Contents

selectedFont

The currently selected font object.

Declaration

var selectedFont: NSFont? { get }

Discussion

The value of this property is the last font recorded with a setSelectedFont(_:isMultiple:) message.

While fonts are being converted in response to a convert(_:) message, you can determine the font selected in the Font panel like this:

NSFontManager *fontManager = [NSFontManager sharedFontManager];
panelFont = [fontManager convertFont:[fontManager.selectedFont]];

See Also

Setting and Examining the Selected Font