Class

NSFontPanel

The Font panel—a user interface object that displays a list of available fonts, letting the user preview them and change the font used to display text.

Declaration

@interface NSFontPanel : NSPanel

Overview

Actual changes to the font panel are made through conversion messages sent to the shared NSFontManager instance. There’s only one Font panel for each app.

Topics

Getting the Font Panel

sharedFontPanel

Returns the single NSFontPanel instance for the application, creating it if necessary.

sharedFontPanelExists

Returns YES if the shared Font panel has been created, NO if it hasn’t.

Enabling Font Changes

enabled

A Boolean that shows whether the receiver’s Set button is enabled.

- reloadDefaultFontFamilies

Triggers a reload to the default state, so that the delegate is called.

Updating the Font Panel

- setPanelFont:isMultiple:

Sets the selected font in the receiver to the specified font.

Converting Fonts

- panelConvertFont:

Converts the specified font using the settings in the receiver, with the aid of the shared NSFontManager if necessary.

Working in Modal Loops

worksWhenModal

A Boolean that indicates whether the receiver allows fonts to be changed in modal windows and panels.

Setting an Accessory View

accessoryView

The specified view as the receiver’s accessory view, allowing you to add custom controls to your application’s Font panel without having to create a subclass.

Constants

Tags of Views in the FontPanel

These constants are obsolete and should not be used.

Deprecated

Relationships

Inherits From

See Also

Font Panels

NSFontPanelValidation

A set of methods you use to tell the Font panel to display some or all of its elements.