Closed Bug 1711479 Opened 3 years ago Closed 3 years ago

[css-fonts] extend font-size-adjust to take a pair of values: <metric> <number>

Categories

(Core :: Layout: Text and Fonts, defect)

defect

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: mozilla-apprentice, Assigned: jfkthame)

References

Details

(Keywords: dev-doc-complete)

Attachments

(5 files)

A resolution was made for csswg-drafts/#6160.

[css-fonts] extend font-size-adjust to take a pair of values: <metric> <number>

  • RESOLVED: Start with ex cap ic and ch

Discussion.

I have a WIP patch for this, though we'll need to get clarity on https://github.com/w3c/csswg-drafts/issues/6288 in order to finalize the implementation.

Assignee: nobody → jfkthame
Attachment #9222168 - Attachment description: WIP: Bug 1711479 - Extend font-size-adjust to take a pair of values [<metric>] <number>, with the metric being optional (default 'ex'). → Bug 1711479 - Support various metrics (not only ex-height) as the basis for font-size-adjust calculations in the gfx font implementations. r=#layout-reviewers
Status: NEW → ASSIGNED

We have a couple of tests that fail on tryserver on certain platforms (though they pass for me locally),
apparently because the glyph measurements used to support the various glyph-related metrics may be
affected by resolution and/or hinting settings. So these are annotated as fuzzy for now.

If we undertake a reimplementation of font metrics to better harmonize behavior across platforms
(a longstanding wish!), perhaps we'll be able to eliminate these discrepancies.

Depends on D116280

The test here used a face with src: local(Arial);, while the reference file used font-family: Arial, sans-serif;
but these may not reliably result in the same behavior. The @font-face rule looks up a specific face,
and if that face is not found, the test will fall back to the browser's default font; but the reference might
get a different result if, for example, a fontconfig alias/substitution rule is present that maps Arial to
a different sans-serif than the browser's default.

So instead of trying to use a local font lookup to provide the metrics contrast with Ahem, this patch specifically
loads a second font resource (in both the testcase and reference) to provide consistent behavior.

Depends on D116282

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a15cec1f0554
Implement CSS support for the optional adjustment-basis metric keywords for the font-size-adjust property (enabled on Nightly only for now). r=emilio
https://hg.mozilla.org/integration/autoland/rev/85b6b2648f60
Support various metrics (not only ex-height) as the basis for font-size-adjust calculations in the gfx font implementations. r=layout-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/4e689776fe5d
Add the extended (two-value) font-size-adjust syntax to various WPT tests. r=emilio
https://hg.mozilla.org/integration/autoland/rev/3d1d2b4a2713
Remove metadata annotations for Linux-specific WPT failures that are fixed by more accurate 'ex' computation. r=emilio
https://hg.mozilla.org/integration/autoland/rev/f1b19a0463cd
Adjust css-values/ex-unit-001 test to avoid dependency on locally-installed font lookup. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/29253 for changes under testing/web-platform/tests
Upstream PR was closed without merging
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b6140578afaf
Implement CSS support for the optional adjustment-basis metric keywords for the font-size-adjust property (enabled on Nightly only for now). r=emilio
https://hg.mozilla.org/integration/autoland/rev/37ddac04a09b
Support various metrics (not only ex-height) as the basis for font-size-adjust calculations in the gfx font implementations. r=layout-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/46b6ee998a7f
Add the extended (two-value) font-size-adjust syntax to various WPT tests. r=emilio
https://hg.mozilla.org/integration/autoland/rev/658694a38b47
Remove metadata annotations for Linux-specific WPT failures that are fixed by more accurate 'ex' computation. r=emilio
https://hg.mozilla.org/integration/autoland/rev/43c6edbfc3da
Adjust css-values/ex-unit-001 test to avoid dependency on locally-installed font lookup. r=emilio
Upstream PR merged by moz-wptsync-bot
Keywords: dev-doc-needed
Regressions: 1717556
Blocks: 1720131

Updated docs, BCD, and experimental features.

[closing comment 9's backout-needinfo, since this re-landed after that.]

Flags: needinfo?(jfkthame)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: