W3C home > Mailing lists > Public > www-style@w3.org > March 2010

Re: font-specific feature handling

From: Robert O'Callahan <robert@ocallahan.org>
Date: Fri, 19 Mar 2010 17:07:27 +1300
Message-ID: <11e306601003182107u1596df88gfee2de7ef8251cdf@mail.gmail.com>
To: Christopher Slye <cslye@adobe.com>
Cc: www-style <www-style@w3.org>
On Fri, Mar 19, 2010 at 2:00 PM, Christopher Slye <cslye@adobe.com> wrote:

> On Mar 18, 2010, at 5:19 PM, Tab Atkins Jr. wrote:
> > On Thu, Mar 18, 2010 at 4:04 PM, Robert O'Callahan <robert@ocallahan.org>
> wrote:
> >> Another approach, which I raised the previous time we discussed this, is
> to
> >> allow font-specific features (i.e., numbered features) everywhere, but
> >> (outside @font-face) we only apply those features where the font being
> used
> >> to render the text is the first font in the font-family property.
> >
> > That's probably the easiest, though it's kind of weird.
> I agree -- easy, and slightly weird. But what if you really did want to
> apply it to a fallback font?
Inevitably, we'll have "new" versions of OpenType fonts, where the font name
> will be different (e.g. new "WarnockSuperFab" vs old "WarnockPro") but they
> will both have compatible features. And what if the first font is a local
> font that falls back to the same font on the web? Better to use the big font
> on a user's system rather than downloading it, right? I guess it would be
> back to specifying it in @font-face, then.

For that situation, you could write
@font-face {
  font-family: Warnock;
  src: local(WarnockSuperFab), local(WarnockPro), url(WarnockSuperFab.woff)
and then "font-family: Warnock; font-variant: alt-set(3)" will work.
Basically, you can move fallback based on font availability out of
font-family into @font-face rules so that the "first family in font-family"
rule works for you.

For more complicated situations, such as applying font-specific features to
multiple fonts selected based on character coverage, you'd need to fall back
on creating lots of @font-face rules with font-specific features in them.
Not great, but perhaps not very common.

"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
Received on Friday, 19 March 2010 04:08:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:43 UTC