Justif
Knuth-Plass justification and microtypography for the web
Details
- External ID
- 48946738
- Source
- HN
- Company
- —
- Product
- Justif
- Website domain
- lyall.co
- Launched
- July 17, 2026
- Cohort
- —
- Upvotes
- 198
- Upvotes percentile
- 0.96415770609319
- Tags
- —
- Fetched at
- Sept. 7, 2026, 9:26 p.m.
- Updated at
- Sept. 7, 2026, 9:26 p.m.
Description
Justif is a drop-in JavaScript library that progressively enhances web pages to TeX-level text justification. Installation is a single <script> line, standard text and accessibility affordances are unchanged, and users with JS disabled get native browser rendering.I made justif because I've long been a fan of justified text. I think it looks clean and elegant, and makes reading more enjoyable. But bad justification is the opposite, with gaping spaces that distract me to the point of making the text near unreadable.Browsers have got better recently at handling justified text [0][1], but still use suboptimal greedy algorithms for the most part, and are not near that TeX/InDesign level of quality that I crave. `text-wrap: pretty` exists but is far from a panacea, as you can see for yourself in the demo.Justif also has the benefit of providing more consistent text layout across browsers. Blink (Chrome), Gecko (Firefox) and WebKit (Safari) all justify text differently, so normally what the user sees depends on what browser they use.Take a look at the demo, play around with it, see if you can break anything. I'm open to improvements of the API design as well, so please let me know your thoughts.For more details, see the README: https://github.com/lyallcooper/justif0: https://cloudfour.com/thinks/justified-text-better-than-expe...1: https://owickstrom.github.io/the-proportional-web/
Enrichment
- Theme
- typography and unicode text tools
- Vertical
- Horizontal
- Function
- Dev tools
- Audience
- Developer
- AI stance
- Not AI
- Project type
- Commercial product
- Normalized one-liner
- text justification for web
- Manually corrected
- False
Could you build this?
No Implementing the Knuth-Plass dynamic programming line-breaking algorithm with font metric measurements, hyphenation, and microtypography in DOM-aware JavaScript requires deep typographic and algorithmic expertise.
What it would actually take: The architecture requires an accurate text measurement engine using the Canvas API or FontMetrics API, an implementation of the TeX hyphenation algorithm (Liang's algorithm), and Knuth-Plass global optimum line breaking modeling stretchable/shrinkable glues and penalties. It must handle bidirectional text, kerning pairs, optical margins, and DOM mutation reconciliation smoothly without reflow thrashing. This requires specialized domain knowledge in algorithmic typography and browser rendering performance.
Discussion
20 comments analyzed.
Competitors mentioned: WASM-based font measurement approach, LaTeX, Word processors with justification
Concerns raised: Performance with very long paragraphs, HTML renderers misinterpret abbreviations as sentence-ends, Drop caps compatibility, React Native support feasibility
Feature requests: Drop caps support, React Native implementation, Thin space handling for abbreviations like 'No. 12'
Competitors
Other products that read as similar to this one — 27 launches clear the similarity bar, closest 8 shown.
Attention rank: #1 of 28 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).
Launched 258 days after the earliest competitor.
- JustHTML · hn · 2025-12-02 · 6 upvotes · similarity 0.41
- osso · github · 2026-09-26 · 13 upvotes · similarity 0.40
- ZenPaint, a pixel-perfect MacPaint recreation for the browser · hn · 2025-11-25 · 8 upvotes · similarity 0.36
- ZenPaint, a pixel-perfect MacPaint recreation for the browser · hn · 2025-11-15 · 18 upvotes · similarity 0.36
- Is this the perfect 404 page? [CSS only] · hn · 2026-01-28 · 8 upvotes · similarity 0.36
- One clean, developer-focused page for every Unicode symbol · hn · 2025-12-25 · 198 upvotes · similarity 0.35
- Unsiloed AI · hn · 2026-05-25 · 9 upvotes · similarity 0.35
- Mojibake · hn · 2026-07-16 · 78 upvotes · similarity 0.35
Other launches for this product
Same idea, different domain
Nobody's really built a dev tools tool for Sales yet.