Txt Line Breaking

Configure NSParagraphStyle line wrapping, hyphenation, truncation, line height, paragraph spacing, and tab stops in TextKit and AttributedString. Covers lineBreakMode, lineBreakStrategy, hyphenationFactor, usesDefaultHyphenation, soft hyphens, allowsDefaultTighteningForTruncation, lineHeightMultiple, minimumLineHeight, maximumLineHeight, lineSpacing, paragraphSpacing, firstLineHeadIndent, headIndent, NSTextTab. Use when text wraps at the wrong points, an ellipsis fails to appear, lines look too tight or too loose, paragraphs ignore vertical spacing, or tab columns are misaligned. Use whenever the user mentions truncation, hyphenation, line height, leading, or paragraph spacing — even if they do not name NSParagraphStyle. Do NOT use for text that must wrap around shapes or flow across columns — see txt-exclusion-paths. Do NOT use for measuring how tall the result will be — see txt-measurement.

sitapix 8bff566 13.2 KB Updated

File contents

sitapix/apple-text/tree/main/skills/txt-line-breaking commit 8bff5662ac

Frequently asked questions

npx skillmds@latest add sitapix/txt-line-breaking