Using hyphenation and justification on the web
alistapart.com
alistapart.com
It wouldn’t be strange to have a CSS property that controls hyphenation, ‘text-overlow:ellipsis’ (which adds a ellipsis before the text overflows [+]) also changes the text at that level.
True hyphenation requires:
0. A property to enable or disable hyphenation 1. Hyphenation algorithm (mostly a solved problem) 2. Hyphenation dictionaries: One per language, and need to be high quality -- OpenOffice has the best open source one, but generally these are not very common
I'm not convinced that 0 or 1 are the blockers here.
There could be another issue: speed. Doing proper hyphenation and justification slows layout.
It seems I was a bit too brisk with my assertion. Hyphenation is coming (at some point in the indefinite future), only the implementation details seem to be not yet agreed upon – not even in a rudimentary way – which is probably why no browser dares to implement it.
The Working Draft links to another Draft where a possible implementation is detailed [1]. Looking around the public mailing list it seems that some have been barking up that tree for a long time.
Standards really don’t seem to be the holdup. At least some people have campaigned for the inclusion of hyphenation in the past.
I still think that implementation isn’t the problem, either. This seems to be one of those eccentric typographic details that is ignored and can safely be ignored because the web doesn’t depend on it (kind of like kerning and ligatures which are now only slowly finding their way into browsers). It’s also not exactly flashy like rounded borders, drop shadows or gradients. That might be the reason why browser vendors are dragging their feet. They could implement it but it’s not super-trivial so they rather wait and see.
[1] http://www.w3.org/TR/2007/WD-css3-gcpm-20070205/#hyphenation
FTFY
Seriously though, browsers need better typography in general. http://nitens.org/taraborelli/latex
Yes: see (for example) http://en.wikipedia.org/wiki/Hz-program .
A really good H&J algorithm is doing a significant amount of work. It has to think about things like successive hyphens (which get distracting quickly), rivers (the unpleasant vertical lines of whitespace that appear especially in over-spaced text), and so on. This involves lots of backtracking and image processing, and it fires every time the layout changes. It’s all possible to do in a browser someday, but it’s not trivial.
Some (http://line25.com/articles/10-usability-crimes-you-really-sh...) say that justified text is hard to read for Dyslexic users.
Others (http://www.v7n.com/forums/web-usability/42975-justify-not-ju...) claim that ragged right side can help "keeping place" in the text. (but why then the books are justified?)
Anyway because of that and because it is troublesome to implement justification correctly I think adding those soft-hyphens isn't worth a trouble.
What you would really want is a fancy justification algorithm like the one InDesign uses (it takes into account not just the current line but the whole paragraph and it avoids, among other things, white rivers in the text) with lots of knobs to turn.
That’s currently just not possible on the web which is why justification is often not such a good idea even if you can find workarounds. But it’s certainly no crime. (All books, newspapers and magazines do it.)
Maybe it's a relic of printing processes that can be left behind.
I was surprised that you did notice it, since most books are hyphenated. And now I get to ask: how is what I said a non sequitur, and how have I misrepresented what you said?
The text looks absolutely hideous at large font sizes. I almost think it would be better non-justified.
I don't get jolted out of the flow of text with good hyphenation. It's more distracting to me to see irregular spacing in the line. The extra spaces when the justification is working very hard feels slower-paced, and the dense lines feel higher-paced, giving this weird rhythm, something like: "sooo tthheee mmmaaannn walkedacrossthe roooaaad".
The best justification (no pun intended) for using "ragged text" I found was under the heading "Text Alignment" on http://community.infragistics.com/ux/articles/text-treatment... .
It is also my opinion that full justification may make the text block as a whole prettier but makes the text significantly harder to read. However, soft hypens and zero-width spaces still have a role to play on the web even so because justified and ragged-right text both have problems with very, very long words, and on the internet multi-hundred character words actually show up with some frequency, mostly as URLs.