0

I'm using the package CormorantGaramond, which changes many of the fonts in my document, i.e. section titles, chapter titles, which I'm happy with. However, I would like to change the font on all of the regular (i.e. body) text in the doc without affecting the section/chapter title fonts and without having to wrap my text in a command.

How can I do this?

MWE:

\documentclass[12pt]{article}
\usepackage{CormorantGaramond}
\title{Nice CormorantGaramond Title}
\author{}

\begin{document}

\maketitle

\section{Nice CormorantGaramond section title}
\subsection{Nice CormorantGaramond subsection title}
I want all of this text to be computer modern.

\end{document}
  • You want titles in Computer Modern and the body font in Cormorant Garamond? This will look horrible! – Bernard Aug 27 '18 at 15:09
  • No, the other way round! I want the body to be CM and the titles Cormorant Garamond.... – Akoben Aug 27 '18 at 15:10
1

Most titles use \normalfont, which in this case is CG. \maketitle does not. You can switch back and forth using \normalfont and \cmfont if needed.

\documentclass[12pt]{article}
\edef\cmfamily{\familydefault}
\usepackage{CormorantGaramond}
\title{Nice CormorantGaramond Title}
\author{}

\newcommand{\cmfont}{\usefont\encodingdefault
  \cmfamily
  \seriesdefault
  \shapedefault
  \relax}

\begin{document}
\maketitle
\cmfont

\section{Nice CormorantGaramond section title}
\subsection{Nice CormorantGaramond subsection title}
I want all of this text to be computer modern.

{\normalfont But this is in CormorantGaramond}

\end{document}
  • I want the section/subsection etc fonts to be CormorantGaramond (which they are, the package does that), but I want the body text to all be CM. Ideally without having to wrap every bit of body text in {\command } as my document is 150 pages long! – Akoben Aug 27 '18 at 17:39
  • 1
    It should stay in \cmfont unless you take it out. Most uses of \normalfont are done inside groups, so the change is local to the group. – John Kormylo Aug 27 '18 at 22:36

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.