Re: WebFonts

Paul Prescod wrote:
> The Web fonts spec looks very complete. Good work!
> I wonder, though, if it has to be so explicitly tied to CSS. If XML's
> stylesheet language is not CSS, or if another stylesheet language is
> developed for HTML, then the WebFonts work would presumably be not
> applicable. Right now the syntax and semantics are inextricably tied. So
> much so that strictly speaking this standard would have to be updated
> when CSS2 comes out, or incorporated into it:

Yes, it is intended to become an integral part of CSS. But we do also
want it to be applicable in other places where fonts are needed, even if
they don't need the rest of CSS.

Although CSS is a single, internally consistent (I hope) system, it is
not intended as an all-or-nothing specification. For example, a
synchronized multimedia format[2] might use the positioning properties
and backgrounds, but has probably no use for fonts. On the other hand,
Java might want to use the Web Fonts, but doesn't need the other

If you look at the Web Fonts as a black box with input and output, then
the input consists of values for 5 properties: font-family, font-weight,
font-variant, font-style, and font-size. The output is a font.

We have looked at how DSSSL characteristics could be mapped to these
five properties, and the mapping is not very complicated. We will
probably provide that mapping in some Note or other document. (Or if you
want to do it? That'll save us some work...)

> "This specification extends the font mechanisms in CSS1..."
> I think that it would be possible to define descriptors and algorithms
> with a variable syntax and present a *sample syntax* that happens to be
> CSS for pedagogic purposes. This could save a lot of work later on as
> well as perhaps extend the specification's applicability -- perhaps even
> to non-web applications.

That will probably be done by means of DOM[1].

As soon as it is part of DOM, you'll automatically have many new
syntaxes (C, Java, Javascript, etc.), but I think it would be a bad idea
to create alternative syntaxes just for Web Fonts. Every new syntax
means extra work for implementers, larger applications, less
interoperability, more things for people to learn, and general


[1] http://www.w3.org/MarkUp/DOM/
[2] http://www.w3.org/AudioVideo/

  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/pub/WWW/People/Bos/                      INRIA/W3C
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 4 93 65 77 71               06902 Sophia Antipolis Cedex, France

Follow-Ups: References: