2 ms·
Browsers take hyphenation hints: insert ­ in a word to tell it that it can put a hyphen there. Either combined with css ´hyphens: auto´ to tell the browser
by wongarsu 2y ago
Browsers take hyphenation hints: insert ­ in a word to tell it that it can put a hyphen there. Either combined with css ´hyphens: auto´ to tell the browser to also choose where to put hyphens, or ´hyphens: manual´ so your hints are the only thing that counts. Then just do it all server-side. Browsers still aren't the best at actually using that, but it's better than not hyphenating at all. (and of course you could write your own layout engine that uses your soft hints)
But shipping a whole dictionary wouldn't even be that unreasonable. A reasonable English dictionary is about 1.5MB compressed or 4MB uncompressed.