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.

Overview

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.

Symbols

Creating a Run Delegate

Getting Information About a Run Delegate

func CTRunDelegateGetRefCon(CTRunDelegate)

Returns a run delegate’s “refCon” value.

func 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.

CTRunDelegate

The type of the CTRunDelegate opaque object.

Constants

Run Delegate Versions

The version of the run delegate.