Contents

setFont(_:range:)

Sets the font of characters within aRange to aFont.

Declaration

func setFont(_ font: NSFont, range: NSRange)

Discussion

This method applies only to a rich text object.

This method does not include undo support by default. Clients must invoke shouldChangeText(inRanges:replacementStrings:) or shouldChangeText(in:replacementString:) to include this method in an undoable action.

See Also

Changing the font