-
Notifications
You must be signed in to change notification settings - Fork 756
Description
Which format type to specify for a font from an OpenType collection is unclear.
In Section 4.3.3.1 (@font-face format types) of the 13 November 2019 draft of the CSS Fonts Module Level 4, there is no dedicated format type listed for collections and it is not listed in the <font-format> production, either. In contrast (and contradiction?), RFC 8081, explicitly defines a “@font-face Format” of “collection”.
The example in Section 4.3.2 on using fragment identifiers with OpenType collections doesn’t help resolving this ambiguity; it simply doesn’t doesn't use any format type declarations.
What should the example look like with explicit format declarations?
Following RFC 8081, the following makes sense:
src: url(fonts/coll.otc#foo) format(collection);
src: url(fonts/coll.woff2#foo) format(woff2);
In the RFC, both the Collection Font Format (@font-face format: collection) and WOFF 2.0 (woff2) allow fragment identifiers, as opposed to the OpenType Layout (OTF) Font Type (opentype) and WOFF 1.0 (woff), which do not allow fragment identifiers. But in contrast to WOFF 2.0, which can contain both a single font face or a collection and hence requires only a single font format (woff2), opentype and collection are distinct formats.
But this interpretation means that collection is missing from the <font-format> production (in both Level 3 and 4).