Re: [csswg-drafts] [css-fonts-5] advance-override details (#5983)

[`letter-spacing` as currently defined in CSS](https://drafts.csswg.org/css-text-3/#letter-spacing-property) (whether it's a good definition may be a topic for a separate discussion) isn't something that can readily be specified/implemented as an attribute of a particular font resource, because of how it behaves at element boundaries. Given `<span style="letter-spacing:1em">foo</span>` you can't just adjust the metrics of the `f`, `o`, `o` and be done; what happens at the edges is supposed to depend on the style of the *parent* element.

That would even come into play if you have two *immediately adjacent* `<span>`s with the same `letter-spacing` property: what happens at the boundary between them isn't the result of their `letter-spacing` but of their common parent's:

> Letter spacing between two typographic character units effectively “belongs” to the innermost element that contains the two typographic character units: the total letter spacing between two adjacent typographic character units (after bidi reordering) is specified by and rendered within the innermost element that contains the boundary between the two typographic character units.

I think `advance-override` should explicitly *not* attempt to have this kind of behavior; to serve the intended purpose of making the metrics of a fallback font more similar to another "primary" font, it must simply apply, unconditionally, to the individual glyphs rendered by that font.

Now, if you want to support *changing* the definition of `letter-spacing` (which AFAIK none of the major browsers currently implements as spec'd), I'd be happy to entertain that idea. But as it stands, I am definitely opposed to saying that `advance-override` should behave similarly to how `letter-spacing` is spec'd. I believe it belongs to a different level of the rendering model.

-- 
GitHub Notification of comment by jfkthame
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5983#issuecomment-789292019 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 2 March 2021 23:14:39 UTC