Contents

substituteFont(for:)

Replaces the specified font with a suitable screen font if one is available.

Declaration

func substituteFont(for originalFont: NSFont) -> NSFont

Parameters

  • originalFont:

    The font to replace.

Return Value

A screen font suitable for use in place of originalFont, or simply originalFont if a screen font can’t be used or isn’t available.

Discussion

A screen font can be substituted if the receiver is set to use screen fonts and if no NSTextView associated with the receiver is scaled or rotated.

See Also

Methods