Hello everbody,
as said above, I wrote a little Python script that reads WOFF files (my own free fonts), extracts the embedded TrueType font data tables and rewrites them into TrueType font files. Well, it should theoretically. :-)
I read the specs (WOFF -- TrueType) and did everything as stated there. Here I posted a short overview of all relevant informations: Overview. I decompressed the font data tables where needed, wrote all header structs as said in the TrueType spec and, of course, recalculated all length/offset values.
I have two assumptions why the font files aren't recognized:
I used wrong values as
searchRange
,entrySelector
andrangeShift
in the offset subtable. Although it's well described how to calculcate these, I bother if my values were right, because I got floats but only integers were allowed (had to round them).The order in which I wrote the tables. See below for the order I used (in the table directory and the following data part)
Table order:
cmap
cvt
FFTM
fpgm
gasp
GDEF
glyf
GPOS
GSUB
head
hhea
hmtx
loca
maxp
name
OS/2
post
prep
I'd be thankful if someone could help me.
Best regards,
peta