W3C home > Mailing lists > Public > www-style@w3.org > March 2009

Re: @font-face, Font Families and Computed Values ?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 23 Mar 2009 23:51:56 -0400
Message-ID: <49C858DC.3030303@mit.edu>
To: Faruk Ateş <faruk@apple.com>
CC: www-style@w3.org
Faruk Ateş wrote:
> # 1. Should the Computed Value be returned with or without quotes?

"returned" in what sense?  If you're talking about getComputedStyle or 
the like, note that what that returns is not really the "computed value" 
in the sense that CSS2.1 (say) uses it in.

> # 3. What about :first-letter and :first-line pseudo elements that 
> change possibly *all* of the element's rendering?
> 
> Example:
> 
> <p>w</p>
> 
> p { font-family: Times, serif; }
> p:first-line { font-family: Helvetica, sans-serif; }
> p:first-letter { font-family: Courier, monospace; }
> 
> I reckon this should have NO impact on the Computed Value since the 
> pseudo elements would effectively constitute a new element inside the p 
> element, but confirmation of that would still be nice.

That's correct.

> What should a UA do with fonts listed that are @font-face embedded when:
> 
> - the UA does not (yet) support @font-face?*

The @font-face rule would just fail to parse, no?

> - the embedded @font-face font file is Not Found?

Section 4 of http://www.w3.org/TR/css3-webfonts/ covers this in step 4, 
no?  If dereferencing the src doesn't give a font file, then there is no 
match.  Or did you mean the effect on computed values in particular?

> Should a UA stick to the "As specified" Computed Value even for fonts it 
> doesn't actually include and thus wouldn't render? This already applies 
> for lists of fonts without any use of @font-face, but the new embedding 
> of fonts makes this issue more pertinent.

Yes, this is the only reasonable interpretation of the spec and of what 
"computed value" means (as opposed to "used value").

> I guess at the heart of all these questions lies the bigger issue: is it 
> right for Computed Value to be returned "as specified" when the 
> specified value has a nearly-100% guarantee of NOT representing what is 
> actually the computed value as rendered by the UA?

You're confusing "computed value" (which is a construct primarily of use 
in handling properties with "inherit" values or that inherit by default) 
and "used value" (which tells you what really happened).  I'd think that 
you'd really want to inherit font-family "as specified".  Anything else 
leads to pretty bizarre behavior...

-Boris
Received on Tuesday, 24 March 2009 03:52:43 GMT

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