W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2017

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

From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
Date: Mon, 30 Oct 2017 20:34:11 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-340575525-1509395650-sysbot+gh@w3.org>
>  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):

@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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:19 UTC