[XeTeX] About Microsoft YaHei font

Dongsheng Song dongsheng.song at gmail.com
Tue May 29 04:15:15 CEST 2007


I use XeTeX for W32 (0.996) from
http://www.fsci.fuk.kindai.ac.jp/kakuto/win32-ptex/web2c75-e.html.
The fontconfig version is:

C:\xetext\w32tex>fc-cache -V
fontconfig version 2.4.2

When I use:

\setromanfont[BoldFont={* Bold}]{Microsoft YaHei}

Then xelatex fail:
...
! Font \@tempfontb="Microsoft YaHei Bold/ICU" at 10.0pt not loadable: Metric (T
FM) file or installed font not found.
\\zf at make@font at shapes ...f at suffix " at \f at size pt
                                                  \edef \@tempb {\fontname \...
l.10 ...anfont[BoldFont={* Bold}]{Microsoft YaHei}

The YaHei fonts can be donload from:

http://i18n-zh.googlecode.com/files/fonts-zh_CN-r131.tar.bz2

Thanks for your help.

2007/5/29, Nikola Lecic <nlecic at eunet.yu>:
> Hello Dongsheng,
>
> On Sun, 27 May 2007 17:14:26 +0800
> "Dongsheng Song" <dongsheng.song at gmail.com> wrote:
>
> > I'm new to xetex, When I use
> >
> > \setromanfont{Microsoft YaHei}
> >
> > The pdf output not deal bold style,  but the 'Microsoft YaHei' font
> > has Bold style:
> >
> > E:\usr\xetex>fc-list |  grep YaHei
> > Microsoft YaHei,微软雅黑:style=Bold
> > Microsoft YaHei,微软雅黑:style=Regular
>
> What fontconfig version you have?
>
> > Now I have to use:
> >
> > \fontspec[ExternalLocation]{msyhbd.ttf}
> > The five boxing wizards jump quickly.\\
> >
> > or
> >
> > \font\CBL="[C:/WINDOWS/Fonts/msyhbd.ttf]" at 24 pt
> > \CBL The five boxing wizards jump quickly.
> >
> > What's the proper usage for set default document fonts using YaHei?
>
> I don't have that font, but the more elegant way to do such things is
> to instruct fontspec what font to load with \emph, \bf, etc. Does this
> formula work:
>
>   \setromanfont[BoldFont={* Italic}]{Charis SIL}
>   [...]
>   Hello, \bf{Hello}
>
> (deliberately incorrect font for testing purposes). See fontspec manual
> for details and all options.
>
> So, try to upgrade fontconfig first. If the problem persists, try to
> figure out if you can anyhow invoke Bold variant and then try BoldFont
> (and similar) options.
>
> Nikola Lečić
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_yahei.tex
Type: application/x-tex
Size: 1140 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20070529/32e6ba24/attachment.tex 


More information about the XeTeX mailing list