[pdftex] Problem with TrueType fonts - error "Bad metric"

Taco Hoekwater taco at elvenkind.com
Sat Feb 19 16:20:13 CET 2005


Stefan Ohletz wrote:
> Thank you very much for your help. I solved the problem!

excellent!

> It doesn't seem to be a real bug in ttf2afm, because the demo version of 
> a TrueType font editor revealed that XHeight was set to 64960 already in 
> the font file, in the section "Include PCL5 data".

This sort of thing happens regularly. One thing one learns quickly is
that when a TTF font vendor says their fonts are 'high quality' it only
means that there are no obvious missing characters in latin-1, and that
the font produces acceptable baselines when viewed on the screen.

The TTF font format is pretty good, but the Windows implementation is
built to minimize 'user discomfort', so it either ignores or works
around faulty fonts as much as it possibly can.

Designers know this, so a lot of them do not bother to do QA on the
actual font (hey, it works in Word, Ok?). End result: the overall
quality of available TTF fonts is less-than-perfect.

> To me as a newbie it seems that one has to know a lot about the file 
> formats and the myriads of options one can change in the .ttf font file, 
> which probably also means that one has to have ready a font editor to 
> fix some problems (well, maybe it would suffice to get to know the .afm 
> format, would it?).

Studying AFM format is definately worth the effort. It is easy to fix
by hand in an editor, and it is quite easy to learn.

> Why isn't it possible for TeX to use such apparently working open 
> source libraries?

This is a simple trade-off. If you want to be able to work with dodgy
fonts easily, you have to sacrifice quality. E.g.: If TeX would use
the freetype library instead of TFM files, it couldn't do math
typesetting [as well as it does].

Greetings, Taco




More information about the pdftex mailing list