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

>  I would rather see a new `features()` string in the stylesheet

That definitely looks nicer to read. And my main comment was about re-using OpenType table names, anyway, the rest was mostly musings.

One limitation, though: by adding a separate `features` parameter, instead of overloading `format()`, wouldn't we break the syntax for existing browsers?  So you'd actually need to write (for the near-future, anyway):


```css
@font-face {
  font-family: heading-font;
          /* fallback stack for browsers that don't know features() */
  src: url(fallback-font.woff2) format("woff2"), 
        url(fallback-fallback-font.woff) format("woff"),
        url(how-old-is-your-browser-font.ttf) format("ttf");
  src: url(fancy-font.woff2) format("woff2") features("CPAL,FVAR"),
           /* fallback for browsers that understand features(), but don't support these features */
        url(fallback-font.woff2) format("woff2"); /* assume woff2 support in this case */
}
```

Which is sub-optimal, but no worse than oodles of other similar fallback redundancies in modern stylesheets.

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

Received on Monday, 30 October 2017 20:34:14 UTC