[csswg-drafts] [css-font-loading-3] Unclear how to parse font families (#3776)

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

== [css-font-loading-3] Unclear how to parse font families ==
https://drafts.csswg.org/css-font-loading-3/#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.

https://drafts.csswg.org/css-fonts-4/#family-name-syntax

> Font family names other than generic families must either be given quoted as <string>s, or unquoted as a sequence of one or more identifiers.

So what if you have

```Javascript
new FontFace("4m", source)
```

It is neither a quoted string nor an unquoted sequence of one or more identifiers (identifiers can't start with a number), so WebKit throws an exception here. However, Chrome and Firefox treat the argument as if it was quoted.

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

Received on Thursday, 28 March 2019 20:54:55 UTC