2

When compiled, the following code works perfectly.

\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\defaultfontfeatures{Mapping=tex-text}
\setdefaultlanguage{english}
\setmainfont{CMU Serif}
\begin{document}
абц АБЦ \textsc{абц} \textit{абц} \textsl{абц}

abc ABC \textsc{abc} \textit{abc} \textsl{abc}
\end{document}

However, if I change english to serbian

\setdefaultlanguage{serbian}

then I get the warning

LaTeX Font Warning: Font shape `EU1/CMUSerif(2)/m/sc' undefined
(Font)              using `EU1/CMUSerif(2)/m/n' instead on input line 8.

and small caps do not show correctly. How can I get small caps working in serbian documents (using both Cyrillic and Latin script)?

EDIT: I noticed that if I use

\setdefaultlanguage[Script=Latin]{serbian}

small caps work correctly, and the problem shows up only if I use

\setdefaultlanguage[Script=Cyrillic]{serbian}

which is the default option.

6
  • Do small caps make sense in Cyrillic texts?
    – egreg
    Oct 10, 2015 at 18:00
  • Why not? I need to achieve the following effect Cyrillic Small Caps Oct 10, 2015 at 18:23
  • Even the Paratype fonts don't have small caps for Cyrillic
    – egreg
    Oct 10, 2015 at 19:59
  • It seems that CMU Serif font that I use here does support Cyrillic small caps, since everything displays correctly when the language is set to english. output.pdf Oct 10, 2015 at 20:14
  • I suppose it's a problem on the font side, because without polyglossia and fontspec only, declaring the font with \setmainfont[Script=Cyrillic,Language=Serbian]{CMU Serif} shows the same problem with \textsc. No problem if Language is set to Russian.
    – egreg
    Oct 10, 2015 at 20:28

1 Answer 1

1

I found a solution that works. Since the problem is in the Language/Script combination, I temporary switch to the default language for all small caps.

\setmainfont{CMU Serif}[SmallCapsFont={CMU Serif},
                        SmallCapsFeatures={Language=Default,Letters=SmallCaps}]

If there are any better solutions, please describe them.

You must log in to answer this question.

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