[XeTeX] Problem with Japanese font

Gerrit Sangel z0idberg at gmx.de
Sun Feb 10 11:09:02 CET 2008


Hello Wilfred,

Yes, I’ve installed the file via the KDE font installation program. I can use 
it in Abiword, Openoffice, and so on.
I guess it has something to do with the Name, because it is in Japanese?

The output of fc-list is this way:

gerrit at gerrit ~ $ fc-list | grep 'EPSON'
EPSON 太明朝体B:style=Regular
EPSON 行書体M:style=Regular
EPSON 太角ゴシック体B:style=Regular
EPSON 教科書体M:style=Regular
EPSON 太丸ゴシック体B:style=Regular
EPSON 太行書体B:style=Regular
EPSON 丸ゴシック体M:style=Regular
EPSON 正楷書体M:style=Regular


the file looks this way:

------------

\documentclass{scrartcl}
\usepackage{fontspec}
\setromanfont{Breitkopf Fraktur}
\usepackage[german]{babel}

\newcommand{\antiqua}[1]{{\setromanfont{Gentium}#1}}
\newcommand{\kaiti}[1]{{\setromanfont{AR PL ZenKai 
Uni}\XeTeXlinebreaklocale "zh" #1}}
\newcommand{\mincho}[1]{{\setromanfont{IPAMincho}\XeTeXlinebreaklocale "ja" 
#1}}
\newcommand{\kaisho}[1]{{\setromanfont{EPSON 正楷書体M}\XeTeXlinebreaklocale "ja" 
#1}}
\begin{document}

This is a text in Fraktur and now something comes in \antiqua{Antiqua} and now 
in kaiti \kaiti{楷書} and now in \mincho{明朝} and now in kaisho \kaisho{楷書}
\end{document}

-------------

This works fine if I don’t use the kaisho command. The other ones all work, 
but the Epson font does not. I really guess it has something to do with the 
Japanese in the name.

I read that there is a way to manually specify the file name for a font? How 
does this work?

\fontspec does not do anything? I just get the normal Latex font.


I guess we really do need a good manual... ;)


Thanks
Gerrit


Am Samstag 09 Februar 2008 schrieb Wilfred van Rooijen:
> Hi Gerrit,
>
> If you use fontspec, you need to specify the
> PostScript name of the font in the \fontspec command.
>
> Have you installed the font in a system-recognized
> directory for fonts? If not, see the fontspec manual
> to instruct to look for other locations.
>
> On linux, you have to run 'fc-cache -fv ' to update
> the font cache after installing the font.
>
> On linux, you can use 'fc-list' to see which fonts are
> available. It will give you also the PS-name. Example:
>
> rooijen at love206a-rooijen ~ $ fc-list | grep Koz
> Kozuka Mincho Pro\-VI,小塚明朝 Pro\-VI,Kozuka
> Mincho Pro\-VI R,小塚明朝 Pro\-VI
> R:style=R,Regular
> Kozuka Gothic Pro,小塚ゴシック Pro,Kozuka Gothic
> Pro M,小塚ゴシック Pro M:style=M,Regular
>
> So I would use \fontspec{Kozuka Mincho Pro} to use the
> first font.
>
> Regards,
> Wilfred
>
> --- Gerrit Sangel <z0idberg at gmx.de> wrote:
> > Hello list,
> >
> > I have the following problem with Xelatex:
> >
> > I want to write a text in Japanese with the font
> > EPSON 正楷書体M
>
> (http://www.i-love-epson.co.jp/download2/printer/driver/win/page/ttf30.htm)
>
> > if i specify a command for the font:
> >
> > \newcommand{\kaisho}[1]{{\setromanfont{EPSON
> > 正楷書体M}\XeTeXlinebreaklocale "ja"
> > #1}}
> >
> > and use it in the text, Xelatex seems to run
> > flawlessly but does not generate
> > any output. In the log the following is written:
> >
> > \c at zf@famc at EPSON 正楷書体M=\count92
> > Package fontspec Info: Defining font family for
> > "EPSON 正楷書体M" with op
> > tions [] on input line 31.
> > Package fontspec Info: Could not resolve font EPSON
> > 正楷書体M/B (it might
> >  not exist) on input line 31.
> > Package fontspec Info: Could not resolve font EPSON
> > 正楷書体M/I (it might
> >  not exist) on input line 31.
> > Package fontspec Info: Could not resolve font EPSON
> > 正楷書体M/BI (it migh
> > t not exist) on input line 31.
> >
> > etc.
> >
> > I opened the font in Fontforge, and “EPSON
> > 正楷書体M” is written as a Japanese
> > family in the font names.
> >
> > Does anybody maybe know how to solve this?
> >
> >
> > Thanks
> > Gerrit Sangel
> > _______________________________________________
> > XeTeX mailing list
> > postmaster at tug.org
> > http://tug.org/mailman/listinfo/xetex
>
>      
> ___________________________________________________________________________
>_________ Looking for last minute shopping deals?
> Find them fast with Yahoo! Search. 
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex


More information about the XeTeX mailing list