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

Wilfred van Rooijen wvanrooijen at yahoo.com
Mon Aug 23 07:29:44 CEST 2010


When you update your tex system make sure to run "texconfig" or a similar utility to update the database of file names, paths, etc. If you use Linux, make sure that the font occurs only once on your system. Fonts that are only installed by a single user usually reside in $HOME/.fonts, and system wide fonts reside somewhere else (/usr/share/fonts in my case).

I don't know how proficient you are with latex and friends. If you use xelatex, you don't need to load any extra packages which have to do with input encoding. inputenc, fontenc etc are no longer necessary.

If you save you input file as UTF-8, all characters should be processed correctly, regardless of whether they are Japanese, Chinese, Tamil, Urdu, Sanskrit or Greek.

In xelatex a lot of the dealings with glyphs (the actual signs in a font at the location pointed to by the input encoding) are left to the details provided in the OTF and TTF fonts. Thus, you have to make sure that xelatex uses a font which has glyphs available for the characters you want to use. Use the fontspec package to select a font.

I am presently working on a gloss file for polyglossia (the xelatex replacement of babel) for Japanese. Once this file is available, choosing Japanese as a language will automatically set the correct font etc.

You can switch fonts with the fontspec package. If you need it, you can define a latin font and a Japanese font and have xelatex switch automatically upon encountering a CJK string. 


--- On Sat, 21/8/10, Andrew A. Adams <aaa at meiji.ac.jp> wrote:

> From: Andrew A. Adams <aaa at meiji.ac.jp>
> Subject: Re: [XeTeX] Japanese Characters in PDF do not match thosein source file.
> To: "Unicode-based TeX for Mac OS X and other platforms" <xetex at tug.org>, "Andy Lin" <kiryen at gmail.com>
> Date: Saturday, 21 August, 2010, 11:01 AM
> > 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.
> I did have a meta-font varient installed from an earlier
> iteration of things 
> when I was using the old CJK package and had installed the
> IPA Japanese fonts 
> in that way. I did try to remove these as part of my
> attempts at 
> troubleshooting before posting to the list. I'll have
> another look through 
> and see if there are still references to the old versions,
> perhaps picking up 
> the wrong font through misconfigurations.
> -- 
> 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/
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex

More information about the XeTeX mailing list