Re: [CSS21][css3-text] letter-spacing, word-spacing and justification

On Tuesday 30 July 2013 22:34:45 fantasai wrote:
> On 05/10/2013 07:17 PM, fantasai wrote:
> > Our proposal...
> 
> Steve Zilles asked for proposed text for these...
> 
> > Part I: letter-spacing: <length> allows justification
> > 
> >    This solves backwards-compatibility with such style sheets as
> >    you mention, and is also consistent with implementations.
> >    
> >    It is also consistent with how 'word-spacing' behaves: <length>
> >    values there allow justification.
> >    
> >    (Note: This would be a change from CSS2.1, so will need to be
> >    backported.)
> 
> Proposed text, added to 'letter-spacing' section;
> 
>   | Depending on the justification rules in effect, user agents may
>   | further increase or decrease the space between characters
>   | in order to justify text. See 'text-justify' for details.
> > 
> > Part II: Add 'fixed' keyword to disallow justification
> > 
> >    We have a problem if we allow justification for letter-spacing
> >    always; German typesetting rules requires that it not be
> >    allowed! So here is a proposal --
> >    
> >      letter-spacing: normal | <length> || fixed
> >    
> >    If 'fixed' keyword is specified, then justification cannot alter
> >    letter-spacing, only word-spacing.
> > 
> > I think Part I is important to take. I am open to other suggestions
> > to solve the use case in Part II...
> 
> Proposed text:
>   | fixed
>   | 
>   |   When this keyword is specified, user agents must not adjust
>   |   spacing between characters in order to justify text.
>   |   Justification is only allowed at expansion opportunities
>   |   provided by a single character (such as a word separator or
>   |   other punctuation).
>   | 
>   | Unless the ''fixed'' keyword is specified, depending on ...
>   | [above] ...

That changes the meaning of 'letter-spacing' as it has been used until 
now (and which I've been relying on).

Besides, using inter-letter spacing for justification is something you 
don't want to happen by default. If you have a really difficult text, 
you may want to explicitly enable it, if there is no other option.

I propose explaining under the <length> value of 'letter-spacing' that 
the space between letters may still be varied for the purposes of 
justification if 'text-justify' is set to 'distribute':

    User agents may not further increase or decrease the inter-character
    space in order to justify text <ins>except if 'text-justify' is
    'distribute'</ins>.

> 
> Relatedly, I think we need to add this to the 'text-justify' section:
>   | It is not defined in this level whether or how other factors
>   | (such as font size, letter-spacing, glyph shape, position
>   | within the line, etc.) may influence the distribution of
>   | space to expansion opportunities within the line.
> 
> because while justification space is additive with tracking, I don't
> think we want to define that it can't account for differences in
> tracking: I'm pretty sure that adding 2px space between characters
> is more noticeable with zero spacing than with 10px spacing, and
> while we do want differences in letter-spacing to not be equalized
> away, imo the UA should be allowed to bias justification space to
> make it less noticeable.
> 
> ~fantasai



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Wednesday, 31 July 2013 10:19:07 UTC