Contents

CTFontDescriptorCreateCopyWithSymbolicTraits(_:_:_:)

Creates a copy of the font descriptor with the specified symbolic traits as the original.

Declaration

func CTFontDescriptorCreateCopyWithSymbolicTraits(_ original: CTFontDescriptor, _ symTraitValue: CTFontSymbolicTraits, _ symTraitMask: CTFontSymbolicTraits) -> CTFontDescriptor?

Parameters

  • original:

    The original font descriptor.

  • symTraitValue:

    The value of the symbolic traits.

  • symTraitMask:

    The mask bits of the symbolic traits. This parameter represents a bitfield that indicates which traits should be changed and which should be taken from the original font descriptor.

Return Value

Returns a new font descriptor reference in the same family with the given symbolic traits, or NULL if no matching font descriptor is found in the system.

Discussion

This bitfield of symTraitValue parameter indicates the desired value for the traits specified by the symTraitMask parameter. Used in conjunction, they can allow for trait removal as well as addition.

See Also

Creating Font Descriptors