Skip to content

Commit

Permalink
Split font-synthesis into many features in a group
Browse files Browse the repository at this point in the history
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 w3c/csswg-drafts#1641 for background.
  • Loading branch information
foolip committed Apr 26, 2024
1 parent 6dc9eb5 commit 7bda8e1
Show file tree
Hide file tree
Showing 13 changed files with 182 additions and 15 deletions.
19 changes: 19 additions & 0 deletions feature-group-definitions/font-synthesis-position.dist.yml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions feature-group-definitions/font-synthesis-position.yml
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions feature-group-definitions/font-synthesis-small-caps.dist.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions feature-group-definitions/font-synthesis-small-caps.yml
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions feature-group-definitions/font-synthesis-style.dist.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions feature-group-definitions/font-synthesis-style.yml
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions feature-group-definitions/font-synthesis-weight.dist.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions feature-group-definitions/font-synthesis-weight.yml
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions feature-group-definitions/font-synthesis.dist.yml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 4 additions & 15 deletions feature-group-definitions/font-synthesis.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions groups/css.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions groups/font-synthesis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://drafts.csswg.org/css-fonts-4/#font-synthesis-intro
name: Font synthesis
parent: fonts
3 changes: 3 additions & 0 deletions groups/fonts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Everything related to web fonts and font rendering control.
name: Fonts
parent: css

0 comments on commit 7bda8e1

Please sign in to comment.