I'd like to type my CV/resume form Friggeri's template (http://www.latextemplates.com/template/friggeri-resume-cv) that is based on Helvetica Neue fonts which I do not have on my computer and the package 'fontspec'. In the class file friggeri-cv.cls, the Helvetica fonts are called by:

\newfontfamily\bodyfont[]{Helvetica Neue}
\newfontfamily\thinfont[]{Helvetica Neue UltraLight}
\newfontfamily\headingfont[]{Helvetica Neue Condensed Bold}

\setmainfont[Mapping=tex-text, Color=textcolor]{Helvetica Neue Light}

I've made a few conclusive tries with TrueType/OpenType fonts installed on my computer (e.g., Calibri) but I'd like to use Computer Modern instead since I do prefer this font. Replacing Helvetica Neue by cmr or cmss on the go (e.g.,

% ...
\setmainfont[Mapping=tex-text, Color=textcolor]{cmss}

don't work because he can't find the fonts (of course I do not have a TrueType version of Computer Modern/Latin Modern) and replacing the code by

%\newfontfamily\bodyfont[]{Helvetica Neue}
%\newfontfamily\thinfont[]{Helvetica Neue UltraLight}
\def\thinfont{\sf\sl}    %not exactly what I'm looking for but to ensure the command responds
%\newfontfamily\headingfont[]{Helvetica Neue Condensed Bold}

\defaultfontfeatures{Mapping=tex-text, Color=textcolor}
%\setmainfont[Mapping=tex-text, Color=textcolor]{Computer Modern Roman}

gets me this error when I compile:

! TeX capacity exceeded, sorry [input stack size=5000].
\font@name ->
l.35 \section{contact}

I'm quite new with XeLaTeX and I'm looking for a (preferably simple and straightforward) way to rewrite this part of the Friggeri CV template to use "native" Computer Modern fonts instead of TT/OT fonts. The Cls file can be retrieved at the URL above and here is a shortened and bib-free version of Friggeri's example code :


\header{john}{smith}{junior business analyst} 

\begin{aside} % In the aside, each new line forces a line break
123 Broadway
City, State 12345
english mother tongue
spanish \& italian fluency


{Masters {\normalfont of Commerce}}
{The University of California, Berkeley}
{Thesis explored the idea that money...}
{Bachelor {\normalfont of Business Studies}}
{The University of California, Berkeley}
{Specialization in Commerce}


{Los Angeles, California}
{\emph{1\textsuperscript{st} Year Analyst} \\
Developed spreadsheets for risk analysis.}

Thanks in advance for any help.

  • 1
    Use Latin Modern Roman and Latin Modern Sans, or CMU Serif and CMU Sans, not cmr and cmss. – egreg Dec 11 '14 at 12:28
  • Why don't yiu have TT Latin Modern fonts? These should come with every TeX distribution – MaxNoe Dec 11 '14 at 12:30
  • Doing font stuff is generally more complicated in LaTeX than in XeLaTeX, so I recommend you use the CMU .ttf fonts. – Sverre Dec 11 '14 at 15:42
  • Thank you for your very usefull answers. I'm actually a total noob at Xe(La)TeX and although I've been using LaTeX since 8 years or so, I only used CMR fonts which I find the most confortable to read but if I had had Helvetica on my PC, I wouldn't have tried to change it in the first place. I finally used an OT version of Latin Modern (I seriously didn't know that such was provided) Thanks again, an I think I'll go back to my metafonts and PSTricks! – Julien Dec 11 '14 at 22:09
  • @egreg I would have suggested exactly the same. Do you want to write up an answer? – Johannes_B Oct 7 '15 at 10:54

Package fontspec wants to have the name of the font. For Computer modern, this is CMU Serif and CMU Sans.

The Latin Modern fonts provide an enhancement of Computer Modern, including many carefully designed diacritics. If you need more letters than the english alphabet uses, LM is recommended. This would be Latin Modern Roman and Latin Modern Sans.

You can also use Latin Modern Mono if you need a mono-spaced font.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.