0

CMU bold small capitals work for me with \usepackage[T1]{fontenc} but not with \usepackage{fontspec}. Is there a way to get a separate CMU font that only has small capitals? When I buy fonts they come with separate files for small capitals and that works fine with fontspec.

Edit

\documentclass{report}
\usepackage{fontspec}

\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}
10
  • Please tell us how you load CMU at present using commands of the fontspec package.
    – Mico
    Mar 14, 2021 at 5:55
  • @Mico Please see update. I am only trying to use bold small capitals from CMU. The output is bold but not small caps. Mar 14, 2021 at 6:15
  • Does tex.stackexchange.com/a/334406/87678 help? Mar 14, 2021 at 6:22
  • (The CMU opentype fonts include small caps as an open type feature, not as a separate font, btw) Mar 14, 2021 at 6:25
  • @DavidPurton I tried using the Terminal commands from the linked answer. The first one was executed but the second was not. fc-cache command not found. So at this point it still doesn't work. Mar 14, 2021 at 6:29

2 Answers 2

4

You have to set the features for small caps in a boldface context.

\documentclass{report}
\usepackage{fontspec}

\setmainfont{Latin Modern Roman}[
  BoldFeatures = {
    SmallCapsFont = CMU Serif Bold Extended Roman,
    SmallCapsFeatures={Letters=SmallCaps},
  },
  SmallCapsFont = Latin Modern Roman Caps,
]

\begin{document}

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

\end{document}

enter image description here

2

Latin Modern Roman font does not include a bold small caps variant.

You can use the CMR Unicode font.

This should work with both xelatex and lualatex:

\documentclass{article}    
\usepackage{fontspec}    
\setmainfont{CMU Serif}    
\begin{document}    
\scshape small caps \bfseries bold small caps    
\end{document}

output

You must log in to answer this question.

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