feat(text): bound and extend justification (11.14 layer 3) - #69
Open
thejustinwalsh wants to merge 2 commits into
Open
feat(text): bound and extend justification (11.14 layer 3)#69thejustinwalsh wants to merge 2 commits into
thejustinwalsh wants to merge 2 commits into
Conversation
size-limit report 📦
|
Word spaces expand uniformly up to the declared maximum ratio of their natural advance sum; the remaining deficit spills into inter-cluster letter gaps bounded per gap; residue reads as an under-full line. A declared minimum ratio makes spaces elastic both ways: the breaker lends the shrinkable fraction back while scanning, admitting the word that would otherwise just overflow through a new CLUSTER_SPACE flag, and positioning compresses those spaces to exactly the same bound. The last-line policy justifies final and hard-broken lines on request. Measurement mirrors every branch through positioned_fragment_advance. Proven red-green at distribution, breaker, and Three integration levels.
thejustinwalsh
force-pushed
the
feat/justification-controls
branch
from
August 12, 2026 06:00
8a40d60 to
a238430
Compare
thejustinwalsh
marked this pull request as ready for review
August 14, 2026 02:34
# Conflicts: # docs/packages/benchmarks.md # docs/packages/glyph.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Layer 3 of the 11.14 typography tier: professional justification bounds.
Semantics
maxWordSpaceRatio× their natural advance sum; the remaining deficit spills into inter-cluster letter gaps bounded byletterSpaceExpansionper gap; any residue reads as an under-full line.minWordSpaceRatiomakes spaces elastic both ways. The line breaker lends the shrinkable fraction back while scanning — admitting the word that would otherwise just overflow, detected through a newCLUSTER_SPACEflag stamped at cluster build — and the positioning pass compresses those spaces to exactly the same bound, so break admission and paint always agree.lastLine: 'justify'extends justification to final and hard-broken lines.positioned_fragment_advance.Evidence
Red-green: distribution unit tests (cap spill into bounded gaps, shrink clamp at the declared minimum, last-line gates), a breaker admission test (rigid line breaks after the space; a 0.5 shrink fraction fits the whole run), and a Three integration segment — an unbounded justified last line fills its exact 300-unit box, while capped word growth plus a 0.5 letter-gap bound lands at natural-plus-gaps exactly. 180 Rust lib tests; full package check green.