Details
Finding Paths and Damming Rivers: Automated Prevention of Typographic Rivers in Justified Text
Year: 2026
Term: Winter
Student Name: Grace Stewart
Supervisor: Ava McKenney
Abstract: Rivers of white refer to visually distracting patterns of whitespace in a text that occur when word spaces in multiple consecutive lines become coincidentally aligned. While many typesetting processes have become automated with the transition from hand-set type to digital systems, the prevention of such undesirable rivers remains a largely manual task. This thesis presents a novel river-preventing line-breaking algorithm that preempts the introduction of rivers into a text during the line breaking and justification process. This method combines the well-established Knuth–Plass line-breaking algorithm with the concept of “turn penalties,” originating in the field of navigation, to punish pairs of consecutive lines with vertically aligned spaces. The resulting algorithm significantly reduces the presence of rivers in a text while maintaining high typographic quality and achieving practical execution times.