Re: [css3-text] Hyphenation Resources

On 1 Feb 2011, at 08:34, Håkon Wium Lie wrote:

> Also sprach John Daggett:
> 
>> The current CSS3 Text spec defines a 'hyphenation-resource' @-rule:
>> 
>>  http://dev.w3.org/csswg/css3-text/#hyphenation-resource
>> 
>> This was based on a similar property defined in CSS3 GCPM:
>> 
>>  http://dev.w3.org/csswg/css3-gcpm/#the-hyphenate-resource-property
>> 
>> However, neither of these reference or define a syntax for the
>> hyphenation resource.
> 
> As such, the 'hyphenate-resource property is similar to the
> 'cursor' property:
> 
>  http://www.w3.org/TR/css3-ui/#cursor

Or the src descriptor in @font-face rules, for example.

> 
>> Effectively, these are UA-specific resources when defined this way.
> 
> Not quite. Both Prince and Antenna House supports the TeX format, it
> seems. Having a standardized way of referencing the hyphenation
> resources therefore make sense. I believe the TeX format is also used
> in many other products.

Hyphenation resources based on TeX's are used in a number of products, but I'm not sure quite how "standardized" those files are. Some of the TeX files in circulation (e.g., found on CTAN or other sources) include macros, etc, and probably can't be used exactly as-is by non-TeX processors even if they rely on the same underlying algorithms. Referring to "the TeX format" is not an adequate way to identify a specific, interoperable resource format.

> 
> Even when differnet UAs support different formats, the comma-separated
> list will handle the situation:
> 
>  body { hyphenate-resource: url(hyph.dic), url(hyph.dac) }
> 
> The result would be interoperable between a formatter that supports
> "dic" and the (more hypothetical) "dac" format.

This would be improved, IMO, by adding "format hints" similar to those in @font-face, so that the UA can avoid downloading resources that it won't be able to use. E.g.,

body {
  hyphenate-resource: url(hyph.dic) format "TeX", url(hyphens.dac) format "foo", url(hyph_en_US.xml) format "FOP";
}

or maybe

@hyphenate-resource {
  lang: "en-US";
  src: url(hyph.dic) format "TeX", url(hyphens.dac) format "foo", url(hyph_en_US.xml) format "FOP";
}

JK

Received on Tuesday, 1 February 2011 09:05:20 UTC