I've installed full TexLive 2011 using "install-tl" script in Ubuntu 12.04. When I was using TexLive 2009 from repositories the following file was compiled without any errors.
\documentclass{article}
% XeLaTeX
\usepackage{xltxtra}
\usepackage{xunicode}
% Fonts
\setmainfont{Arial}
\newfontfamily\cyrillicfont{Arial}
\setmonofont{Courier New}
% Lang
\usepackage{polyglossia}
\setmainlanguage{russian}
\setotherlanguage{english}
\begin{document}
English normal. \texttt{English monospace}.
Русский обычный. \texttt{Русский моноширинный}. % Text in Russian
\end{document}
But XeLaTeX from TexLive 2011 gives this error:
ERROR: Package polyglossia Error:
--- TeX said --- The current roman font does not contain the Cyrillic script! Please define \cyrillicfont with \newfontfamily.
See the polyglossia package documentation for explanation. Type H for immediate help. ...
l.17 ...nglish normal. \texttt{English monospace} .
In spite of this error the output PDF is correct.
The error remains if comment out \setmonofont{Courier New}. Using Courier New as main font gives no error on normal text (without \texttt, \textbf and so on). Using DejaVu Sans Mono as monospaced font gives no error too.
I've been searching for solution few hours but there aren't any. Maybe this is a bug in Polyglossia or Fontspec?
\cyrillicfonttt. For short text in English I use\textenglishbut have no idea why I have to do it :) Could you explain it too, please? – Kirill May 28 '12 at 12:59\<family>fontttfeature is explained on page 6 of the documentation of Polyglossia. I've added some words about "segregating languages". – egreg May 28 '12 at 13:56