frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Justif – Knuth-Plass justification and microtypography for the web

https://justif.lyall.co/
19•lyall•4d ago
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/justif

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

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

Comments

svat•4d ago
This is great! Loved the demo and controls (and nice touch to include The Frog Prince as one of the sample texts lol). I think by doing tracking and expansion you're going even further than original Knuth TeX did/does. Maybe for the demo when hyphenation is turned off, the browser side should also turn it off? Or leave it like this, justif without hyphenation still does better than browser with hyphenation :)

Wish this project great success!

lyall•4d ago
Thank you! And yes by default TeX doesn't do tracking or expansion, but the microtype [0] package does.

And I did struggle a bit with deciding how best to do the comparison to native browser rendering. I wanted it to be an apples-to-apples comparison, but also didn't want to unfairly handicap the browser by disabling something like hyphenation. It's already bad enough as is...

0: https://ctan.org/pkg/microtype

wrs•33m ago
Chromium supposedly implemented Knuth-Plass for CSS's "text-wrap: balance", but reading the end of the tracking bug [0] it seems it stops at six lines? (Design doc: [1])

[0] https://issues.chromium.org/issues/40270471 [1] https://docs.google.com/document/d/1jJFD8nAUuiUX6ArFZQqQo8yT...

antics9•30m ago
Side-by-side didn’t do it for me but flicker made all the difference!

This is great, wish that browsers would implement a better algorithm.

Also good execution with the demo page.

OpenAI and Hugging Face address security incident during model evaluation

https://openai.com/index/hugging-face-model-evaluation-security-incident/
291•mfiguiere•1h ago•151 comments

FreeInk: Open ecosystem for e-readers

https://freeink.org/
255•FriedPickles•2h ago•62 comments

Gemini 3.6 Flash, 3.5 Flash-Lite, and 3.5 Flash Cyber

https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-3-6-flash-3-5-flas...
527•logickkk1•6h ago•422 comments

Long presumed dead, a thriving coral reef is discovered in West Africa

https://e360.yale.edu/digest/benin-coral-reef
249•speckx•5h ago•43 comments

Jack Dorsey launches Buzz to combine team chat, AI agents and Git hosting

https://runtimewire.com/article/jack-dorsey-block-buzz-team-chat-ai-agents-git
157•ryanmerket•4h ago•149 comments

'VPNs are lawful technical tools,' says EU Court in landmark copyright ruling

https://www.techradar.com/vpn/vpn-privacy-security/vpns-are-lawful-technical-tools-says-eu-court-...
170•healsdata•1h ago•22 comments

Apple defeats liability for not scanning iCloud for CSAM

https://blog.ericgoldman.org/archives/2026/07/apple-defeats-liability-for-not-scanning-icloud-for...
277•speckx•7h ago•239 comments

Laguna S 2.1

https://poolside.ai/blog/introducing-laguna-s-2-1
149•rexledesma•4h ago•32 comments

Apple Private Cloud Compute SoC 3 audit reports

https://support.apple.com/guide/certifications/apple-private-cloud-compute-soc-3-audit-apc95a31b9...
66•throwfaraway4•3h ago•18 comments

Meta's AI models are powering the first wave of Genesis Mission projects

https://ai.meta.com/blog/genesis-mission-lawrence-berkeley-national-laboratory-segment-anything-d...
80•surprisetalk•4h ago•51 comments

Qwen-Image-3.0: Rich Content, Authentic Details, Deep Knowledge

https://qwen.ai/blog?id=qwen-image-3.0
515•ilreb•12h ago•206 comments

The Birth of Prolog (1996)

https://dl.acm.org/doi/10.1145/234286.1057820
13•Jtsummers•3d ago•0 comments

PCjs Machines

https://www.pcjs.org/
168•naves•7h ago•20 comments

Show HN: A self-running space economy SIM in Rust and Bevy

https://github.com/Kalcode/spaceprojectsim
56•kalcode•3h ago•18 comments

Bloomy (YC S26) is hiring a founding engineer

1•alexsouthmayd•4h ago

"Drawing" the Mona Lisa with GPT-5.6, Claude, Gemini, and Grok

https://www.tryai.dev/blog/ai-drawing-arena-colored-pencils-claude-gpt-grok
5•hershyb_•21m ago•3 comments

A digestion of the Jacobian conjecture counterexample

https://terrytao.wordpress.com/2026/07/21/a-digestion-of-the-jacobian-conjecture-counterexample/
8•jeremyscanvic•25m ago•0 comments

France's Anssi Will Block PQC-Free Products from Certification Starting 2027

https://postquantum.com/security-pqc/anssi-pqc-certification-2027/
75•Sami_Lehtinen•5h ago•33 comments

The Price of Happiness (2024)

https://happiness-science.org/price-of-happiness/
32•andyjohnson0•2h ago•10 comments

Show HN: Justif – Knuth-Plass justification and microtypography for the web

https://justif.lyall.co/
19•lyall•4d ago•4 comments

The World's 2,400 Castles

https://thecastlemap.com/
151•marklit•5h ago•111 comments

Measuring reward-seeking by instilling contrastive beliefs

https://alignment.openai.com/measuring-reward-seeking/
7•mfiguiere•3h ago•1 comments

My USB Drive Has a Hidden Encrypted Vault

https://rootkitlabs.com/2026/06/22/I%27m-Building-a-Secure-USB-Drive/
120•machinehum•1d ago•77 comments

Slater – Low-memory graphdb designed for read-heavy graphs

https://github.com/Hikari-Systems/slater
22•rickkjp•2h ago•7 comments

The unreasonable difficulty of time series forecasting

https://suzyahyah.github.io/machine%20learning/2026/06/27/trouble-with-time-series.html
97•suzyahyah•3d ago•38 comments

Advertise in ChatGPT

https://ads.openai.com/
215•montecarl•2h ago•215 comments

Show HN: Read the Tape – Wordle for daytrading, five blind S&P 500 charts a day

https://readthetape.cc/
13•will_asouka•1d ago•8 comments

AI Agent – TRMNL

https://help.trmnl.com/en/articles/14130438-ai-agent
28•joeyespo•3h ago•16 comments

Roblox Officially Supports GrapheneOS

https://en.help.roblox.com/hc/en-us/articles/49648939984916-Android-Remote-Attestation
37•Cider9986•4h ago•4 comments

Show HN: Orate – On-device neural text-to-speech queue for Mac

https://orate.to/
5•bherms•56m ago•0 comments