Apple IIgs #104
Font Manager Fundamentals

This Technical Note discusses information and philosophy of that typographical toolset, the Font Manager.

Note: For some reason, the author information for this Note is missing on the version available online. -- AH

FixFontMenu only works once per FMStartUp

You may have noticed that none of the Font Manager calls that translate font family numbers to menu item IDs (or vice-versa) require a menu ID as a parameter. That's because the Font Manager was designed with the idea that an application would only need one font menu, so it keeps one correspondence in private static storage.

This means that once someone has called FixFontMenu, any later FixFontMenu call during that Font Manager session will destroy the results of the first one, unless all the parameters are identical. The Font Manager doesn't remove the font menu items, but it does not return the correct results from FamNum2ItemID or ItemID2FamNum.

This means if you're a new desk accessory, the Font Manager can't help you create a font menu -- attempting to use FixFontMenu will make any application font menu useless. You can use Font Manager routines such as CountFamiles, FindFamily and GetFamInfo to obtain all the information necessary to build your own font menu (or font choosing dialog box, for that matter -- but if you create a dialog for an NDA, remember that it has to fit in 320 mode also).

Font styling requires QuickDraw Auxiliary

The Font Manager can't create fonts with outline, shadow or italic styles unless QuickDraw Auxiliary (tool set #18) is present and started. These facts are mentioned in pieces other places, but not in one place -- if you want normal Font Manager operations, you must load and start QuickDraw Auxiliary.

Further Reference

This and all of the other Apple II Technical Notes have been converted to HTML by Aaron Heiss as a public service to the Apple II community, with permission by Apple Computer, Inc. Any and all trademarks, registered and otherwise, are properties of their owners.