Re: font features in CSS

Bert Bos wrote:

> I think we should provide keywords for small caps (already done) and
> oldstyle figures, and maybe one or two more. But if a font has half
> a dozen different ampersands and the designer really wants the
> fourth variant, he should make a font with that glyph. (Or maybe he
> actually meant to use an image?)

This is far too limiting in my opinion.  There are many valuable features in OpenType, we should definitely attempt to expose ones that are useful for authors and commonly supported in fonts.  Authors should be able to vary their use of these features within a page, asking authors to fiddle with font editors to produce a font that enables certain features is error prone, difficult, not to mention a violation of "no alteration" clauses of many font licenses.

Steve Zilles wrote:

> I meant that CSS would use the long names and implementers would use
> the registry to find the related OT tag value.

To some degree, the issue of whether to expose low-level OpenType features is a distraction right now.  We implemented -moz-font-feature-opentype as a way of exposing features easily for experimentation purposes since many of these features are better understood visually.  The most important thing to focus on now is what set of properties is a good middle point between Bert's two feature addition and a set of properties that exposes every OpenType feature ever proposed.

Chris Lilley wrote:

> BB> I thought at first about moving the font features from
> BB> the 'font-variant' property to a descriptor inside @font-face, but I
> BB> actually prefer now to not have them there either.
> 
> I disagree. The features need to be in a font descriptor, so that
> the layout engine can download fonts with the appropriate features.

I think adding a font-variant descriptor to @font-face is extremely useful, since many OpenType features have values that are font specific (e.g. the meaning of the styleset features ss01, ss02, etc.).  I *don't* think it should be used as part of font selection however, e.g. selecting a face based on the value of font-variant.  That's old school thinking. ;)

Cheers,

John Daggett
Mozilla Japan

Received on Friday, 30 October 2009 17:34:07 UTC