<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSFontAttributeName",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@NSFontAttributeName"
  },
  "title" : "NSFontAttributeName"
}
-->

# NSFontAttributeName

The font of the text.

```
extern NSAttributedStringKey NSFontAttributeName;
```

## Discussion

The value of this attribute is a <doc://com.apple.documentation/documentation/UIKit/UIFont> object. Use this attribute to change the font for a range of text. If you do not specify this attribute, the string uses a 12-point Helvetica(Neue) font by default.

---

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)