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.
polyglossia
andfontspec
only, declaring the font with\setmainfont[Script=Cyrillic,Language=Serbian]{CMU Serif}
shows the same problem with\textsc
. No problem ifLanguage
is set toRussian
.