2

I want to use bold small capitals from CMU Serif while setting Latin Modern as my main font.

Minimal working example

\documentclass{report}
\usepackage{mathspec}

\setmainfont{Latin Modern Roman 10 Regular}[ BoldFeatures = {SmallCapsFont = {CMU Serif Bold}}, SmallCapsFont = Latin Modern Roman Caps]

\begin{document}

Roman. \textbf{Bold.} \textsc{Small capitals.} \textbf{\textsc{Bold small capitals.}}

\end{document}

Output

Output

Errors

Errors

How can I resolve these errors? Bold small capitals from CMU Serif work fine when I'm not using fontspec.

Edit. Maybe I can adapt this answer? I know how to do import a symbol from mathabx but not from CMU Serif. I will just be using bold small capitals for heading numbers, so it doesn't matter if I have to define new symbols.

1 Answers1

3

As Ulrike Fischer said in her comment, you’re correctly selecting the small caps font but need to also select its small-caps feature. You also need a few more lines to enable slanted small caps.

\documentclass{report}
\usepackage{fontspec}

\setmainfont{Latin Modern Roman}[ SmallCapsFont = Latin Modern Roman Caps, UprightFeatures = {SmallCapsFeatures = {}}, % Suppresses warning about missing smcp feature. BoldFeatures = {SmallCapsFont = {CMU Serif Bold}}, ItalicFeatures = {SmallCapsFont = {CMU Serif Roman Slanted}}, BoldItalicFeatures = {SmallCapsFont = {CMU Serif Bold Slanted}}, SmallCapsFeatures={Letters=SmallCaps}]

\begin{document} Roman font. \textbf{Bold font.} \textsc{Small caps font.} \textbf{\textsc{Bold small caps font.}}

\itshape Italic font. \textbf{Bold font.} 
\textsc{Small caps font.} \textbf{\textsc{Bold small caps font.}}

\end{document}

Latin Modern / CMU Serif sample

You might also try New Computer Modern, which redesigned its small caps.

Davislor
  • 44,045