FAILURE MAP
← Case archive

FA-80040 / Typography line breaking / Member archive

Box-glue-penalty breakpoints: glue legality context · case 05

Breaks are taken at glue that follows a penalty.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Input [items, width]; items are ["b",w], ["g",w] or ["p",w,cost,flag]. Legal breaks: glue immediately after a box; penalty with cost < 10000 (width counted only if broken there); cost <= -10000 forces a break. Discardable glue/penalties at a line start are dropped. First-fit: when the running width exceeds the measure, break at the last legal breakpoint. Return [[line width, break kind]] with kinds glue/penalty/forced/end.

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: glue legality context[[4, "glue"], [7, "glue"], [3, "glue"], [7, "glue"], [3, "forced"], [6, "end"]][[5, "penalty"], [7, "glue"], [3, "glue"], [7, "penalty"], [3, "forced"], [6, "end"]]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 ↗