# `GSFont setContextKerningForKey:fontMasterID:value:`

*Instance Method*

Sets the contextual kerning value for a context key and master.

## Declaration

```swift
func setContextKerningForKey(_ key: Any, fontMasterID masterID: Any, value: CGFloat)
```

```objc
- (void) setContextKerningForKey:(id) key fontMasterID:(id) masterID value:(CGFloat) value;
```

```python
setContextKerningForKey_fontMasterID_value_(key: object, masterID: object, value: float)
```

## See Also

### Contextual Kerning

- [`GSFont.kerningContext`](/Core/GlyphsCore/GSFont/kerningContext) — Contextual kerning data.
- [`GSFont contextKerningForKey:fontMasterID:`](/Core/GlyphsCore/GSFont/contextKerningForKey:fontMasterID:) — Contextual kerning value for a context key and master, or `NSNotFound` when no value is stored.
- [`GSFont removeContextKerningForKey:fontMasterID:`](/Core/GlyphsCore/GSFont/removeContextKerningForKey:fontMasterID:) — Removes the contextual kerning value for a context key and master.
- [`GSFont replaceContextKerningKey:key:`](/Core/GlyphsCore/GSFont/replaceContextKerningKey:key:) — Replaces a context key while keeping its master values.
- [`GSFont parseContextKey:`](/Core/GlyphsCore/GSFont/parseContextKey:) — Parses a contextual kerning key into glyph tokens and class tokens.

