W3C home > Mailing lists > Public > www-style@w3.org > August 2010

font family name tests

From: John Daggett <jdaggett@mozilla.com>
Date: Thu, 5 Aug 2010 19:00:41 -0700 (PDT)
To: www-style <www-style@w3.org>
Cc: www-font <www-font@w3.org>
Message-ID: <1775848488.199667.1281060041460.JavaMail.root@cm-mail03.mozilla.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:30 GMT