---
title: "ensureGlyphs(forCharacterRange:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nslayoutmanager/ensureglyphs(forcharacterrange:)"
---

# ensureGlyphs(forCharacterRange:)

Forces the layout manager to generate glyphs for the specified character range if it hasn’t already.

## Declaration

```swift
func ensureGlyphs(forCharacterRange charRange: NSRange)
```

## Parameters

- `charRange`: The character range for which glyphs are generated.

## Discussion

Discussion The layout manager reserves the right to perform glyph generation for larger ranges. If noncontiguous layout is disabled, then the affected range is always effectively extended to start at the beginning of the text.

## See Also

### Causing glyph generation and layout

- [ensureGlyphs(forGlyphRange:)](appkit/nslayoutmanager/ensureglyphs(forglyphrange:).md)
- [ensureLayout(forBoundingRect:in:)](appkit/nslayoutmanager/ensurelayout(forboundingrect:in:).md)
- [ensureLayout(forCharacterRange:)](appkit/nslayoutmanager/ensurelayout(forcharacterrange:).md)
- [ensureLayout(forGlyphRange:)](appkit/nslayoutmanager/ensurelayout(forglyphrange:).md)
- [ensureLayout(for:)](appkit/nslayoutmanager/ensurelayout(for:).md)
- [glyphGenerator](appkit/nslayoutmanager/glyphgenerator.md)
