Intent to Re-implement and Ship: CSS Font Loading API - FontFaceSet: check() method

96 views
Skip to first unread message

ChangSeok Oh

unread,
Oct 15, 2023, 4:01:47 PM10/15/23
to blink-dev
Contact emails

Specification

Summary

The FontFaceSet's check() function verifies whether it's possible to display text using the specified fonts without attempting to utilize fonts in the FontFaceSet that have not completed loading. This allows users to safely employ the font without later triggering a font replacement (i.e., font swap).


Motivation
While having a review [1] to fix issue 1416842 [2], I heard that an "Intent to ship" email is required since the fix changes Blink's behavior. The font loading API was updated, so we need to update our implementation in conformance with the spec.


Blink component

Search tags

TAG review
None

TAG review status
Not applicable

Risks

Interoperability and Compatibility

The current behavior of Blink does neither follow the updated spec nor match other engines' behavior. This proposal aims at fixing it. https://github.com/w3c/csswg-drafts/issues/5744


Gecko: Shipped/Shipping (https://bugzilla.mozilla.org/show_bug.cgi?id=1252821)

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=156035)

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None


Debuggability

None


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?Yes

The following WPT tests cover this feature. * css/css-fonts/fallback-remote-to-data-url.html * css/css-fonts/fallback-url-to-local.html


Flag name on chrome://flags
None

Finch feature name
None

Non-finch justification
None

Requires code in //chrome?
False

Tracking bug

Estimated milestones
Shipping on desktop

120

Shipping on Android

120

Shipping on WebView

120

Shipping on WebView

120


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

This intent message was generated by Chrome Platform Status.

Alex Russell

unread,
Oct 16, 2023, 1:35:24 PM10/16/23
to ChangSeok Oh, blink-dev
LGTM1

--
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+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/f1705c1e-cf65-4c2e-bfe2-3ee3b4fb12d1n%40chromium.org.

Mike Taylor

unread,
Oct 16, 2023, 2:15:08 PM10/16/23
to Alex Russell, ChangSeok Oh, blink-dev

Yoav Weiss

unread,
Oct 17, 2023, 7:30:29 AM10/17/23
to Mike Taylor, Alex Russell, ChangSeok Oh, blink-dev
I see Safari failing both WPTs you state below and Firefox fails one of them. Are you sure they are shipping it?

ChangSeok Oh

unread,
Oct 17, 2023, 5:16:35 PM10/17/23
to Yoav Weiss, blink-dev
Hi Yoav,

Yes, Safari and Firefox support the check method [1], and I confirmed it. The test failures are due to other factors (e.g., pixel mismatches), not FontFaceSet::check(). Sub-tests on the check() method have passed.

[1] https://caniuse.com/mdn-api_fontfaceset_check

--
ChangSeok

Yoav Weiss

unread,
Oct 18, 2023, 3:21:01 AM10/18/23
to ChangSeok Oh, blink-dev
LGTM3

Thanks for clarifying. Please file implementation bugs for these failures, if ones don't already exist.

ChangSeok Oh

unread,
Oct 18, 2023, 1:09:35 PM10/18/23
to blink-dev, yoav...@chromium.org, blink-dev
Gecko got a ticket for that failure, WebKit passed the tests when I ran the tests with ToT.
Thanks for your LGTMs!
Reply all
Reply to author
Forward
0 new messages