[csswg-drafts] [css-fonts-5] How do font-size-adjust property and size-adjust descriptor work together? (#6128)

xiaochengh has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-fonts-5] How do font-size-adjust property and size-adjust descriptor work together? ==
`font-size-adjust` is [defined](https://drafts.csswg.org/css-fonts-3/#font-size-adjust-prop) as:

> This property allows authors to specify an aspect value for an element that will effectively preserve the x-height of the first choice font, whether it is substituted or not.
> ...
> The value of ‘font-size-adjust’ affects the used value of ‘font-size’ but does not affect the computed value.

While `size-adjust` is recently [resolved](https://github.com/w3c/csswg-drafts/issues/6075#issuecomment-801224623) and [specified](https://drafts.csswg.org/css-fonts-5/#descdef-font-face-size-adjust) as

>  ... when the descriptor value is a percentage, all metrics values of this font, including glyph advance sizes, are resolved as the given percentage multiplied by the used font size.

So they affect the exact same value. What should we do when both of them are set?

In particular, while `size-adjust` scales the x-height, while `font-size-adjust` depends on the unadjusted `x-height` and tries to preserve its value by scaling the used font size. So there seems to be a dependency issue here to clarify, or which one to apply first.

Also @jfkthame since Gecko has already shipped `font-size-adjust` and prototyped `size-adjust`. It would be great to know Gecko's behavior and considerations.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6128 using your GitHub account


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

Received on Tuesday, 23 March 2021 17:16:39 UTC