- From: Niklas Åkerlund <spinningvertex@gmail.com>
- Date: Thu, 9 Aug 2007 15:46:57 +0200
- To: www-style@w3.org
This message was sparked by Daniel Aleksandersen who pointed out to me the potentially bad development of CSS Hyphenation. I figure automatic Hyphenation is a hard thing to implement. You basically need to check each word that's about to wrap if it can be broken up. And if so, keep the piece(s) that fits before wrapping. To do that, you'd need a dictionary/list(s) of all words in the specific language(s) used that can be broken up and where the break(s) should be. This is how the working draft of the CSS3 module: "Generated Content for Paged Media" describes it at the moment. And CSS3 Text currently says, "A current proposal for advanced hyphenation controls is published in the Generated Content for Paged Media draft." If this should be implemented in "@media screen", browsers would need to download dictionaries from pages which hyphenates long words. This would be really bad because dictionaries are big... and once downloaded the text might rewrap causing confusion. I'd rather suggest that browsers contains built in dictionaries, or provides them as extensions. This might also be useful for built in spell checking which, for example, extensions like the google toolbar currently implements. Manual(or server side implemented) would be alot easier to implement for browsers. Text would simply contain hyphenations from the start. However, to keep the specs consistent, a hyphenation character like u+200B should only show in preformated text. Just like the newline character. In html, the BR tag breaks lines. In accordance to this, Mozilla and IE implements the non-standard WBR to provide break points inside words. So in short, I sugest adding WBR and the behaviour of u+200B to the specs first... This might not be the right mail list to suggest that but I felt it was mostly CSSText related anyhow... Niklas Åkerlund
Received on Thursday, 9 August 2007 13:47:02 UTC