Re: [css3-text] vertical-align and shaping

Tab Atkins wrote:

> > For example, I don't see any reason why the two pieces of markup
> > below should be shaped differently:
> >
> >   <span>A</span><span>W</span>
> >   <sup>A</sup><sup>W</sup>
> >
> > I don't see any reason why the kerning applied between the letters
> > in adjacent spans should not be used between adjacent superscript
> > elements.
> 
> Because they're effectively different words, semantically.  And
> this is far more than kerning - you don't want those two to
> ligaturize, or affect character shapes in Arabic, etc.

I don't really see how "semantically" different somehow implies
coalescing can occur in one case but not in another. Worse, using a
presentation attribute like 'vertical-align' is a poor way to infer
that somehow inlines are distinct.

Example - a simple 1px bump in the baseline breaks kerning and ligatures:

  .shift-up span { vertical-align: 1px; }

  <p><span>A</span><span>W</span> <span>f</span><span>i</span></p>
  <p class="shift-up"><span>A</span><span>W</span> <span>f</span><span>i</span></p>

Why should kerning and ligatures be used in one of these but not the other?

I don't think there's any real use case that you're solving by
introducing this "non-baseline values of vertical-align disables
coalescing" rule. In the absence of a real need, CSS should strive
to avoid special-case rules like this that complicate
implementations unnecessarily and result in odd behavior for authors.

Regards,

John Daggett
Mozilla Japan

Received on Wednesday, 10 September 2014 01:16:47 UTC