---
title: NSGlyphGenerator
framework: appkit
role: symbol
role_heading: Class
path: appkit/nsglyphgenerator
---

# NSGlyphGenerator

An object that performs the initial, nominal glyph generation phase in the layout process.

## Declaration

```swift
class NSGlyphGenerator
```

## Overview

Overview The nominal glyph generation pass essentially generates one glyph per character; the typesetter may later make substitutions in the glyph stream, for example, changing an acute accent glyph followed by an “e” glyph into a single acute-accented “é” glyph. NSGlyphGenerator communicates via the NSGlyphStorage protocol. An example of a class that conforms to the protocol is NSLayoutManager.

## Topics

### Obtaining a glyph generator

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

### Generating glyphs

- [generateGlyphs(for:desiredNumberOfCharacters:glyphIndex:characterIndex:)](appkit/nsglyphgenerator/generateglyphs(for:desirednumberofcharacters:glyphindex:characterindex:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.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)

## See Also

### Glyphs

- [NSGlyph](appkit/nsglyph.md)
- [NSGlyphStorage](appkit/nsglyphstorage.md)
- [NSGlyphInfo](appkit/nsglyphinfo.md)
- [Reserved Glyph Codes](appkit/reserved-glyph-codes.md)
- [NSFontRenderingMode](appkit/nsfontrenderingmode.md)
