# `GSLayer setPreviousKerning:forLayer:direction:`

*Instance Method*

Sets the kerning value between a previous layer and this layer.

## Declaration

```objc
- (void) setPreviousKerning:(CGFloat) value forLayer:(GSLayer *) previousLayer direction:(GSWritingDirection) direction;
```

```python
setPreviousKerning_forLayer_direction_(value: float, previousLayer: GSLayer, direction: GSWritingDirection)
```

## Parameters

- `previousLayer` — The layer before this layer.

## Discussion

The value is stored for the layer’s associated master and the requested writing direction. Group kerning is used unless the pair has a kerning exception. Pass `CGFLOAT_MAX` to remove the kerning value.

## See Also

### Kerning Values

- [`GSLayer.kerning`](/Core/GlyphsCore/GSLayer/kerning) — Kerning dictionary for observing kerning changes.
- [`GSLayer previousKerningForLayer:direction:`](/Core/GlyphsCore/GSLayer/previousKerningForLayer:direction:) — Kerning value between a previous layer and this layer.
- [`GSLayer nextKerningForLayer:direction:`](/Core/GlyphsCore/GSLayer/nextKerningForLayer:direction:) — Kerning value between this layer and a next layer.
- [`GSLayer setNextKerning:forLayer:direction:`](/Core/GlyphsCore/GSLayer/setNextKerning:forLayer:direction:) — Sets the kerning value between this layer and a next layer.

