I am trying to typeset a multi-language unicode document (English, German, Spanish, Russian and there are more languages to come) in XeLaTeX and I am struggling with Cyrillic letters. Consider the following example:
\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{russian}
\begin{document}
\noindent
\textrm{Hello! Привет!}\\
\textit{Hello! Привет!}\\
\textsl{Hello! Привет!}\\
\textsc{Hello! Привет!}
\end{document}
The document is typeset with XeLaTeX without error messages on my TeXLive 2012 system but the Cyrillic letters don't show up. I made some experiments with the fontspec
and cm-unicode
packages but I could not get anything besides the Roman serif font to work (and it was a mess anyway – that is why I did not include it in the above example).
What it the correct way to use all available Computer Modern characters for as many languages as possible at the same time in XeLaTeX (or LuaLaTeX)?
Best Answer
Polyglossia loads
fontspec
, but the default font is Latin Modern, which has no support for Cyrillic.You can load the Computer Modern Unicode fonts instead:
I'd still use language changing commands, even if the font directly supports Cyrillic, because hyphenation would be incorrect (or missing) otherwise.
In case you don't have installed the CMU fonts as system fonts, you need a different way to call them, assuming your TeX Live has them.
There's no slanted CMU font, so the call to
\textsl
becomes the same as\textit
. One could artificially slant the upright font.