# `GSGlyph decomposeBracketLayersSubstitutions:error:`

*Instance Method*

Separates Alternative layer groups into glyphs for variable-font substitution.

## Declaration

```swift
func decomposeBracketLayersSubstitutions(_ substitutions: NSMutableArray!) throws -> [Any]
```

```objc
- (NSArray *) decomposeBracketLayersSubstitutions:(NSMutableArray *) substitutions error:(NSError **) error;
```

```python
decomposeBracketLayersSubstitutions_error_(substitutions: list) -> tuple[list, NSError]
```

## Parameters

- `substitutions` — A collection to which the substitution rules are appended.
- `error` — On return, an error that prevented the layer groups from being separated.

## Return Value

The added glyphs, an empty array when no separation is needed, or `nil` on failure.

## Discussion

The receiver retains its first layer group. Other Alternative layer groups become returned glyphs, including required variants of composite glyphs.

## See Also

### Curve Conversion

- [`GSGlyph convertToCompatibleTrueTypeWithError:ignoreIncompatible:error:`](/Core/GlyphsCore/GSGlyph/convertToCompatibleTrueTypeWithError:ignoreIncompatible:error:) — Converts the glyph’s compatible interpolation layers to quadratic curves.
- [`GSGlyph convertToCompatibleTrueType:curveError:error:`](/Core/GlyphsCore/GSGlyph/convertToCompatibleTrueType:curveError:error:) — Converts specified compatible layers to quadratic curves.
- [`GSGlyph convertPath:toTrueTypeWithError:error:`](/Core/GlyphsCore/GSGlyph/convertPath:toTrueTypeWithError:error:) — Converts cubic segments that can be approximated within a tolerance to quadratic segments.
- [`GSGlyph decomposeAndCleanupError:`](/Core/GlyphsCore/GSGlyph/decomposeAndCleanupError:) — Prepares compatible interpolation layers for TrueType curve conversion.
- [`GSGlyph decomposeAndCleanupError:ignoreIncompatible:`](/Core/GlyphsCore/GSGlyph/decomposeAndCleanupError:ignoreIncompatible:) — Prepares selected interpolation layers for TrueType curve conversion.

