1

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}
6
  • What errors would that be?
    – LaRiFaRi
    Jun 27, 2018 at 11:15
  • "If you use XeLeLaTeX or LuaLaTeX, you can also directly download the new Desktop Fonts from fontawesome.com into your TeX tree. If you save them with the filenames FontAwesome5Brands-Regular-400.otf FontAwesome5Free-Regular-400.otf FontAwesome5Free-Solid-900.otf you can start using the new files right away."
    – LaRiFaRi
    Jun 27, 2018 at 11:17
  • Yes I use lualatex, but where do I store the otf files, how do I install the fontawesome5 package, how do I call the icons, etc? The errors are related to not being able to find the sty files or the icons...
    – DaniCee
    Jun 27, 2018 at 11:29
  • Ubuntu 16.04 comes with TeXLive 2015 while fontawesome5 is not supported before TeXLive 2017. Even if you manually install the package, it probably fails because expl3 and LuaTeX are too old. Instead I recommmend installing a "vanilla" TeXLive to get current packages, see tex.stackexchange.com/questions/1092/… on how to do this. With TeXLive 2018, fontawesome5 is available by default and your second example just works. Jun 27, 2018 at 18:18
  • OK let me try this
    – DaniCee
    Jun 28, 2018 at 1:52

1 Answer 1

1

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
26
  • Have you tested this without downloading the fonts too? As maintainer of fontawesome5 I would be very surprised if downloading the free fonts without renaming the files would make any difference. Jun 27, 2018 at 18:22
  • Yes, always no problem
    – user2478
    Jun 27, 2018 at 18:34
  • OK but where do I place the fonts, how do I install the fontawesome5 package, etc? Could you provide a full answer with an example?
    – DaniCee
    Jun 28, 2018 at 1:42
  • I have followed the steps to get the newest texlive in tex.stackexchange.com/questions/1092/… It still complains with error File fontawesome5.sty not found... Is my system still making use of the old texlive installation (the one I installed from the repositories)?
    – DaniCee
    Jun 28, 2018 at 5:53
  • 1
    So at the end I installed Ubuntu 18.04 (with much trouble) almost only for this, but it still does not have the latest version of fontawesome (though it works perfect with fontawesome5 and the MWE above). I confirm I downloaded the latest Desktop version of fontawesome5 and placed the otf files in /usr/share/texlive/texmf-dist/fonts/opentype/public/fontawesome5, I did have to change the file names to remove the spaces, then run sudo texhash, and it worked!
    – DaniCee
    Jul 7, 2018 at 5:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .