I am currently trying to use Cyrillic fonts in overleaf, but whatever I try overleaf throws an error, though PDF preview looks fine.

My preambule code looks like:

\setmainfont{Times New Roman}
\newfontfamily{\cyrillicfonttt}{Liberation Mono}

As already proposed here or here.

Nevertheless, overleaf give me and error:

Package polyglossia Error: The current latin font LiberationMono(0) does not contain the "Cyrillic" script!

(polyglossia)                Please define \cyrillicfont with \newfontfamily command.

See the polyglossia package documentation for explanation.
Type  H <return>  for immediate help.

l.24 \selectlanguage *{ukrainian}

This error message was generated by an \errmessage
command, so I can't give any explicit help.
Pretend that you're Hercule Poirot: Examine all clues,
and deduce the truth by order and method.

Is there a workaround to solve this problem in overleaf? Is it happen because overleaf uses old version of polyglossia or it is a problem with the package itself? Can it be reported to the people for a fix?

  • 1
    you only defined a tt-font for cyrilic. Define also \cyrillicfont and \cyrillicfontsf. Apr 18, 2020 at 14:34
  • I built the LiberationMono fonts from the source on GitHub and they do have the Cyrillic script. In other words, I can't reproduce the issue with an up-to-date version of the fonts.
    – egreg
    Apr 18, 2020 at 14:37
  • 1
    Thanks very much! Adding \cyrillicfont and \cyrillicfontsf fonts solved the problem. Apr 18, 2020 at 14:39
  • Also helped me!
    – A.Ametov
    Jan 10, 2022 at 13:12


You must log in to answer this question.

Browse other questions tagged .