- From: John Daggett <jdaggett@mozilla.com>
- Date: Mon, 12 Dec 2011 18:41:58 -0800 (PST)
- To: tao yu <tao.yu@nokia.com>
- Cc: www-style@w3.org, jonathan@jfkew.plus.com
> I tried "Arial Bold" as "family-name" on Chrome, it works ok to > display the text in Bold. Chrome might be flexible to handle this > case. You are right, "Arial Bold" is a face name, not family name. Webkit browsers have an outstanding bug where they recognize other font identifiers as well as the family name. They should only be recognizing the family name. The main reason for this is that underneath the covers GDI is being used and GDI (as opposed to DirectWrite) allows *both* family name ('Arial') and fullname ('Arial Bold') to be matched. On OSX, fullnames are *not* recognized by Webkit but PostScript names ('Arial-BoldMT') are. You can see a full set of these examples here: http://people.mozilla.org/~jdaggett/tests/arialvariations.html Because of this, Webkit browsers fail these CSS 2.1 test suite tests: Webkit fails on Windows: http://test.csswg.org/suites/css2.1/20110111/html4/font-family-name-013.htm Webkit fails on OSX: http://test.csswg.org/suites/css2.1/20110111/html4/font-family-name-014.htm You should always use a *family* name to match a family and other style attributes to match a specific style/weight/width combination within the family, in this case simply: font-family: Arial; font-weight: bold; This works everywhere, in both old and new browsers. Regards, John Daggett
Received on Tuesday, 13 December 2011 02:42:35 UTC