<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSAttributedString/DocumentAttributeKey/textScaling",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation",
      "UIKit"
    ],
    "preciseIdentifier" : "c:@NSTextScalingDocumentAttribute"
  },
  "title" : "textScaling"
}
-->

# textScaling

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

```
static let textScaling: NSAttributedString.DocumentAttributeKey
```

## Discussion

The value of this property is one of the options of the <doc://com.apple.documentation/documentation/UIKit/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)