# `GSLayer metricsKey:name:operator:value:oppositeSite:atHeight:master:`

*Type Method*

Parses a metrics key into its referenced glyph, operator, numeric value, opposite side, height, and master.

## Declaration

```swift
class func metricsKey(_ key: String?, name glyphName: AutoreleasingUnsafeMutablePointer<NSString?>, operator aOperator: UnsafeMutablePointer<CChar>, value: UnsafeMutablePointer<CGFloat>, oppositeSite: UnsafeMutablePointer<Int16>, atHeight: UnsafeMutablePointer<Int>, master masterName: AutoreleasingUnsafeMutablePointer<NSString?>?) -> Bool
```

```objc
+ (BOOL) metricsKey:(NSString *) key name:(NSString **) glyphName operator:(char *) aOperator value:(CGFloat *) value oppositeSite:(short *) oppositeSite atHeight:(NSInteger *) atHeight master:(NSString **) masterName;
```

```python
metricsKey_name_operator_value_oppositeSite_atHeight_master_(key: str, aOperator: str, value: float, oppositeSite: int, atHeight: int) -> tuple[bool, str, str]
```

## Parameters

- `glyphName` — On return, the referenced glyph name.
- `aOperator` — On return, the arithmetic operator encoded in the key.
- `value` — On return, the numeric value encoded in the key.
- `oppositeSite` — On return, whether the key references the opposite side.
- `atHeight` — On return, the height qualifier from the key, or `NSNotFound`.
- `masterName` — On return, the referenced master name.

## Return Value

`YES` when the key syntax is valid.

## Discussion

This parses metrics key syntax without evaluating the referenced layer.

## See Also

### Metrics Keys

- [`GSLayer.widthMetricsKey`](/Core/GlyphsCore/GSLayer/widthMetricsKey) — Layer-specific metrics key for the advance width.
- [`GSLayer.leftMetricsKey`](/Core/GlyphsCore/GSLayer/leftMetricsKey) — Layer-specific metrics key for the left side bearing.
- [`GSLayer.rightMetricsKey`](/Core/GlyphsCore/GSLayer/rightMetricsKey) — Layer-specific metrics key for the right side bearing.
- [`GSLayer.topMetricsKey`](/Core/GlyphsCore/GSLayer/topMetricsKey) — Layer-specific metrics key for the top side bearing.
- [`GSLayer.bottomMetricsKey`](/Core/GlyphsCore/GSLayer/bottomMetricsKey) — Layer-specific metrics key for the bottom side bearing.
- [`GSLayer.vertWidthMetricsKey`](/Core/GlyphsCore/GSLayer/vertWidthMetricsKey) — Layer-specific metrics key for the vertical advance width.
- [`GSLayer.vertOriginMetricsKey`](/Core/GlyphsCore/GSLayer/vertOriginMetricsKey) — Layer-specific metrics key for the vertical origin.

