Instance Method

defaultLineHeight(for:)

Returns the default line height for a line of text drawn using a given font.

Declaration

func defaultLineHeight(for theFont: NSFont) -> CGFloat

Parameters

theFont

The font for which to determine the default line height.

Return Value

The default line height for a line of text drawn using theFont.

Discussion

The value returned may vary according to the layout manager’s typesetter behavior.

See Also

Managing the Typesetter

var typesetter: NSTypesetter

The current typesetter.

func defaultBaselineOffset(for: NSFont) -> CGFloat

Returns the default baseline offset specified by the layout manager's typesetter behavior for the given font.