Re: font features in CSS

On Friday 30 October 2009, Sylvain Galineau wrote:
> > From: www-font-request@w3.org [mailto:www-font-request@w3.org] On
> > Behalf Of Bert Bos
> >
> > Moreover, I don't think it is a requirement that CSS supports all
> > OT features. A handful of the more common ones is enough. If a
> > designer wants a specific feature of a specific font, he can make a
> > new font (or a virtual font) in which that feature is turned on.
> > That's what we have @font-face for.
>
> Do you mean that @font-face would support a mapping mechanism e.g.
> (apologies for bad names/patterns)
>
> @font-face {
> 	font-family:Greetings;
> 	src:url(Greetings.xyz);
> 	font-variant-map: exalted feature("salt=2","ss05=1");
> }
>
> ...
>
> #headline {
> 	font-family:Greetings;
> 	font-variant: exalted;
> }

I thought at first about moving the font features from 
the 'font-variant' property to a descriptor inside @font-face, but I 
actually prefer now to not have them there either.

This should be handled outside of CSS, with a program such as Fontforge 
or maybe a format such as the proposed WOFF. That not only makes the 
font features available in contexts where you don't have or want CSS, 
such as XSL, SVG, PDF or TeX, but it also avoids complexity in CSS and 
a dependency of CSS on a particular font format.

When I wrote "virtual font," I indeed had a scheme in mind to turn 
@font-face into a language for defining virtual fonts. A standard for 
virtual fonts could be nice. But on second thoughts, it's only useful 
if that standard *doesn't* depend on CSS.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Friday, 30 October 2009 15:42:31 UTC