W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: [css3-fonts] @font-face matching and font-style descriptor

From: John Daggett <jdaggett@mozilla.com>
Date: Mon, 13 Sep 2010 21:27:16 -0700 (PDT)
To: Sergey Malkin <sergeym@microsoft.com>
Cc: www-style@w3.org, www-font <www-font@w3.org>, Sylvain Galineau <sylvaing@microsoft.com>
Message-ID: <928074007.564358.1284438436313.JavaMail.root@cm-mail03.mozilla.org>

Sergey Malkin wrote:

> One more clarification is needed, though, regarding use of
> artificial styles. In case where font-style descriptor is not
> specified, spec says "default values are assumed". What is default
> value? Is this equivalent to specified "font-style:normal"?
> 
> Consider following example:
> 
> @font-face { 
>   font-family: MyFont1;
>   src: local(Arial);
> }
> 
> @font-face { 
>   font-family: MyFont2;
>   src: local(Arial);
>   font-style:normal;
> }
> 
> Will following two lines be rendered identically? They will both use
> regular Arial face. But will each of them be allowed to use
> generated oblique font?
> 
> <div style="font-family:MyFont1; font-style:italic;">Abc</div>
> <div style="font-family:MyFont2; font-style:italic;">Abc</div>

The default value of descriptors in @font-face rules are listed as the
"Initial value", i.e. the value specified if no descriptor is
explicitly defined.  The initial values of font-style descriptors is
"normal", so the two rules you've defined are equivalent.  User agents
will synthesize an italic face if needed.

As for *how* a user agent does this, I think there are a number of
weird edge cases.  For example:

@font-face {
  font-family: MyFont3;
  src: local(Arial Italic);
  font-style: normal;
}

Should the browser add extra oblique to an already italic face if it's
the single "normal" face defined for a family?  I think it probably
makes sense to allow user agents to treat already italicized font data
as a "synthesized" version.  I don't think we should have a
conformance requirement that user agents oblique already
italic faces.

Tab Atkins Jr. wrote:

> It should probably say "initial value", which is defined for every property.

Agreed, although I would note these are *not* properties but descriptors.

Regards,

John Daggett
Received on Tuesday, 14 September 2010 04:27:50 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:31 GMT