- From: Xiaocheng Hu <notifications@github.com>
- Date: Wed, 16 Sep 2020 12:06:41 -0700
- To: w3ctag/design-reviews <design-reviews@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3ctag/design-reviews/issues/557@github.com>
Saluton TAG!
I'm requesting a TAG review of new CSS descriptors `ascent-override`, `descent-override` and `line-gap-override` for @font-face rule. ([design doc](https://docs.google.com/document/d/1PW-5ML5hOZw7GczOargelPo6_8Zkuk2DXtgfOtJ59Eo/edit?usp=sharing))
Example usage:
```
@font-face {
font-family: arial;
src: local(Arial), url("http://example.com/arial.woff");
ascent-override: 60%;
descent-override: 40%;
line-gap-override: 0%;
}
```
This allows web authors to override the metrics of a font and control text position within a line: the ascent, descent and line gap are set to exactly 60%, 40% and 0% of the em size. See also [demo](https://jsfiddle.net/wpnjav2k/) and its [video recording](https://www.youtube.com/watch?v=h_0T3SiISZg).
There are two major use cases:
1. Improve interoperability. Different browsers on different platforms currently use different pieces of data from a font file, causing [interop issues](https://github.com/w3c/csswg-drafts/issues/4792). This can be fixed by overriding the font metrics.
2. Reduce layout shifting caused by web fonts, by overriding the metrics of the fallback font to match the web font
- Explainer¹ (minimally containing user needs and example code): as given above
- Specification URL: Please refer to [design doc](https://docs.google.com/document/d/1PW-5ML5hOZw7GczOargelPo6_8Zkuk2DXtgfOtJ59Eo/edit#bookmark=id.7chgnuuzhh5g) for now. CSSWG has just [resolved](https://github.com/w3c/csswg-drafts/issues/4792#issuecomment-693528301) to add these descriptors and will add a spec soon
- Tests: Currently as [Chromium web tests](https://chromium.googlesource.com/chromium/src/+/refs/heads/master/third_party/blink/web_tests/wpt_internal/css/css-fonts). Will upstream to WPT soon.
- Security and Privacy self-review²: None
- Primary contacts (and their relationship to the specification):
- Xiaocheng Hu (@xiaochengh), Google
- Organization(s)/project(s) driving the specification: CSSWG
- External status/issue trackers for this specification: [Chrome status](https://chromestatus.com/feature/5651198621253632)
Further details:
- [X] I have reviewed the TAG's [API Design Principles](https://w3ctag.github.io/design-principles/)
- Relevant time constraints or deadlines: Oct 15, 2020 (Chrome M87 Beta Promotion)
- The group where the work on this specification is currently being done: CSSWG
- Major unresolved issues with or opposition to this specification: None
You should also know that...
[please tell us anything you think is relevant to this review]
We'd prefer the TAG provide feedback as (please delete all but the desired option):
💬 leave review feedback as a **comment in this issue** and @-notify @xiaochengh
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/557
Received on Wednesday, 16 September 2020 19:06:54 UTC