Smart-font features

I'm part of a project that has developed a smart-font rendering engine
called Graphite. It is similar to AAT and OpenType in the sense that it can
do all kinds of complex rendering. And like like AAT and OpenType, the font
can define "features" which are ways of varying the rendering. For
instance, you might turn on or off the ability to create ligatures, or
specify a special form of certain characters. You might even use a feature
to do transliteration.

We're in the middle of a project to provide support for Graphite in the
Mozilla browser. And to do that we want to make sure that there is adequate
markup in XHTML to handle the equivalent of the behavior of our
Graphite-based text editor. With regard to features, you may have data that
needs to be marked up with a specific bunch of feature settings, so that it
is sure to be displayed the way the author intended.

But it appears to me that there is no way to handle the concept of font
features in CSS. The closest thing I could find is font-variant, which is
really the sort of thing we want. But the only legal values are "normal"
and "small-caps".

The issue is complicated by the fact that some of the features are binary
and some are multi-valued. (In AAT and Graphite, that is; I believe all
OpenType features are binary.)

One possibility is a new CSS style property whose value is an arbitrary
string that could be passed to the rendering engine. Generally each feature
has a numerical ID and set of numerical values, so the string could be a
list of feature/value pairs. (In OpenType I believe all features have an
officially registered ID, but in AAT and Graphite they are more arbitrary.
In Graphite at least, you can query the engine for the defined features and
their legal values.)

Another suggestion is a format like: "font-feature: <id>;
font-feature-value: <value>". But that would only work for one feature at a
time, and there could possibly be many.

Has anybody from the OpenType or AAT development team brought up this
topic? Maybe it hasn't hit their radar screens, but it seems to be a bigger
need than just something for Graphite.

Thanks for any help you can give.

Sharon Correll

P.S. I've looked through the archives for something on this topic and
didn't find it, so I hope I'm not beating a dead horse!

Received on Friday, 31 January 2003 19:18:52 UTC