Intent to Ship: @font-face descriptor advance-override

112 views
Skip to first unread message

Xiaocheng Hu

unread,
Feb 22, 2021, 8:11:45 PMFeb 22
to blink-dev

Contact emails

xiaoc...@chromium.org

Explainer


https://gist.github.com/xiaochengh/3aae8a97d1b0388c8e701819b63e2c49

Specification

https://drafts.csswg.org/css-fonts-5/#descdef-font-face-advance-override

API spec

Yes

Design docs


https://bit.ly/39qATQ4

Summary

The advance-override descriptor scales all character advances of the font face by the given percentage. It can be used to match text width between two fonts, and hence reduce layout shift caused by web font loading.



Blink component

Blink>CSS

Search tags

csscss-fontsfont-faceadvance-override

TAG review

This feature is very similar to ascent-override, descent-override and line-gap-override that we shipped earlier (https://chromestatus.com/features/5651198621253632). A new TAG review is probably not needed.

TAG review status

Not applicable

Risks



Interoperability and Compatibility

This is a new feature that CSSWG just resolved to add. We do not expect interoperability/compatibility risks if other browsers also implement it.



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/489)

WebKit: No signal (https://lists.webkit.org/pipermail/webkit-dev/2021-February/031706.html)

Web developers: No signals


Is this feature fully tested by web-platform-tests?

Yes

Tracking bug

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

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5184230088769536

This intent message was generated by Chrome Platform Status.

fantasai

unread,
Feb 22, 2021, 10:48:26 PMFeb 22
to blin...@chromium.org
> Summary:
> The advance-override descriptor scales all character advances of the font face
> by the given percentage. It can be used to match text width between two fonts,
> and hence reduce layout shift caused by web font loading.
> TAG review: > This feature is very similar to ascent-override, descent-override and
> line-gap-override that we shipped earlier. A new TAG review is
> probably not needed.
> Interoperability and Compatibility:
> This is a new feature that CSSWG just resolved to add. We do not expect
> interoperability/compatibility risks if other browsers also implement it.

The CSSWG resolved to add something like this feature, but it did not resolve
on a particular definition of how it behaves. Looking at it for the first time
today, I can say that the spec is both missing details and imho has an
incorrect default for the second parameter.

As for things like TAG review, while the technical implementation of
advance-override is quite similar to ascent-override etc., the impact on text
rendering and readability is *very* different because it changes the
relationship of glyphs within a line, not just the spacing between them. It
needs i18n and a11y review.

As for other details, the current spec -- which is explicitly marked as "not
ready for implementation" by its editors btw -- defines the effect as adding
"tracking", but does not define the ways in which this differs from the
"tracking" added by letter-spacing.

~fantasai

Xiaocheng Hu

unread,
Feb 23, 2021, 5:31:46 PMFeb 23
to fantasai, blink-dev
I misunderstood the implications of changes to css-fonts-5. Sorry about that.

We should resolve issue #5983 first. 

--
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/3753b6fb-598b-aab1-ce46-a584368b9bbc%40inkedblade.net.

Yoav Weiss

unread,
Mar 18, 2021, 6:15:58 AMMar 18
to blink-dev, Xiaocheng Hu, blink-dev, fantasa...@inkedblade.net
Can you update the thread? The issue was closed with a decision to reverse the spec for this and specify a scaling descriptor instead, but I'd love to better understand that decision.

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Xiaocheng Hu

unread,
Mar 18, 2021, 3:15:49 PMMar 18
to Yoav Weiss, blink-dev, Xiaocheng Hu, fantasa...@inkedblade.net
Yes, the spec has been reversed. So I'll withdraw this intent.

The reason is due to legibility concerns of 'advance-override'. When applied, it may worsen the legibility, especially on scripts that require cursive joining (e.g. Arabic).

As our goal is to reduce CLS, and the scale factor also effectively reduces CLS without breaking legibility as much, we found it a better alternative. Hence, 'advance-override' is no longer needed.

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Reply all
Reply to author
Forward
0 new messages