frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

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

https://justif.lyall.co/
2•lyall•1h 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•38m 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•22m 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

Oxidizing OCaml with Modal Memory Management (2024)

https://dl.acm.org/doi/10.1145/3674642
1•lioeters•1m ago•0 comments

SpaceX IPO Earns Millions for US Small Business Administration Head

https://www.reuters.com/business/media-telecom/spacex-ipo-earns-millions-us-small-business-admini...
1•1vuio0pswjnm7•1m ago•0 comments

A Road to Lisp: Which Lisp

https://scotto.me/blog/2026-07-17-which-lisp/
1•silcoon•3m ago•0 comments

Use and share Skills for SAP and contribute

https://skills.cloud.sap
1•yogananda•4m ago•1 comments

Show HN: I built TrackMyMetro, a fast, ad-free metro router for India

https://trackmymetro.com
1•HelloShiv•8m ago•0 comments

Best EC2 Instance for PostgreSQL

https://postgres.saneengineer.com/best-ec2-instance-for-postgresql
1•b-man•8m ago•0 comments

Open Sauce 2026 – Exhibits

https://www.opensauce.com/exhibits
1•brokensegue•13m ago•0 comments

Show HN: Wolbarg – Local-first shared memory for AI agents using SQLite

https://wolbarg.com/blog/why-sqlite-is-enough-for-local-ai-agent-memory
1•atharvmunde•13m ago•0 comments

Kimi K3 may be an important inflection point for AI

https://twitter.com/GavinSBaker/status/2078110934740980193
1•jger15•20m ago•0 comments

Cross Compiling Rust To openwrt `mipsel-unknown-Linux-musl` on Mac OS

https://gabrielfalcao.github.io/blog/cross-compiling-rust-to-openwrt-mipsel-unknown-linux-musl-on...
1•gfalcao•21m ago•0 comments

Eusend keeps your email data in the EU

https://www.eusend.dev/blog/how-eusend-keeps-your-email-in-the-eu
1•sharecrow•22m ago•0 comments

EU loosens carbon market rules to let industry pollute for longer

https://www.politico.eu/article/eu-loosens-carbon-market-rules-to-allow-industry-to-pollute-for-l...
2•leonidasrup•23m ago•0 comments

Anthropic Thinks Its Own Success Is Key to Making AI Safe

https://www.wired.com/story/anthropic-thinks-ai-can-only-be-safe-under-its-control/
2•1vuio0pswjnm7•24m ago•0 comments

Show HN: Hearth, an open-source local AI that runs your PC (files, apps, voice)

https://github.com/0pen-Sourcer/Hearth
1•SwagKing•25m ago•0 comments

More Bounce to the Ounce – By Maciej Cegłowski

https://mceglowski.substack.com/p/more-bounce-to-the-ounce
2•pavel_lishin•27m ago•0 comments

Video Game Critic

https://videogamecritic.com/
1•helloplanets•27m ago•0 comments

Pattern Matching on Compressed Strings Without Decompression

https://spiraldb.com/blog/pattern-matching-strings-without-decompression
1•surprisetalk•28m ago•0 comments

PennyLane is an open-source quantum software platform for quantum

https://github.com/PennyLaneAI/pennylane
2•donutloop•29m ago•0 comments

Soft Dorothy Software: Unfinished Tales (Vol 1)

https://github.com/EngineersNeedArt/SoftDorothy-UnfinishedTales-Vol1
1•gregsadetsky•29m ago•0 comments

Multi-region data and service mesh operated by a Makefile

https://github.com/neospe/autoops
2•renk•30m ago•0 comments

Some Thoughts on AI and Art

https://insertchaos.bearblog.dev/thoughts-on-ai-and-art/
1•snorbleck•30m ago•0 comments

A multipurpose, private personal AI on a dedicated AWS instance

https://purposemapped.com
1•BuddyPerry•30m ago•0 comments

Document intelligence platform – share files, track views, collect signatures

https://tinidrop.com
1•santosh_premi•30m ago•0 comments

V1 of OpenTelemetry Go Compile-Time Instrumentation

https://opentelemetry.io/blog/2026/go-compile-time-instrumentation-v1/
1•svrnm•31m ago•0 comments

Glider Classic Returns

https://www.softdorothy.com/gliderclassic/gliderclassic.html
1•gregsadetsky•31m ago•0 comments

Regular expression speed and error rates

https://www.johndcook.com/blog/2026/07/17/regex-speed-error/
1•ibobev•32m ago•0 comments

Egerton MS 1995

https://quuxplusone.github.io/blog/2026/07/16/egerton-ms-1995/
2•ibobev•32m ago•0 comments

Why Org Social is the ethical Fediverse alternative

https://en.andros.dev/blog/734c56f2/why-org-social-is-the-ethical-fediverse-alternative/
4•ibobev•33m ago•2 comments

Unigent SDK – universal cross-harness, cross-session agent workflow scripting

https://github.com/gintasz/unigent
1•gintasz•35m ago•0 comments

Curry-Howard Correspondence – How proof assistants work [pdf]

https://cklixx.people.wm.edu/teaching/math400/Wesley-P1.pdf
1•max-amb•37m ago•0 comments