cjk-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cjk] revisiting ttf2tfm and dvipdfmx


From: Hin-Tak Leung
Subject: Re: [cjk] revisiting ttf2tfm and dvipdfmx
Date: Wed, 17 Jul 2013 04:29:44 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 SeaMonkey/2.17.1

Werner LEMBERG wrote:
<snipped>
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.

Was rather surprised when I ran a gdb session with fedora's debug info
and saw the source path mentioning freetype 1.5 . I just assumed most things
are freetype 2 based by now. Anyway, it seems to be a regression, or I was
very lucky not to see the segfault 10 years ago due to some padding from quirky compiler versions, etc.

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.

I only have one issue with freetype 2 at the moment - ftdump (or ftview) on NISC18030.ttf, one of the fonts shipped with Mac OS X 10.7 (and possibly other
versions also) don't work. I haven't looked much further, but ghostscript
seems to be happy loading the font file, at least the headers, and I'd be surprised that Apple, of all people, ships a broken font, so ftdump refuses to do essentially gs's ttfloadtable is strange.

If you have access to a recent Mac OS X box, you can have a look yourself.

- "\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):

Fedora ships 20130608 r30832 , so mine is just a little more recent than yours,
but that shouldn't be an issue.


   (.../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:    Try loading font information for C49+wnmc ...
   LaTeX Font Info:    No file C49wnmc.fd. ...

I'll give that a try again.

- 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.

Hmm, the difference is quite extensive - both the number of subfonts and
the number of actual fonts. I was thinking of reading them back.

Though, in the documentation, it says something about not-used glyph slots
could contain anything (presumably 'random anything').

" Unused positions (either caused by empty code points in the mapping
table or missing glyphs in the TrueType font) will be filled (rather arbitrarily) with characters present in the input encoding but not specified in the output encoding (without the -q option ttf2tfm prints the final output encoding to standard output)."

- 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.

I played with xetex a bit a while ago, but found it doesn't do line breaks, glyph spacings as nice as CJK. Maybe I am old-fashioned :-).

- 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'll keep looking. The doc suggests "updmap --enable Map=MAPFILE" to do each one by one.

- 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).

Thanks for the tips.

- 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.

Thanks for the tips. It is a typeface to mimic stone-cuttings in seals (i.e.
official looking thing, substitute for signatures), so probably have
always been used in a glyph-by-glyph basis, and may have been always strange
that way.

- 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.

Yes - see the other thread. I just mod'ed the font files to read v3 (no post
glyph name table), then they work. They are of the win 3.x era, I believe, newly
acquired, not part of the font sets I played with 10 years ago.

- 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 :-)

:-). It probably make sense 10 years ago to restrict to printing only (just use private for hard-copy), but these days everything is digital, not allowing embedding significantly reduces the usefulness of a type face.

OTOH, I'd prefer not to modify font files - the number of Arphic GPL cjk font
derivatives out there make me crinch... just because one is allowed to modify
a font, and can do it, does not mean one should. :-(.

- 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?

Yes, already tried that. It does something wierd and not quite expected.

I'll probably drop you a sizeable patch to update cjk/doc/pdfhowto/* at some
stage. (if I find the time gradually...).

Hin-Tak



reply via email to

[Prev in Thread] Current Thread [Next in Thread]