Re:Microfeatures I Love in Blogs and Personal Websites
by wongarsu on Monday June 24, 2024 @12:27PM
(#40778009)
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.
I don't plan to ever do something like this for any purpose, and I have never seen anybody do it either... But you can.