Instance Method

convertFontTraits:

Converts font traits to a new traits mask value.

Declaration

- (NSFontTraitMask)convertFontTraits:(NSFontTraitMask)traits;

Parameters

traits

The current font traits.

Return Value

The new traits mask value to be used by convertFont:.

Discussion

This method is intended to be invoked to query the font traits while the action message (usually changeFont:) is being invoked when the current font action is either NSAddTraitFontAction or NSRemoveTraitFontAction.

See Also

Converting Fonts Manually

- convertFont:toFace:

Returns a font whose traits are as similar as possible to those of the given font except for the typeface, which is changed to the given typeface.

- convertFont:toFamily:

Returns a font whose traits are as similar as possible to those of the given font except for the font family, which is changed to the given family.

- convertFont:toHaveTrait:

Returns a new version of the font object containing a single additional trait.

- convertFont:toNotHaveTrait:

Returns a new version of a font object without the specified traits.

- convertFont:toSize:

Returns a font object whose traits are the same as those of the given font, except for the size, which is changed to the given size.

- convertWeight:ofFont:

Returns a font object whose weight is greater or lesser than that of the given font.

currentFontAction

The current font conversion action.