FAILURE MAP
← Case archive

FA-80133 / Typography line breaking / Member archive

Runt last-line prevention: repeated rebalancing · case 03

A runt is only partly fixed when one moved word is not enough.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Input [words, width, minimum last-line length]. Greedy fill (unit spaces; overwide word alone). Then while there are at least two lines and the last line string is shorter than the minimum, move the last word of the previous line down if that line keeps at least one word and the new last line fits. Return lines.

Why this case matters

Line breaking decides where paragraphs wrap on screen and in print; a wrong decision point shifts every following line.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: repeated rebalancing["serif the", "is is of", "grid at", "is a"]["serif the", "is is of", "grid", "at is a"]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗