Returns an array of normalized font descriptors matching the provided descriptor.
SDKs
- iOS 3.2+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Core Text
Declaration
CFArray Ref CTFontDescriptorCreateMatchingFontDescriptors(CTFont Descriptor Ref descriptor, CFSet Ref mandatoryAttributes);
Parameters
descriptor
The font descriptor.
mandatoryAttributes
A set of attribute keys that must be identically matched in any returned font descriptors. May be
NULL
.
Return Value
A retained array of normalized font descriptors matching the attributes present in descriptor
.
Discussion
If descriptor
itself is normalized, then the array will contain only one item: the original descriptor. In the context of font descriptors, normalized infers that the input values were matched up with actual existing fonts, and the descriptors for those existing fonts are the returned normalized descriptors.