Retired Document
Important: This document has been retired. For information on the font panel, see The Font Panel in Cocoa Text Architecture Guide.
Creating a Font Panel
In general, you add the facilities of the font panel to your application, along with the NSFontManager and the Font menu, through which the user opens the font panel, using Interface Builder. You do this by dragging a Font or Format menu (which contains a Font submenu) into one of your application’s menus. At runtime, the font panel object is created and hooked into the font conversion system. You can also create (or access) the font panel using the sharedFontPanel
class method.
You can add a custom view object to an NSFontPanel using setAccessoryView
, allowing you to add custom controls to the font panel. You can also limit the fonts displayed (by default, all fonts) by assigning a delegate to the application’s font manager object (see The Font Panel).
In Objective-C, if you want the NSFontManager to instantiate the font panel from some class other than NSFontPanel, use the NSFontManager class method setFontPanelFactory:
. See Converting Fonts Manually for more information on using the font conversion system.
Copyright © 1997, 2013 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2013-04-23