[pdftex] Generating CJK in PDF

Werner LEMBERG wl at gnu.org
Tue May 8 00:16:07 CEST 2001


> I got this feature to work after seeing Hans' message, but it took
> some reading of pdftex sources to find out about the undocumented
> /index<n> syntax for *.enc files...

I would be glad if you can send me a small but complete example for
testing.

> The .enc files contain the same information as the .sfd file, but
> using glyph indices instead of char codes.  I've just extended
> ttf2tfm so that together with the .tfm files it writes the .enc
> files.  I guess one could make it create the /ToUnicode cmap files
> and the .map file for pdftex as well.

Please send me the patch.

> By the way, Hans' example showed an encoding file named
> 'gbk-81.enc', which made it look as if the encoding file depends
> just on the charset of the TTF file.  I believe this isn't right,
> and 'gbk-81.enc' actually contains glyph indices in the TTF font.
> This is a bit inconvenient (one needs lots of distinct .enc files),
> and seems to be asking for trouble: what if a user replaces the TTF
> font by a newer version with the same name but different glyph
> indices?  Wouldn't it be more convenient to be able to work with
> char codes from the Unicode cmap table instead?

I fear this won't be possible.  For example, the current version from
ttf2tfm uses some OpenType features to get vertical glyph
representation forms for pseudo-vertical typesetting (i.e. rotated
glyphs) from a CJK font if such an OpenType table is available.  The
character codes are the same, but you'll get different glyph indices.


    Werner



More information about the pdftex mailing list