Your application can display fonts to the user by providing a Font menu or a Fonts panel. The Font menu, shown in Figure 1-4, is the user interface available in Mac OS 9. Prior to Mac OS X version 10.1, the Font menu was the only Font interface available to Carbon applications. With the release of Mac OS X version 10.2, Carbon applications can provide a Fonts panel, shown in Figure 1-3. The Fonts panel was previously available only to Cocoa applications. If your application runs only in Mac OS X, you should provide a Fonts panel rather than a Font menu. The Fonts panel is the preferred user interface for Fonts.
Fonts Panel is the programming interface that provides the functions you need to support the Fonts panel. Using these functions along with Carbon events, your application can do the following:
Show and hide the Fonts panel
Set selections programmatically in the Fonts panel
Obtain user selections from the Fonts panel
As shown in Figure 1-3, the columns in the Fonts panel improve the viewing and selection of large collections of fonts compared to the hierarchical Font menu shown in Figure 1-4. The columns provide easy access for users to select font, style, and size. The Fonts panel also supports font color, although color is not shown in Figure 1-3. See “Providing a Fonts Panel in a Carbon Application” for instructions and code examples on supporting a Fonts panel in your application.
Last updated: 2007-12-11