Skip to content

feat(text): flow paragraphs through ordered columns (11.18 slice) - #72

Open
thejustinwalsh wants to merge 2 commits into
feat/editorial-workloadfrom
feat/column-flow
Open

feat(text): flow paragraphs through ordered columns (11.18 slice)#72
thejustinwalsh wants to merge 2 commits into
feat/editorial-workloadfrom
feat/column-flow

Conversation

@thejustinwalsh

@thejustinwalsh thejustinwalsh commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

What

An 11.18 slice pulled forward on demand: ParagraphContentBox gains columns { count, gap }, mapping the public Text onto the engine's already-proven ordered multi-region flow — side-by-side region rectangles inside the exact content-box width, filled in order without balancing.

Contract

  • The column height is the flow signal (sequential filling has no other reason to advance), so columns require an exact width and a bounded height — both rejected loudly at construction and set().
  • Column zero keeps the paragraph's region id (extra columns stride the high byte), so single-column request bytes are unchanged.
  • Alignment, justification, first-line indent, and paragraph spacing compose per column unchanged — they were already slot-based.
  • Drop-cap exclusions are explicitly out of scope; that surface stays with 11.18 proper.

Evidence

Red-green through the real Wasm engine: at the exact column measure, halving the reference height pushes the tail of the text into the second region, the columned block extent stays inside the column height with no overflow, and both invalid combinations throw. The editorial workload becomes a real page — one single-measure justified lede over a body flowing mid-sentence through two justified columns — settling in the presentation probe at three draws (lede + one clipped draw per column) over 869 glyphs at 120 FPS. Full package and benchmark checks green; three-runtime budget re-priced (+1.7 KB raw of geometry derivation and validation).

Also corrects the wasm budget comment from the review closure: cross-host size variance is byte-different equal-length builds (different sha256, same source), not gzip nondeterminism.

ParagraphContentBox gains columns { count, gap }, mapping the public
Text onto the engine's proven ordered multi-region flow: side-by-side
region rectangles inside the exact content-box width, filled in order
without balancing. The column height is the flow signal, so columns
require an exact width and a bounded height, rejected loudly at
construction; column zero keeps the paragraph's region id so
single-column request bytes are unchanged. The editorial workload
becomes a real page: a single-measure justified lede over a body
flowing through two justified columns, batching to three draws over
869 glyphs. Red-green through the real engine: half-height columns
push the tail into the second region, the block extent stays inside
the column height, and both invalid combinations throw. The drop-cap
exclusion surface stays with 11.18 proper. Also corrects the wasm
budget comment: cross-host variance is byte-different equal-length
builds, not gzip nondeterminism.
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
Core JS (gzip) 18.47 KB (0%)
Shaper Wasm (gzip) 418.49 KB (0%)
Three.js adapter JS (gzip) 60.7 KB (+0.54% 🔺)
Inter font · Bitmap (gzip) 545.27 KB (0%)
Inter font · MTSDF (gzip) 6.48 MB (0%)
Inter font · Slug (gzip) 604.06 KB (0%)
Font Awesome icons · Bitmap (gzip) 439.53 KB (0%)
Font Awesome icons · MTSDF (gzip) 6.89 MB (0%)
Font Awesome icons · Slug (gzip) 642.64 KB (0%)
Font validator JS (gzip) 134.24 KB (0%)
Runtime bake host JS (gzip) 5.38 KB (0%)
Runtime bake Worker JS (gzip) 142.45 KB (0%)
Font baker JS (gzip) 2.41 KB (0%)
Font baker Wasm (gzip) 379.63 KB (0%)
Bitmap baker JS (gzip) 4.66 KB (0%)
Bitmap baker Wasm (gzip) 228.31 KB (0%)
MTSDF baker JS (gzip) 5.39 KB (0%)
MTSDF baker Wasm (gzip) 209.22 KB (0%)
Slug baker JS (gzip) 4.01 KB (0%)
Slug baker Wasm (gzip) 181.24 KB (0%)

@thejustinwalsh
thejustinwalsh marked this pull request as ready for review August 14, 2026 02:42
# Conflicts:
#	docs/packages/benchmarks.md
#	docs/packages/glyph.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant