Re: @font-feature-values rule syntax

2010-11-16 10:10 EEST: Christopher Slye:
> On Nov 15, 2010, at 11:50 PM, Mikko Rantalainen wrote:
>> If this understanding is correct, then I suggest that the only supported
>> method for font alternates is using the @font-face directly as in the
>> example above.
> 
> ... Except that in your example, the stylistic alternates would be on
> all the time for that font, rather than discretionary. One could not
> use the font without those variants being activated everywhere.
> 
> The advantage the name-key approach (e.g. "swishy") is that one can
> then activate it for only certain elements. I might not want swash
> capitals all the time for PoeticaStd; I might just want them for
> h2:first-letter, or some span.

How about you do it this way:

  @font-face {
    font-family: Swishy;
    src: url(JupiterSans.woff) format('woff');
    font-variant: styleset(5, 13);
  }

  @font-face {
    font-family: Swashy;
    src: url(JupiterSans.woff) format('woff');
    font-variant: styleset(7, 42);
  }

  @font-face {
    font-family: Foobarish;
    src: url(JupiterSans.woff) format('woff');
    font-variant: styleset(3, 17);
  }

Then you just say that you want to use "Swishy" for h2:first-letter and
"Foobarish" for emphasized paragraph text.

-- 
Mikko

Received on Tuesday, 16 November 2010 09:09:16 UTC