Apple Text Layout & Line Breaking
Configures advanced paragraph styling, line wrapping, and hyphenation for Apple's TextKit and AttributedString frameworks.
This skill provides expert guidance on manipulating NSParagraphStyle properties to control complex text layout behaviors in iOS and macOS applications. It assists developers in implementing precise line-breaking strategies, managing hyphenation factors, handling truncation with ellipses, and fine-tuning vertical geometry like line height and paragraph spacing. It is particularly useful for resolving layout bugs where text wraps at the wrong points, paragraphs ignore spacing rules, or tab columns are misaligned in UIKit, AppKit, and Core Text environments.
Key Features
01Precise control over line-breaking modes and strategies for multi-script support
02Vertical spacing control for inter-line and inter-paragraph gap normalization
03Comprehensive line height management using clamping and baseline offsets
040 GitHub stars
05Advanced hyphenation configuration including factor tuning and soft hyphen usage
06Detailed tab stop configuration for precise column and decimal alignment
Use Cases
01Fixing truncation and ellipsis bugs in multi-line labels or text containers
02Implementing complex column-based text layouts and hanging indents
03Designing custom text editors with specific typographic and layout constraints