# `GSLayoutManager`

*Class*

## Declaration

```swift
class GSLayoutManager
```

```objc
@interface GSLayoutManager : NSObject
```

```python
class GSLayoutManager(NSObject)
```

## Topics

### Instance Properties

- [`GSLayoutManager.cachedActiveAttributes`](/Core/GlyphsApp/GSLayoutManager/cachedActiveAttributes)
- [`GSLayoutManager.cachedAttributedString`](/Core/GlyphsApp/GSLayoutManager/cachedAttributedString)
- [`GSLayoutManager.cachedDrawLayers`](/Core/GlyphsApp/GSLayoutManager/cachedDrawLayers)
- [`GSLayoutManager.cachedFeatures`](/Core/GlyphsApp/GSLayoutManager/cachedFeatures)
- [`GSLayoutManager.cachedLayers`](/Core/GlyphsApp/GSLayoutManager/cachedLayers)
- [`GSLayoutManager.cachedLayersPosition`](/Core/GlyphsApp/GSLayoutManager/cachedLayersPosition)
- [`GSLayoutManager.cachedSize`](/Core/GlyphsApp/GSLayoutManager/cachedSize)
- [`GSLayoutManager.characterIndexesByLayerIndex`](/Core/GlyphsApp/GSLayoutManager/characterIndexesByLayerIndex) — This property should normally not be modified directly. It is exposed mainly for state restoration purposes.
- [`GSLayoutManager.containerView`](/Core/GlyphsApp/GSLayoutManager/containerView)
- [`GSLayoutManager.lineHeight`](/Core/GlyphsApp/GSLayoutManager/lineHeight)
- [`GSLayoutManager.replacedCharacterIndexesByLayerIndex`](/Core/GlyphsApp/GSLayoutManager/replacedCharacterIndexesByLayerIndex) — This property should normally not be modified directly. It is exposed mainly for state restoration purposes.

### Instance Methods

- [`GSLayoutManager cachedDrawLayersPositionAtIndex:`](/Core/GlyphsApp/GSLayoutManager/cachedDrawLayersPositionAtIndex:)
- [`GSLayoutManager cachedLayerAtIndex:`](/Core/GlyphsApp/GSLayoutManager/cachedLayerAtIndex:)
- [`GSLayoutManager characterIndexForPoint:`](/Core/GlyphsApp/GSLayoutManager/characterIndexForPoint:)
- [`GSLayoutManager characterIndexForLayerIndex:`](/Core/GlyphsApp/GSLayoutManager/characterIndexForLayerIndex:)
- [`GSLayoutManager characterRangeForLayerRange:`](/Core/GlyphsApp/GSLayoutManager/characterRangeForLayerRange:)
- [`GSLayoutManager contextKerningValues:runIdx:`](/Core/GlyphsApp/GSLayoutManager/contextKerningValues:runIdx:)
- [`GSLayoutManager drawTextWithSelectedLayerRange:inRect:`](/Core/GlyphsApp/GSLayoutManager/drawTextWithSelectedLayerRange:inRect:)
- [`GSLayoutManager endDrawText`](/Core/GlyphsApp/GSLayoutManager/endDrawText)
- [`GSLayoutManager firstRectForCharacterRange:actualRange:`](/Core/GlyphsApp/GSLayoutManager/firstRectForCharacterRange:actualRange:)
- [`GSLayoutManager layerIndexForPoint:`](/Core/GlyphsApp/GSLayoutManager/layerIndexForPoint:)
- [`GSLayoutManager layerIndexForCharacterIndex:`](/Core/GlyphsApp/GSLayoutManager/layerIndexForCharacterIndex:)
- [`GSLayoutManager layerIndexForGlyphSelectionAtPoint:`](/Core/GlyphsApp/GSLayoutManager/layerIndexForGlyphSelectionAtPoint:) — Like [`GSLayoutManager layerIndexForPoint:`](/Core/GlyphsApp/GSLayoutManager/layerIndexForPoint:), but prefers a layer whose drawn outline contains the point (searching outward from the active layer), falling back to the layer-box hit test when no outline is hit. Used for double-click glyph selection.
- [`GSLayoutManager layerRangeForCharacterRange:`](/Core/GlyphsApp/GSLayoutManager/layerRangeForCharacterRange:)
- [`GSLayoutManager layoutString:`](/Core/GlyphsApp/GSLayoutManager/layoutString:)
- [`GSLayoutManager respondToCallback:hash:operation:exception:`](/Core/GlyphsApp/GSLayoutManager/respondToCallback:hash:operation:exception:)
- [`GSLayoutManager updateActiveLayer`](/Core/GlyphsApp/GSLayoutManager/updateActiveLayer)
- [`GSLayoutManager updateCachedLayerPaths`](/Core/GlyphsApp/GSLayoutManager/updateCachedLayerPaths)

### Type Methods

- [`GSLayoutManager inherentWritingDirectionOfLayers:`](/Core/GlyphsApp/GSLayoutManager/inherentWritingDirectionOfLayers:) — Performs a simplified implementation of the *Unicode Standard Annex #9 – Unicode Bidirectional Algorithm* based on the `direction` of the glyphs of the layers.

## Relationships

### Inherits From

- `NSObject`

