W3C home > Mailing lists > Public > www-style@w3.org > August 2007

[CSS3 Text] 4.2. Hyphenation

From: Niklas Åkerlund <spinningvertex@gmail.com>
Date: Thu, 9 Aug 2007 15:46:57 +0200
Message-ID: <b0dd968b0708090646h4203153fqc87c78e38952347f@mail.gmail.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:52 GMT