>From the Palm OS Reference, concerning the fontP parameter to >FntDefineFont... > > This resource must remain locked until the calling application undefines > the custom font or quits. > >The question is how is a custom font undefined? Is it just a matter of >calling FntDefineFont with the same font ID and a NULL fontP,
This used to be the recommended technique, but a bug in 4.0 causes a NULL pointer reference warning in Poser. Which reminds me, I need to tell Keith & the doc writer about that. >or is it >just enough that the font ID is no longer used by anything? Yes. >I can't >exactly wait until the app exits, because different custom fonts may be >used at different times while the app runs. Only one will ever be used at >one time, though. You can re-define the custom font associated with a font ID via multiple calls to FntDefineFont, as long as you make sure the old font is no longer used anywhere before you change it. I remember this being a bug that one developer ran into, where they still had a field which was using a custom font. When they re-defined the font, the field got confused (because the text needed to be re-wrapped, and the line starts array needed more entries) and this then triggered a hard-to-debug problem much later in the code. -- Ken -- Ken Krugler TransPac Software, Inc. <http://www.transpac.com> +1 530-470-9200 -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
