-
Notifications
You must be signed in to change notification settings - Fork 715
[css-fonts-4][css-font-loading] Applying default font-display to FontFace.load() #3188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Yeah, it should definitely apply, just for simplicity. (You can just change the value on a FontFace object, unlike a third-party @font-face rule, but still, consistency seems useful and simple for authors.) |
Turns out it doesn't have an effect because the descriptors in the dictionary passed to FontFace constructor have default values. |
aarongable
pushed a commit
to chromium/chromium
that referenced
this issue
Nov 27, 2018
This CL implements support for specifying a default value for font-display for @font-face rules which do not provide a font-display descriptor. See spec [1]. The implementation is currently behind a flag which is off by default (not tested, not in experimental). For intent-to-implement, see [4]. There is a question if we should mix descriptors with @-rules in @font-feature-values because an unrecognized descriptor would be seen as part of the following rule as the start of a qualified ruled which means forward-compatibility could break. Also, there is a question if this is a font feature value and should be added to that @-rule at all. Both these issue are discussed/mentioned in [2]. Since using a descriptor directly in @font-feature values is not compatible with Gecko, we're wrapping the font-display descriptor in a block with no prelude for now. Note that the default font-display cannot currently apply to fonts loaded by FontFace.load() because the dictionary passed to FontFace have default values which effectively overrides any @font-feature-values descriptors[3]. [1] https://drafts.csswg.org/css-fonts-4/#font-display-font-feature-values [2] w3c/csswg-drafts#2973 [3] w3c/csswg-drafts#3188 [4] https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/C6taiCkYayU Bug: 777846 Change-Id: I290f23e7489afeef64812d7604417268c2464455 Reviewed-on: https://chromium-review.googlesource.com/c/1222966 Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#611056}
SergioOpenPeer
pushed a commit
to webrtc-uwp/chromium-tools
that referenced
this issue
May 10, 2019
This CL implements support for specifying a default value for font-display for @font-face rules which do not provide a font-display descriptor. See spec [1]. The implementation is currently behind a flag which is off by default (not tested, not in experimental). For intent-to-implement, see [4]. There is a question if we should mix descriptors with @-rules in @font-feature-values because an unrecognized descriptor would be seen as part of the following rule as the start of a qualified ruled which means forward-compatibility could break. Also, there is a question if this is a font feature value and should be added to that @-rule at all. Both these issue are discussed/mentioned in [2]. Since using a descriptor directly in @font-feature values is not compatible with Gecko, we're wrapping the font-display descriptor in a block with no prelude for now. Note that the default font-display cannot currently apply to fonts loaded by FontFace.load() because the dictionary passed to FontFace have default values which effectively overrides any @font-feature-values descriptors[3]. [1] https://drafts.csswg.org/css-fonts-4/#font-display-font-feature-values [2] w3c/csswg-drafts#2973 [3] w3c/csswg-drafts#3188 [4] https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/C6taiCkYayU Bug: 777846 Change-Id: I290f23e7489afeef64812d7604417268c2464455 Reviewed-on: https://chromium-review.googlesource.com/c/1222966 Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#611056} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 5d39943cf7bd8db8aa1f874f3444affca39e408f
Is this issue resolved? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The spec for default value for font-display[1] talks about @font-face, but it should apply to fonts loaded through FontFace.load() as well? Should that be clarified in the spec?
[1] https://drafts.csswg.org/css-fonts-4/#font-display-font-feature-values
The text was updated successfully, but these errors were encountered: