- From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
- Date: Wed, 05 Oct 2016 00:39:01 +0000
- To: public-css-archive@w3.org
> I think it's worth mentioning that there is no current proposal to
make anything in the @font-face block define which point along any
variation axis is actually used. All current proposals describe that
style applied to elements defines which point is used, and the
descriptors in @font-face blocks are only there for font selection.
@litherum going slightly off topic, but this actually seems to be an
issue, especially if you're mixing several variable fonts, or variable
fonts with non variable ones. Since all these axes are on arbitrary
scales (and even worse, custom axises of the same name might not even
have the same meaning in different fonts), just assuming that the same
value on the same axis will make different fonts match each other
nicely seems wrong.
It seems to me that we need a level of indirection, similar to how you
can do
```
@font-face {
font-family: foo;
weight: 700;
src: url('..../foo-700.otf');
}
@font-face {
font-family: bar;
weight: 700;
src: url('..../bar-900.otf');
}
.something {
font-family: foo, bar;
}
```
For sure, good syntax to deal with that is not obvious with variable
fonts, but losing this ability sounds bad.
Now, mixing the idea of providing:
- ranges in which the variable font should be used
- mapping values on the variable axis to different values in the
stylesheet
how about something like this:
* `@font-face { /*...*/ font-weight: 200 600, 900;}` => Select this
variable font when the stylesheet calls for a weight between 200 and
600 or of 900.
* `@font-face { /*...*/ font-weight: 900/753; }` => Select this
variable font when the stylesheet calls for a weight of 900, and
rendering using a weight of 753
* `@font-face { /*...*/ font-weight: 200/300 600/650, 900/753;}` =>
Select this variable font when the stylesheet calls for a weight
between 200 and 600 or of 900. Map (linearly) the 200-600 range from
the stylesheet to 300-650 in the font, and 900 to 753.
Note: this is relates to #528
--
GitHub Notification of comment by frivoal
Please view or discuss this issue at
https://github.com/w3c/csswg-drafts/issues/521#issuecomment-251553192
using your GitHub account
Received on Wednesday, 5 October 2016 00:39:16 UTC