Maybe I’m misunderstanding but Latex does this pretty well (“mastered” is a bit fuzzy I guess).
Maybe I’m misunderstanding but Latex does this pretty well (“mastered” is a bit fuzzy I guess).
A simple flood fill will hyphenate very enthusiastically, use suboptimal breaking points, does not consider stretching whitespace, and leads to rivers and other artifacts.
Many more sophisticated algorithms suffer from the same problems. Last I used LaTeX seriously, it also produced rivers where a human using e.g. Scribus would not.
What browsers are less good at, though, is determining exactly which lines to hyphenate when the possibility exists. If the 'hyphens: auto' property is used, they tend to be too eager, whereas (La)TeX applies hyphenation much more judiciously.
http://www.eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf
https://tex.stackexchange.com/questions/230668/any-progress-...
http://litherum.blogspot.com/2015/07/knuth-plass-line-breaki...