[Tex/LaTex] How to transition best from fontawesome (4) to fontawesome5 in an article

fontawesomefontsinstallinginstalling-fontspackages

I have an old article in which I use fontawesome icons from version 4.7.

In Ubuntu 16.04, I had installed font-awesome (v4.5) and texlive-fonts-extra from the repositories. Then I downloaded the fontawesome 4.7 font from the fontawesome website, and placed the new FontAwesome.otf file at /usr/share/fonts/opentype/font-awesome

This allowed me to use icons in newer releases of fontawesome.

Now fontawesome5 has come up and everything is different, and I do not seem to be able to make it work.

So what would be the best practice to have fontawesome5 up and running?

Please assume I have no idea, walk me through how to install the fontawesome5 package and the fonts.

This is my old MWE:

\documentclass{article}
\usepackage{fontawesome}
\newfontfamily{\FA}{FontAwesome}
%1 - Install font-awesome and texlive-fonts-extra from the repositories
%2 - If you want to use the latest, download font awesome latest version from http://fortawesome.github.io/Font-Awesome/
%3 - Uncompress and copy the FontAwesome.otf file to the following location, replacing current file
%sudo cp FontAwesome.otf /usr/share/fonts/opentype/font-awesome/FontAwesome.otf
%4 - Call symbols newer than your previous version separately
\newcommand\faUserCircle{{\FA\symbol{"F2BD}}}
\newcommand\faIdCard{{\FA\symbol{"F2C2}}}

\begin{document}
some symbols:\\
\faEnvelope\\
\faSkype\\


new symbols:\\
\faUserCircle\\
\faIdCard\\

\end{document}

which produces:

image1

I want to reproduce it with fontawesome5, including some icon that is new to that release.

I tried the following, but it gives me multiple errors, so I guess I did not install the package or fonts correctly.

\documentclass{article}
\usepackage{fontawesome5}

\begin{document}
some symbols:\\
\faEnvelope\\
\faSkype\\


new symbols:\\
\faUserCircle\\
\faIdCard\\

\end{document}

Best Answer

No problem with up-to-date TL2018 and your example. I downloaded the fonts and did not changed the original file names. With LuaLaTeX:

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
YJJRQL+LMRoman10-Regular             CID Type 0C       Identity-H       yes yes yes      4  0
IXHJTI+FontAwesome5FreeSolid         CID Type 0C       Identity-H       yes yes yes      5  0
QQOXUN+FontAwesome5BrandsRegular     CID Type 0C       Identity-H       yes yes yes      6  0

I installed TeXLive on Ubuntu with the following steps:

  • first remove the complete Ubuntu/Debian TeXLive installation with sudo apt remove texlive-full If it will delete also an TeX editor, then say yes.
  • Create the texlive directory with sudo mkdir /usr/local/texlive
  • Set the permission for texlive to the user and not root (makes installtion/updates easier) with sudo chown <USER> /usr/local/texlive Replace <USER> with your username
  • Now run wget https://github.com/scottkosty/install-tl-ubuntu/raw/master/install-tl-ubuntu && chmod u+x ./install-tl-ubuntu
  • As an alternative get first the install script with wget https://github.com/scottkosty/install-tl-ubuntu/raw/master/install-tl-ubuntu and change the permission with chmod u+x ./install-tl-ubuntu
  • Now we can run the install script as a user: ./install-tl-ubuntu
  • in the end you should have an up-to-date TeXLive 2018
  • now install your favorite editor as usual.
  • that's all