Serif text with sans-serif headers

Asked by Fredrik Lindgren on 2012-01-09

Hi,

Would it be possible to add the option of using a serif font for the text while a sans-serif font is used for the headers (name, section titles, etc.)? If you specify serif/roman you currently get serif text for everything (with the casual CV style).

Question information

Language:
English Edit question
Status:
Solved
For:
moderncv Edit question
Assignee:
Xavier Danaux Edit question
Solved by:
Xavier Danaux
Solved:
2012-01-10
Last query:
2012-01-10
Last reply:
2012-01-10
Best Xavier Danaux (xdanaux) said : #1

Hi Fredrik,

You can easily change all the fonts used. Here are for example the definitions for the classic style:
\renewcommand*{\namefont}{\fontsize{34}{36}\mdseries\upshape}
\renewcommand*{\titlefont}{\LARGE\mdseries\slshape}
\renewcommand*{\addressfont}{\small\mdseries\slshape}
\renewcommand*{\quotefont}{\large\slshape}
\renewcommand*{\sectionfont}{\Large\mdseries\upshape}
\renewcommand*{\subsectionfont}{\large\mdseries\upshape}
\renewcommand*{\hintfont}{}

Just redefine the font you want to change, adding e.g. \sffamily (for sans serif), \rmfamily (for roman) or explicitly calling a specific font.

Kind regards,

Xavier

Thanks Xavier Danaux, that solved my question.