[XeTeX] CJK and ideographic font names

Jonathan Kew jonathan_kew at sil.org
Thu Sep 9 21:47:06 CEST 2004


On 9 Sep 2004, at 7:02 pm, Paolo Matteucci wrote:

> Hi,
>
> I had a quick look at the previous postings and at the examples  
> provided, but was unable to find an answer to my question, so here it  
> is.
>
> I would like to use the font 华文楷体.ttf (STKaiti Regular), but can't get  
> xelatex to load it.
>
> If you want, you can have a look at my original source file (using  
> pdflatex, the ucs package and the instructions given at  
> http://www.ece.uci.edu/~chou/unicode-tex.html) here:  
> http://www.maths.soton.ac.uk/~pnm/cjk/canton.tex... and its output  
> here: http://www.maths.soton.ac.uk/~pnm/cjk/canton.pdf.
>
> Now, I know that I can't use XeTeX with the Latin Modern fonts (at  
> least not with the pfb one), and, probably, for what I need to do, I'd  
> better stick to pdflatex... Nevertheless, I would have expected that  
> something like this would work in xelatex:
>
> \DeclareFontFamily{U}{stkaiti}{}
> \DeclareFontShape{U}{stkaiti}{m}{n}%
>      {<-> "STKaiti\space Regular"}{}
> \DeclareFontShape{U}{stkaiti}{m}{it}%
>      {<-> ssub * stkaiti/m/n}{}
> \DeclareFontShape{U}{stkaiti}{bx}{n}%
>      {<-> ssub * stkaiti/m/n}{}
> \DeclareFontShape{U}{stkaiti}{b}{n}%
>      {<-> ssub * stkaiti/m/n}{}
> \DeclareFontShape{U}{stkaiti}{bx}{it}%
>      {<-> ssub * stkaiti/m/n}{}
> \DeclareFontShape{U}{stkaiti}{b}{it}%
>      {<-> ssub * stkaiti/m/n}{}
> \DeclareFontShape{U}{stkaiti}{m}{sc}%
>      {<-> ssub * stkaiti/m/n}{}
> \DeclareTextFontCommand{\cntext}{\fontencoding{U}\fontfamily{stkaiti}\s 
> electfont}
>
> ...but doesn't. I get the message: "! Font U/stkaiti/m/n/20.74=STKaiti  
> Regular at 20.74pt not loadable: ATSUI font not found".
>
> Would anyone be so kind to tell me what I'm doing wrong?
>

You're so close... but not quite! The name you need to use is just  
"STKaiti", not "STKaiti Regular". I believe what Font Book calls the  
"Display Name" of a font is the appropriate one to choose, if in doubt.

As you note, you'll have trouble with the Latin Modern fonts, too, and  
probably some of the other packages you're loading... I don't know how  
the tipa stuff is set up. And the UTF8 inputenc option will have to go,  
as XeTeX will have already interpreted the UTF8 codes before the macros  
see them!

HTH,

Jonathan



More information about the XeTeX mailing list