W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2007

[whatwg] Hyphenation

From: Kornel Lesinski <kornel@osiolki.net>
Date: Tue, 09 Jan 2007 23:16:31 -0000
Message-ID: <op.tlwtj3m54suneb@g5.local>
On Tue, 09 Jan 2007 13:03:04 -0000, Leons Petrazickis  
<leons.petrazickis at gmail.com> wrote:

> I would suggest that the first priority is getting a naive hyphenator
> into browsers. Since you only ever need hyphenation when
> full-justifying

I disagree. It's also needed in narrow columns, even if they're  
left-justified and may be useful for very long words in general.

> Once that is in place, we can start thinking about special cases. I
> would suggest a hyphenation dictionary in the <head> of the document.

Hyphenation dictionary supplied by the page seems like a good idea, but  
having it in <head> might cause some headaches in dynamic systems:
* in some template systems adding anything to <head> is difficult
* author may want to compose page from several independent fragments,  
possibly each having its own dictionary. Merging these dictionaries would  
either require some extra logic or cause duplicate entires (and authors  
won't like that waste).
* One would have to keep in sync dictionaries and text (in practice there  
will be cases when dictionary lacks some words or contains words which  
aren't present in text any more)
* syntax proposed is verbose and with entire dictionary repeated on every  
page that adds up to a substantial traffic

And this problem can't be solved by using external file for dictionary, as  
it will either delay initial display of the page until dictionary is  
loaded or will require reflow of entire page.


Therefore I suggest something possibly a bit more difficult to UAs - learn  
 from the text in document.

Having document with:
The zo?-ven hypertext must ab-stain from grooming monkeys in an
indefatigably questionable fashion. The zo?ven hypertext must abstain
 from grooming monkeys in an indefatigably questionable fashion.

UA would make note of words with soft hyphens and replace further  
non-hyphenated occurances with hyphenated ones:
The zo?-ven hypertext must ab-stain from grooming monkeys in an
indefatigably questionable fashion. The zo?-ven hypertext must ab-stain
 from grooming monkeys in an indefatigably questionable fashion.

(decision whether this is visible in DOM or not is probably best left to  
implementation).

As for the exceptions in hyphenation, I'm in favor of <hyph> element.


-- 
pozdrawiam, Kornel Lesi?ski
Received on Tuesday, 9 January 2007 15:16:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:31 UTC