---
title: textScaling
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsattributedstring/documentattributekey/textscaling
---

# textScaling

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

## Declaration

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

## Discussion

Discussion The value of this property is one of the options of the 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.

## See Also

### Getting the font-scaling options

- [sourceTextScaling](foundation/nsattributedstring/documentattributekey/sourcetextscaling.md)
