2

I am using a fantastic template to try and generate a CV. I have installed Tex Live 2016 this morning.

When I try and compile the cv.tex document, I am prompted with the following error:

"fontspec error: "font-not-found" The font FontAwesome cannot be found...." 

on Line 164. The document successfully compiles with the Educations, Skills, Experience sections but does not include the heading (persons name and contact details).

Following this link, I tried to place the relevant .ttf files in my local directory, using

~texmf\tex\xelatex\fonts\truetype\awesomefont

But this has not helped.

A contributor to the github document informed me that the fontawesome package is installed with a default TeX Live installation. As said here. He then suggested I compile the following example

\documentclass{article}
\usepackage{fontspec}
\RequirePackage{fontawesome}
\begin{document}
\faCodeFork
\end{document}

For which I generate a blank document. So where must I place the .sty or .ttf files so the document can be successfully compiled?

lukeg
  • 211
  • Does latex actually know the font is there? Can it be found using kpsewhich also doesn't fontspec use the font cache to look for fonts? Thus that has to be updated. – daleif Apr 02 '17 at 11:18
  • [Crosslink]https://github.com/posquit0/Awesome-CV/issues/115) – Johannes_B Apr 02 '17 at 11:19
  • Since fontawesome should already be in tl16, that extra stuff you've added might confuse latex. What does the mwe say if you rename that ~/texmf folder? (to make xelatex ignore it). – daleif Apr 02 '17 at 11:22
  • the MWE ran and exited normally, but only generated a blank page – lukeg Apr 02 '17 at 11:26
  • and I have since deleted awesomefont from ~texmf\ – lukeg Apr 02 '17 at 11:27
  • and a search of ´fontawesome´ within tex live 2016 directory shows it has been installed – lukeg Apr 02 '17 at 11:43
  • Have you refreshed your filename database? Or tried to place the ttfs in the same folder as the document? – TeXnician Apr 02 '17 at 11:55
  • the solution by macmadness86 provides a MWE to generate the twitter logo http://tex.stackexchange.com/questions/132888/fontawesome-font-not-found . Now I am just trying to include that into the cv.tex document. But I am not sure why the name (in large letters) is still not being generated – lukeg Apr 02 '17 at 12:04
  • Did you try installing fontawesome as a system font? xelatex can use them. – Bernard Apr 02 '17 at 12:30

1 Answers1

1

As outlined in this solution by @macmadness86, the MWE above needs to be slightly edited, so that:

\listfiles
\documentclass{article}
\usepackage{fontspec}

%\defaultfontfeatures{
%  Extension = .otf
%}
%\usepackage{fontawesome}
\newfontfamily\fatest{FontAwesome.otf} % Explicitly provide .otf
%or
%\newfontfamily\fatest[Extension=.otf]{FontAwesome}


\begin{document}
    %\faTwitter This is a test
    {\fatest\char"F099} This is a test
\end{document}

And more specifically within the cv.texfile, one must dive into the awesome-cv.cls file and change:

\newfontfamily\FA[Path=\@fontdir]{FontAwesome}

to

\newfontfamily\fatest{FontAwesome.otf}

and

\newfontfamily\headerfont[
  Path=\@fontdir,

to

\newfontfamily\headerfont[
  Path=/usr/local/texlive/2016/texmf-dist/fonts/opentype/public/fontawesome/
lukeg
  • 211