---
title: NSFont.TextStyleOptionKey
framework: appkit
role: symbol
role_heading: Structure
path: appkit/nsfont/textstyleoptionkey
---

# NSFont.TextStyleOptionKey

The options that you apply when requesting the font or font descriptor of a preferred text style.

## Declaration

```swift
struct TextStyleOptionKey
```

## Discussion

Discussion Pass a dictionary that contains any combination of these keys and their corresponding values to preferredFont(forTextStyle:options:) or preferredFontDescriptor(forTextStyle:options:) to further configure the returned font or font descriptor.

## Topics

### Initializers

- [init(rawValue:)](appkit/nsfont/textstyleoptionkey/init(rawvalue:).md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Creating System Fonts

- [preferredFont(forTextStyle:options:)](appkit/nsfont/preferredfont(fortextstyle:options:).md)
- [systemFont(ofSize:)](appkit/nsfont/systemfont(ofsize:).md)
- [systemFont(ofSize:weight:)](appkit/nsfont/systemfont(ofsize:weight:).md)
- [boldSystemFont(ofSize:)](appkit/nsfont/boldsystemfont(ofsize:).md)
- [monospacedSystemFont(ofSize:weight:)](appkit/nsfont/monospacedsystemfont(ofsize:weight:).md)
- [monospacedDigitSystemFont(ofSize:weight:)](appkit/nsfont/monospaceddigitsystemfont(ofsize:weight:).md)
- [systemFontSize](appkit/nsfont/systemfontsize.md)
- [smallSystemFontSize](appkit/nsfont/smallsystemfontsize.md)
- [NSFont.Weight](appkit/nsfont/weight.md)
- [NSFont.TextStyle](appkit/nsfont/textstyle.md)
