Function

CTFontDescriptorCreateCopyWithFeature

Copies a font descriptor with new feature settings.

Declaration

CTFontDescriptorRef CTFontDescriptorCreateCopyWithFeature(CTFontDescriptorRef original, CFNumberRef featureTypeIdentifier, CFNumberRef featureSelectorIdentifier);

Parameters

original

The original font descriptor.

featureTypeIdentifier

The feature type identifier.

featureSelectorIdentifier

The feature selector identifier.

Return Value

A copy of the original font descriptor modified with the given feature settings.

Discussion

This is a convenience method to toggle more easily the state of individual features.

See Also

Creating Font Descriptors

CTFontDescriptorCreateWithNameAndSize

Creates a new font descriptor with the provided PostScript name and size.

CTFontDescriptorCreateWithAttributes

Creates a new font descriptor reference from a dictionary of attributes.

CTFontDescriptorCreateCopyWithAttributes

Creates a copy of the original font descriptor with new attributes.

CTFontDescriptorCreateCopyWithVariation

Creates a copy of the original font descriptor with a new variation instance.

CTFontDescriptorCreateCopyWithFamily

Creates a copy of the font descriptor in the specified family based on the traits of the original.

CTFontDescriptorCreateCopyWithSymbolicTraits

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

CTFontDescriptorCreateMatchingFontDescriptors

Returns an array of normalized font descriptors matching the provided descriptor.

CTFontDescriptorCreateMatchingFontDescriptor

Returns the single preferred matching font descriptor based on the original descriptor and system precedence.