---
title: "ensureLayout(forGlyphRange:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nslayoutmanager/ensurelayout(forglyphrange:)"
---

# ensureLayout(forGlyphRange:)

Forces the layout manager to perform layout for the specified glyph range if it hasn’t already.

## Declaration

```swift
func ensureLayout(forGlyphRange glyphRange: NSRange)
```

## Parameters

- `glyphRange`: The glyph range for which layout is performed.

## Discussion

Discussion The layout manager reserves the right to perform layout 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(forCharacterRange:)](appkit/nslayoutmanager/ensureglyphs(forcharacterrange:).md)
- [ensureGlyphs(forGlyphRange:)](appkit/nslayoutmanager/ensureglyphs(forglyphrange:).md)
- [ensureLayout(forBoundingRect:in:)](appkit/nslayoutmanager/ensurelayout(forboundingrect:in:).md)
- [ensureLayout(forCharacterRange:)](appkit/nslayoutmanager/ensurelayout(forcharacterrange:).md)
- [ensureLayout(for:)](appkit/nslayoutmanager/ensurelayout(for:).md)
- [glyphGenerator](appkit/nslayoutmanager/glyphgenerator.md)
