Re: [css3-fonts] new editor's draft

> > Even if defined with font-weight and font-style defaulting to "all",
> > that means you're going to ignore bold and italic faces and use the
> > normal face in all situations. That's not really a good way of defining
> > what 'serif' means.
> 
> We're doing this at the moment without ignoring bold and italic, as
> described in my other email on the topic.
> 
> @font-face {
>      font-family: serif;
>      font-weight: all;
>      font-style: all;
>      src: local("Times New Roman")
> }
> 
> will result in Times New Roman being used with the appropriate weight
> and style in Prince at the moment.

So what happens with the rule below?

@font-face {
  font-family: serif;
  font-weight: all;
  font-style: all;
  src: local("Times New Roman Bold Italic");
}

Does your system pick up all bold/italic variations using this syntax?
If so, you're overloading syntax intended to specify a *face* and
associating it with a way of looking up a *family*.  

> > Using your original font-family list, let's say you wanted to override
> > the Arabic glyphs used in Times New Roman with Scheherazade instead.
> >
> > @font-face {
> >   font-family: Scheherazade;
> >   src: url(ScheherazadeRegAAT.ttf) format("truetype-aat"), url(ScheherazadeRegOT.ttf) format("opentype");
> > }
> >
> > body: { font-family: Scheherazade, Times New Roman, OpenSymbol, ...; }
> 
> I find that a very compelling example. Perhaps what I'm looking for is
> an explicit way of creating a union font, eg.
> 
> @font-face {
>      font-family: MyFont;
>      src: union(font(local("Times New Roman"), url("times.ttf")),
>              font(local("Symbol")))
> }
> 
> apologies for the awful syntax, the idea is that MyFont would use Times
> New Roman and then Symbol for glyph fallback, where Times New Roman
> would either be the system font with that name or a a file if no system
> font with that name existed.

This is *exactly* what the unicode-range feature allows you to do,
it allows a set of fonts to be unioned together.  

@font-face {
  font-family: MyFont;
  src: local("Symbol");
  unicode-range: U+0-10AFFFF;
}

@font-face {
  font-family: MyFont;
  src: local("Times New Roman"), url(times.ttf);
  unicode-range: <character ranges for Times New Roman>;
}

I think unicode-range represents a somewhat complex use case.  For
simpler cases, it would be enough to use:

@font-face {
  font-family: MyFont;
  src: local("Times New Roman"), url(times.ttf);
}

body { font-family: MyFont, Symbol; }

Cheers,

John Daggett
Mozilla Japan

Received on Thursday, 22 January 2009 06:52:33 UTC