[XeTeX] xetex, fontspec, windows problems
Michiel Kamermans
pomax at nihongoresources.com
Thu Jul 10 22:09:33 CEST 2008
Hi all,
I wrote Will Robertson a few days ago on the issue of fontspec not being
able to load certain fonts in windows, which sparked a few responses,
most notably by Akira Kakuto, who conjected it had to do with calling
the font by filename rather than font name. I can assure you that this
is however not the case. In fact the problem is so simple to demonstrate
that it should be ridiculously easy to reproduce on any other windows box =)
Step 1: make sure you are in a modern Windows, like Windows XP, Windows
Vista or Windows Server 2008 (which is essentially a stripped, leaner
version of Vista)
Step 2: go to
http://www.i-love-epson.co.jp/download2/printer/driver/win/page/ttf30.htm
and download the ttf30.exe font package. These are free Japanese fonts
offered by Epson, and have a particularly nice textbook font, referred
to as "EPSON 教科書体M" in any font-aware text editor and word
processor (running fc-list will verify this as being the font name).
Step 3: create the following very simple .tex file:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{EPSON 教科書体M}
\begin{document}
Test text: テストです(漢字も一緒)。
\end{document}
Step 4: run this file through xetex/xelatex
On my system (Windows Server 2008, using the MiKTeX distribution,
running using xelatex) this goes horribly wrong, generating the
following output:
------
This is XeTeX, Version 3.1415926-2.2-0.998.3 (MiKTeX 2.7)
entering extended mode
(test.tex
LaTeX2e <2005/12/01>
Babel <v3.8j> and hyphenation patterns for english, dumylang,
nohyphenation, german, ngerman, french, loaded.
("D:\Program Files\MiKTeX 2.7\tex\latex\base\article.cls"
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
("D:\Program Files\MiKTeX 2.7\tex\latex\base\size10.clo"))
("D:\Program Files\MiKTeX 2.7\tex\xelatex\fontspec\fontspec.sty"
("D:\Program Files\MiKTeX 2.7\tex\generic\ifxetex\ifxetex.sty")
("D:\Program Files\MiKTeX 2.7\tex\latex\tools\calc.sty")
("D:\Program Files\MiKTeX 2.7\tex\latex\xkeyval\xkeyval.sty"
("D:\Program Files\MiKTeX 2.7\tex\generic\xkeyval\xkeyval.tex"
("D:\Program Files\MiKTeX 2.7\tex\generic\xkeyval\keyval.tex")))
("D:\Program Files\MiKTeX 2.7\tex\latex\base\fontenc.sty"
("D:\Program Files\MiKTeX 2.7\tex\xelatex\euenc\eu1enc.def")
("D:\Program Files\MiKTeX 2.7\tex\xelatex\euenc\eu1lmr.fd"))
fontspec.cfg loaded.
("D:\Program Files\MiKTeX 2.7\tex\xelatex\fontspec\fontspec.cfg"))
(test.aux)
[1] (test.aux) )
** ERROR ** Cannot proceed without the "native" font: EPSON-KYOKASHO
(EPSON ã≥â»èëëÃÇl Regular)...
Output file removed.
Error 1 (driver return code) generating output;
file test.pdf may not be valid.
Transcript written on test.log.
------
The only thing I can think of here is that XeTeX is using the font name
encoded in a wrong character encoding here...
Regards,
- Mike Kamermans
www.nihongoresources.com
More information about the XeTeX
mailing list