[Top][All Lists]

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

[cjk] revisiting ttf2tfm and dvipdfmx

From: Hin-Tak Leung
Subject: [cjk] revisiting ttf2tfm and dvipdfmx
Date: Tue, 09 Jul 2013 22:32:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 SeaMonkey/2.17.1

Hi Werner,

I revisited the pdf howto document bundled with cjk I wrote almost 10 years ago,
having just upgraded to fedora 19 which has a rather up-to-date TexLive
installation. Life has gone very much easier, I am glad to say.

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

I seem to have found three regressions, running the same versions of fonts as
the what the howto was based on. (I stashed the fonts away, and just haven't
touched them for years).

- "ttf2tfm open/wcl-??.ttf -P 3 -E 4 -q -w    address@hidden@" now segfault when
generating the last subfont tfm (#55). It used to be ale to complete the action
10 years ago.

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

- there seems to be an intermittent problem with floating-point exception if
"-f ? " is used with ttf2tfm . (I was able to get it for a day or two, then it
seem to have disappeared - it may come back again).

(I put the trace at the end of this e-mail for you to have a look yourself).

I also seems to have overlooked one issue 10 years ago - or maybe there wasn't a
clear message.

- A few old font files generate this:
"Font C00/aavpop/m/n/12/02=aavpop02 at 12.0pt not loadable: Bad metric (TFM) 
The the corresponding glyphs are/were missing. (They were missing in 10-year-old
pdf's, so it is not a new problem, but one that I overlooked). I also see this with a few new fonts.

I have a few new questions/issues for you also:

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

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

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

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

Some issues not really to do with cjk, but I hope you might shed some lights 

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

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

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

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


P.S. Here are the locations of segfault and floating point exceptions:

(gdb) run open/wcl-01.ttf   -P 3 -E 4 -q -w    address@hidden@
Starting program: /usr/bin/ttf2tfm open/wcl-01.ttf   -P 3 -E 4 -q -w    

Program received signal SIGSEGV, Segmentation fault.
0x000000000041101c in TT_Get_Short () at ./file.c:905
905         getshort = ((Short)CUR_Frame.cursor[0] << 8) |
(gdb) bt
#0  0x000000000041101c in TT_Get_Short () at ./file.c:905
#1 Load_TrueType_Glyph (load_flags=<optimized out>, glyph_index=<optimized out>, glyph=<optimized out>, instance=<optimized out
at /usr/src/debug/texlive-2012/source/libs/freetype/freetype-1.5/lib/ttgload.c:813 #2 TT_Load_Glyph (instance=..., glyph=..., address@hidden, loadFlags=<optimized out>, address@hidden) at /usr/src/debug/texlive-2012/source/libs/freetype/freetype-1.5/lib/ttapi.c:1224 #3 0x00000000004071f1 in readttf (address@hidden, quiet=True, address@hidden)
    at ../../../texk/ttf2pk/ttfaux.c:525
#4 0x0000000000401c86 in main (argc=<optimized out>, argv=<optimized out>) at ../../../texk/ttf2pk/ttf2tfm.c:907

(gdb) run  open-more/mikachanALL.ttc -f 1 -q -w address@hidden@
Starting program: /usr/bin/ttf2tfm open-more/mikachanALL.ttc -f 1 -q -w 

Program received signal SIGFPE, Arithmetic exception.
0x0000000000407443 in readttf (address@hidden, quiet=True, address@hidden)
    at ../../../texk/ttf2pk/ttfaux.c:262
262         fnt->xheight = properties.os2->sxHeight * 1000 / fnt->units_per_em;
(gdb) bt
#0 0x0000000000407443 in readttf (address@hidden, quiet=True, address@hidden)
    at ../../../texk/ttf2pk/ttfaux.c:262
#1 0x0000000000401c86 in main (argc=<optimized out>, argv=<optimized out>) at ../../../texk/ttf2pk/ttf2tfm.c:907
(gdb) print fnt->units_per_em
$1 = 0
(gdb) print properties.os2->sxHeight
$2 = 6896

reply via email to

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