# `GSLayer setPreviousKerningException:forLayer:direction:`

*Instance Method*

Sets whether the pair between a previous layer and this layer has a kerning exception.

## Declaration

```swift
func setPreviousKerningIsException(_ exception: Bool, to previousLayer: GSLayer, direction: GSWritingDirection)
```

```objc
- (void) setPreviousKerningException:(BOOL) exception forLayer:(GSLayer *) previousLayer direction:(GSWritingDirection) direction;
```

```python
setPreviousKerningException_forLayer_direction_(exception: bool, previousLayer: GSLayer, direction: GSWritingDirection)
```

## Parameters

- `previousLayer` — The layer before this layer.

## Discussion

Enabling the exception keeps the current resolved kerning value as a glyph-specific value. Disabling the exception restores use of group kerning when possible.

## See Also

### Kerning Exceptions

- [`GSLayer previousKerningExceptionForLayer:direction:`](/Core/GlyphsCore/GSLayer/previousKerningExceptionForLayer:direction:) — Whether the pair between a previous layer and this layer has a kerning exception.
- [`GSLayer nextKerningExceptionForLayer:direction:`](/Core/GlyphsCore/GSLayer/nextKerningExceptionForLayer:direction:) — Whether the pair between this layer and a next layer has a kerning exception.
- [`GSLayer setNextKerningException:forLayer:direction:`](/Core/GlyphsCore/GSLayer/setNextKerningException:forLayer:direction:) — Sets whether the pair between this layer and a next layer has a kerning exception.

