[XeTeX] Xetex doesnt display chinese characters in fonts that should have them
Gareth Hughes
garzohugo at gmail.com
Sun Apr 19 21:34:00 CEST 2009
> Hi!
>
> I'm using LyX and want to embed _one_ chinese character. It's kinda hard, which is sad because it's 2009, but hey, you folks are trying hard to make it as easy as possible, right? ;)
>
> I got it working using chinese fonts, which I need to specify using \fontspec{fontname}, which kind of sucks because I suck at LaTeX and I dont manage to restore the font I used before. Is there an easy way to sort of "push" a font and then "pop" it later? I guess I'll have to set up all fonts using \setromandefault and whats-his-name, but even if I do, how do I reset to the default font?
>
> Also, I'm kinda confused that Xetex cant use the chinese characters in e.g. Bitstream Vera Serif. In OpenOffice, Lyx and Kate, I see the character correctly, but after running Xelatex, its just missing from the document. It's kinda weird as the character is in the font, but Xetex cannot see it. Do you have any ideas?
>
> Here's the lyx/tex/pdf files for an example I made:
>
> http://lastpageofthe.net/xetex-problems/chinese.lyx
> http://lastpageofthe.net/xetex-problems/chinese.tex
> http://lastpageofthe.net/xetex-problems/chinese.pdf
>
> Thanks for your help in advance!
>
> Kosta
Bitstream Vera doesn't have the character, and neither do the other two
fonts. If other software is displaying the character they are pulling
the font-substitution trick. You could use:
\setmainfont{Bitstream Vera Serif}
\newfontfamily\Chinese{Sazanami Mincho}
Then you can set the section:
This is a cat: {\Chinese 猫} means cat.
or
This is a cat: \Chinese 猫\rmfamily means cat.
Have fun,
Gareth.
More information about the XeTeX
mailing list