# `GSFont setKerningForFontMasterID:leftKey:rightKey:value:direction:`

*Instance Method*

Sets the kerning value for a pair of kerning keys.

## Declaration

```swift
func setKerningForFontMasterID(_ fontMasterID: Any, leftKey: Any, rightKey: Any, value: CGFloat, direction: GSWritingDirection)
```

```objc
- (void) setKerningForFontMasterID:(id) fontMasterID leftKey:(id) leftKey rightKey:(id) rightKey value:(CGFloat) value direction:(GSWritingDirection) direction;
```

```python
setKerningForFontMasterID_leftKey_rightKey_value_direction_(fontMasterID: object, leftKey: object, rightKey: object, value: float, direction: GSWritingDirection)
```

## Discussion

Kerning keys are glyph identifiers or prefixed group keys such as `@MMK_L_A` and `@MMK_R_A`.

## See Also

### Kerning

- [`GSFont.kerningLTR`](/Core/GlyphsCore/GSFont/kerningLTR) — Left-to-right kerning data.
- [`GSFont.kerningRTL`](/Core/GlyphsCore/GSFont/kerningRTL) — Right-to-left kerning data.
- [`GSFont.kerningVertical`](/Core/GlyphsCore/GSFont/kerningVertical) — Vertical kerning data.
- [`GSFont kerningForDirection:`](/Core/GlyphsCore/GSFont/kerningForDirection:) — Kerning dictionary for a writing direction.
- [`GSFont masterKerning:direction:`](/Core/GlyphsCore/GSFont/masterKerning:direction:) — Kerning dictionary for one master and writing direction.
- [`GSFont kerningForFontMasterID:firstGlyph:secondGlyph:direction:`](/Core/GlyphsCore/GSFont/kerningForFontMasterID:firstGlyph:secondGlyph:direction:) — Kerning value between two glyphs in a master and writing direction, or `NSNotFound` when no pair applies.
- [`GSFont kerningForFontMasterDict:firstGlyph:secondGlyph:direction:`](/Core/GlyphsCore/GSFont/kerningForFontMasterDict:firstGlyph:secondGlyph:direction:) — Kerning value between two glyphs in a master kerning dictionary, or `NSNotFound` when no pair applies.
- [`GSFont kerningForFontMasterID:leftKey:rightKey:direction:`](/Core/GlyphsCore/GSFont/kerningForFontMasterID:leftKey:rightKey:direction:) — Kerning value for a pair of kerning keys, or `NSNotFound` when no pair is stored.
- [`GSFont removeKerningForFontMasterID:leftKey:rightKey:direction:`](/Core/GlyphsCore/GSFont/removeKerningForFontMasterID:leftKey:rightKey:direction:) — Removes the kerning value for a pair of kerning keys.
- [`GSFont setKerning:forMaster:direction:`](/Core/GlyphsCore/GSFont/setKerning:forMaster:direction:) — Replaces the kerning dictionary for one master and writing direction.
- [`GSFont addKerning:forMaster:direction:`](/Core/GlyphsCore/GSFont/addKerning:forMaster:direction:) — Adds kerning pairs to the kerning dictionary for one master and writing direction.
- [`GSFont masterIDforMetrics:`](/Core/GlyphsCore/GSFont/masterIDforMetrics:) — Returns the master identifier used for metrics and kerning data.
- [`GSFont masterIDforMetrics:hasLink:`](/Core/GlyphsCore/GSFont/masterIDforMetrics:hasLink:) — Returns the master identifier used for metrics and kerning data.
- [`GSFont.lastKerningChange`](/Core/GlyphsCore/GSFont/lastKerningChange)

