[csswg-drafts] [css-fonts-4] confusing text re: the `font-family` descriptor in `@font-palette-values` (#7308)

jfkthame has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-fonts-4] confusing text re: the `font-family` descriptor in `@font-palette-values` ==
The text at https://drafts.csswg.org/css-fonts-4/#font-family-2-desc seems confusing to me:

> This descriptor defines the font family name that this palette applies to. This palette will only ever be applied to the font with this name. The value of this descriptor matches the definition of the [`<family-name>`](https://drafts.csswg.org/css-fonts-4/#family-name-value) for the ['font-family'](https://drafts.csswg.org/css-fonts-4/#propdef-font-family) property. This means that only named font families are allowed and rules that including generic or installed fonts in the list of font families are syntax errors. If syntax errors occur within the font family list, the entire rule must be ignored.

Two issues with this:

(a) The first two sentences make it sound like the descriptor expects a **single** font family name. But the last two sentences refer to the "list of font families" / "font family list". Which is it? Can an author write a single `@font-palette-values` rule that applies to a list of font families, or must each family be addressed by a separate rule?

(b) If the value of this descriptor "matches the definition of the [`<family-name>`](https://drafts.csswg.org/css-fonts-4/#family-name-value) for the ['font-family'](https://drafts.csswg.org/css-fonts-4/#propdef-font-family) property", then it can presumably be the family name of either an installed font or a family defined by `@font-face` rules. But then the text says that "rules that includ[e] generic _or installed_ fonts in the list of font families are syntax errors". So can `@font-palette-values` be used to address an installed font by family name (e.g. "Segoe UI Emoji" on Windows), or is that an error?

I think the answers I'd like to see would be that (a) the `font-family` descriptor accepts a list of font family names, and (b) these may include installed fonts as well as webfonts (i.e. only generics would be excluded). But it's unclear to me what the spec is currently trying to say about these questions.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7308 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 25 May 2022 15:19:53 UTC