---
title: CTTypesetter
framework: coretext
role: symbol
role_heading: Class
path: coretext/cttypesetter
---

# CTTypesetter

A typesetter which performs line layout.

## Declaration

```swift
class CTTypesetter
```

## Overview

Overview Line layout includes word wrapping, hyphenation, and line breaking in either vertical or horizontal rectangles. A typesetter object takes as input an attributed string and produces a line of typeset glyphs (composed into glyph runs) in a CTLine object. The typesetter performs character-to-glyph encoding, glyph ordering, and positional operations, such as kerning, tracking, and baseline adjustments. If multiline layout is needed, it is performed by a CTFramesetter object, which calls into the typesetter to generate the typeset lines to fill the frame. A CTFramesetter encapsulates a typesetter and provides a reference to it as a convenience, but a caller may also choose to create a freestanding typesetter.

## Topics

### Creating a Typesetter

- [CTTypesetterCreateWithAttributedString(_:)](coretext/cttypesettercreatewithattributedstring(_:).md)
- [CTTypesetterCreateWithAttributedStringAndOptions(_:_:)](coretext/cttypesettercreatewithattributedstringandoptions(_:_:).md)

### Creating Lines

- [CTTypesetterCreateLine(_:_:)](coretext/cttypesettercreateline(_:_:).md)
- [CTTypesetterCreateLineWithOffset(_:_:_:)](coretext/cttypesettercreatelinewithoffset(_:_:_:).md)

### Breaking Lines

- [CTTypesetterSuggestLineBreak(_:_:_:)](coretext/cttypesettersuggestlinebreak(_:_:_:).md)
- [CTTypesetterSuggestLineBreakWithOffset(_:_:_:_:)](coretext/cttypesettersuggestlinebreakwithoffset(_:_:_:_:).md)
- [CTTypesetterSuggestClusterBreak(_:_:_:)](coretext/cttypesettersuggestclusterbreak(_:_:_:).md)
- [CTTypesetterSuggestClusterBreakWithOffset(_:_:_:_:)](coretext/cttypesettersuggestclusterbreakwithoffset(_:_:_:_:).md)

### Getting the Type Identifier

- [CTTypesetterGetTypeID()](coretext/cttypesettergettypeid().md)

### Constants

- [Typesetter Options](coretext/typesetter-options.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)
- [CTRun](coretext/ctrun.md)
- [CTRunDelegate](coretext/ctrundelegate.md)
- [CTTextTab](coretext/cttexttab.md)
