Skip to content

[css-fonts] Should all new generic family names win over @font-face names? #5001

Description

@kojiishi

According to:
https://drafts.csswg.org/css-fonts-4/#family-name-syntax
The unquoted generic font-family names should not match @font-face nor existing font names.

As we add more generic families, and we changed the definition not to require to resolve to existing fonts, I wonder we may want to revisit this criteria too.

As the number of generic family increases, we'll increase the risk of snippets like this to behave differently by browsers:

@font-face { family-name: fangsong; ... }
html { font-family: fangsong; }

then browsers that supports fangsong generic family will ignore this @font-face.

In Blink, we apply this rule to system-ui, but haven't done so to other generic families yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions