FA-80228 / Typography line breaking / Member archive
Ragged-right hyphenation zone: minimum word length unit · case 03
Long words with few syllables are never hyphenated.
Case contract
Input [words as syllables, width, zone, min word length, min chars before, min chars after, hyphenate capitals]. Greedy fill. A word that does not fit may be hyphenated only if the slack left on the line (width minus current text minus the separating space) is at least the zone, the word has at least min-word characters, and (capitals allowed or its first letter is not uppercase). Pick the latest syllable boundary with head >= min before and tail >= min after chars whose head plus "-" 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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: minimum word length unit | ["of hyphenated", "typography", "Berlin ragged a", "McDonald", "McDonald set", "eBooking"] | ["of hyphenated", "typography Ber-", "lin ragged a", "McDonald McDon-", "ald set eBook-", "ing"] | 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 ↗