djcsdy / swfmill

Generate or decompile Adobe Flash SWF files using an XML dialect. Inspect and modify the XML by hand, or by using a built in XSLT processor.
http://www.swfmill.org/
GNU General Public License v2.0
131 stars 28 forks source link

getVerticalMetrics of a ttf font doesn't always work #22

Closed mekhall closed 11 years ago

mekhall commented 11 years ago

On my Ubuntu 12.10 machine running the latest swfmill to build an swf containing a ttf font fails.

In the getVerticalMetrics method of swft_import_ttf.cpp there is a peculiar byte-picking going on from a struct returned from freetype. Why?

For example, the ascender value in the pOS2 case is taken from offset 76 and 77 of the struct. On my machine that seems to lie in offset 90 and 91...

Why not use the struct member by name?

djcsdy commented 11 years ago

Honestly I have no idea why the original author of that code decided to implement it in such a strange way.

It will be fixed in the next release. Sorry it took so long.

mekhall commented 11 years ago

That's great! Thanks for fixing!

djcsdy commented 11 years ago

I’ve released swfmill 0.3.3, which includes this fix.