Re: Advanced Font Features

Also sprach Christoph Päper:

 > Font technologies like Open Type and AAT provide a number of advanced  
 > typographic features, i.e. stuff known from print or handwriting, but  
 > uncommon to electronic typesetting. Not all of them have counterparts  
 > in CSS yet.
 > 
 > Should they? How?

I think they should. I've been working on a proposal for this based on
extending the 'font-variant' property. This message contains the
essence of the proposal

The 'font-variant' property offers designers a way to indicate
preference for small-caps variants in a font. The property is present
in CSS1 and CSS2. Recently, OpenType has added other sets of alternate
glyphs in a font. For example, an OpenType font can contain swash
capitals, ligatures, and old-style digits.

To specify which of the alternate fonts are to be used, it is proposed
that the 'font-variant' property is extended with new keyword values.
Also, the property is turned into a shorthand property representing
five individual properties.

Here are the new properties:

   font-variant-caps: normal | smallcaps
   font-variant-digits: normal | oldstyle | lining
   font-variant-width: normal | proportional
   font-variant-swash: normal | swash
   font-variant-ligatures: normal | standard | alternate

Example 1: to specify that 'oldstyle' digits and 'smallcaps' variants
are to be used with H1 elements, this style sheet can be used:

   h1 { 
     font-variant-caps: smallcaps
     font-variant-digits: oldstyle
   }

Example 2: The example can also be written:

   h1 { font-variant: smallcaps oldstyle }

(The only difference between Example 1 and Example 2 is that Example 2
sets the other individual properties to their initial value, as per
the normal CSS rules.)

Example 3: to specify that the font's default style of digits are
  used, be it 'lining' or 'oldstyle':

   h1 { font-variant-digits: normal }

Some OpenType fonts support a wider range of alternate glyphs (e.g.,
titling-alternates | historical-alternates | ligatures |
alternate-ligatures | digits-monospaced | digits-proportional |
digits-lining). Should any of these be supported?

This proposal came out of discussions with Tal Leming and Adam Twardoch. 

FYI, there is a dicussion on related topics in this forum:

  http://typophile.com/node/40332

Cheers,

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Saturday, 19 January 2008 14:29:22 UTC