-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-fonts-5] font-size-adjust and font metrics overrides #8967
Comments
Related, but I think we discussed this: Does the spec already clarify the case of how the PS:
Do you mean by that, the font size is first scaled (up, 2.0x in your example), then he ascent/descent overrides are applied? |
I think so. The level 5 draft mentions
Yes. Here is the test. |
Sorry to have ignored this issue; I try to keep on top of issues tagged
It sounds as if there is a desire to change the order of operations so that the spec says to apply font-size-adjust first, and then the overrides are applied? Which would align the spec to what Blink and Gecko currently do, and what the WPT is testing for? |
I intend to clarify the order of operations rather than change the existing order. The current description makes it hard to figure out the order between
Yes.
Yes. That is aligned with the current behaviors of Gecko and Blink. (FYI, WebKit does not support font metric overrides yet).
font-size-adjust-metrics-override.html tests the behavior. |
I see where the confusion is coming from.
This sounds like the size-adjust descriptor was applied first, and then the font-size-adjust property was applied. However, my proposal and the current browser's implementation sound the opposite. (i.e., I think the spec description above is a bit misleading. When the On the other hand, I don't know the authors' original intention and whether we have a general ordering rule to resolve this conflict. But I think we can clarify the order in the spec, adopting the current browser implementations if we agree. |
So, what is the next step? Do we need to bring this issue to the CSS WG meeting and get it resolved there? Or can we close this issue by simply accepting a pull request if I make the edit on the spec? |
How about you propose some specific text, as a PR, and we get it reviewed and merge if there is consensus? |
O.K. I will come up with a PR. |
Related spec: https://drafts.csswg.org/css-fonts-5/#valdef-ascent-overridedescriptor-percentage
The spec document describes the percentage value for the font metrics overrides as follows.
That description sounds a bit obscure to me. What is the used font size? Does it mean the specified size by
font-size
or the computed size or the actual size to render (i.e., effective size) or something else?The spec also needs to clarify how the font size should be adjusted when font metrics overrides and font-size-adjust are simultaneously applied. For instance,
When I tested, Gecko applied the metric override after font-size-adjust. So, Chromium is following the Gecko's behavior [1], but I hope the spec would be improved here.
Proposed solution:
Change the wording like the following;
The corresponding metric is replaced by the given percentage multiplied by the effective font size.
or
The corresponding metric is replaced by the given percentage multiplied by the font size after adjustment.
[1] https://chromium-review.googlesource.com/c/chromium/src/+/4305200
The text was updated successfully, but these errors were encountered: