Re: [CSS21] font-family: inheritance and missing fonts

On Wednesday 2005-03-23 21:51 +0100, Christian Roth wrote:
> Given this stylesheet:
>   p    { font-family: Courier; }
>   span {	font-family: Foo; }
> with the font "Courier" existing on the system and the font "Foo" not
> existing, in which font should "Text." render in this XHTML code:
> 		<p><span>Text.</span></p>
> ?
> The spec obviously leaves room for interpretation.

I don't see how.

> 2. the declaration-block for span effectively becomes empty since "Foo"
> is an invalid value for the property font-family on this system since the
> font does not exist, and therefore "Courier" is inherited from <p>.

I see no support for this idea in the spec.  It's clearly valid
according to the definition of the property, and nothing says it's not.

There are also other things that suggest that this was the intent of the
spec.  For example,
  Computed value: as specified
defines a font matching algorithm based on a computed value of
'font-family' that contains fonts that may not be present.

It's also worth noting that the presence of fonts is not a simple as a
font being present or absent, since font fallback is per-character, not
per-element (when a font does not have a glyph for a particular


L. David Baron                                <URL: >
          Technical Lead, Layout & CSS, The Mozilla Foundation

Received on Wednesday, 23 March 2005 21:10:22 UTC