Re: [csswg-drafts] [meta] [css-fonts] Criteria for generic font families (#4910)

There are 2 notations, i.e. quoted string and plain keyword, for 3 namespaces, i.e. `@font-face`, installed typeface and generic font family names, but the latter cannot clash with the others when they are in quoted strings. For precedence rules, the different notations are currently not distinguished, though. 

- W3C/specification-defined, global generic font family names _must not_ be quoted
- vendor/platform-defined, external local typeface names _should_ be quoted – ideally change to _must_
- author/stylesheet-defined, internal custom font face names _may_(?) be quoted

Perhaps, this 

~~~~ ebnf
<'font-family'>: [ <family-name> | <generic-family> ]#
~~~~

could be changed to this

~~~~ ebnf
<'font-family'>: [ <typeface> | <generic-family>  ]#;
<typeface>: <family-name> | " <family-name> ";
~~~~

Perhaps, `font-family: "foo"` could imply `@font-face {font-family: "foo"; src: local(foo)}` and `font-family: foo` could imply `@font-face {font-family: foo; src: generic(foo), local(foo)}`.

-- 
GitHub Notification of comment by Crissov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4910#issuecomment-621943691 using your GitHub account

Received on Thursday, 30 April 2020 15:57:16 UTC