![]() ![]() I’m not actually in a position to recommend any design decisions to anybody. Recommendation: Don’t Do It to “Recommendation: Don’t Do It” # In the above paragraph, of the nine lines that reach the right margin, five (over half!) are hyphenated and split. Instead, you’ll see dense blocks rich with hyphenation: You will almost never see the kind of floaty word spacing like above. Chrome couldn’t figure out a good way to lay this out, even with hyphenation turned on.Ĭompare this with LaTeX, which aggressively hyphenates. Notice the difference? Exactly there is none. Here’s another example of justified text with and without hyphenation in Chrome (this is Chrome 89, on March 29, 2021). Justify + Hyphenation on the Web: It’s Still not Great to “Justify + Hyphenation on the Web: It’s Still not Great” # The second point especially should reveal that hyphenating justified text involves an algorithm, and the algorithm can be of different quality in different implementations. Apparently this is surprisingly computationally intensive, which might have factored into it languishing for so long. Decisions you make on one line affect the next. How do you decide when to hyphenate? There’s some algorithm running making tradeoffs between shoving words further apart and splitting them up. Compared to just splatting down symbols on the page and wrapping, knowing about syllables seems way more complex. Second, this means the process is now language-specific. In other words, you suddenly need a huge dictionary with syllable markings for all words. First of all, this requires knowing where the syllables in all words are. Where are you allowed to hyphenate? At syllable boundaries. Why would it be hard? As far as I can tell, there are a couple main aspects: When I looked this up a while back, it was the first time I’d really thought about hyphenation. Aside: Hyphenation to “Aside: Hyphenation” # Edge apparently isn’t quite there yet entirely. For, e.g., Safari on macOS and iOS, you’ve still got to use one of those janky CSS -webkit- prefixes. ![]() But, lo and behold, wait a few months, and it’s starting to emerge: The last time I’d looked, hyphenation (CSS: hyphens: auto) wasn’t widely available. I marked somewhat awkward spaces in orange, and very ugly ones in red.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |