Instance Method

object(forKey:)

Returns the font attribute specified by the given key.

Declaration

func object(forKey attribute: NSFontDescriptor.AttributeName) -> Any?

Parameters

anAttribute

The font attribute key.

Return Value

The font attribute corresponding to anAttribute. For valid values of anAttribute, see Font Attributes.

See Also

Getting the Font Attributes

var fontAttributes: [NSFontDescriptor.AttributeName : Any]

The receiver’s dictionary of attributes.

struct NSFontDescriptor.AttributeName

These font attributes are defined by NSFontDescriptor.

var matrix: AffineTransform?

The current transform matrix of the receiver.

var pointSize: CGFloat

The point size of the receiver.

var postscriptName: String?

The PostScript name of the receiver.