Re: [csswg-drafts] [css-fonts-4] @font-family src: should accept a specifier which lists font requirements

> So, if a browser should only download a font if it knows what to do with a CPAL (color palette) table, say that. 
Suppose an implementation can handle `COLR`+`CPAL` but not `SVG `+`CPAL`? OK in that case there is still a single table name that can be used, but sometimes it really is the case of certain combinations of tables or certain parts of tables (`OS/2` springs to mind) or certain versions of tables (the many versions of `CMAP` for example).

> I know the format() strings aren't proper MIME type strings to start with (because they don't include the initial font/ part), 

I initially planned to use MIME types there, but given _significant_ resistance to the idea of a font/* top level type we went with the 'format' string as a temporary workaround. Temporary meaning two decades or so.

> It looks like MIME type parameters are supposed to be part of a MIME type registration,

Yes in general, and yes for the specifics of the font/* top level type. See the registration procedure in [RFC 8081](https://tools.ietf.org/html/rfc8081).

However, putting files on a web server is significantly complicated if parameters need to be set; and then we also need to deal with legacy and mis-configured servers. Part of the goal of RFC 8081 was to align specifications with actual widely deployed practice.

In my experience, content negotiation of that sort is easier and more likely to work if client driven. So I would rather see a new `features()` string in the stylesheet than a complex  parameter-based addendum to Media Types.

```css
@font-face {
  font-family: heading-font;
  src: url(fancy-font.woff2) format("woff2") features("CPAL,FVAR"),
        url(fallback-font.woff2) format("woff2"),
        url(fallback-fallback-font.woff) format("woff"),
        url(how-old-is-your-browser-font.ttf) format("ttf");
}
```

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

Received on Monday, 30 October 2017 17:47:14 UTC