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

Re: [csswg-drafts] [css-fonts-4] [varfont] Variation fonts deserve their own @-rules

From: litherum via GitHub <sysbot+gh@w3.org>
Date: Wed, 21 Sep 2016 23:43:17 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-248775063-1474501395-sysbot+gh@w3.org>
[Migrated](https://github.com/w3c/csswg-drafts/issues/498#issuecomment-248317926)
 on behalf of @jpamental:

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 litherum
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/522#issuecomment-248775063 
using your GitHub account
Received on Wednesday, 21 September 2016 23:43:25 UTC

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