---
title: "setKeyEquivalentFont(_:size:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsbuttoncell/setkeyequivalentfont(_:size:)"
---

# setKeyEquivalentFont(_:size:)

Sets by name and size of the font used to draw the key equivalent.

## Declaration

```swift
func setKeyEquivalentFont(_ fontName: String, size fontSize: CGFloat)
```

## Parameters

- `fontName`: The name of the font to use to draw the key equivalent.
- `fontSize`: The font size to use to draw the key equivalent.

## Discussion

Discussion This method redisplays the button if necessary. It does nothing if the button doesn’t have a key equivalent associated with it. The default font is the same as that used to draw the title.

## See Also

### Related Documentation

- [font](appkit/nscell/font.md)

### Managing the Key Equivalent

- [keyEquivalent](appkit/nsbuttoncell/keyequivalent.md)
- [keyEquivalentFont](appkit/nsbuttoncell/keyequivalentfont.md)
- [keyEquivalentModifierMask](appkit/nsbuttoncell/keyequivalentmodifiermask.md)
