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

Getting Information About a Run Delegate

func CTRunDelegateGetRefCon(CTRunDelegate) -> UnsafeMutableRawPointer

Returns a run delegate’s “refCon” value.

func CTRunDelegateGetTypeID() -> CFTypeID

Returns the type of CTRunDelegate objects.

Callbacks

typealias CTRunDelegateGetAscentCallback

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

typealias CTRunDelegateGetDescentCallback

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

typealias CTRunDelegateGetWidthCallback

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

typealias CTRunDelegateDeallocateCallback

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

Data Types

struct CTRunDelegateCallbacks

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

class CTRunDelegate

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.