Function

CTFontDescriptorCreateWithAttributes

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

Declaration

CTFontDescriptorRef CTFontDescriptorCreateWithAttributes(CFDictionaryRef attributes);

Parameters

attributes

A dictionary containing arbitrary attributes.

Return Value

A new font descriptor with the attributes specified.

Discussion

The provided attribute dictionary can contain arbitrary attributes that are preserved; however, unrecognized attributes are ignored on font creation and may not be preserved over the round trip from descriptor to font and back to descriptor.

See Also

Creating Font Descriptors

CTFontDescriptorCreateWithNameAndSize

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

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.

CTFontDescriptorCreateCopyWithFeature

Copies a font descriptor with new feature settings.

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.