# Error: The current roman font does not contain the cyrillic script!

\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{russian}
\setmainfont[Ligatures=TeX]{Times New Roman}
\begin{document}
\section{Test}
\end{document}


I already tried what was suggested here. here, and here. Tried to compile with XeTeX and LuaLaTeX but the result is same.

And this font does support cyrillic script, the following compiles and looks properly:

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Times New Roman}
\begin{document}
АБВГД
\end{document}

• Welcome to TeX.SX. Add \newfontfamily\cyrillicfont{Times New Roman}[Script=Cyrillic] after the \setmainfont command. See here for futher reference: tex.stackexchange.com/questions/91507/… and tex.stackexchange.com/questions/223327/… – Jasper Habicht Feb 5 '18 at 12:39
• Some fonts don't advertise their support for scripts in the expected way. It may depend on the particular version of Times New Roman you have: on my system I get no error about the script. – egreg Feb 5 '18 at 13:02
• I don't get an error, even if I explictly use a font which doesn't have cyrillic. That's rather curious. Could you show your log-file? – Ulrike Fischer Feb 5 '18 at 14:30
• @UlrikeFischer I could replicate the problem using Overleaf. Maybe you want to check over there? If I compile it on a Mac, there is no warning or error. – Jasper Habicht Feb 5 '18 at 14:57
• @JasperHabicht If you compile on overleaf with lualatex and try to use times new roman, which font is used at the end? Beside this I just realize that fonts without cyrillic chars can neverless have the cyrillic script ;-). – Ulrike Fischer Feb 5 '18 at 16:49

\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{russian}
\setmainfont[Ligatures=TeX]{Times New Roman}
\newfontfamily\cyrillicfont{Times New Roman}[Script=Cyrillic]
\begin{document}
\section{Test}
\end{document}


Credits go to Jesper Habicht (and egreg).

• Credits rather go to egreg who originally helped other with this problem. – Jasper Habicht Feb 5 '18 at 15:06
• The only downside is that now you get warning that Font 'Times New Roman' does not contain script 'Cyrillic'. This is not true, the document compiles without problems and it looks just like it should look. – Hanlon Feb 5 '18 at 18:01
• Just remove the Script=Cyrillic option. – egreg Feb 5 '18 at 19:02
• That's not a bad warning, it is merely confusing if you don't know the internals of Open Type fonts. What it means is that none of the font internal instructions, pertaining to things such as kerning, substitutions, and ligatures, has instructions for what to do about Cyrillic characters. So, if Cyrillic characters are in the font, they are used "as-is" without any magical Open Type modifications. However, I do not know the underlying logic of fontspec, in that regard. – user139954 Feb 5 '18 at 19:03