On Sun, Jul 10, 2011 at 2:52 AM, Jukka K. Korpela <[email protected]> wrote:
> 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 &#x2300;</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".
>

Ya I seem to have misunderstood what I read.  Your example proves
that.  I thought I once read that the fallback only occurs if the
entire font is missing, but I either misunderstood or I read something
that was targeted at IE.

The funny thing is that I don't ever use IE except as the final step
in testing a site.

Thank you.

--
Ghodmode
http://www.ghodmode.com/blog
______________________________________________________________________
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/

Reply via email to