3 ms·
The hyphenation dictionaries browsers use for CSS hyphenation seem to be pretty accurate as well. At least for English.
by zamadatix 5y ago
The hyphenation dictionaries browsers use for CSS hyphenation seem to be pretty accurate as well. At least for English.
- jfk13 5y agoAll those I'm aware of are directly based on those used in the TeX world, so that's to be expected. 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.
- kqr 5y agoIt goes way beyond dictionaries though. Once you know where you can break words, how do you know where you should break words? 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.