# `GSLayer attributedMetricsKey:fontSize:state:`

*Instance Method*

Attributed display string for a metrics key.

## Declaration

```swift
func attributedMetricsKey(_ side: GSMetricNumbers, fontSize: CGFloat, state metricsKeyState: UnsafeMutablePointer<GSMetricsKeysUI>?) -> NSAttributedString
```

```objc
- (NSAttributedString *) attributedMetricsKey:(GSMetricNumbers) side fontSize:(CGFloat) fontSize state:(GSMetricsKeysUI *) metricsKeyState;
```

```python
attributedMetricsKey_fontSize_state_(side: GSMetricNumbers, fontSize: float, metricsKeyState: GSMetricsKeysUI) -> NSAttributedString
```

## Parameters

- `side` — The metric side whose key should be displayed.
- `fontSize` — The display font size.
- `metricsKeyState` — On return, the state flags for the displayed key. not used any more. Kann weg.

## See Also

### Metrics Keys Utilities

- [`GSLayer plainMetricsKeyUI:`](/Core/GlyphsCore/GSLayer/plainMetricsKeyUI:) — Plain metrics key for display and editing.
- [`GSLayer alignedMetricsValueForKey:`](/Core/GlyphsCore/GSLayer/alignedMetricsValueForKey:) — Numeric offset encoded in an aligned metrics key.
- [`GSLayer metricsKeysOutOfSync`](/Core/GlyphsCore/GSLayer/metricsKeysOutOfSync) — Whether any horizontal metrics key is out of sync.
- [`GSLayer metricsKeysInvalid`](/Core/GlyphsCore/GSLayer/metricsKeysInvalid) — Whether any horizontal metrics key is invalid.
- [`GSLayer metricsLabelForSide:`](/Core/GlyphsCore/GSLayer/metricsLabelForSide:) — Localized label for a metric side.
- [`GSLayer colorForMetricsState:`](/Core/GlyphsCore/GSLayer/colorForMetricsState:) — Display color for metrics key state flags.

