From 7bda8e197402b0b9bc0b9334aa7625c372dfaecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Fri, 26 Apr 2024 10:02:42 +0200 Subject: [PATCH] Split font-synthesis into many features in a group Trying to compute the status of the previous font-synthesis feature proved it to be untenable as a single feature, or as features that pair `font-synthesis: style` with `font-synthesis-style`. Define a bunch of new features, and gently discourage use of the shorthand in the description. See https://github.com/w3c/csswg-drafts/issues/1641 for background. --- .../font-synthesis-position.dist.yml | 19 ++++++++++++++ .../font-synthesis-position.yml | 11 ++++++++ .../font-synthesis-small-caps.dist.yml | 26 +++++++++++++++++++ .../font-synthesis-small-caps.yml | 12 +++++++++ .../font-synthesis-style.dist.yml | 26 +++++++++++++++++++ .../font-synthesis-style.yml | 12 +++++++++ .../font-synthesis-weight.dist.yml | 26 +++++++++++++++++++ .../font-synthesis-weight.yml | 12 +++++++++ .../font-synthesis.dist.yml | 21 +++++++++++++++ feature-group-definitions/font-synthesis.yml | 19 +++----------- groups/css.yml | 7 +++++ groups/font-synthesis.yml | 3 +++ groups/fonts.yml | 3 +++ 13 files changed, 182 insertions(+), 15 deletions(-) create mode 100644 feature-group-definitions/font-synthesis-position.dist.yml create mode 100644 feature-group-definitions/font-synthesis-position.yml create mode 100644 feature-group-definitions/font-synthesis-small-caps.dist.yml create mode 100644 feature-group-definitions/font-synthesis-small-caps.yml create mode 100644 feature-group-definitions/font-synthesis-style.dist.yml create mode 100644 feature-group-definitions/font-synthesis-style.yml create mode 100644 feature-group-definitions/font-synthesis-weight.dist.yml create mode 100644 feature-group-definitions/font-synthesis-weight.yml create mode 100644 feature-group-definitions/font-synthesis.dist.yml create mode 100644 groups/css.yml create mode 100644 groups/font-synthesis.yml create mode 100644 groups/fonts.yml diff --git a/feature-group-definitions/font-synthesis-position.dist.yml b/feature-group-definitions/font-synthesis-position.dist.yml new file mode 100644 index 0000000000..05ff825f4c --- /dev/null +++ b/feature-group-definitions/font-synthesis-position.dist.yml @@ -0,0 +1,19 @@ +# Generated from: font-synthesis-position.yml +# Do not edit this file by hand. Edit the source file instead! + +name: font-synthesis-position +description: "The `font-synthesis-position` CSS property sets whether or not the browser should synthesize subscript and superscript typefaces when they're missing from the font." +spec: https://drafts.csswg.org/css-fonts-4/#font-synthesis-position +group: font-synthesis +status: + baseline: false + support: + firefox: "118" + firefox_android: "118" +compat_features: + - css.properties.font-synthesis-position + # The font-synthesis shorthand also allows disabling all synthesis and opting + # in to specific kinds of synthesis. As such, `font-synthesis: position` + # affects everything except position, and doesn't fit the description of this + # feature. See https://github.com/w3c/csswg-drafts/issues/1641. + # - css.properties.font-synthesis.position diff --git a/feature-group-definitions/font-synthesis-position.yml b/feature-group-definitions/font-synthesis-position.yml new file mode 100644 index 0000000000..69d6713723 --- /dev/null +++ b/feature-group-definitions/font-synthesis-position.yml @@ -0,0 +1,11 @@ +name: font-synthesis-position +description: "The `font-synthesis-position` CSS property sets whether or not the browser should synthesize subscript and superscript typefaces when they're missing from the font." +spec: https://drafts.csswg.org/css-fonts-4/#font-synthesis-position +group: font-synthesis +compat_features: + - css.properties.font-synthesis-position + # The font-synthesis shorthand also allows disabling all synthesis and opting + # in to specific kinds of synthesis. As such, `font-synthesis: position` + # affects everything except position, and doesn't fit the description of this + # feature. See https://github.com/w3c/csswg-drafts/issues/1641. + # - css.properties.font-synthesis.position diff --git a/feature-group-definitions/font-synthesis-small-caps.dist.yml b/feature-group-definitions/font-synthesis-small-caps.dist.yml new file mode 100644 index 0000000000..392ff84bb9 --- /dev/null +++ b/feature-group-definitions/font-synthesis-small-caps.dist.yml @@ -0,0 +1,26 @@ +# Generated from: font-synthesis-small-caps.yml +# Do not edit this file by hand. Edit the source file instead! + +name: font-synthesis-small-caps +description: "The `font-synthesis-small-caps` CSS property sets whether or not the browser should synthesize small caps typefaces when they're missing from the font." +spec: https://drafts.csswg.org/css-fonts-4/#font-synthesis-small-caps +group: font-synthesis +usage_stats: https://chromestatus.com/metrics/css/timeline/popularity/703 +status: + baseline: low + baseline_low_date: 2023-03-27 + support: + chrome: "97" + chrome_android: "97" + edge: "97" + firefox: "111" + firefox_android: "111" + safari: "16.4" + safari_ios: "16.4" +compat_features: + - css.properties.font-synthesis-small-caps + # The font-synthesis shorthand also allows disabling all synthesis and opting + # in to specific kinds of synthesis. As such, `font-synthesis: small-caps` + # affects everything except small caps, and doesn't fit the description of + # this feature. See https://github.com/w3c/csswg-drafts/issues/1641. + # - css.properties.font-synthesis.small-caps diff --git a/feature-group-definitions/font-synthesis-small-caps.yml b/feature-group-definitions/font-synthesis-small-caps.yml new file mode 100644 index 0000000000..05000cf750 --- /dev/null +++ b/feature-group-definitions/font-synthesis-small-caps.yml @@ -0,0 +1,12 @@ +name: font-synthesis-small-caps +description: "The `font-synthesis-small-caps` CSS property sets whether or not the browser should synthesize small caps typefaces when they're missing from the font." +spec: https://drafts.csswg.org/css-fonts-4/#font-synthesis-small-caps +group: font-synthesis +usage_stats: https://chromestatus.com/metrics/css/timeline/popularity/703 +compat_features: + - css.properties.font-synthesis-small-caps + # The font-synthesis shorthand also allows disabling all synthesis and opting + # in to specific kinds of synthesis. As such, `font-synthesis: small-caps` + # affects everything except small caps, and doesn't fit the description of + # this feature. See https://github.com/w3c/csswg-drafts/issues/1641. + # - css.properties.font-synthesis.small-caps diff --git a/feature-group-definitions/font-synthesis-style.dist.yml b/feature-group-definitions/font-synthesis-style.dist.yml new file mode 100644 index 0000000000..7e93e3e7f6 --- /dev/null +++ b/feature-group-definitions/font-synthesis-style.dist.yml @@ -0,0 +1,26 @@ +# Generated from: font-synthesis-style.yml +# Do not edit this file by hand. Edit the source file instead! + +name: font-synthesis-style +description: The `font-synthesis-style` CSS property sets whether or not the browser should synthesize italic and oblique typefaces when they're missing from the font. +spec: https://drafts.csswg.org/css-fonts-4/#font-synthesis-style +group: font-synthesis +usage_stats: https://chromestatus.com/metrics/css/timeline/popularity/701 +status: + baseline: low + baseline_low_date: 2023-03-27 + support: + chrome: "97" + chrome_android: "97" + edge: "97" + firefox: "111" + firefox_android: "111" + safari: "16.4" + safari_ios: "16.4" +compat_features: + - css.properties.font-synthesis-style + # The font-synthesis shorthand also allows disabling all synthesis and opting + # in to specific kinds of synthesis. As such, `font-synthesis: style` affects + # everything except style, and doesn't fit the description of this feature. + # See https://github.com/w3c/csswg-drafts/issues/1641. + # - css.properties.font-synthesis.style diff --git a/feature-group-definitions/font-synthesis-style.yml b/feature-group-definitions/font-synthesis-style.yml new file mode 100644 index 0000000000..da4762d0b0 --- /dev/null +++ b/feature-group-definitions/font-synthesis-style.yml @@ -0,0 +1,12 @@ +name: font-synthesis-style +description: The `font-synthesis-style` CSS property sets whether or not the browser should synthesize italic and oblique typefaces when they're missing from the font. +spec: https://drafts.csswg.org/css-fonts-4/#font-synthesis-style +group: font-synthesis +usage_stats: https://chromestatus.com/metrics/css/timeline/popularity/701 +compat_features: + - css.properties.font-synthesis-style + # The font-synthesis shorthand also allows disabling all synthesis and opting + # in to specific kinds of synthesis. As such, `font-synthesis: style` affects + # everything except style, and doesn't fit the description of this feature. + # See https://github.com/w3c/csswg-drafts/issues/1641. + # - css.properties.font-synthesis.style diff --git a/feature-group-definitions/font-synthesis-weight.dist.yml b/feature-group-definitions/font-synthesis-weight.dist.yml new file mode 100644 index 0000000000..e92cc53272 --- /dev/null +++ b/feature-group-definitions/font-synthesis-weight.dist.yml @@ -0,0 +1,26 @@ +# Generated from: font-synthesis-weight.yml +# Do not edit this file by hand. Edit the source file instead! + +name: font-synthesis-weight +description: The `font-synthesis-weight` CSS property sets whether or not the browser should synthesize bold typefaces when they're missing from the font. +spec: https://drafts.csswg.org/css-fonts-4/#font-synthesis-weight +group: font-synthesis +usage_stats: https://chromestatus.com/metrics/css/timeline/popularity/700 +status: + baseline: low + baseline_low_date: 2023-03-27 + support: + chrome: "97" + chrome_android: "97" + edge: "97" + firefox: "111" + firefox_android: "111" + safari: "16.4" + safari_ios: "16.4" +compat_features: + - css.properties.font-synthesis-weight + # The font-synthesis shorthand also allows disabling all synthesis and opting + # in to specific kinds of synthesis. As such, `font-synthesis: weight` affects + # everything except weight, and doesn't fit the description of this feature. + # See https://github.com/w3c/csswg-drafts/issues/1641. + # - css.properties.font-synthesis.weight diff --git a/feature-group-definitions/font-synthesis-weight.yml b/feature-group-definitions/font-synthesis-weight.yml new file mode 100644 index 0000000000..46b1b8ef01 --- /dev/null +++ b/feature-group-definitions/font-synthesis-weight.yml @@ -0,0 +1,12 @@ +name: font-synthesis-weight +description: The `font-synthesis-weight` CSS property sets whether or not the browser should synthesize bold typefaces when they're missing from the font. +spec: https://drafts.csswg.org/css-fonts-4/#font-synthesis-weight +group: font-synthesis +usage_stats: https://chromestatus.com/metrics/css/timeline/popularity/700 +compat_features: + - css.properties.font-synthesis-weight + # The font-synthesis shorthand also allows disabling all synthesis and opting + # in to specific kinds of synthesis. As such, `font-synthesis: weight` affects + # everything except weight, and doesn't fit the description of this feature. + # See https://github.com/w3c/csswg-drafts/issues/1641. + # - css.properties.font-synthesis.weight diff --git a/feature-group-definitions/font-synthesis.dist.yml b/feature-group-definitions/font-synthesis.dist.yml new file mode 100644 index 0000000000..139d181882 --- /dev/null +++ b/feature-group-definitions/font-synthesis.dist.yml @@ -0,0 +1,21 @@ +# Generated from: font-synthesis.yml +# Do not edit this file by hand. Edit the source file instead! + +name: font-synthesis +description: The `font-synthesis` CSS shorthand property disables all font synthesis except the given kinds. To disable synthesis of a specific kind of font synthesis, instead use the longhand properties such as `font-synthesis-style` and `font-synthesis-weight`. +spec: https://drafts.csswg.org/css-fonts-4/#font-synthesis +group: font-synthesis +usage_stats: https://chromestatus.com/metrics/css/timeline/popularity/704 +status: + baseline: low + baseline_low_date: 2022-01-06 + support: + chrome: "97" + chrome_android: "97" + edge: "97" + firefox: "34" + firefox_android: "34" + safari: "9" + safari_ios: "9" +compat_features: + - css.properties.font-synthesis diff --git a/feature-group-definitions/font-synthesis.yml b/feature-group-definitions/font-synthesis.yml index 3ac6738eb1..80bf8a1508 100644 --- a/feature-group-definitions/font-synthesis.yml +++ b/feature-group-definitions/font-synthesis.yml @@ -1,18 +1,7 @@ name: font-synthesis -description: The `font-synthesis` CSS property sets whether or not the browser should synthesize bold, italic, small-caps, and other typefaces when they're missing from the font. -spec: https://drafts.csswg.org/css-fonts-4/#font-synthesis-intro -usage_stats: - - https://chromestatus.com/metrics/css/timeline/popularity/700 # font-synthesis-weight - - https://chromestatus.com/metrics/css/timeline/popularity/701 # font-synthesis-style - - https://chromestatus.com/metrics/css/timeline/popularity/703 # font-synthesis-small-caps - - https://chromestatus.com/metrics/css/timeline/popularity/704 # font-synthesis +description: The `font-synthesis` CSS shorthand property disables all font synthesis except the given kinds. To disable synthesis of a specific kind of font synthesis, instead use the longhand properties such as `font-synthesis-style` and `font-synthesis-weight`. +spec: https://drafts.csswg.org/css-fonts-4/#font-synthesis +group: font-synthesis +usage_stats: https://chromestatus.com/metrics/css/timeline/popularity/704 compat_features: - - css.properties.font-synthesis-position - - css.properties.font-synthesis-small-caps - - css.properties.font-synthesis-style - - css.properties.font-synthesis-weight - css.properties.font-synthesis - - css.properties.font-synthesis.position - - css.properties.font-synthesis.small-caps - - css.properties.font-synthesis.style - - css.properties.font-synthesis.weight diff --git a/groups/css.yml b/groups/css.yml new file mode 100644 index 0000000000..094a6c5643 --- /dev/null +++ b/groups/css.yml @@ -0,0 +1,7 @@ +# This group is intended for everything that can be done with CSS syntax and its +# associated APIs. Almost all such features are defined by the CSSWG, but there +# are exceptions: https://compat.spec.whatwg.org/#css-compat-section +# +# Additionally, not every deliverable of the CSSWG is a CSS feature: +# https://drafts.fxtf.org/geometry/ +name: CSS diff --git a/groups/font-synthesis.yml b/groups/font-synthesis.yml new file mode 100644 index 0000000000..fb2fcbfdfa --- /dev/null +++ b/groups/font-synthesis.yml @@ -0,0 +1,3 @@ +# https://drafts.csswg.org/css-fonts-4/#font-synthesis-intro +name: Font synthesis +parent: fonts diff --git a/groups/fonts.yml b/groups/fonts.yml new file mode 100644 index 0000000000..79370a5f7c --- /dev/null +++ b/groups/fonts.yml @@ -0,0 +1,3 @@ +# Everything related to web fonts and font rendering control. +name: Fonts +parent: css