Contents

convert(_:toNotHaveTrait:)

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

Declaration

func convert(_ fontObj: NSFont, toNotHaveTrait trait: NSFontTraitMask) -> NSFont

Parameters

  • fontObj:

    The font whose traits are matched.

  • trait:

    The mask for the traits to remove, created using the C bitwise OR operator to combine the traits described in Constants. Using Boldfontmask or Italicfontmask 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

Related Documentation

Converting Fonts Manually