Reference information on CreateScalableFontResource

Jeremy White jwhite at codeweavers.com
Wed Apr 9 23:04:06 CDT 2008


I'm doing a brain dump for posterity on this task; you can tune out
of this email; it's mostly meant for Google archiving purposes.

I've spent far more time than I should on this implementation;
I originally did a quick + dirty version that was not binary
compatible with Windows .fot files.  Worked like a charm; I could
run Civ III (yay!).

But Alexandre said, gee, it should be easy to make it create a binary
compatible .fot file, take an afternoon and do that, why don't you, Jer?
Several weeks and a lot of swearing later, I now know far more about the
format of .fot files and fontdir resource structures than I care to.

I'm attaching a program that was useful to me; it dumped many chunks
of info about a .ttf file from FreeType.  Comparing that to a .fot file
generated on Windows was helpful.  I'm also attaching a hex dump of a .fot
file with my annotation on the basic structure.

The hard parts were that the .fot format seems to be an NE image, but
it seems to have subtle bugs in it and that the FONTDIR resource structure
is not well documented.  I've mostly sussed out how to use Freetype
to replicate most of the members; there are still a few I don't have
quite right.  (And I probably get this all wrong in non US or double
byte locales.  :-/)

The previous patches contain essentially all of my hard won knowledge
of the FONTDIR structure.

Cheers,

Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dumpttf.c
Type: text/x-csrc
Size: 6680 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20080409/8bc8eeaa/attachment.c 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lucon.hexdump
Url: http://www.winehq.org/pipermail/wine-devel/attachments/20080409/8bc8eeaa/attachment.txt 


More information about the wine-devel mailing list