News for hackers. Stuff that matters.
Re:Using hyphenation and justification on the web by celoyd on Tuesday September 07, 2010 @08:03PM (#1670558)
Are those hyphenation algorithms really that hard to implement?

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.

There are no comments on this comment yet.