Re: advanced font features in CSS

> Are there OpenType features omitted here that
> should really be exposed for authors?

This seems to cover only substitution features. How would this handle  
positioning features? For example, there is a capital spacing feature  
(cpsp) that type designers use to adjust spacing in all caps settings.  
Perhaps that could be triggered by the same property that handles the  
all caps substitution feature.

> Or limitations that are
> unfortunate?  For example, OpenType allows distinct sets of glyphs  
> with
> a common style to be specified independently but the 'styleset' value
> defined here is associated with a single numeric value, so only one of
> these stylesets could be applied at a time.

Stylistic sets are not mutually exclusive. Users may activate more  
than one at a time. For example, a user may activate ss01 which  
inserts an alternate 'g', ss02 which inserts an alternate 'Q' and ss09  
which inserts alternate 'W' and 'w'.

> Alternates and Swashes
>
>   contextual: calt, clig (OT), not in AAT

Contextual ligatures (clig) may be better grouped with ligatures. Most  
applications group these along with liga under a generic "Ligatures"  
option.

Contextual alternates should be on by default. This feature is used by  
many fonts to ensure proper appearance. FWIW, the OT specification  
defines the default state of most, if not all, features. It would be  
best if these specifications are followed.

>   swash: swsh(number), cswh(number) (OT), AAT?

As Thomas mentioned, most fonts use contextual forward and backward  
tracking to automatically insert the proper swash. In fact, I don't  
know that I've ever seen a font that uses GSUB lookup type 3 as the  
spec describes for swashes. I think it may be safer to allow users to  
activate swashes independent of a specific number.

>  alternates: salt(number) (OT), character alternatives = number (AAT)

This is the same as the swsh(number) problem mentioned above. The salt  
implementation has been an area of debate for a long time.

If you really want to enable the manual selection of individual  
alternates you could use the aalt feature. Perhaps something like:  
access-alternates <number>.

>   Capitalization
>
>   titling-caps: titl (OT), style options = titling caps (AAT)

titl is not limited to capital usage. I think it should be part of  
Alternates and Swashes.

Would the all caps (case) feature ever be triggered? Many fonts use  
this to insert all caps specific punctuation. Will there be a way to  
activate caps to small caps (c2sc) feature? Many fonts use this to  
insert small cap variations of more than alphabetic forms.

> Numeric styles

>   normal: clears all features below, uses font defaults
>   lining-nums: lnum (OT), number case = upper case (AAT)
>   oldstyle-nums: onum (OT), number case = lower case (AAT)
>   proportional-nums: pnum (OT), number spacing = proportional (AAT)
>   tabular-nums: tnum (OT), number spacing = monospaced (AAT)
>   diagonal-fractions: frac (OT), fractions = diagonal
>   stacked-fractions: afrc (OT), fractions = stacked
>   slashed-zero: zero (OT), AAT?

Numerators (numr) and denominators (dnom) are in many fonts. Maybe  
they would be good to include.

Tal

Received on Monday, 29 June 2009 17:17:38 UTC