[Tex/LaTex] Moderncv change date font

fontsmoderncv

I would like to change the font of the date column if possible in moderncv. If that is not possible how do i change the font of the whole resume?

Best Answer

Sure it's possible. moderncv uses \cventry to typeset the information, so you can redefine this command (original definition in moderncvbodyi.sty) and add the required font modification for the date (the second argument). For example, to typeset the dates using the Zapf Chancery fonts in \footnotesize you would need

\renewcommand*{\cventry}[7][.25em]{%
  \cvitem[#1]{{\fontfamily{pzc}\footnotesize\selectfont#2}}{%
    {\bfseries#3}%
    \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
    \ifthenelse{\equal{#5}{}}{}{, #5}%
    \ifthenelse{\equal{#6}{}}{}{, #6}%
    .\strut%
    \ifx&#7&%
    \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}

A complete example:

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

\renewcommand*{\cventry}[7][.25em]{%
  \cvitem[#1]{{\fontfamily{pzc}\footnotesize\selectfont#2}}{%
    {\bfseries#3}%
    \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
    \ifthenelse{\equal{#5}{}}{}{, #5}%
    \ifthenelse{\equal{#6}{}}{}{, #6}%
    .\strut%
    \ifx&#7&%
    \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}


\name{John}{Doe}

\begin{document}

\section{Education}
\cventry{1920--1950}{Degree}{Institution}{City}{\textit{Grade}}{Description}  \cventry{1920--1950}{Degree}{Institution}{City}{\textit{Grade}}{Description} 

\end{document}

The result:

enter image description here