cjk-list
[Top][All Lists]
Advanced

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

[cjk] invalid magic number in TTF (was: revisiting ttf2tfm and dvipdfmx)


From: Werner LEMBERG
Subject: [cjk] invalid magic number in TTF (was: revisiting ttf2tfm and dvipdfmx)
Date: Thu, 18 Jul 2013 12:43:17 +0200 (CEST)

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

Apple indeed ships a broken font since it doesn't conform to Apple's
own TrueType standard
(https://developer.apple.com/fonts/TTRefMan/RM06/Chap6head.html): The
`magic number' in the `bhed' table should be 0x5F0F3CF5, however, in
this font it is 0x000000FF.[1]  Actually, this is the first font ever
where I have seen such a problem.  Tsk, tsk, tsk.

I've just changed FreeType so that an incorrect magic number within a
TTF causes a warning instead of an error, and now the font gets loaded
without any problems.


    Werner


[1] The font I have tested is version 6.0d2e1 from 2009, having a size
    of 7108232 bytes.  Interestingly, the `bhed' table has a bad
    checksum, so something has gone wrong while creating the font.
    Additionally, given that the font only contains 16x16 bitmaps, it
    is excessively large: The same data would easily fit into a TTF
    with a size of approx. 1 MByte.

reply via email to

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