logoalt Hacker News

notpushkintoday at 3:01 AM1 replyview on HN

I’m looking at the comparison [0] and the `pretty` example is hyphenated, while greedy is not. Not sure it’s fair to compare them like that, considering we’ve had `hyphens: auto` for a while now.

Edit: it’s actually vice versa! Which I should have known because the very next paragraph says:

> But the “smart” algorithm decides to add an entire line to it, which requires inflating all the white space proportionally.

Which is exactly how the example on the right looks.

[0]: https://matklad.github.io/2026/02/14/justifying-text-wrap-pr...


Replies

crazygringotoday at 3:07 AM

That jumped out at me too... I'm not sure if they have different hyphenation properties set though, or if the greedy justified version just doesn't wind up hyphenating anywhere in this particular case?

Unfortunately there's no live HTML demo to inspect, just the images.

show 1 reply