-
Notifications
You must be signed in to change notification settings - Fork 747
Description
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.
'<percentage>'
The corresponding metric is replaced by the given percentage multiplied by the used font size.
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,
@font-face {
font-family: TestFont;
src: serif;
ascent-override: 100%;
descent-override: 50%;
}
.size-adjusted {
font: 20px TestFont;
font-size-adjust: 2.0;
}
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