# `GSGlyph layerGroups`

*Instance Method*

The layer identifier groups used to check compatibility and coordinate edits across corresponding layers.

## Declaration

```swift
func layerGroups() -> [NSOrderedSet]
```

```objc
- (NSArray<NSOrderedSet<NSString *> *> *) layerGroups;
```

```python
layerGroups() -> list[NSOrderedSet<NSString *>]
```

## Discussion

A layer group is an ordered set of layer identifiers for layers that participate in the same interpolation or substitution context. Intermediate, Alternative, and color layers can form groups distinct from the master layers. The grouping follows the font’s compatibility and empty-layer settings.

## See Also

### Layer Groups

- [`GSGlyph layerGroupsInstances:masters:ignoreEmptyLayers:error:`](/Core/GlyphsCore/GSGlyph/layerGroupsInstances:masters:ignoreEmptyLayers:error:) — The layer identifier groups required by a set of instances.
- [`GSGlyph forcedLayerGroupIdsSeenLayers:ignoreEmptyLayers:`](/Core/GlyphsCore/GSGlyph/forcedLayerGroupIdsSeenLayers:ignoreEmptyLayers:) — The layer identifier groups formed without reference to configured instances.
- [`GSGlyph layerGroupIDSetForLayer:`](/Core/GlyphsCore/GSGlyph/layerGroupIDSetForLayer:) — The forced layer group containing a layer, or `nil` when the layer is not in a group.
- [`GSGlyph layerGroupIDSetForLayer:ignoreEmptyLayers:`](/Core/GlyphsCore/GSGlyph/layerGroupIDSetForLayer:ignoreEmptyLayers:) — The forced layer group containing a layer, or `nil` when the layer is not in a group.
- [`GSGlyph layerGroupIDsForLayer:`](/Core/GlyphsCore/GSGlyph/layerGroupIDsForLayer:) — The forced layer group containing a layer as an array, or `nil` when the layer is not in a group.
- [`GSGlyph compatibleLayerGroupIdsForLayer:`](/Core/GlyphsCore/GSGlyph/compatibleLayerGroupIdsForLayer:) — The identifiers of layers in the same group that have compatible shapes, anchors, and path-component hints.
- [`GSGlyph collectBraceLayerIDsMasters:allKeys:`](/Core/GlyphsCore/GSGlyph/collectBraceLayerIDsMasters:allKeys:) — The font masters including representations of active Intermediate-layer locations.

