Contact emails

moon...@chromium.org, dr...@chromium.org

Explainer

https://bugs.chromium.org/p/chromium/issues/detail?id=973194

https://drafts.csswg.org/css-fonts/#font-prop-desc

Specification

https://drafts.csswg.org/css-fonts/#font-prop-desc

Summary

Auto range support for variable fonts in 'font-weight', 'font-style' and
'font-stretch' descriptors inside '@font-face' rule.

Motivation

Variable fonts provide users the opportunity to choose how heavy or slanted
or wide the typeface should be, rather than having those decided by the
type designer.

For variable fonts, in Chrome, it is required to add the supported range
for 'font-weight', 'font-style' and 'font-stretch' descriptors inside
@font-face rule, otherwise variable fonts would either be synthesizing bold
faces or the text will appear as normal.

In CSS WG issue 2485 <https://github.com/w3c/csswg-drafts/issues/2485> it
was resolved to add a default keyword 'auto'.

Blink component

Blink>Fonts
<https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EFonts>

Search tags

auto range <https://chromestatus.com/features#tags:auto%20range>, variable
fonts <https://chromestatus.com/features#tags:variable%20fonts>, font-weight
<https://chromestatus.com/features#tags:font-weight>, font-style
<https://chromestatus.com/features#tags:font-style>, font-stretch
<https://chromestatus.com/features#tags:font-stretch>

TAG reviewAlready shipped in other browsers, see below, no TAG review
required.

TAG review status

Not applicable, existing standard, shipped in other UAs

Risks

Interoperability and Compatibility

Low, feature already shipped in Firefox and Safari.

Gecko: Shipped/Shipping Variable fonts work without specifying the
supported range, however the browser does not yet support auto value
parsing. Tests for 'font-stretch' and 'font-weight' descriptors are
passing. Although the 'font-style' descriptor has a bug when it is
synthetically obliquing out of the supported range.

WebKit: Shipped/Shipping Variable fonts work without specifying the
supported range, however the browser does not yet support auto value
parsing. Tests for 'font-stretch' descriptors are passing. Although the
'font-weight' descriptor works without specifying the range, there are some
pixel differences in the test results. 'font-style' descriptor looks like
it is synthesizing oblique faces.

Web developers: Positive (
https://bugs.chromium.org/p/chromium/issues/detail?id=973194)

Content authors have been running into this counterintuitive problem of not
seeing their variable fonts working without explicitly specifying the
range. A UX engineer at Google, for example, faced this issue when she
wasn’t able to use font-weight property without specifying the supported
range for the variable font. That’s what she said: “It would be useful if
the variable fonts behavior was always consistent with normal fonts, where
you don't need to declare font-weight within @font-face”

Activation

None expected; Feature already implemented in other browsers.


Debuggability

Same as existing descriptors, @font-face rules inspectable in DevTools.


Will this feature be supported on all six Blink platforms (Windows, Mac,
Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests
<https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>
?

Yes. ‘auto’ keyword parsing tests for each descriptor; Added WPT tests for
variable and static fonts for ‘font-weight’, ‘font-style’ and
‘font-stretch’ descriptors.

Flag name

CSSFontFaceAutoVariableRange

Requires code in //chrome?

No

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=973194

Estimated milestones109
Anticipated spec changes

None expected


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5173271981457408

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to blink-dev+unsubscr...@chromium.org.
To view this discussion on the web visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAO7W_C2%3DsXW53%2B08RULQvLXfWLqmxfmQ5ix%3D%3DV8qXhtbGhgAg%40mail.gmail.com.

Reply via email to