Bold/Italic/BoldItalic fonts with \XeLaTeX
's \setmainfont
does not work correctly. For example (below), the \textbf{English}
and \textit{English}
looks like normalfont. With \LuaLaTex
it is works fine.
\documentclass[twoside]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setmainfont{CMU Serif}
\setsansfont{CMU Sans Serif}
\setmonofont{CMU Typewriter Text}
\begin{document}
\noindent
\textbf{English}\\
\texttt{English}\\
\textit{English}\\
\end{document}
With certain other definition
\setmainfont[
Ligatures=TeX,
Extension=.otf,
BoldFont=cmunbx,
ItalicFont=cmunti,
BoldItalicFont=cmunbi,
]{cmunrm}
Both, \XeLaTeX
and \LuaTeX
displays fonts correctly.
I'm using WinXP SP3, Miktex 2.9 (updated)
Some additions
I found temporary solution of the problem. I notice with the \setmainfont{Times New Roman}
\XeLaTeX
works well. Then I install fonts from \MikTex\fonts\opentype\public\cm-unicode\
to the Windows\Fonts
folder.
It turns out that only MiKTeX
's xelatex.exe
can see fonts from system folder, not from own folder despite the that LaTeX\MikTex\fontconfig\config\*fonts*.conf
are included the path to own font folders.
Another additions
As I noticed, the xelatex.exe
understand many Human fontfamily names from \MikTex\fonts\opentype\public\cm-unicode\
except only CMU Serif family.
\setmainfont{CMU Bright}
displays Bold/Italic/BoldItalic fonts.
It seems, the problem localized not in the xelatex.exe
but possible in the package fontspec
for xelatex, or more probably, in the font files cmun*.otf
. May be inside cmun*.otf
there are no relations between other files, which is belong to the same family. But it is strange, the LuaLaTeX
displays CMU Serif
family correct.
Best Answer
With -up-to-date TL 2014 and
xelatex
andlualatex
You should update your system.