---
title: NSATSTypesetter
framework: appkit
role: symbol
role_heading: Class
path: appkit/nsatstypesetter
---

# NSATSTypesetter

A concrete typesetter object that places glyphs during the text layout process.

## Declaration

```swift
class NSATSTypesetter
```

## Overview

Overview An NSATSTypesetter object creates line fragment rectangles, positions glyphs within the line fragments, determines line breaks by word wrapping and hyphenation, and handles tab positioning. This object encapsulates the advanced typesetting capabilities of Core Text. NSATSTypesetter provides line and character spacing accuracy and supports many languages, including bidirectional languages. note: Use this class with NSLayoutManager in macOS11 and earlier. In macOS12 and later, consider using NSTextLayoutManager which provides improved support for international scripts.

## Topics

### Getting the shared typesetter object

- [shared](appkit/nsatstypesetter/shared.md)

### Accessing the layout manager

- [layoutManager](appkit/nsatstypesetter/layoutmanager.md)
- [usesFontLeading](appkit/nsatstypesetter/usesfontleading.md)
- [typesetterBehavior](appkit/nsatstypesetter/typesetterbehavior.md)
- [hyphenationFactor](appkit/nsatstypesetter/hyphenationfactor.md)
- [bidiProcessingEnabled](appkit/nsatstypesetter/bidiprocessingenabled.md)

### Getting the text container

- [currentTextContainer](appkit/nsatstypesetter/currenttextcontainer.md)
- [lineFragmentPadding](appkit/nsatstypesetter/linefragmentpadding.md)

### Performing font substitution

- [substituteFont(for:)](appkit/nsatstypesetter/substitutefont(for:).md)

### Getting the location of text tabs

- [textTab(forGlyphLocation:writingDirection:maxLocation:)](appkit/nsatstypesetter/texttab(forglyphlocation:writingdirection:maxlocation:).md)

### Accessing paragraph information

- [attributedString](appkit/nsatstypesetter/attributedstring.md)
- [setParagraphGlyphRange(_:separatorGlyphRange:)](appkit/nsatstypesetter/setparagraphglyphrange(_:separatorglyphrange:).md)
- [paragraphGlyphRange](appkit/nsatstypesetter/paragraphglyphrange.md)
- [paragraphSeparatorGlyphRange](appkit/nsatstypesetter/paragraphseparatorglyphrange.md)

### Laying out a paragraph

- [layoutParagraph(at:)](appkit/nsatstypesetter/layoutparagraph(at:).md)

### Getting Spacing Information

- [lineSpacing(afterGlyphAt:withProposedLineFragmentRect:)](appkit/nsatstypesetter/linespacing(afterglyphat:withproposedlinefragmentrect:).md)
- [paragraphSpacing(afterGlyphAt:withProposedLineFragmentRect:)](appkit/nsatstypesetter/paragraphspacing(afterglyphat:withproposedlinefragmentrect:).md)
- [paragraphSpacing(beforeGlyphAt:withProposedLineFragmentRect:)](appkit/nsatstypesetter/paragraphspacing(beforeglyphat:withproposedlinefragmentrect:).md)

### Laying Out Glyphs

- [boundingBox(forControlGlyphAt:for:proposedLineFragment:glyphPosition:characterIndex:)](appkit/nsatstypesetter/boundingbox(forcontrolglyphat:for:proposedlinefragment:glyphposition:characterindex:).md)
- [getLineFragmentRect(_:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:)](appkit/nsatstypesetter/getlinefragmentrect(_:usedrect:forparagraphseparatorglyphrange:atproposedorigin:).md)
- [hyphenCharacter(forGlyphAt:)](appkit/nsatstypesetter/hyphencharacter(forglyphat:).md)
- [hyphenationFactor(forGlyphAt:)](appkit/nsatstypesetter/hyphenationfactor(forglyphat:).md)
- [shouldBreakLine(byHyphenatingBeforeCharacterAt:)](appkit/nsatstypesetter/shouldbreakline(byhyphenatingbeforecharacterat:).md)
- [shouldBreakLine(byWordBeforeCharacterAt:)](appkit/nsatstypesetter/shouldbreakline(bywordbeforecharacterat:).md)
- [willSetLineFragmentRect(_:forGlyphRange:usedRect:baselineOffset:)](appkit/nsatstypesetter/willsetlinefragmentrect(_:forglyphrange:usedrect:baselineoffset:).md)
- [setHardInvalidation(_:forGlyphRange:)](appkit/nsatstypesetter/sethardinvalidation(_:forglyphrange:).md)

### Deprecated

- [getGlyphs(in:glyphs:characterIndexes:glyphInscriptions:elasticBits:)](appkit/nsatstypesetter/getglyphs(in:glyphs:characterindexes:glyphinscriptions:elasticbits:).md)

## Relationships

### Inherits From

- [NSTypesetter](appkit/nstypesetter.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### TextKit 1

- [NSTextStorage](appkit/nstextstorage.md)
- [NSLayoutManager](appkit/nslayoutmanager.md)
- [NSTypesetter](appkit/nstypesetter.md)
