Urgent.News

What's breaking now, across thousands of outlets.

Tech

"I just chose words carefully."

Monospace text typesetting is often not a favorite task. Regular text is acceptable, right alignment is tolerable if one can manage counting spaces, even centering presents challenges due to the lack of half spaces for perfect alignment. Full justification takes things to an extreme, with overly large spaces that cannot be evenly distributed, leading to an uncomfortable feeling.

The standard solution in typesetting is hyphenation, but in monospace, hyphenation is also unpleasant as the hyphens draw too much attention and disrupt copy and paste.

This is why full justification is rarely seen in text files. However, there is an alternative approach. Rewriting the text to carefully select only words that precisely match the line length can avoid double spaces altogether. This is precisely what rs1n did in the late 1990s for his guide to Super Metroid. The resulting text features 17,000 words with the right margin perfectly ending on a letter, and there are no instances of twin spaces.

The author lightly mentions in the FAQ that no program was used to justify the text; it was all done by the author choosing words carefully so that everything lined up on the right-hand side. The author shares this mostly as a curiosity, noting that some rewrites for physical books are common to avoid widows and orphans, but such meticulous editing is less common in onscreen writing.

Despite the effort required, many can relate to dedicating hours to fine-tuning a button UI string or a tooltip to fit within a specific width in a densely packed interface.

Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Also reported by 1 other outlet

Read the original at unsung.aresluna.org →

More in Tech

Kernel prepatch 7.3-rc1

Linus has released 7.3-rc1 and closed the merge window for this release. " Nothing really stands out - except for the fact that it's big.

More from Sunday 30 August →