Closed Bug 476002 Opened 15 years ago Closed 15 years ago

reftest text/zwnj-01 fails on Windows with ClearType enabled

Categories

(Core :: Layout: Text and Fonts, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: jfkthame, Assigned: jfkthame)

Details

Attachments

(2 files)

A number of the tests in layout/reftests/text fail when ClearType is enabled on Windows. All but one of these problems are resolved by the patch for bug 445087, which fixes a clipping problem when the reftest images are drawn on canvas.

However, zwnj-01.html still fails even with that patch. Examination of the test and reference images shows that they differ at the point where the ZWNJ character occurs in the test file, and the text is broken into separate inline-block spans in the reference.

IMO, the test file is rendering correctly here, and the defect is actually in the reference. The problem is that the ClearType smoothing pixels from the two text fragments (in two separate inline-blocks) actually overlap, and when the two blocks are painted separately we don't precisely reproduce the result of painting all the text in a single run.

The attached image (enlarged screenshot) shows the discrepancy.
I think it's unlikely that we can completely resolve the discrepancy between text drawn all at once and text drawn in separate operations, where overlap of ClearType antialiasing occurs. Perhaps work on improving the alpha channel behavior in Cairo with ClearType may help (see bug 363861), but for the purpose of the ZWNJ test, we should simply ignore the difference.

The patch works around the issue by modifying the reftest to apply an SVG filter (non-white pixels to black) to the test and reference canvases, so that the slight color difference in the ClearType pixels is ignored.
Attachment #359575 - Flags: review?(roc)
Keywords: checkin-needed
Comment on attachment 359575 [details] [diff] [review]
patch to modify zwnj-01 reftest to avoid failure with ClearType
[Checkin: Comment 2+3]


http://hg.mozilla.org/mozilla-central/rev/91d0c4feeff9
Attachment #359575 - Attachment description: patch to modify zwnj-01 reftest to avoid failure with ClearType → patch to modify zwnj-01 reftest to avoid failure with ClearType [Checkin: Comment 2]
Comment on attachment 359575 [details] [diff] [review]
patch to modify zwnj-01 reftest to avoid failure with ClearType
[Checkin: Comment 2+3]

(In reply to comment #2)

Ftr, this was after fixing context for
{
patching file layout/reftests/text/reftest.list
Hunk #1 FAILED at 20
1 out of 1 hunks FAILED
}
Attachment #359575 - Attachment description: patch to modify zwnj-01 reftest to avoid failure with ClearType [Checkin: Comment 2] → patch to modify zwnj-01 reftest to avoid failure with ClearType [Checkin: Comment 2+3]
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Version: unspecified → Trunk
See bug 581081 for an adjustment to this patch.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: