<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSLayoutManager/range(ofNominallySpacedGlyphsContaining:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSLayoutManager(im)rangeOfNominallySpacedGlyphsContainingIndex:"
  },
  "title" : "range(ofNominallySpacedGlyphsContaining:)"
}
-->

# range(ofNominallySpacedGlyphsContaining:)

Returns the range of displayable glyphs that surround the glyph at the specified index.

```
func range(ofNominallySpacedGlyphsContaining glyphIndex: Int) -> NSRange
```

## Parameters

`glyphIndex`

Index of the glyph to test.

## Return Value

The range of nominally spaced glyphs.

## Discussion

This method returns the range for the glyphs around the given glyph that can be displayed using only their advancements from the font, without pairwise kerning or other adjustments to spacing. The range returned begins with the first glyph, counting back from `glyphIndex`, that has a location set, and it continues up to, but does not include, the next glyph that has a location set.

Performs glyph generation and layout if needed.

---

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)