[Tex/LaTex] Liberation Mono: The current roman font does not contain the Cyrillic script!

fontspolyglossiaxetex

Ok, so the problem is next, I use Liberation fonts in my XeLaTeX document:

\setmainfont{Liberation Serif}
\setsansfont{Liberation Sans}
\setmonofont{Liberation Mono}

\setmainlanguage{ukrainian}
\setotherlanguage{english}

And Liberation Serif as well as Liberation Sans work as they should. But when an error

Package polyglossia Error: The current roman font does not contain the Cyrillic script! Please define \cyrillicfont with \newfontfamily.

occurs at the very end of the document where the monospace font appears for the first time as URL.

Also my friend has no problems like this on Mac.

Is this a problem with Tex-live distribution for Linux, or a problem with Liberation Mono ?

Best Answer

Also on my machine the Liberation Mono font advertises no information about the available scripts, so Polyglossia can't activate it correctly when the current script is cyrillic.

A workaround for this is to define a \cyrillicfonttt:

\newfontfamily{\cyrillicfonttt}{Liberation Mono}

See section 4 in the documentation of Polyglossia.

Note: the error message is indeed misleading. I believe there is already a bug report filed on the development site of Polyglossia.


Added Version 2.00.1 of the Liberation fonts does not suffer from this problem, at least for the cyrillic script; the output of otfinfo -s is

% otfinfo -s LiberationMono-Regular.ttf
cyrl        Cyrillic
cyrl.MKD    Cyrillic/Macedonian
cyrl.SRB    Cyrillic/Serbian
hebr        Hebrew

while it was empty for the version the previous testing was done. The new version, released October 4, 2012, is available at https://fedorahosted.org/liberation-fonts/