Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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/

share|improve this answer
    
This is a bug of font or Polyglossia? Because you've said that Liberation Mono font advertises no information –  Uko Jan 13 '13 at 7:39
    
Not of Polyglossia: the font doesn't make available the information Polyglossia needs in order to be sure that it has the cyrillic script characters. –  egreg Jan 13 '13 at 10:01
    
It looks like version 2.00.1 of liberation fonts works cool –  Uko Jan 14 '13 at 9:11
    
@Uko Thanks for the information. I'll test them and add to my answer. –  egreg Jan 14 '13 at 10:41
    
IMO it is a Polyglossia bug, the font does not need to have OpenType Cyrillic tags to support it, unlike, say, Arabic. Either way this IMO should be a warning not an error. –  Khaled Hosny Jan 14 '13 at 14:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.