<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.13.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTypesetter/substituteGlyphs(in:withGlyphs:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTypesetter(im)substituteGlyphsInRange:withGlyphs:"
  },
  "title" : "substituteGlyphs(in:withGlyphs:)"
}
-->

# substituteGlyphs(in:withGlyphs:)

Replaces the specified glyphs with specified replacement glyphs.

```
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

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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)