1

I'm using the moderncv template and I cannot change the font.

I'm looking at https://www.overleaf.com/articles/slash-fontspec-all-the-fonts/qnsxyhrgjsgs for my fonts. Using \setmainfont does not work.

I'd also like to change section fonts, similar to this solution: Change body font in moderncv without affecting the other fonts, but I don't understand what his \fontfamily{pzc} is doing or how to adapt it for a font from above.

  • pcz in \fontfamily{pzc} is a shorthand for the postscript font Zapf Chancery. You can use the fontspec font selection commands in its stead. But in order to help you more, we need to see some code, i.e. a minimal working example (MWE) – DG' Nov 6 '18 at 15:51
0

Building on the solution you linked to (→ Change body font in moderncv without affecting the other fonts), I found that the following works:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}

\usepackage{fontspec}
\setmainfont{FiraSans}

\firstname{John}
\familyname{Doe}
\title{CV}
\address{Baker Street}{Southampton}
\mobile{+1~(234)~567~890}
\phone{+2~(345)~678~901}
\fax{+3~(456)~789~012}
\email{john@doe.org}
\homepage{www.johndoe.com}

\renewcommand*\namefont{\fontspec{FiraSans}\fontsize{40}{48}\selectfont}
\renewcommand*\titlefont{\fontspec{FiraSans}\fontsize{20}{24}\selectfont}
\renewcommand*\addressfont{\fontspec{FiraSans}\selectfont}
\renewcommand*\sectionfont{\fontspec{FiraSans}\fontsize{20}{24}\selectfont}

\begin{document}
  • This works for me, but not for FiraSans in particular. Not a huge deal, as this does seem to work with most fonts from my list. Thanks! – Cobalt_000 Nov 6 '18 at 18:32

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.