3 ms·
Such a long discussion and no mention the Knuth algorithm?
by SeanLuke 5y ago
Such a long discussion and no mention the Knuth algorithm?
- gwern 5y ago"The method is suitable for headlines and a single short paragraph of text. It’s not suitable for long paragraphs of texts or multiple paragraphs. It yields no benefit over the browser’s default layout engine when the text exceeds a couple of lines. You’ll also end up with paragraphs of uneven widths, which breaks up the cohesion of the right-hand text edge of your design. It works great for two–four lines of text, though." Knuth-Plass is for setting all text to a specified width and balancing as best as possible within that, not having varying widths.
- d2wa 5y agoIt wasn’t really relevant in this context. It’s similar to what the browsers do by default, however.