Contents

modifyFont(_:)

Modifies a trait of the font.

Declaration

func modifyFont(_ sender: Any?)

Parameters

  • sender:

    The control that sent the message.

Discussion

By default, the action message is changeFont:. This action method causes the receiver to send its action message up the responder chain.

When a responder replies by providing a font to convert in a convert(_:) message, the receiver converts the font in the manner specified by sender. The conversion is determined by sending a tag message to sender and invoking a corresponding method:

Sender’s Tag

Method Used

NSNoFontChangeAction

None; the font is returned unchanged.

NSViaPanelFontAction

The Font panel’s Convert(_:).

NSAddTraitFontAction

Convert(_:tohavetrait:).

NSRemoveTraitFontAction

Convert(_:tonothavetrait:).

NSSizeUpFontAction

Convert(_:tosize:).

NSSizeDownFontAction

Convert(_:tosize:).

NSHeavierFontAction

Convertweight(_:of:).

NSLighterFontAction

Convertweight(_:of:).

See Also

Sending Action Methods