Field report · justif in the wild
Federalist Reader presents the Federalist Papers as facsimile front pages of the newspapers that first printed them. Its Gazette view reproduces The Independent Journal — in IM FELL DW Pica, two 356 px columns, drop caps — but for its first week it set the text ragged-right, which no 1787 compositor would have shipped. We ran justif against the live page to see what it would do. It was made for this — and within days, justif was setting every essay on the site in production.
Real markup and font from the live site, at the exact 356 px measure. The right panel is frozen output of justif running against the page — every line’s word-spacing, letter-spacing, and protrusion is what the engine computed, serialized verbatim.
text-align: left; hyphens: auto
By a faction, I understand a number of citizens, whether amounting to a majority or a minority of the whole, who are united and actuated by some common impulse of passion, or of interest, adversed to the rights of other citizens, or to the permanent and aggregate interests of the community.
There are two methods of curing the mischiefs of faction: the one, by removing its causes; the other, by controlling its effects.
There are again two methods of removing the causes of faction: the one, by destroying the liberty which is essential to its existence; the other, by giving to every citizen the same opinions, the same passions, and the same interests.
text-align: justify; hyphens: auto — one line at a time, spaces stretched to fit
By a faction, I understand a number of citizens, whether amounting to a majority or a minority of the whole, who are united and actuated by some common impulse of passion, or of interest, adversed to the rights of other citizens, or to the permanent and aggregate interests of the community.
There are two methods of curing the mischiefs of faction: the one, by removing its causes; the other, by controlling its effects.
There are again two methods of removing the causes of faction: the one, by destroying the liberty which is essential to its existence; the other, by giving to every citizen the same opinions, the same passions, and the same interests.
Whole-paragraph optimization + hanging punctuation, frozen from the live run
By a faction, I understand a number of citizens, whether amounting to a majority or a minority of the whole, who are united and actuated by some common impulse of passion, or of interest, adversed to the rights of other citizens, or to the permanent and aggregate interests of the community.
There are two methods of curing the mischiefs of faction: the one, by removing its causes; the other, by controlling its effects.
There are again two methods of removing the causes of faction: the one, by destroying the liberty which is essential to its existence; the other, by giving to every citizen the same opinions, the same passions, and the same interests.
Both justified panels reach the margin, but the native panel gets there by stretching spaces on whichever line came up short. In justif’s panel the computed word-spacing deviates by fractions of a pixel per line, because the engine re-chose every break in the paragraph at once.
Line-ending commas and final periods hang past the right margin guide (the −5 to −6 px margin-inline-end in the frozen markup), so the letterforms define the optical edge. On a facsimile of hand-set newsprint this reads as period-correct, not decorative.
The browser hyphenates this short passage twice (caus-es, giv-ing in Chromium). Justif, given the same en-US TeX patterns, found whole-paragraph solutions that needed none at a 356 px measure.
Two-column facsimile layout, self-hosted revival fonts, small caps, inline italics: everything Just Worked from a console injection, and selection, find-in-page, and the DOM’s semantics stayed intact. (The drop-cap opener keeps the browser’s native justification by design, sitting exactly as a compositor would have locked it.)
This page began as a field report sent to justif’s author during the library’s Show HN week. Days later, justif 0.5.0 was live and so were we: every essay on federalistreader.org is now set with whole-paragraph justification and hanging punctuation, the way its 1787 originals were set by hand. The big Fell drop caps keep the browser’s native justification by design. Open any paper and look at the right edge.