-
Notifications
You must be signed in to change notification settings - Fork 757
Description
new FontFace("Font 01", "").familyIs an empty string in Gecko, because Font 01 is not a valid family name (you need to quote it because 01 is not a CSS identifier)
Safari says normal.
Chrome says Font 01.
My understanding is that Gecko is right, per https://drafts.csswg.org/css-font-loading/#font-face-constructor:
Parse the family argument, and the members of the descriptors argument, according to the grammars of the corresponding descriptors of the CSS @font-face rule. If the source argument is a CSSOMString, parse it according to the grammar of the CSS src descriptor of the @font-face rule. If any of them fail to parse correctly, reject font face’s [[FontStatusPromise]] with a DOMException named "SyntaxError", set font face’s corresponding attributes to the empty string, and set font face’s status attribute to "error". Otherwise, set font face’s corresponding attributes to the serialization of the parsed values.
But given the lack of interop other members may disagree? What is exactly going on in Safari / Chrome?
Metadata
Metadata
Assignees
Type
Projects
Status