since I am working on my CV using moderncv, I was wondering if it is possible to change the icons used in the header. These icons are from the package marvosym. As indicated by this question moderncv – non marvosym symbols, you can use the fontawesome-package.
\documentclass{article}
\usepackage{fontawesome}
\begin{document}
\faTwitter
\faLinkedin
\faLinkedinSign
\end{document}
Seems to be easy, but unfortunately I receive an error message even if I compile with xelatex or lualatex. The error indicates the following:
! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
Both xelatex and lualatex are functioning well with other codes. Hence, I do not know what's the problem. However, I would really like to use the icons from the fontawesome-package.
Does anybody has an idea?
Thank you very much in advance,
Phil
Best Answer
My example:
run with
xelatex
orlualatex
The otf version of FontAwesome is saved in the TeXLive path which is by default not searched by
xetex
.luatex
uses its own font handling and will find the file. One can test it:if there is no output then
xelatex
will not find the font. In a file~/fontconfig/fonts.conf
I havewhich tells
fontconfig
also to search for fonts in/usr/local/texlive/current/...
.current
is always a link which points to the current TL version. After creating that file runfc-cache -fv
.Test your file with
lualatex
, it should generate the font list by default if it doesn't find awesome. Or runluaotfload-tool --update --force
before testinmg it withlualatex