Closed Bug 1681691 Opened 4 years ago Closed 4 years ago

Implement ascent-override, descent-override, and line-gap-override

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: tobi, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(9 files)

12.17 KB, image/png
Details
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36

Steps to reproduce:

It would be very useful if you could implement ascent-override, descent-override, and line-gap-override.
More info:

https://bugs.chromium.org/p/chromium/issues/detail?id=800693
(especially comments #20, #30 and #31)

https://tobireif.com/non_site_stuff/test_case_for_font_position_report_yet_another_font/

https://www.w3.org/TR/css-fonts-4/#font-metrics-override-desc

Chrome supports it (tested on MacOS vs Windows).

Hi,

I've chosen a component for this bug in hope that someone may look at it. We'll await for their answer. If you consider that there's another component that's more proper for this case you may change it.

Regards, Flor.

Component: Untriaged → Layout: Block and Inline
Product: Firefox → Core
Version: unspecified → Trunk
Status: UNCONFIRMED → NEW
Ever confirmed: true

Thanks!

Here's one reason why it's important to implement this feature:

https://tobireif.com/posts/ensuring_the_correct_vertical_position_of_large_text/

(And there's another reason listed in the post below "Another use case".)

Attached image the general issue

Given that the issue can be as severe as in the attached screenshot, please consider assigning a high priority to implementing this feature.

Component: Layout: Block and Inline → Layout: Text and Fonts
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4805e23e62d2 Create a NonNegativePercentage type in values:specified. r=emilio https://hg.mozilla.org/integration/autoland/rev/8d5c2106a2b4 Convert the font-stretch descriptor to use NonNegativePercentage. r=emilio https://hg.mozilla.org/integration/autoland/rev/12418707741d Add ascent-, descent- and line-gap-override descriptors to the style system. r=emilio https://hg.mozilla.org/integration/autoland/rev/e86d980f511e Also remove unnecessary 'unsafe' from a bunch of FontFaceRule descriptor getters. r=emilio https://hg.mozilla.org/integration/autoland/rev/af79bc7f7919 Add metrics override descriptors to webidl. r=emilio https://hg.mozilla.org/integration/autoland/rev/9f9c3c13801a Add support for metrics overrides to gfxUserFontEntry, dom::FontFace, etc r=emilio https://hg.mozilla.org/integration/autoland/rev/bb53155c3dd0 Adjust font-family names used in WPT metrics-override tests to avoid spurious failures due to antialiasing in Gecko. r=emilio https://hg.mozilla.org/integration/autoland/rev/536bbc4b9ecd Update metadata for WPT metrics-override tests. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/28171 for changes under testing/web-platform/tests
Pushed by malexandru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/104675869016 Update manifest expectations for fontface-override-descriptor-getter-setter.sub.html and idlharness.https.html a=manifest-fix
Blocks: 1700152
Pushed by malexandru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e43fba82fb31 Update manifest expectations on linux for idlharness.https.html and fontface-override-descriptor-getter-setter.sub.html a=manifest-fix
Upstream PR was closed without merging
Backout by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a81bade3ba3a Backed out 10 changesets for wpt failures on fontface-override-descriptor-getter-setter.sub.html and idlharness.https.html. CLOSED TREE
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b45b607fee4d Create a NonNegativePercentage type in values:specified. r=emilio https://hg.mozilla.org/integration/autoland/rev/d9b488c09c23 Convert the font-stretch descriptor to use NonNegativePercentage. r=emilio https://hg.mozilla.org/integration/autoland/rev/e7887dc9a3c6 Add ascent-, descent- and line-gap-override descriptors to the style system. r=emilio https://hg.mozilla.org/integration/autoland/rev/1bc4081f95e4 Also remove unnecessary 'unsafe' from a bunch of FontFaceRule descriptor getters. r=emilio https://hg.mozilla.org/integration/autoland/rev/5dd06c73f703 Add metrics override descriptors to webidl. r=emilio https://hg.mozilla.org/integration/autoland/rev/a19844063d00 Add support for metrics overrides to gfxUserFontEntry, dom::FontFace, etc r=emilio https://hg.mozilla.org/integration/autoland/rev/64edecd0df6f Adjust font-family names used in WPT metrics-override tests to avoid spurious failures due to antialiasing in Gecko. r=emilio https://hg.mozilla.org/integration/autoland/rev/dda736a69ceb Update metadata for WPT metrics-override tests. r=emilio

Backed out for causing wpt failuresin idlharness.https.html

Backout link: https://hg.mozilla.org/integration/autoland/rev/7275678ff756180616f5d550e660d721af304865

Push with failures

Failure log

LE:
Also failed on fontface-override-descriptor-getter-setter.sub.html

Failure log

Upstream PR was closed without merging

Thanks all for working on this! 🔥🔥🔥🔥🔥

Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/05c9db2ef078 Create a NonNegativePercentage type in values:specified. r=emilio https://hg.mozilla.org/integration/autoland/rev/800c1908e363 Convert the font-stretch descriptor to use NonNegativePercentage. r=emilio https://hg.mozilla.org/integration/autoland/rev/bb712701f65a Add ascent-, descent- and line-gap-override descriptors to the style system. r=emilio https://hg.mozilla.org/integration/autoland/rev/3f78a589cfed Also remove unnecessary 'unsafe' from a bunch of FontFaceRule descriptor getters. r=emilio https://hg.mozilla.org/integration/autoland/rev/b9aa305826a2 Add metrics override descriptors to webidl. r=emilio https://hg.mozilla.org/integration/autoland/rev/ba2dad1a5220 Add support for metrics overrides to gfxUserFontEntry, dom::FontFace, etc r=emilio https://hg.mozilla.org/integration/autoland/rev/cac338430f0d Adjust font-family names used in WPT metrics-override tests to avoid spurious failures due to antialiasing in Gecko. r=emilio https://hg.mozilla.org/integration/autoland/rev/1c77bd7b8c3f Update metadata for WPT metrics-override tests. r=emilio
Upstream PR merged by moz-wptsync-bot

Thanks all!

Blocks: 1704494
Flags: needinfo?(jfkthame)

I have written the pages for these descriptors on MDN, updated BCD, added to the release notes.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: