[XeTeX] About Microsoft YaHei font

Nikola Lecic nlecic at EUnet.yu
Tue May 29 08:42:33 CEST 2007


On Tue, 29 May 2007 05:28:04 +0200
Nikola Lecic <nlecic at EUnet.yu> wrote:

> I see. But this works:
> 
>   \documentclass[a4paper,11pt]{report}
>   \usepackage{fontspec}
>   \setromanfont{微软雅黑}
>   \begin{document}
>       Hello, \bf{Hello}.
>   \end{document}
> 
> You can find here some observations about fontconfig problematic names
> handling/groupping in version 2.4.2 (in comparison with 2.3.X, which
> itself has some other flaws):
> 
>   http://tug.org/pipermail/xetex/2007-April/006364.html

I was a bit precipitous. The example I sent

\documentclass[a4paper,11pt]{report}
\usepackage{fontspec}
\setromanfont{微软雅黑}
\begin{document}
      Hello, \bf{Hello}.
\end{document}

works if you correct the Fontname field of the msyhbd.ttf to be
'MicrosoftYaHeiBold' instead of 'MicrosoftYaHei'. Then this code
produces the result I attached, without manual invoking the font by
file name.

This is essentially the same problem as the one described in archived
mailinglist thread. In both cases there is a name mismatch within the
font(s). In that case and in this one, fc-list shows the same font
names, before and after correction, but without changing the
font name fields, fontspec confuses XeTeX and it can't load the font.

I don't know if the licence permits this little correction, but you can
ask them to correct that themselves if it doesn't.

Nikola Lečić
-------------- next part --------------
A non-text attachment was scrubbed...
Name: YaHei.png
Type: image/png
Size: 1151 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20070529/1834d535/attachment-0001.png 


More information about the XeTeX mailing list