---
title: "substituteGlyphs(in:withGlyphs:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstypesetter/substituteglyphs(in:withglyphs:)"
---

# substituteGlyphs(in:withGlyphs:)

Replaces the specified glyphs with specified replacement glyphs.

## Declaration

```swift
func substituteGlyphs(in glyphRange: NSRange, withGlyphs glyphs: UnsafeMutablePointer<NSGlyph>!)
```

## Parameters

- `glyphRange`: The range of glyphs to be substituted.
- `glyphs`: The glyphs to substitute for the glyphs in glyphRange.

## Discussion

Discussion This method does not alter the glyph-to-character mapping or invalidate layout information. A subclass can override this method to interact with custom glyph storage.

## See Also

### Deprecated

- [actionForControlCharacter(at:)](appkit/nstypesetter/actionforcontrolcharacter(at:).md)
- [deleteGlyphs(in:)](appkit/nstypesetter/deleteglyphs(in:).md)
- [getGlyphs(in:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:)](appkit/nstypesetter/getglyphs(in:glyphs:characterindexes:glyphinscriptions:elasticbits:bidilevels:).md)
- [insertGlyph(_:atGlyphIndex:characterIndex:)](appkit/nstypesetter/insertglyph(_:atglyphindex:characterindex:).md)
- [NSTypesetterControlCharacterAction](appkit/nstypesettercontrolcharacteraction.md)
