CTFontCollection

A font collection.

Overview

A font collection represents a group of font descriptors taken together as a single object.

Font collections provide the capabilities of font enumeration, access to global and custom font collections, and access to the font descriptors comprising the collection.

Topics

Creating Font Collections

CTFontCollectionCreateFromAvailableFonts

Returns a new font collection containing all available fonts.

CTFontCollectionCreateWithFontDescriptors

Returns a new font collection based on the given array of font descriptors.

CTFontCollectionCreateCopyWithFontDescriptors

Returns a copy of the original collection augmented with the given new font descriptors.

Getting Font Descriptors

CTFontCollectionCreateMatchingFontDescriptors

Returns an array of font descriptors matching the collection.

CTFontCollectionCreateMatchingFontDescriptorsSortedWithCallback

Returns the array of matching font descriptors sorted with the callback function.

CTFontCollectionSortDescriptorsCallback

Returns the matching font descriptors of a collection in sorted order.

Getting the Type Identifier

CTFontCollectionGetTypeID

Returns the type identifier for Core Text font collection references.

Data Types

CTFontCollectionRef

A reference to a font collection.

CTMutableFontCollectionRef

A reference to a mutable font collection.

Constants

kCTFontCollectionRemoveDuplicatesOption

An option key to specify filtering of duplicates.

CTFontCollectionCopyOptions

Option bits for use with CTFontCollectionCopyFontAttribute(s).

See Also

Opaque Types

CTFont

A font object.

CTFramesetter

Generate text frames.

CTGlyphInfo

Override a font's specified mapping from Unicode to the glyph ID.

CTLine

A line of text.

CTParagraphStyle

Paragraph or ruler attributes in an attributed string.

CTTextTab

A tab in a paragraph style, storing an alignment type and location.

CTTypesetter

A typesetter which performs line layout.