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:


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:


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:


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


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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:49 UTC