2

I'm switching to XeLaTeX and have a problem choosing a Cyrillic (Russian) font for the document. If I try just

\documentclass[a4paper,12pt]{report}     

\usepackage{polyglossia}
\setdefaultlanguage{russian}

\begin{document}
Hi! Привет!
\end{document}

an error is thrown:

Package polyglossia Error: The current roman font does not contain the Cyrillic script!

As far as I understand I must explicitly specify a font. Unfortunately I know close to nothing about fonts and I have no guidelines imposed to follow. What is a recommended Cyrillic font in OS X? Some kind of rule of thumb to set and forget about.

4
  • The script in the answer to the linked question works and allows easily to find what OpenType fonts support the Cyrillic script in TeX Live; for the system fonts also, but in that case Font Book is perhaps handier.
    – egreg
    Mar 9, 2014 at 10:13
  • @egreg: The answers to the two earlier postings are not good at addressing the concerns raised in this question: In one posting, the script searches only for files with extension .otf, whereas many OpenType fonts are distributed in files with extension .ttf. The answers to the second posting provide information on finding type-1 T2A-encoded font files with cyrillic characters, but nothing at all about files with extensions ttf and otf; the latter clearly are the main focus of the users of XeLaTeX and LuaLaTeX.
    – Mico
    Mar 9, 2014 at 19:37
  • @Mico It's easy to change the script to cope also with TrueType fonts.
    – egreg
    Mar 9, 2014 at 20:48
  • @egreg - That may be the case, but it's not indicated anywhere in the answer in question (pun intended...). That's one reason I believe the new posting is not adequately answered by previous postings.
    – Mico
    Mar 9, 2014 at 20:59

1 Answer 1

6

The good news is that there are lots and lots of opentype font families that provide a full Cyrillic alphabet and are easy to use with XeLaTeX (and LuaLaTeX). The bad news is that you may have to spend some time choosing which font family best suits your needs. MacOS X provides quite a few such font families; it's also fairly easy to download and activate additional fonts -- high-quality and free of charge -- that may suit your needs better than the ones that come pre-installed with MacOS X.

The main font-related package you should become familiar is called fontspec. It provides the command \setmainfont, and many more.

MacOSX provides an application called FontBook. FontBook provides a convenient (though slow) method for inspecting all installed fonts for various features, including whether cyrillic characters are included in a given font.

Here's an entirely non-representative sample of font families that feature cyrillic characters. Some fonts should already be installed on your system, while others (e.g., EB Garamond and XITS) may need to be downloaded and activated first.

enter image description here

%% !TEX TS-program = xelatex
\documentclass[a4paper,12pt]{report}     
\usepackage{fontspec}
\setmainfont{lmroman10-regular.otf}
\usepackage{polyglossia}
\setdefaultlanguage{russian}
\newcommand\hi{Hi! Привет!\newline}

\begin{document}\pagestyle{empty}
\noindent Some serif fonts\newline
\noindent%
\setmainfont{Garamond Premier Pro}\hi
\setmainfont{EB Garamond} \hi
\setmainfont{Arno Pro} \hi
\setmainfont{XITS} \hi
\setmainfont{Cambria} \hi
\setmainfont{Minion Pro} \hi

\bigskip\noindent%
\setmainfont{lmroman10-regular.otf}%
Some sans-serif fonts\newline
\setmainfont{Calibri} \hi
\setmainfont{Arial}\hi
\setmainfont{Myriad Pro} \hi
\end{document}
6
  • You can add to this list Minion Pro and Myriad Pro, that come with Adobe Reader.
    – Bernard
    Mar 9, 2014 at 12:50
  • Of all of these I have only Arial. Is my OS X somehow corrupted or these fonts just come with other software, like MS Office or Adobe products, none of which I have?
    – Yrogirg
    Mar 9, 2014 at 17:34
  • @Yrogirg - EB Garamond and XITS will probably have to be downloaded and activated first. The other font families, though, should be part of a standard MacOSX distribution. Please try running the MWE under LuaLaTeX instead of XeLaTeX and see if more fonts are "found".
    – Mico
    Mar 9, 2014 at 19:45
  • @Bernard - Thanks for the suggestion -- I've added the two fonts to the list.
    – Mico
    Mar 9, 2014 at 19:57
  • 2
    EB Garamond and Xits should be in MacTeX (opentype as well as type1) but you may need to tell FontBook about them to install them for the system. You can probably do this by using 'Go' in Finder to open up /usr/local/texlive/2013/texmf-dist/fonts/opentype/public/ebgaramond, for example, and double-clicking on the fonts there. You should get asked if you want to install them.
    – cfr
    Mar 9, 2014 at 22:36

You must log in to answer this question.

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