I've added the fontawesome package from the MiKTeX console, but when trying to create the document in TeXworks using XeLaTeX, I get the following error:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "FontAwesome" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
I'm using Windows 10, and on a previous machine I got my tex file to work as is, but I can't recover whatever configuration I did to make it work. Thoughts?
edit: CLS File
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{cv-roald}[2017/01/30 My custom CV class]
\LoadClass{article}
% --------------------------------- %
% PARAMETERS %
% --------------------------------- %
\newlength{\margin}
\setlength{\margin}{25mm}
\newlength{\leftcol}
\setlength{\leftcol}{0.22\paperwidth}
\newlength{\hdrheight}
\setlength{\hdrheight}{38mm}
\newlength{\vspacepar}
\setlength{\vspacepar}{0.4\baselineskip}
\newlength{\hspaddress}
\setlength{\hspaddress}{1em}
\newlength{\FAspace}
\setlength{\FAspace}{0.2em}
% --------------------------------- %
% PACKAGES %
% --------------------------------- %
\RequirePackage{fontspec}
\RequirePackage{titlesec}
\RequirePackage{tikz}
\RequirePackage{xcolor}
\RequirePackage[margin= \margin]{geometry}
\defaultfontfeatures{ % Important to add, else fontawesome will not work with XeLaTeX
Path = Fonts/}
\RequirePackage{fontawesome}
\RequirePackage{calc}
\RequirePackage{tabularx}
\RequirePackage{enumitem}
\setlist{parsep=1 pt, topsep=1 pt}
\RequirePackage{parskip}
% --------------------------------- %
% CALCULATED LENGTHS %
% --------------------------------- %
\newlength{\hdrskip}
\setlength{\hdrskip}{\hdrheight-\margin}
\newlength{\rightcol}
\setlength{\rightcol}{\paperwidth-\leftcol}
\newlength{\LeftColBody}
\setlength{\LeftColBody}{\leftcol-\margin}
\newlength{\RightColBody}
\setlength{\RightColBody}{\textwidth-\LeftColBody}
% --------------------------------- %
% FONTS %
% --------------------------------- %
\setmainfont{SourceSansPro}[
Path = Fonts/,
Extension = .otf ,
UprightFont = *-Light,
ItalicFont = *-LightIt,
BoldFont = *-Semibold,]
\newfontfamily\titlefont{AdventPro}[
Path = Fonts/,
Extension = .ttf,
UprightFont = *-ExtraLight,
BoldFont = *-SemiBold,
]
% --------------------------------- %
% COLORS %
% --------------------------------- %
\definecolor{maincolor}{RGB}{60, 142, 250}
\colorlet{lightermain}{maincolor!35}
\colorlet{darkermain}{maincolor!90!black}
% --------------------------------- %
% HEADER %
% --------------------------------- %
\newcommand{\sep}{\hspace{\hspaddress} | \hspace{\hspaddress}}
\newcommand{\header}[4]{%
% #1 First name
% #2 Last name
% #3 = Address
% #4 = Phone, mail and LinkedIn
\begin{tikzpicture}[remember picture, overlay]
% Colored bar on top of the page
\node [below right, fill=darkermain, minimum height=\hdrheight, minimum width=\paperwidth, outer sep=0] (name) at (current page.north west) {};
% Node for the name
\node[anchor=base, text=white, inner sep=0.25 cm] (nametext) at (name.base) {%
\fontsize{40pt}{32pt}\color{white}%
{\titlefont #1~}{\titlefont \textbf{#2}\par}
};
% Address
\node[anchor=north, text=lightermain] (address) at (nametext.south) {#3 \par};
% Phone/mail/nationality
\node[anchor=north, text=lightermain] at (address.south) {#4};
\end{tikzpicture}
\vspace{\hdrskip}
}
% --------------------------------- %
% TITLE FORMAT %
% --------------------------------- %
\titleformat{\section}{\titlefont\color{maincolor}\huge\bfseries}{\thesection}{0em}{}
\titlespacing*{\section}{0pt}{1.5ex plus 0.2ex minus .2ex}{-0.5ex plus .2ex}
\newcommand{\worktitle}[2]{
% #1 = Job or education title
% #2 = Company and location
{\bfseries\MakeUppercase{#1}}
{\itshape #2}
}
% --------------------------------- %
% ENVIRONMENTS %
% --------------------------------- %
\newenvironment{tabularcv}{
\tabularx{\textwidth}{@{}>{\raggedright\arraybackslash}p{\LeftColBody}@{}>{\raggedright\arraybackslash}p{\RightColBody}}}{
\endtabularx}
\newenvironment{tabitemize}{
\itemize}{
\vspace*{-\baselineskip}
\enditemize}
% --------------------------------- %
% BODY TEXT OPTIONS %
% --------------------------------- %
\setlength{\parindent}{0pt} % Remove indent at the start of a new paragraph
\setlength{\parskip}{\vspacepar} % adds extra vertical space between paragraphs
Example Body
\documentclass[]{cv-roald}
\begin{document}
\pagestyle{empty} %to remove the page numbers
\header{First}{Last}{\faMapMarker \hspace{\FAspace} Address \sep Title \sep City, State}
{\faMobile \hspace{\FAspace} +1 123 456 7890 \sep \faEnvelope \hspace{\FAspace} abc@xyz.com \sep Other}
\section*{Skills}
\begin{tabularcv}
& \worktitle{Skill}{}
\newline Description
\end{tabularcv}
\section*{Education}
\begin{tabularcv}
Years & \worktitle{Major}{Institution (State)}
\newline Minor
\begin{tabitemize}
\item Details
\end{tabitemize}
\end{tabularcv}
\section*{Projects}
\begin{tabularcv}
& \worktitle{Project Name}{Type}
\newline Description
\\[\vspacepar]
\end{tabularcv}
\section*{Work}
\begin{tabularcv}
2014-2015 & \worktitle{Title}{Company}
\newline Description
\end{tabularcv}
\end{document}