tags:

views:

257

answers:

1

I want to use the openoffice chinese fonts, eg AR PL SungtiL GB, but the xelatex tells me that it is an invalid name (as shown below). It seems like the font name has spaces and so it doesn't recognize it? How should I get around this?

(/usr/share/texmf-texlive/tex/latex/base/syntonly.sty)kpathsea: Invalid fontname `AR PL SungtiL GB', contains ' '

I am using the xeCJK package in XeTeX 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian) on Ubuntu.

+1  A: 

Have you tried using the fontspec package?

I can use any installed font, even if there are spaces in their names. Note that I use a Mac, but according to the package documentation it should work on any xetex-based system. In the following example the Chinese font is "Apple LiSung". (The file's encoding is UTF-8, of course.)

\usepackage{fontspec}% provides font selecting commands
\usepackage{xunicode}% provides unicode character macros
\usepackage{xltxtra} % provides some fixes/extras
\newfontfamily\zh{Apple LiSung}

\begin{document}
And then she asked: {\zh 今天你还好吗?} But I couldn't answer ...

See the excellent package documentation here.

David