I am trying to compile resume.tex that uses awesome-cv class following this resume template. I get the following error:
usr/local/texlive/2016/texmf-dist/tex/latex/public/fontawesome/fontawesome.sty: 45: font spec error: "font-not-found"
The font "FontAwesome" cannot be found.
l.45 \newfontfamily{\FA}{FontAwesome}
The problem arises on line 77 of awesome-cv.cls when running this line: \RequirePackage{fontawesome}. This problem has been mentioned in this question. I tried the following lines of code in a test.tex file and was able to run it where these three options all worked: LaTeX, XeTex and LuaLaTex.
\documentclass{article}
\usepackage{fontspec}
\usepackage{fontawesome}
\begin{document}
\faTwitter
\end{document}
My confusion is that how come I can run the above lines of codes successfully, but TeXShop fails to require the same package when I run resume.tex. Adding a path (below) as suggested by one of the solutions from here didn't work either.
\defaultfontfeatures{
Path = /usr/local/texlive/2016/texmf-dist/fonts/opentype/public/fontawesome/ }
PS: I just downloaded and installed the newest distributions of mactex.
Thanks for your help
UPDATE:
Beside resume.tex, I have a class file named awesome-cv.cls and also fontawesome.sty and a fonts folder that contains files such as FontAwesome.ttf, Roboto-Bold.ttf, etc. If I run resume.tex in latexshare website using LuaLaTex, it works without any problem. By putting fontawesome.sty and fonts folder and referring to them in awesome-cv.cls, we make sure we are using the right file. Now, if I try that in my MacBook Pro, I get this error (yellowish message) where the problem happens at Line 12 of fontawesome.sty when it is called in awesome-cv.clos:
% Define shortcut to load the Font Awesome font.
\newfontfamily{\FA}{FontAwesome}
***: If I erase fontawesome.sty and fonts folder, I get a very similar error this time stating the installed location of fontawesome package:
usr/local/texlive/2016/texmf-dist/tex/latex/public/fontawesome/fontawesome.sty: 45: font spec error: "font-not-found"
The font "FontAwesome" cannot be found.
l.45 \newfontfamily{\FA}{FontAwesome}

xelatexyou can installfontawesomeas a system font. – Bernard Dec 25 '16 at 23:05fontawesomeas a system font if I runTeXShopusingxelatex? I run it and it gives me the same error. – ahoosh Dec 25 '16 at 23:12resume.texitself. – Bernard Dec 25 '16 at 23:16fontawesomepackage specifically in\newfontfamily{\FA}{FontAwesome}insidefontawesome.sty. I am not sure it's due to a problem inresume.tex– ahoosh Dec 26 '16 at 00:42fontawesomepackage and use, viz.\faTwitter? – Bernard Dec 26 '16 at 00:53\newfontfamily{\FA}{FontAwesome}insidefontawesome.styraises an error when being called fromawesome-cvclass, but works fine if I load the package in other conditions. I guess somehow the path is not detected in that case. – ahoosh Dec 26 '16 at 04:39/tex/latex/public/fontawesome/. Did you copy some local version there? – Ulrike Fischer Dec 26 '16 at 12:31fontawesomeis not in a public folder, why does\faTwitterexample works? If that is the case. should I emphasize aPATHusing something like\newfontfamily{\FA}[PATH]{FontAwesome}insidefontawesome.styor I need to make a public folder with the fonts? – ahoosh Dec 26 '16 at 19:15LuaLaTex– ahoosh Dec 26 '16 at 19:17UPDATEsection and covered the error. It is strange! It is working fine insharelatex. Also, I can loadfontawesomeand use it for other tasks! – ahoosh Dec 27 '16 at 17:57.zipfiles from unknown sources. – cfr Dec 27 '16 at 21:08fontawesome.sty. – cfr Dec 27 '16 at 23:04\newfontfamily\FA[Path=\@fontdir]{FontAwesome}which is not going to work well ... If you insist, try commenting out that line. – cfr Dec 27 '16 at 23:12XeLaTeX, I get an error similar to the error I get when runningresume.texwhich happens at l12\newfontfamily{\FA}{FontAwesome}– ahoosh Dec 30 '16 at 17:58LuaLaTeX, it works perfectly and the location offontawesomeis atusr/local/texlive/2016/texmf-dist/fonts/opentype/public/fontawesome/FontAwe some.otf. Doesn't that tell us that the installation is fine? – ahoosh Dec 30 '16 at 18:00\newfontfamily\FA[Path=\@fontdir]{FontAwesome}, I agree with you. I have afontsfolder beside.texfile. The same combination works fine insharelatex. Currently I am running it there, but I am baffled why it does not work on my laptop. – ahoosh Dec 30 '16 at 18:04fontspecmanual to see what it says about the use ofPathwith XeTeX? – cfr Dec 31 '16 at 14:37