Instance Method

convertFont:toNotHaveTrait:

Returns an NSFont object with the same traits as the given font, except for the traits in the given font trait mask, which are removed.

Declaration

- (NSFont *)convertFont:(NSFont *)fontObj toNotHaveTrait:(NSFontTraitMask)trait;

Parameters

aFont

The font whose traits are matched.

fontTraitMask

The mask for the traits to remove, created using the C bitwise OR operator to combine the traits described in Constants. Using NSBoldFontMask or NSItalicFontMask removes the bold or italic trait, respectively.

Return Value

A font with matching traits minus the given traits, or aFont if it can’t be converted.

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 font whose traits are the same as those of the given font, except that the traits are changed to include the single specified trait.

- convertFont:toSize:

Returns an NSFont 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 an NSFont object whose weight is greater or lesser than that of the given font, if possible.

currentFontAction

The current font conversion action.

- convertFontTraits:

Converts font traits to a new traits mask value.