-
Notifications
You must be signed in to change notification settings - Fork 757
Description
The font-format syntax is:
<font-format>= [<string> | collection | embedded-opentype | opentype
| svg | truetype | woff | woff2 ]
So the answer to my question would be yes. This is also expected by the related WPT test:
// Unknown format string still matches the grammar, although it won't be
// loaded. UAs may choose to either not load it, or not add unsupported
// entries to the list, ensure that subsequent component of the list are
// still recognized.
But I'm wondering, if we really should parse any string and then reject the unsupported ones during loading, or if we should already return a parse error for the unsupported strings. I guess we could possibily do that, since spec says that format(collection) and format("collection") should have the same effect. And the effects can now be slightly different. For example, if the engine doesn't support collection, format(collection) will be rejected at parsing but format("collection") will only be rejected at loading.
While keywords are preferred to identify font formats, for reasons of backwards compatibility the following strings are also accepted, and have the same effect as if the equivalent modern syntax had been used.
And there is no intention to add to this list:
NOTE: The CSS WG does not anticipate extending this list of format strings in the future.