[Tex/LaTex] Windows logo from fontawesome does not work

fontawesome

I was looking at an answer here that suggests to use Font Awesome to get the Windows logo: Is the Windows logo available?

However it does not seem to work here, and when I copy/paste the code I don't get any logo. Could you explain how to use the Windows logo from fontawesome?

\documentclass{article}
\usepackage{fontspec,fontawesome}

\newcommand{\faWindows}{\FA\symbol{"F17A}}
\newcommand{\faLinux}{\FA\symbol{"F17C}}
\newcommand{\faApple}{\FA\symbol{"F179}}

\begin{document}

\verb|Windows:| \faWindows \par
\verb|Linux  :| \faLinux \par
\verb|Apple  :| \faApple

\end{document}

Best Answer

You seem to be using an outdated version of the Font Awesome font (maybe the one that comes with the CTAN package).

There two ways to fix this.

Adding the updated version of FontAwesome to the texmf-tree

Download the fontawesome latest version from their site: http://fortawesome.github.io/Font-Awesome/

Extract the FontAwesome.otf file and put it into the TeX Live tree

<your-texlive-path>/texmf-local/fonts/opentype/public/fontawesome/FontAwesome.otf

If there is no such directory, create it.

Install the updated version of the font as a system font

This depends on your OS, in OpenSUSE you need to search in the package manager and it will install the font for you.

The system font should take precedence over the TeX Live font (I think...)

At this point you can compile your MWE:

\documentclass{article}
\usepackage{fontspec,fontawesome}

\newcommand{\faWindows}{\FA\symbol{"F17A}}
\newcommand{\faLinux}{\FA\symbol{"F17C}}
\newcommand{\faApple}{\FA\symbol{"F179}}

\begin{document}

\verb|Windows:| \faWindows \par
\verb|Linux  :| \faLinux \par
\verb|Apple  :| \faApple

\end{document}

And it will work