Re: [csswg-drafts] [css-fonts-4] [varfont] @font-face descriptors should accept ranges

[Migrated](https://github.com/w3c/csswg-drafts/issues/498#issuecomment-248222408)
 on behalf of @nattokirai:

Jonathan Kew has also suggested using ranges in `@font-face` rules:

```css
/* For legacy UAs that don't support variation fonts,
   load individual faces. */
@font-face {
  font-family: BodyText;
  src: url(fonts/BodyText-Regular.otf) format("opentype");
}
@font-face {
  font-family: BodyText;
  font-weight: bold;
  src: url(fonts/BodyText-Bold.otf) format("opentype");
}
@font-face {
  font-family: BodyText;
  font-style: italic;
  src: url(fonts/BodyText-Italic.otf) format("opentype");
}
@font-face {
  font-family: BodyText;
  font-style: italic;
  font-weight: bold;
  src: url(fonts/BodyText-BoldItalic.otf) format("opentype");
}

/* For UAs with variation support: the style and weight descriptors
   cover a range, which means this will override all the preceding
   rules that fall within the ranges. UAs that don't recognize the
   "opentype-variation" support will not load anything here, so will
   fall back to the individual faces above. */
@font-face {
  font-family: BodyText;
  font-style: normal, italic;
  font-weight: 1-1000;
  src: url(fonts/BodyText-Var.otf) format("opentype-variation");
}
```

So `font-stretch` would use a percentage range? `50-150%`? Hmmm.

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

Received on Wednesday, 21 September 2016 23:35:12 UTC