CTRunDelegate

A run delegate.

Overview

A run delegate is assigned to a run (attribute range) to control typographic traits such glyph ascent, glyph descent, and glyph width.

The callbacks defined for CTRunDelegate objects are provided by the owner of a run delegate and are used to modify glyph metrics during layout. The values returned by the delegate are applied to each glyph in the run or runs corresponding to the attribute with that delegate.

Topics

Creating a Run Delegate

CTRunDelegateCreate

Creates an immutable instance of a run delegate.

Getting Information About a Run Delegate

CTRunDelegateGetRefCon

Returns a run delegate’s “refCon” value.

CTRunDelegateGetTypeID

Returns the type of CTRunDelegate objects.

Callbacks

CTRunDelegateGetAscentCallback

Defines a pointer to a function that determines typographic ascent of glyphs in the run.

CTRunDelegateGetDescentCallback

Defines a pointer to a function that determines typographic descent of glyphs in the run.

CTRunDelegateGetWidthCallback

Defines a pointer to a function that determines the typographic width of glyphs in the run.

CTRunDelegateDeallocateCallback

Defines a pointer to a function that is invoked when a CTRunDelegate object is deallocated.

Data Types

CTRunDelegateCallbacks

A structure holding pointers to callbacks implemented by the run delegate.

CTRunDelegateRef

The type of the CTRunDelegate opaque object.

Constants

Run Delegate Versions

The version of the run delegate.

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.