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.

2
  • 2
    You might have a look at New Computer Modern.
    – Davislor
    Oct 24, 2020 at 20:17
  • Add SmallCapsFeatures={Letters=SmallCaps}. Oct 24, 2020 at 20:17

1 Answer 1

3
+100

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.

14
  • It didn't work for me. See update. Oct 24, 2020 at 20:38
  • I will look at New Computer Modern. Oct 24, 2020 at 20:39
  • 1
    @simplejack The warning you’re getting about Latin Modern Roman Caps lacking the scmp OpenType feature is harmless. You can, however, suppress it by moving the SmallCapsFeatures={Letters=SmallCaps} option within the BoldFeatures, ItalicFeatures and BoldItalicFeatures blocks.
    – Davislor
    Oct 24, 2020 at 21:05
  • @simplejack I edited in a fix to suppress the warnings.
    – Davislor
    Oct 24, 2020 at 21:08
  • The issue is that the output doesn't have bold small caps ... Oct 24, 2020 at 21:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .