Re: [csswg-drafts] [css4-fonts] support for OpenType font variations

Would there be a value in allowing the font-face descriptors (e.g., 
font-weight, font-stretch) to take two values, defining the range 
available from the file?

If you use range descriptors, then the non-variable fallbacks no 
longer match the descriptors, and would need separate font-face rules.
  However, I'm pretty sure that still works with `@font-face` as 
currently defined, just need to watch the ordering:

```css
@font-face { /* fallback normal weight face */
font-family: BodyText;
font-weight: normal;
src: url(something) format(woff);
}
@font-face { /* fallback bold weight face */
font-family: BodyText;
font-weight: bold;
src: url(something-bold) format(woff);
}
@font-face { /* variable weight font */
font-family: BodyText;
font-weight: 200, 700; /* min and max weights */
src: url(something-variable) format(woff2-variations);
}
```
So user agents that recognize the range descriptor and variable-font 
format would download the final file, others would download one or all
 of the backups (depending on which weights are required).


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

Received on Tuesday, 20 September 2016 03:53:44 UTC