---
title: CTRun
framework: coretext
role: symbol
role_heading: Class
path: coretext/ctrun
---

# CTRun

A glyph run.

## Declaration

```swift
class CTRun
```

## Overview

Overview A glyph run is a set of consecutive glyphs sharing the same attributes and direction. The typesetter creates glyph runs as it produces lines from character strings, attributes, and font objects. That is, a line is constructed of one or more glyphs runs. Glyph runs can draw themselves into a graphic context, if desired, although most users have no need to interact directly with glyph runs.

## Topics

### Getting Glyph Run Data

- [CTRunGetGlyphCount(_:)](coretext/ctrungetglyphcount(_:).md)
- [CTRunGetAttributes(_:)](coretext/ctrungetattributes(_:).md)
- [CTRunGetStatus(_:)](coretext/ctrungetstatus(_:).md)
- [CTRunGetGlyphsPtr(_:)](coretext/ctrungetglyphsptr(_:).md)
- [CTRunGetGlyphs(_:_:_:)](coretext/ctrungetglyphs(_:_:_:).md)
- [CTRunGetPositionsPtr(_:)](coretext/ctrungetpositionsptr(_:).md)
- [CTRunGetPositions(_:_:_:)](coretext/ctrungetpositions(_:_:_:).md)
- [CTRunGetAdvancesPtr(_:)](coretext/ctrungetadvancesptr(_:).md)
- [CTRunGetAdvances(_:_:_:)](coretext/ctrungetadvances(_:_:_:).md)
- [CTRunGetStringIndicesPtr(_:)](coretext/ctrungetstringindicesptr(_:).md)
- [CTRunGetStringIndices(_:_:_:)](coretext/ctrungetstringindices(_:_:_:).md)
- [CTRunGetStringRange(_:)](coretext/ctrungetstringrange(_:).md)

### Measuring the Glyph Run

- [CTLineGetBoundsWithOptions(_:_:)](coretext/ctlinegetboundswithoptions(_:_:).md)
- [CTRunGetTypographicBounds(_:_:_:_:_:)](coretext/ctrungettypographicbounds(_:_:_:_:_:).md)
- [CTRunGetImageBounds(_:_:_:)](coretext/ctrungetimagebounds(_:_:_:).md)
- [CTRunGetBaseAdvancesAndOrigins(_:_:_:_:)](coretext/ctrungetbaseadvancesandorigins(_:_:_:_:).md)

### Drawing the Glyph Run

- [CTRunDraw(_:_:_:)](coretext/ctrundraw(_:_:_:).md)
- [CTRunGetTextMatrix(_:)](coretext/ctrungettextmatrix(_:).md)

### Getting the Type Identifier

- [CTRunGetTypeID()](coretext/ctrungettypeid().md)

### Constants

- [CTRunStatus](coretext/ctrunstatus.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)

## See Also

### Opaque Types

- [CTFont](coretext/ctfont.md)
- [CTFontCollection](coretext/ctfontcollection.md)
- [CTFontDescriptor](coretext/ctfontdescriptor.md)
- [CTFrame](coretext/ctframe.md)
- [CTFramesetter](coretext/ctframesetter.md)
- [CTGlyphInfo](coretext/ctglyphinfo.md)
- [CTLine](coretext/ctline.md)
- [CTParagraphStyle](coretext/ctparagraphstyle.md)
- [CTRunDelegate](coretext/ctrundelegate.md)
- [CTTextTab](coretext/cttexttab.md)
- [CTTypesetter](coretext/cttypesetter.md)
