Hi I have a question regarding the combination of polyglossia and fontspec I have written the folllowing:
\documentclass[oneside, 12pt]{book}
\usepackage{fontspec}
\setmainfont[Script=greek, Mapping=tex-text]{Times New Roman}
\setmonofont[Script=greek,Mapping=tex-text]{Courier New}
\usepackage{polyglossia}
\usepackage{xunicode} % Unicode from accented glyphs
\setdefaultlanguage{greek}
\setotherlanguage{english}
%\newfontfamily\greekfont[Mapping=tex-text]{Times New Roman}
%\newfontfamily\greekfonttt[Mapping=tex-text]{Courier New}
\begin{document}
(This is greek:) Αυτό είναι ελληνικά.
(This is mono spaced greek:) \texttt{Αυτό είναι ελληνικά}
\end{document}
If I do this, XeTeX (actually polyglossia) will complain that:
The current roman font does not contain the Greek script!
However, if I uncomment the newfontfamily
lines everything works ok. What I do not understand is why I have to include them, since I have explicitly defined what the font family should be when using the greek script, in the \setmainfont[Script=greek, Mapping=tex-text]{Times New Roman}
. Otherwise I do not understand the [Script=greek]
option in fontspec.
Can anyone shed a light on this?
Thanks very much!
Times New Roman
font that you are using doesn't have a Greek script feature defined. What font type do you use? Opentype (.otf) or Truetype (.ttf). You can check otfinfo, to see the available features. You would need something likeotfinfo -s fontaname