Hacker News new | past | comments | ask | show | jobs | submit login

Justified text is beautiful ... in narrow-ish columns with good hyphenation. But hyphenation sucks on the web, and without hyphenation you can't even do narrow columns even in the rare cases where it would make sense for the reader.



Well, you can in theory send an entire dictionary with your page to make it not suck.

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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: