- From: L. David Baron <dbaron@dbaron.org>
- Date: Wed, 23 Mar 2005 13:09:44 -0800
- To: www-style@w3.org
- Message-ID: <20050323210944.GA11409@ridley.dbaron.org>
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, http://www.w3.org/TR/2004/CR-CSS21-20040225/fonts.html#font-family-prop says: Computed value: as specified and http://www.w3.org/TR/2004/CR-CSS21-20040225/fonts.html#algorithm 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 character). -David -- L. David Baron <URL: http://dbaron.org/ > Technical Lead, Layout & CSS, The Mozilla Foundation
Received on Wednesday, 23 March 2005 21:10:22 UTC