<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSFontDescriptor/AttributeName",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSFontDescriptorAttributeName"
  },
  "title" : "NSFontDescriptor.AttributeName"
}
-->

# NSFontDescriptor.AttributeName

Constants for the names of font attributes.

```
struct AttributeName
```

## Discussion

You can retrieve the values for these attributes using [`object(forKey:)`](/documentation/AppKit/NSFontDescriptor/object(forKey:)).

## Topics

### Font Attributes

[`static let family: NSFontDescriptor.AttributeName`](/documentation/AppKit/NSFontDescriptor/AttributeName/family)

An optional string object that specifies the font family.

[`static let name: NSFontDescriptor.AttributeName`](/documentation/AppKit/NSFontDescriptor/AttributeName/name)

An optional string object that specifies the font name.

[`static let face: NSFontDescriptor.AttributeName`](/documentation/AppKit/NSFontDescriptor/AttributeName/face)

An optional string object that specifies the font face.

[`static let size: NSFontDescriptor.AttributeName`](/documentation/AppKit/NSFontDescriptor/AttributeName/size)

An optional floating-point number that specifies the font size.

[`static let visibleName: NSFontDescriptor.AttributeName`](/documentation/AppKit/NSFontDescriptor/AttributeName/visibleName)

An optional string object that specifies the font’s visible name.

[`static let matrix: NSFontDescriptor.AttributeName`](/documentation/AppKit/NSFontDescriptor/AttributeName/matrix)

An affine transform that specifies the font’s transformation matrix.

[`static let variation: NSFontDescriptor.AttributeName`](/documentation/AppKit/NSFontDescriptor/AttributeName/variation)

A dictionary that describes the font’s variation axis.

[`static let characterSet: NSFontDescriptor.AttributeName`](/documentation/AppKit/NSFontDescriptor/AttributeName/characterSet)

The set of Unicode characters covered by the font.

[`static let cascadeList: NSFontDescriptor.AttributeName`](/documentation/AppKit/NSFontDescriptor/AttributeName/cascadeList)

An array, each member of which is a sub-descriptor.

[`static let traits: NSFontDescriptor.AttributeName`](/documentation/AppKit/NSFontDescriptor/AttributeName/traits)

A dictionary that fully describes the font traits.

[`static let fixedAdvance: NSFontDescriptor.AttributeName`](/documentation/AppKit/NSFontDescriptor/AttributeName/fixedAdvance)

A floating-point value that overrides the glyph advancement specified by the font.

[`static let featureSettings: NSFontDescriptor.AttributeName`](/documentation/AppKit/NSFontDescriptor/AttributeName/featureSettings)

An array of dictionaries representing non-default font feature settings.

### Initializers

[`init(String)`](/documentation/AppKit/NSFontDescriptor/AttributeName/init(_:))

[`init(rawValue: String)`](/documentation/AppKit/NSFontDescriptor/AttributeName/init(rawValue:))

### Deprecated

[`extern NSString * NSFontColorAttribute;`](/documentation/AppKit/NSFontColorAttribute)

An optional `NSData` object that specifies the font color.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)