At 17:24 2002-10-23 -0700, you wrote:
Palm OS 5 is going to require you to define multiple density fonts. If you look at Constructor 1.8, you'll see that there is an ability to create a "Font Family", which currently is a pair of fonts, one at density 72, the other at density 144, that share a single metrics table -- the metrics is determined by the low density font, so all the spacing, height, and width values used by the high density font are constrained to be double the value of the low density version.Currently we use application custom fonts. We DO NOT include them into our main application as a resource, instead we embed them into each database that a user has. We store the fonts as just plain records, then we load them (in the application) by getting a handle to the record, then locking it and casting it as a FontType*. Then we use FntDefineFont and an incrementing number to define the fonts.We have three different sizes 8, 11, 22 - I use the 11 as a small font and the 22 as a large font on Sony Devices that are in hi-res mode. (320x320). Unfortunately PalmOS 5.x hi-res doesn't quite perform the same way. (e.g. I can't just have a 22pt font and put it on the hi-res screen and it will show up as a sharp 11pt font.) Since the Sony does this, is there a way to make the new OS5 do the same thing?
You should be able to use Constructor's font families to pull in a pair of fonts, and then save out that combined NFNT file, and then use that with FntDefineFont.We add our custom fonts to our database by taking the font.bin file, loading it as a byte-array then storing that data directly into a palm record. We get the bin file by creating the font with xFont, adding the font resource into the constructor by adding a font.rcp file that has an entry like: FONT ID 3000 FONTID 128 "c:\\src\\towncompass\\Fonts\\font_8.pfn" (the pfn was created by xFont) After compiling the prc with this font resource in it, I then use the prc2bin application to pull our all the resources, then keeping the resulting NFNT resources.
Please read the Fonts section of the Palm OS SDK Reference in the Palm OS 5 SDK -- it actually talks about how all of this work, and provides official documentation of the font formats.
I don't think PilRC has been updated to support multiple density fonts yet, but I would expect there to be some support before too long.
--
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/
