- From: litherum via GitHub <sysbot+gh@w3.org>
- Date: Wed, 21 Sep 2016 22:47:36 +0000
- To: public-css-archive@w3.org
[Migrated](https://github.com/litherum/csswg-drafts/issues/4#issuecomment-248094123)
on behalf of @jfkthame:
The problem with `format("woff2", "variation")` (etc) is that if I
understand correctly, this will not prevent the resource being used by
browsers that don't support variation fonts. The current CSS Fonts
spec [says](https://www.w3.org/TR/css-fonts-3/#src-desc):
> The format hint contains a comma-separated list of format strings
that denote well-known font formats. Conformant user agents must skip
downloading a font resource if the format hints indicate only
unsupported or unknown font formats. If no format hints are supplied,
the user agent should download the font resource.
which, at least as implemented in Firefox (I haven't tested this in
other browsers) means that if *any* of the format strings indicates a
supported format, the resource will be used.
I think what we want here is the opposite behavior, whereby if *any*
of the format hints indicates an unsupported format or feature, the
resource should be skipped. Then an author could say things like
src: url("MyVarFont.woff2") format("woff2", "variation"),
url("MyFont.woff2") format("woff2");
to provide a variation font to browsers that support it, and a
non-variation one to legacy UAs. But that won't work in current
Firefox; the first (variation) font will be used even though its
"variation" format hint is not supported.
Maybe we can change this in the spec, and expect browsers to adjust as
needed? I'm not aware that there has been any real use of multiple
format hints at this point; it's not clear to me what current use-case
would require them.
--
GitHub Notification of comment by litherum
Please view or discuss this issue at
https://github.com/w3c/csswg-drafts/issues/513#issuecomment-248764764
using your GitHub account
Received on Wednesday, 21 September 2016 22:47:43 UTC