Skip to content

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

@jfkthame

Description

@jfkthame

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> for the '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> for the '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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Commenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.css-fonts-4Current Work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions