Skip to content

[cssom] Serialization of @font-face assumes font-family descriptor is always present #13323

@Calme1709

Description

@Calme1709

The @font-face section of the CSS fonts spec states that

@​font-face rules require a font-family and src descriptor; if either of these are missing, the @​font-face rule must not be considered when performing the font matching algorithm.

This implies that @font-face rules without valid font-family descriptors are valid through parse time and just don't take part in font matching, this behavior is exhibited by both Chrome and Firefox.

The issue arises when serializing the associated CSSFontFaceRule where step 3 assumes that the font-family descriptor is always present.

This issue is avoided in Chrome and Firefox by skipping steps 2-4 of the serialization algorithm if the font-family descriptor is not present.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions