<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSAttributedString/DocumentAttributeKey/hyphenationFactor",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation",
      "UIKit"
    ],
    "preciseIdentifier" : "c:@NSHyphenationFactorDocumentAttribute"
  },
  "title" : "hyphenationFactor"
}
-->

# hyphenationFactor

The hyphenation factor of the document.

```
static let hyphenationFactor: NSAttributedString.DocumentAttributeKey
```

## Discussion

The value of this attribute is an [`NSNumber`](/documentation/Foundation/NSNumber) object containing a float. A value of 0 indicates that hyphenation is off, and a value of 1 indicates full hyphenation.

The string constant in macOS 10.3 and earlier is `@"HyphenationFactor"`.

---

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)