SetFontLock
SetFontLock
Lock or release the most-recently used font SetFontLock locks or unlocks a font in the heap. Fonts are normally marked as purgeable, so this lets you prevent a font resource from being purged (e.g.,
when you'll need a font but its disk may get ejected).
lockFlag specifies whether or not you want the last-used font to be purgeable.
It is one of:
TRUE Read the font into memory (if it is not already there) and lock the font in the heap; disallow purging of it.
Notes: SetFontLock affects the font most recently used in any of the that other functions call these functions internally.
There is no reason to lock or unlock the system font, since it resides in
ROM.
One case where you might need this function is when you have a dialog or a
menu using a font other than the system font and you expect to perform a
RAM-intensive operation during which the disk containing the font resource
may be ejected (e.g., a disk copy operation). Be sure to call
avoid fragmentation.
resources EXCEPT fonts, so you should use SetFontLock in conjunction with these calls (or stick to exclusive use of the system font).