W3C home > Mailing lists > Public > www-style@w3.org > May 2013

Re: [css-text-decor-3] drop 'text-underline-position: alphabetic'

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 06 May 2013 17:37:17 -0700
Message-ID: <51884CBD.7020501@inkedblade.net>
To: www-style@w3.org
On 03/24/2013 08:58 PM, L. David Baron wrote:
> http://dev.w3.org/csswg/css-text-decor-3/#text-underline-position-property
> describes the acceptable values of text-underline position as:
>
>    # Value:    auto | alphabetic | [ under || [ left | right ] ]
>    # Initial:  auto
>
> I propose that the 'alphabetic' value be dropped, for the following
> reasons.
>
>
> The 'auto' value is, I presume, intended to reflect the existing
> behavior.  The reality of at least some existing implementations is
> that they ask the first available font [1] for its underline position
> and thickness, and use that.  (There may be some implementations
> that use position but not thickness.)

The 'auto' value is intended to allow smarter default behavior than
merely using the font metrics; it allows the UA to check whether the
underline will cross over e.g. CJK characters or subscripts and
adjust the position in response to that. Of course just using the
font metrics is also an acceptable behavior for 'auto'.

> The 'alphabetic' value, on the other hand, seems to require
> implementations that ask for font metrics to do a bunch of extra
> work to figure out whether the position suggested by the font is
> relative to the alphabetic baseline.  It's not clear to me how an
> implementation would do this, though I'm not a font expert.
> Alternatively, a conformant implementation could ignore font metrics
> entirely and do its own calculation, but that seems likely to result
> in a less desirable rendering since the font's preferred underline
> metrics are ignored.

I'm looking at the spec right now, and it seems to mostly say what you
want, other than noting that some fonts provide information for the
wrong kind of underline in the underline metrics.

We've rewritten the positioning section to try to be clearer about it
though. Take a look and let us know if it works?
   http://dev.w3.org/csswg/css-text-decor-3/#line-position

> It's also not clear to me what the use cases for the 'alphabetic'
> value are.  I believe the current behavior (using font metrics)
> generally produces good results, and when it doesn't, that's the
> fault of the font.  If there is a particular behavior that is in
> general more desirable than using font metrics, the specification
> should require that behavior.  If there are a particular set of
> languages that require this value, that should be explained in the
> specification (and I'd be willing to reconsider this proposal).  But
> barring those, I think the 'alphabetic' value should be dropped.

I think it's okay for 'alphabetic' to mean "use the font metrics that
are supposedly indicating an alphabetic underline regardless of whether
they are reasonable". Clarified that in the spec.

~fantasai
Received on Tuesday, 7 May 2013 00:37:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 7 May 2013 00:37:45 UTC