[csswg-drafts] [css-fonts] Use of @font-face format type unclear for collections, possibly contradicting RFC 8081 (#4630)

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

== [css-fonts] Use of @font-face format type unclear for collections, possibly contradicting RFC 8081 ==
Which format type to specify for a font from an OpenType collection is unclear.

In [Section 4.3.3.1 (@font-face format types)](https://www.w3.org/TR/css-fonts-4/#font-face-src-format-types) of the [13 November 2019 draft of the CSS Fonts Module Level 4](https://www.w3.org/TR/2019/WD-css-fonts-4-20191113/), 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](https://tools.ietf.org/html/rfc8081#section-4.4.4), explicitly defines a “`@font-face` Format” of “`collection`”.

The example in [Section 4.3.2](https://www.w3.org/TR/css-fonts-4/#font-face-src-loading) 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](https://tools.ietf.org/html/rfc8081#section-4.4.4) (`@font-face` format: `collection`) and [WOFF 2.0](https://tools.ietf.org/html/rfc8081#section-4.4.6) (`woff2`) allow fragment identifiers, as opposed to the [OpenType Layout (OTF) Font Type](https://tools.ietf.org/html/rfc8081#section-4.4.3) (`opentype`) and [WOFF 1.0](https://tools.ietf.org/html/rfc8081#section-4.4.5) (`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).

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

Received on Wednesday, 25 December 2019 13:30:45 UTC