2011-07-09 21:19, Ghodmode wrote:
> font-family: 'englishfont', 'chinesefont', Arial, sans-serif;
[...]
This fallback does not work for *single characters* in the font.
That depends on the browser.
Nope, that's consistent across IE, Firefox, Chrome, Safari, and Opera.
To see that the fallback works for single characters, do this simple test:
<p style="font-family: Courier, Arial Unicode MS">Foobar ⌀</p>
You will see "Foobar" in Courier but the diameter sign in Arial Unicode
MS. To see this even clearer, download and install the LastResort font
(which shows generic symbols for characters) and put it after Courier in
the list.
Your font-family declaration tells the browser to use "chinesefont" if
"englishfont" is not available/can not be loaded *as a whole*.
No, it means that 'englishfont', if available, will be used for
characters covered by it. For other characters, 'chinesefont', if
available, is used, if it contains them. And so on.
IE tends to get this wrong at times.
Nope, that's exactly how it works in the specification and it's also
consistent across all browsers.
spec: http://www.w3.org/TR/CSS21/fonts.html#propdef-font-family
That's a general description of the font-family and does not say how the
font list is really used. That information can be found at
http://www.w3.org/TR/CSS21/fonts.html#algorithm
Note the words "At a given element and for each character in that
element, the UA assembles the font properties".
--
Yucca, http://www.cs.tut.fi/~jkorpela/
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/