Framework

Core Text

Create text layouts using high-quality typesetting, character-to-glyph conversion, and positioning of glyphs in lines and paragraphs. Optimize font handling with automatic font substitution, and get easy access to font metrics and glyph data.

Overview

This collection of documents is the API reference for the Core Text framework. Core Text provides a modern, low-level programming interface for laying out text and handling fonts. The Core Text layout engine is designed for high performance, ease of use, and close integration with Core Foundation. The text layout API provides high-quality typesetting, including character-to-glyph conversion, with ligatures, kerning, and so on. The complementary Core Text font technology provides automatic font substitution (cascading), font descriptors and collections, easy access to font metrics and glyph data, and many other features.

Multicore Considerations: All individual functions in Core Text are thread safe. Font objects (CTFont, CTFontDescriptor, and associated objects) can be used simultaneously by multiple operations, work queues, or threads. However, the layout objects (CTTypesetter, CTFramesetter, CTRun, CTLine, CTFrame, and associated objects) should be used in a single operation, work queue, or thread.

Symbols

Opaque Types

CTFont

The CTFont opaque type represents a Core Text font object. Font objects represent fonts to an application, providing access to characteristics of the font, such as point size, transform matrix, and other attributes. Fonts provide assistance in laying out glyphs relative to one another and are used to establish the current font when drawing in a graphics context.

CTFontCollection

The CTFontCollection opaque type represents a font collection, that is, a group of font descriptors taken together as a single object.

CTFontDescriptor

The CTFontDescriptor opaque type represents a font descriptor, that is, a dictionary of attributes (such as name, point size, and variation) that can completely specify a font.

CTFrame

The CTFrame opaque type represents a frame containing multiple lines of text. The frame object is the output resulting from the text-framing process performed by a framesetter object.

CTFramesetter

The CTFramesetter opaque type is used to generate text frames. That is, CTFramesetter is an object factory for CTFrame objects.

CTGlyphInfo

The CTGlyphInfo opaque type enables you to override a font's specified mapping from Unicode to the glyph ID.

CTLine

The CTLine opaque type represents a line of text.

CTParagraphStyle

The CTParagraphStyle opaque type represents paragraph or ruler attributes in an attributed string.

CTRun

The CTRun opaque type represents a glyph run, which is a set of consecutive glyphs sharing the same attributes and direction.

CTRunDelegate

The CTRunDelegate opaque type represents a run delegate, which is assigned to a run (attribute range) to control typographic traits such glyph ascent, glyph descent, and glyph width.

CTTextTab

The CTTextTab opaque type represents a tab in a paragraph style, storing an alignment type and location.

CTTypesetter

The CTTypesetter opaque type represents a typesetter, which performs line layout.

Classes

CTFont

A reference to a Core Text font object.

CTFontCollection

A reference to a font collection.

CTFontDescriptor

A reference to a CTFontDescriptor object.

CTFrame

A reference to a Core text frame object.

CTFramesetter

A reference to a Core Foundation framesetter object.

CTGlyphInfo

A reference to a glyph info object.

CTLine

A reference to a line object.

CTMutableFontCollection

A reference to a mutable font collection.

CTParagraphStyle

A reference to a Core Text paragraph style.

CTRubyAnnotation
CTRun

A reference to a run object.

CTTextTab

A reference to a text tab object.

CTTypesetter

A reference to a typesetter object.

See Also

Related Documentation