Fascinating, thank you!
Playing around with it, seems that Safari simply stops hyphenating entirely when when text-wrap is pretty, regardless of whether it's justified or not. (If you smoothly resize the browser width, it makes it pretty easy to tell if hyphens ever come up.)
Which means the image on the left seems like it might be the wrong image?
And now I wonder if text-wrap: pretty is supposed to avoid hyphenation? Are hyphens not pretty? Or is it just a partial implementation by Apple, that they haven't gotten around to supporting hyphenation for it yet?
You can get it if you carefully adjust the window width! Or there’s one example in the author’s post – the word “implementation” is hyphenated for me [1].
So it looks like the algorithm tries to minimize hyphenation, which makes sense to be honest.
[1]: https://matklad.github.io/2026/02/14/justifying-text-wrap-pr...