cjk-list
[Top][All Lists]

## Re: [cjk] revisiting ttf2tfm and dvipdfmx

 From: Werner LEMBERG Subject: Re: [cjk] revisiting ttf2tfm and dvipdfmx Date: Mon, 15 Jul 2013 20:11:35 +0200 (CEST)

Hello Hin-Tak!

Sorry for the late reponse, I was abroad.

> I revisited the pdf howto document bundled with cjk I wrote almost
> 10 years ago,

Great!

> I found a few issues old and new, many of them to do with ttf2tfm,
> and enroute somewhat surprised to find a copy/variant of freetype 1
> survived in the texlive repository.

Yes.  Peter Breitenlohner was working on an update to FreeType 2,
IIRC, but I'm not sure how much time and energy he has invested or is
still investing.

> The number of issues are too many to bother you, so I am asking you
> to refer/recommend me to get my own write-access to fix them
> myself. :-).  Can you forward this and/or point me in the right
> directions?

Actually, I no longer maintain ttf2tfm and ttf2pk (mainly due to lack
of time), sorry.  What you can find in the TeXLive SVN repository is
the most recent version, and I suggest that you send patches to Peter
directly (address@hidden) or to the TeXLive team.

Regarding the cjk git repository, just clone it and commit your
changes, then produce a series of patches so that I can apply them.  I
can also give you write access on Savannah if you prefer.

> - "\begin{CJK*}{SJIS}{wnmc}\end{CJK*}" used to look for
>   c49wnmc.fd. Now it looks for c40wnmc.fd.  Is that intentional?

For me it apparently works (using SVN revision of TeXLive 30186 from
2013-04-30):

(.../texmf-dist/tex/latex/cjk/texinput/SJIS/SJIS.bdg
File: SJIS.bdg 2012/05/07 4.8.3
)
(.../texmf-dist/tex/latex/cjk/texinput/SJIS/SJIS.enc
File: SJIS.enc 2012/05/07 4.8.3
)
(.../texmf-dist/tex/latex/cjk/texinput/SJIS/SJIS.chr
File: SJIS.chr 2012/05/07 4.8.3
)
LaTeX Font Info:    No file C49wnmc.fd. ...

> - I am surprised to find that many tfm's change when I run ttf2tfm
> repeatedly.  Is it supposed to do that? (I now store these generated
> files in a local git repository, so it is rather noticeable).

No; the contents should be identical always if the incantation is
exactly the same.

> - how to do the equivalent of ttf2tfm for opentype fonts? There is a
> otftotfm, but it doesn't seem to have options to do cjk-compatible
> outputs.

No idea, sorry.  I think that the future is xetex and/or luatex which
both can handle OTF directly, so extended support for ttf2tfm is
probably wasted time.  If you *really* need the old route, I today
recommend to use fontforge for generating good old subfont PFBs.

> - updmap doesn't work like it used to, and seemed to be totally
> re-written - got new map files to work with pdftex by appending
> directly to pdftex.map. Is there some secret recipe for updating
> pdftex.map with new entries?

Have you tried texdoc updmap' to read the man page?  I forgot the
details...

> - I think there is a latex command (or should be) to make messages
> like "Missing character: There is no y in font xxx" more visible?
> They appears in the log file but not on the console.

This is an e-tex extension, and you have to explicitly activate it
with

\tracinglostchars 2

(see texdoc etex' for details).

> - I have a font which when processed through LaTeX for "ABCD" (for
> illustration, not really english), resulted in "D C B A" where A is
> approximately at the right place.  What kind of problem may that be?

Good question.  Maybe negative advance widths?  I'm not sure whether
TeX allows this at all.  Maybe you can run tftopl' to check the TFM
file, or maybe you call t1disasm' or ttx' to disassemble the font.

> - two fonts works okay during the latex-> dvi stage, but refused to
> be processed in the dvi-> stage (both pdfTeX and dvipdfmx) for
> having unknown post-version .  Which part of TexLive should I look
> into?

You mean the post' table in the TTF file, right?  This looks rather
strange, since the available formats of this table haven't changed or
extended in the last ten years, AFAIK.  Maybe a font bug?  Otherwise,
you have to directly check the source code of dvipdfmx since it parses
the TrueType fonts by itself, IIRC.

> - About font embedding flag within a truetype font. I see dvipdfmx
> honour that, pdflatex completely ignores it, which xdvipdfmx (xetex)
> can be overridden on a command line. what's your view on it?

It's a gimmick, essentially.  Everyone can easily circumvent the
restriction.  However, it is a good idea to set them correctly IMHO
just to feel better :-)

> - I can't get dvipdfmx to do landscape mode (most of the latex
> packages (lscape and pdflscape)/dvi specials don't work) - this
> seems to be an old silent problem which now has a visible message.
> I'd also like to do the equivalent of dvips -E - i.e. tight bounding
> box also, for generating pdf's to be embedded by another pdf's.

Have you tried dvipdfmx's command line option -l' to set landscape
mode?

Werner
`