[Tex/LaTex] FontAwesome font not found

fontawesomefontsluatexxetex

I'm using the latest version of MacTeX 2013 on OS X 10.8.4. All of my Tex Live packages are fully up-to-date. Tex Live also lists the fontawesome package as installed.

I'm trying to use the FontAwesome font with XeLatex or LuaLatex and getting font-not-found errors. The exact message is:

kpathsea: Running mktexmf FontAwesome
! I can't find file `FontAwesome'.

There's a longer traceback which I am omitting for brevity. Let me know if it's needed to resolve this problem.

I have already tried running the following commands, to no avail:

sudo -H mktexlsr
sudo -H updmap-sys

Other than the above two commands, this is a 100% new out-of-the-box installation, with no modifications whatsoever.

Here's a minimal broken example:

\documentclass{article}
\usepackage{fontawesome}

\begin{document}
\faTwitter
\end{document}

How can I add this missing font?

Edit (Q1 2021): Please see Justin Curry's answer regarding an update to the package name from fontawesome to fontawesome5.

Best Answer

On my MacBook (running MacTeX 2013 under MacOSX 10.7.5), your example compiles correctly under LuaLaTeX if I add the instruction \usepackage{fontspec}:

enter image description here

% !TEX TS-program = lualatex
\documentclass[border=2pt]{standalone}
\usepackage{fontspec}
\usepackage{fontawesome}
\begin{document}
\faTwitter
\end{document}

Addendum: After I downloaded the OpenType version of this font -- BTW, the version at http://fortawesome.github.io/Font-Awesome/ seems to be slightly newer than the one on the CTAN -- and "activated" it by opening it in the FontBook application and clicking on the "Install" button, the MWE above also compiles correctly under XeLaTeX. This is not exactly surprising, I suppose, as Xe(La)TeX depends heavily on the underlying operating system for activities such as loading fonts.


Addendum, mid-February 2020: The demo document shown above continues to work correctly under LuaLaTeX when run under TeXLive2019 or MacTeX2019. To get it to compile under XeLaTeX, you will probably need to insert the instruction

\defaultfontfeatures{Path = /usr/local/texlive/2019/texmf-dist/fonts/opentype/public/fontawesome/}

between the instructions \usepackage{fontspec} and \usepackage{fontawesome}.

The file FontAwesome.otf that's distributed with MacTeX2019 has version number 4.6.3. There is a slightly newer version of the OpenType font file -- version 4.7.0, to be precise -- on github. Both 4.6.3 and 4.7.0 date back to 2016. A minor caveat: I haven't actually tested out the slightly newer version of FontAwesome.otf. However, I believe it should be compatible with the fontawesome package.