Show HN: Justif – publication-grade text justification for the web

  • Posted 2 hours ago by lyall
  • 2 points
https://justif.lyall.co/
I've long been a fan of justified text. I think it looks clean and elegant. But I've always been disappointed by how browsers render it, 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], but still are not near that TeX/InDesign level of quality that I crave.

Inspired by running headfirst into disappointment with how text justification looked on a recent project site of mine, and by Oskar Wickström's "Proportional Web" [1], I decided to make a drop in js library that justifies text at least as well as TeX can, all with a single <script> import.

Justif also has the benefit of providing 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, try some different browsers. Constructive feedback is always welcome.

0: https://cloudfour.com/thinks/justified-text-better-than-expe...

1: https://owickstrom.github.io/the-proportional-web/

0 comments