Sometimes I use the fontawesome5
icons in a block of text set in all uppercase. When I do this I'll letterspace that text with microtype
's \textls{}
or \lsstyle
(depending on the macro) to increase readability. This breaks the icons, in that they are not displayed in the final output. A minimal working (broken) example is given below.
As you can see, the icons aren't affected by bold or italic conversions. The sizing commands (\small
, \large
etc.) also make no difference — I didn't included them in the MWE to keep it small.
This problem doesn't exist if I use the fontawesome
package, which loads the fontawesome 4.x set of icons.
With fontawesome5
i get the following error:
...standalone.cls:18: Missing number, treated as zero. [\textls{Hello \faGlobe}]
I get the following warning when compiling with both fontawesome
and fontawesome5
:
...standalone.cls: Package microtype Warning: Unknown slot number of character(microtype) `\`A'(microtype) in font encoding `TU' in inheritance list(microtype)
Any idea what is happening or where am I going wrong here?
MWE
%!TEX program = lualatex
\documentclass[varwidth]{standalone}
\usepackage{fontawesome5}
\usepackage{microtype}
\begin{document}
Hello \faGlobe
\textbf{Hello \faGlobe}
{\bfseries Hello \faGlobe}
\textit{Hello \faGlobe}
{\itshape Hello \faGlobe}
\textls{Hello \faGlobe}
{\lsstyle Hello \faGlobe}
\end{document}
Output