At 09:08 AM 9/7/2002 +1200, Will Lau wrote: >Does anyone have any documentation for defining OS5 Hi Density fonts? We >can't find any info on the PalmSource developer site.
PalmSource has never really defined much info on fonts, including the high-res variety, but here's what I've been able to tell. *** Tools Support The nFNT resource type is still the same. If you use CodeWarrior with the Palm OS 5 SDK, you can define a font family that will cause the PalmRez post-linker to bundle multiple fonts of different densities together. *** Internal Layout If you look in the Palm OS 5 SDK headers, specifically Font.h, you'll see a new type, FontTypeV2, which has the same layout as the original FontType, but additional fields at the end to specify multiple densities in one font. There is only one set of metrics for a font, since there is only a single offset/width table, and it applies only to single density fonts. If you look in the Boot database on the Palm OS 5 simulator, you'll find the built-in system fonts in the afnx records. These are the same format as the 68K fonts, except the data is little endian and the fields follow 32-bit alignment rules. I just decoded the whole header of afnx 10000, and it looks consistent with stdFont, with both density 72 (single) and 144 (double) glyphs. *** Multiple density fonts on older OSes I think that multi-density fonts will work on older OSes, from what I can see. The font code in OS 4, for example, wouldn't ever look at the new version and density fields, since they are past the end of the structure. Both versions have a owTLoc field that points to the offset/width data, but I'm not exactly sure how the system determines that start of the glyph data. -- Ben Combee <[EMAIL PROTECTED]> CodeWarrior for Palm OS technical lead Palm OS programming help @ www.palmoswerks.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
