W3C home > Mailing lists > Public > www-style@w3.org > February 2011

Re: [css3-text] Hyphenation Resources

From: Jonathan Kew <jonathan@jfkew.plus.com>
Date: Tue, 1 Feb 2011 09:04:20 +0000
Cc: John Daggett <jdaggett@mozilla.com>, www-style list <www-style@w3.org>
Message-Id: <E4FBA0AB-F9A9-43FE-A782-F585694B8F27@jfkew.plus.com>
To: Håkon Wium Lie <howcome@opera.com>
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";

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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:55 UTC