Instance Method


Returns the default baseline offset that the layout manager's typesetter uses for the specified font.


func defaultBaselineOffset(for theFont: NSFont) -> CGFloat



The font for which to return the default baseline offset.

Return Value

The default baseline offset for a line of text drawn using theFont.


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

See Also

Managing the Typesetter

var typesetter: NSTypesetter

The current typesetter.

enum NSLayoutManager.TypesetterBehavior

Constants that determine the layout manager's behavior during layout.

func defaultLineHeight(for: NSFont) -> CGFloat

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