<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTypesetter/glyphRange(forCharacterRange:actualCharacterRange:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTypesetter(im)glyphRangeForCharacterRange:actualCharacterRange:"
  },
  "title" : "glyphRange(forCharacterRange:actualCharacterRange:)"
}
-->

# glyphRange(forCharacterRange:actualCharacterRange:)

Returns the range for the glyphs mapped to the characters of the text store in the specified range.

```
func glyphRange(forCharacterRange charRange: NSRange, actualCharacterRange actualCharRange: NSRangePointer?) -> NSRange
```

## Parameters

`charRange`

The range of the characters whose glyph range is desired.

`actualCharRange`

On return, all characters mapped to those glyphs; may be `NULL`.

## Return Value

The range for the glyphs mapped to the characters of the text store in `charRange`.

## Discussion

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)