From eb3814ec4106b7daa0e797ba9ebd6b5ebb27efbc Mon Sep 17 00:00:00 2001 From: Yelo <305681148+itsyelo@users.noreply.github.com> Date: Fri, 17 Jul 2026 12:26:00 +0800 Subject: [PATCH] docs: link LoomText as the sister text renderer README gains the sister-library pointer; MultilineUILabelTips names LoomLabel among custom renderers and closes the residual-jitter section with the renderer that eliminates it. --- README.md | 2 ++ .../Loom/Loom.docc/Articles/MultilineUILabelTips.md | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3857133..66a38fc 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Background-thread layout pre-calculation for iOS, powered by [Yoga](https://gith Describe layouts with a declarative DSL, calculate frames on a background thread, cache results, and apply them in `layoutSubviews` — eliminating layout computation from the main thread. +Sister library: [LoomText](https://github.com/itsyelo/LoomText) — a CoreText renderer that draws from the same precomputed layout Loom measures with. Typeset once; measurement and rendering share one source of truth. + ## Features - **Background calculation** — Yoga runs on any thread, zero main-thread layout cost diff --git a/Sources/Loom/Loom.docc/Articles/MultilineUILabelTips.md b/Sources/Loom/Loom.docc/Articles/MultilineUILabelTips.md index fbe57f8..242ceb7 100644 --- a/Sources/Loom/Loom.docc/Articles/MultilineUILabelTips.md +++ b/Sources/Loom/Loom.docc/Articles/MultilineUILabelTips.md @@ -169,9 +169,10 @@ bodyLabel.frame = frames.frame(for: .body) ?? .zero ## Custom Renderers If you bind your `Text` node to anything other than `UILabel` — -**`YYLabel`** (Core Text + async drawing), a SwiftUI `Text`, a custom -`CTFrameDraw` view, etc. — the locked-line-height convention above is -not needed. Those renderers don't have UILabel's two-mode internal +**[`LoomLabel`](https://github.com/itsyelo/LoomText)** (Loom's sister +renderer), **`YYLabel`** (Core Text + async drawing), a SwiftUI +`Text`, a custom `CTFrameDraw` view, etc. — the locked-line-height +convention above is not needed. Those renderers don't have UILabel's two-mode internal alignment, so toggling `numberOfLines` produces zero first-line jitter without any `paragraphStyle` lock. @@ -229,7 +230,10 @@ the same residual is present in YYText's own `UILabelSizeExample` demo when measured with `YYTextLayout` (the gold-standard CoreText measurer). Eliminating it entirely requires drawing text yourself without going through `UILabel`'s rendering pipeline; that decision -trade-off is out of scope for a layout framework. +trade-off is out of scope for a layout framework. It is exactly the +trade-off [LoomText](https://github.com/itsyelo/LoomText) makes: its +`LoomLabel` renders the same `LoomTextLayout` it measures with, so the +toggle residual drops to zero. ## See Also