W3C home > Mailing lists > Public > public-css-testsuite@w3.org > March 2012

Re: Test harness and test suite assumptions wrt anti-aliasing (font smoothing, clearType)

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Sat, 17 Mar 2012 02:30:12 -0400
Message-ID: <62eb0c887aec99c1b297638c77618f2c.squirrel@ed-sh-cp3.entirelydigital.com>
To: "John Daggett" <jdaggett@mozilla.com>
Cc: "Public CSS test suite mailing list" <public-css-testsuite@w3.org>

Le Sam 17 mars 2012 0:22, John Daggett a écrit :
> Gérard Talbot wrote:
>> The test suite assumpions
>> http://test.csswg.org/suites/css2.1/nightly-unstable/#uncommon
>> and the test harness entrance page
>> http://test.csswg.org/harness/ [1]
>> should specifically invite testers to disable anti-aliasing (font
>> smoothing, ClearType) in their operating system because this can and
>> will affect rendered layout. I believe the ideal text of such
>> recommendation would describe how to disable anti-aliasing in
>> Windows, Mac and Linux.
> No, I strongly disagree with this.  First, you're confusing a number
> of separate but related issues.

I may not understand as well as you do subpixel positioning.. but I have
read the wiki pages on anti-aliasing, sub-pixel resolution, subpixel
rendering trying to understand as much as I can out of these.

 Browsers typically render text with
> subpixel antialiasing *and* with subpixel or integer-pixel
> positioning. All browsers support subpixel anti-aliasing but only
> Firefox/IE9 use subpixel positioning, Webkit/Opera use integer-pixel
> positioning. Line metrics may be calculated with precise or rounded
> metrics and where exactly the rounding occurs is not defined
> precisely.  Under Windows, hinting will also affect these metrics for a
> given font size, depending on the font.  All of these factors will
> affect the
> precise placement.  Only disabling subpixel anti-aliasing will still
> leave you with other factors that affect placement.

Of course it will leave the other factors that affect placement. Why
should we want to have many factors affect precise placement of text
when automated checking of tests start? Why not eliminate sources of
differential rendering, especially if such sources are entirely outside
the realm of CSS spec?

I create reftests and there are quite a lot razor sharp tests in the
test suite, you know.


John, please examine closely these 2 webpages:



10 min. ago, I had anti-aliasing turn off (under Linux KDE 4.8.1) and
both these webpages looked perfectly identical in Firefox 11.0.

Then I re-enabled anti-aliasing, rebooted and reloaded these 2 webpages
and, this time, there is a 1px height of difference for the black
stripe. Clearly noticeable.

Btw, I had that precise exact problem on december 3rd 2011 and sent
emails about this troublesome issue.

> The other reason for not doing this is that it's not an environment
> users typically use and so you won't be testing the main codepath that
> browsers use, you'll be using a modified non-subpixel-AA path.

It's certainly a valid reason... but machines, softwares doing automated
checking of tests with reftests won't be understanding: it's identical
or not.

> Basically, CSS does not specify pixel-precise layout, so we can't
> always test assuming that it does.  But reftests are useful for just
> this reason, you can write tests such that "A and B render the same"
> does not rely on the precise alignment used, only that the two should
> render identically using either subpixel AA or not.

Please reproduce my experiment with the 2 urls.

regards, Gérard
Contributions to the CSS 2.1 test suite:

CSS 2.1 Test suite RC6, March 23rd 2011:

CSS 2.1 test suite harness:

Contributing to to CSS 2.1 test suite:
Received on Saturday, 17 March 2012 06:30:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:18 UTC