font family name tests

I wrote some tests for inclusion in the CSS 2.1 test suite that point
out several problems with font family name mapping across browsers. 
Here's a simple version of the testcase, based on the Arial font family:

  http://people.mozilla.org/~jdaggett/tests/arialvariations.html

The lines in red should always render in Georgia, not Arial.

For the Arial font family, the only name that should ever map in a
font-family list is "Arial" (matched case-insensitively).  Names like
"Arial Bold" or "Arial-BoldMT" should not match, those are the names of
specific faces.  In CSS, a combination of font properties is used
instead to select a bold face:

  body { font-family: Arial; font-weight: bold; }

The test suite tests for this are in the fonts section, in reftest format:

  http://test.csswg.org/suites/css2.1/20100701/html4/chapter-15.html

See font-family-name-013.htm, font-family-name-014.htm, and
font-family-name-015.htm.  The first testcase will fail for most
browsers on Windows, the second case will fail in Webkit browsers on OSX
and the last case will fail for most browsers when running under 
Japanese Windows.

Note: these tests require the fonts in the package below to be installed:

  http://www.w3.org/Style/CSS/Test/Fonts/CSSTest/CSSTest.zip

These tests only pass if the word "PASS" appears.

Regards,

John Daggett

Received on Friday, 6 August 2010 02:01:15 UTC