Re: [css3-text] Comments on hyphenation

It's good to see renewed interest in hyphenation. I think we all can
agree with Donald Knuth that automatic hyphenation is a requirement
for beautiful typography. And we can probably base our solutions on
his and Liang's work on the topic.

The first proposal for hyphenation in CSS is from 2007:

  http://www.w3.org/TR/2007/WD-css3-gcpm-20070205/#hyphenation

This proposal was base on the implemenation experience from Prince:

  http://www.princexml.com/howcome/2006/p6/p6demo2.html

The 'hyphenation-dictionary' property was later renamed to
'hyphenation-resource' because:

  - most, if not all imeplementations, use some kind of patterns and
    not "dictionaries"
  - in additions to patterns, there are also exception lists
  - 'resource' is a web-friendly name

  http://lists.w3.org/Archives/Member/w3c-css-wg/2007JanMar/0511.html

Prince has implemented the 'hyphenation-resource' property. There have
been some discussions about where to find the best resource files:

  http://www.princehtml.com/bb/viewtopic.php?f=4&t=3758&start=0

The problems seem to be caused by there being several variations of
the TeX algorithm and the resource files. There has been an effort to
collect and harmonize a set of files:

  http://tug.org/svn/texhyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns/txt/

In that collection, the "pat" files contain the patterns, and the
"hyp" files contain the exceptions. 

It's noteworthy that the exeptions are stored in separate files; they
all fit into the comma-separated list of values for the
'hyphenate-resource' property.

I have an action item to try write a short description of the formats used. 

BTW: I believe we should continue to use the 'hyphenate-resource'
property instead of introducing @hyphenate-resource.

 - the WG settled on the 'hyphenate-resource' (and the other names)
   based on feedback from implementors:

     http://www.w3.org/2007/04/10-css-minutes.html

 - generally, CSS uses properties to set values on elements. E.g., we
   use background-* properties instead of @background, even if very
   few elements have a background set.

 - 'hyphenate-resource' allows us to go through :lang values, but
   doesn't require its use.

Cheers,

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Monday, 16 May 2011 22:27:10 UTC