[XeTeX] Japanese Characters in PDF do not match thosein source file.

Andrew A. Adams aaa at meiji.ac.jp
Tue Aug 24 13:29:40 CEST 2010


> Am Tue, 24 Aug 2010 16:54:29 +0900 schrieb Andrew A. Adams:
> 
> > Andy Lin wrote:
> >> Could it be possible you have two copies of IPAMincho in your
> >> system/texpath right now? This has been known to result in issues such
> >> as incorrect glyphs showing up in the output, as in your case.
> > 
> > 
> > The prize goes to Andy Lin for the simplest solution and the weirdest 
> > behaviour of a program I've seen in a while. There were indeed three, not 
> > just two, copies of the font on my system. I had one in my local .fonts 
> > directory and removed that yesterday, but it didn't seem to help. Today I did 
> > a check again and found that two copies were in separate subdirectories in 
> > /usr/share/fonts (japanese and IPA). I deleted one of the two and 
> > lo-and-behold, I get the attached pdf.
> > 
> > Thank you all for your suggestions. Please remember this gotcha for anyone 
> > having similar problems in future: do a search for the font file and delete 
> > duplicates from anywhere XeTeX might find them, particularly from two places 
> > in /usr/share/fonts.
> 
> There is no need to search your system. As I told you you can get
> the pathes of fonts involved in the log of xetex and the terminal
> output of xdvipdfmx:
> 
> "Put \XeTeXtracingfonts=1 in your document and call xelatex with the
> option  --output-driver="xdvipdfmx -vv""

Locate ipam.ttf worked much quicker than deciphering the output of xelatex, 
actually. Especially when \XeTeXtracingfonts=1 gave me an error whenever I 
tried to use it (tried before and after "\begin document"):

Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/xelatex/fontspec/fontspec.sty
(/usr/share/texmf/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf/tex/latex/tools/calc.sty)
(/usr/share/texmf/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texmf/tex/latex/xkeyval/xkeyval.tex
(/usr/share/texmf/tex/latex/xkeyval/keyval.tex)))
fontspec.cfg loaded.
(/usr/share/texmf/tex/xelatex/fontspec/fontspec.cfg)) (./Kanji_Test.aux)
! Undefined control sequence.
l.9 \XeTeXtracingfonts
                      =1
[1] (./Kanji_Test.aux) )
(see the transcript file for additional information)




Of course if two files with different file names claimed to be providing the 
same font, the approach that finally worked for me wouldn't solve it.


-- 
Professor Andrew A Adams                      aaa at meiji.ac.jp
Professor at Graduate School of Business Administration,  and
Deputy Director of the Centre for Business Information Ethics
Meiji University, Tokyo, Japan       http://www.a-cubed.info/





More information about the XeTeX mailing list