W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2016

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

From: Jason Pamental via GitHub <sysbot+gh@w3.org>
Date: Tue, 20 Sep 2016 14:28:37 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-248317926-1474381715-sysbot+gh@w3.org>
I wonder if we could actually leverage `@font-face` blocks to define 
fallbacks and corrections, and then reference which font family you 
want to use as the fallback in an actual web font block like 
@bramstein outlined above. This would allow us to use `@font-face` for
 normal webfonts and more closely matched fallbacks, and only browsers
 that understand `@font-variation` would pay attention to the new 
block.

```
@font-face {
  font-family: Helvetica;
  font-size: 0.975em; (this is relative to whatever the size it’s 
replacing)
  letter-spacing: -0.5px;
}
@font-face {
  font-family: "Droid Sans";
  font-size: 0.975em; (this is relative to whatever the size it’s 
replacing)
  letter-spacing: -0.5px;
}
@font-face {
  font-family: SomeWebFontName;
  src: …
  font-fallback: Helvetica, “Droid Sans”;
}
@font-variation {
  font-family: SomeWebFontName;
  src: …
}
```
This extends the ideas I was trying to articulate here: 
https://github.com/w3c/csswg-drafts/issues/450

but seems to dovetail nicely with this approach.

-- 
GitHub Notification of comment by jpamental
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/498#issuecomment-248317926 
using your GitHub account
Received on Tuesday, 20 September 2016 14:28:48 UTC

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