---
title: hyphenationFactor
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsattributedstring/documentattributekey/hyphenationfactor
---

# hyphenationFactor

The hyphenation factor of the document.

## Declaration

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

## Discussion

Discussion The value of this attribute is an 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".

## See Also

### Getting document appearance keys

- [appearance](foundation/nsattributedstring/documentattributekey/appearance.md)
- [backgroundColor](foundation/nsattributedstring/documentattributekey/backgroundcolor.md)
- [bottomMargin](foundation/nsattributedstring/documentattributekey/bottommargin.md)
- [defaultFontExcluded](foundation/nsattributedstring/documentattributekey/defaultfontexcluded.md)
- [defaultTabInterval](foundation/nsattributedstring/documentattributekey/defaulttabinterval.md)
- [excludedElements](foundation/nsattributedstring/documentattributekey/excludedelements.md)
- [leftMargin](foundation/nsattributedstring/documentattributekey/leftmargin.md)
- [paperMargin](foundation/nsattributedstring/documentattributekey/papermargin.md)
- [paperSize](foundation/nsattributedstring/documentattributekey/papersize.md)
- [prefixSpaces](foundation/nsattributedstring/documentattributekey/prefixspaces.md)
- [rightMargin](foundation/nsattributedstring/documentattributekey/rightmargin.md)
- [textLayoutSections](foundation/nsattributedstring/documentattributekey/textlayoutsections.md)
- [topMargin](foundation/nsattributedstring/documentattributekey/topmargin.md)
- [viewMode](foundation/nsattributedstring/documentattributekey/viewmode.md)
- [viewSize](foundation/nsattributedstring/documentattributekey/viewsize.md)
