W3C home > Mailing lists > Public > www-style@w3.org > December 2012

Re: [css3-text] spacing limits are not interoperable

From: Alan Stearns <stearns@adobe.com>
Date: Tue, 4 Dec 2012 11:30:56 -0800
To: John Daggett <jdaggett@mozilla.com>, www-style list <www-style@w3.org>
Message-ID: <CCE3863D.1A80F%stearns@adobe.com>
On 12/3/12 9:41 PM, "John Daggett" <jdaggett@mozilla.com> wrote:

>As I mentioned previously at the San Diego F2F [3], I don't think it
>makes sense to define fine-grained parameters like this without also
>specifying normatively the justification algorithm with which they are
>used.

I don't think it makes sense to have a single justification algorithm. We
don't specify a line breaking algorithm as specifically as you appear to
be requiring for a justification algorithm. People expect to see slightly
different line breaks in different browsers, and so they should also
expect to see slightly different justification results in different
browsers

>  Authors don't use these parameters as real absolute limits,
>they tweak them visually based on the results in a given
>implementation for a given text layout.

I don't think that's the case, or at least it should not be for reflowable
text. In high-volume print production environments (which are somewhat
analogous to reflowable web text in that there is no attempt to make
line-by-line tweaks) the min/desired/max spacing controls are used in a
style sheet to create a similarity in color over multiple articles or
publications. Tweaks are made to the style sheet, not individual results.

>  In an implementation which
>implements a "better" justification algorithm (e.g. a paragraph global
>algorithm rather than a line local one) this might lead to suboptimal
>results which would discourage the use of improved algorithms.

Is this concern stemming from this set of steps?

1. Set spacing controls
2. Look at the results in a simple justification algorithm
3. Tweak the content based on specific line endings to look good in a
specific browser
4. Now the tweaks applied in step 3 make the content in a different
browser look worse

I agree that step 3 is bad, but it's a bad thing to do even without
spacing controls. I don't see how shuffling between steps 1 and 2 until it
looks good in one browser would make a different browser look worse
(unless you're changing min/max settings to absurd values in a browser
whose justification algorithm ignores them).

What is your scenario where improved algorithms are discouraged?

>
>I should also note that more work is needed to specify these controls
>precisely.  What happens when both limits are reached?  Text is not
>justified or the limits are broken?

The failure mode should see the spacing maximums exceeded. This is
mentioned in section 8 (must not violate the minimum, should avoid
exceeding the maximum).

>  Is word spacing always pushed to
>it's maximum before letter spacing is adjusted?  Or are the values
>pushed towards limits in tandem using some sort of heuristic?

That's what's allowed to differ between implementations, as long as the
expansion point priorities are honored. It should be simple to set up
expansion point tests that expand a single force-justified line and
measure the extra space applied to each category, then verify that the
category priorities are lining up. The validation is not looking for
specific values - it's checking that the values in one category are larger
than the values in a lower-priorty category.

>
>Right now, I think getting a spec out with hyphenation controls
>specified is a higher priority.  Whether these fine-grained controls
>are necessary or really solve use cases that good hyphenation doesn't
>is something that would be better determined once hyphenation is more
>widely supported.
>
>John Hudson mentioned this in April [4]:
>
>  The first key to successful full justification is good
>  hyphenation, to minimise the variation in word spacing. If
>  hyphenation is done properly -- which means analysing more
>  than one line of text -- you never get into a situation in
>  which letterspacing even occurs as an option.

I agree that hyphenation is leaps and bounds more important than spacing
controls. But once we have that, spacing controls become the next thing on
the list for improving justification.

>  
>I propose we defer the optimal/min/max spacing limits to a later
>version of the Text spec.
>
>Regards,
>
>John Daggett
>
>[1] http://dev.w3.org/csswg/css3-text/#spacing
>[2] http://dev.w3.org/csswg/css3-text/#text-justify
>[3] http://lists.w3.org/Archives/Public/www-style/2012Aug/0897.html
>[4] http://lists.w3.org/Archives/Public/www-style/2012Apr/0271.html
>
Received on Tuesday, 4 December 2012 19:31:34 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:03 GMT