3 ms·
It is not just about hyphenation. Even with good hyphenation you will still leave rivers of white space unless you are intelligently managing word spacing. Unf
by teilo 16y ago
It is not just about hyphenation. Even with good hyphenation you will still leave rivers of white space unless you are intelligently managing word spacing.
Unfortunately, browsers are not the only offenders here. Almost almost every word processor in existence is brain-dead when it comes to justification. To my knowledge, there are only a handful of programs that get it right: InDesign, Quark, and Word (but only if you turn on a "Compatibility" option called, "Use Full Justification like Word Perfect"). I am deliberately excluding dinosaurs like Word Perfect and Pagemaker, which also get it right. Oh, and TeX. I am excluding TeX. Tough cookies.
What do I mean by "right"? That there should be more than one tool in your line-breaking toolbox. Hyphenation is one tool. The other is minimum word spacing. This means that instead of only allowing space between words to grow, you also allow it to shrink, up to a set limit. In almost every word processor (Including OOo and derivates, Pages, Mellel and Nisus on the Mac, etc.), no attempt whatsoever is made to reduce the spacing between words to allow another word to fit, or a hyphenation break to occur at a better location.
- baddox 16y agoI suppose it depends on whether you're using a fixed width font. If you are, then an algorithm (probably making using of dynamic programming) can easily produce optimal line breaks, where "optimal" has some specific definition.
- ugh 16y agoYou should never justify fixed-width fonts, only proportional fonts. You also shouldn’t think of spaces between words as multiples of one space width. When you are justifying texts, a space has no defined width, it has an upper bound and a lower bound. I also don’t think that algorithms are the problem. InDesign does a beautiful job at typesetting paragraphs. You can enter an upper bound and lower bound for the space between words and you can display violations of those bounds (the offending words will be highlighted) which you can then manually fine tune. InDesign also offers many other options for hyphenation and justification. (Other professional layout tools have similar options.) The problem might rather be that the effect of such sophisticated typesetting is subtle and it is unlikely that a program like Pages on Mac OS X will be used by typesetters and designers who care about things like that.
- ugh 16y agoProfessional layout tools also allow the letter-spacing to grow and shrink and you can tell them to stretch or squeeze letters. Doing this is obviously very controversial but I think that allowing InDesign to stretch and squeeze letters by a percent or half a percent is visually not noticeable (at least with body text) and can noticeably reduce the number of large holes in your text, especially if the columns of your text are relatively narrow. Other word processors don’t give you that option at all.
- colanderman 16y agoThere's also a TeX package, microtype, which does this same thing (among other optimizations, such as punctuation overhang). I've found that text with variable font widths looks "off" to my eyes, but because the effect is so subtle I'm not sure that this isn't just psychological.