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

# NSTextScalingDocumentAttribute

The text-scaling mode to use when displaying the text.

```
extern NSAttributedStringDocumentAttributeKey const NSTextScalingDocumentAttribute;
```

## Discussion

The value of this property is one of the options of the [`NSTextScalingType`](/documentation/AppKit/NSTextScalingType) type. Some platforms scale fonts to improve their appearance. When saving a document, include this attribute to specify the type of scaling to apply to the text at display time.

---

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)