2

This question already has an answer here:

Consider the following minimal example:

% !TEX program = xelatex
\documentclass{article}

\usepackage{fontawesome}

\begin{document}
\faTwitter{} Some Text \faLinkedin
\end{document}

On my MacTeX 2016 basic system (up to date), the icons are missing in the PDF and I get the following error message:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
/usr/local/texlive/2016basic/texmf-dist/tex/latex/fontawesome/fontawesome.sty:45: fontspec error: "font-not-found"
! 
! The font "FontAwesome" cannot be found.
! 
! See the fontspec documentation for further information.
! 
! For immediate help type H <return>.
!...............................................

The example does work when I change the engine to

% !TEX program = latex

or

% !TEX program = luatex

I don't have the font installed on my system because according to the documentation the package should use the font bundled with the package (which obviously works with latex and luatex, but not with xelatex).

marked as duplicate by Jonathan Komar, Stefan Pinnow, Kurt, diabonas, barbara beeton Oct 24 '17 at 0:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • On linux and similar systems xetex can't find fonts in the texmf tree by name unless you add them first to your fontconfig configuration. See tug.org/texlive/doc/texlive-en/texlive-en.html#x1-340003.4.4 and e.g. tex.stackexchange.com/questions/257231/…. – Ulrike Fischer Jan 27 '17 at 10:15
  • These instructions only work for Linux systems. I didn't find this information on the MacTeX website - could you point me to the relevant steps? – cbrnr Jan 27 '17 at 10:35
  • Hm. Isn't a mac a linux system? In any case I have windows, so can't help you with the details. – Ulrike Fischer Jan 27 '17 at 10:41
  • No, not really - they're both Unix, but differ in many aspects. Thanks anyway, I guess since this is a xelatex-related issue, I'll just switch to lualatex, which works just fine :-). – cbrnr Jan 27 '17 at 10:43
  • Sure what I mean: both are unix and the fontconfig should work similar. – Ulrike Fischer Jan 27 '17 at 10:58
1

As already mentioned here, all I had to do to get it to work with xelatex was install the FontAwesome font on my machine (e.g. by downloading it from here and installing the file FontAwesome.otf).

Not the answer you're looking for? Browse other questions tagged or ask your own question.