Closed Bug 590101 Opened 12 years ago Closed 8 years ago

reftest failures using harfbuzz font backend on windows

Categories

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

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0
Tracking Status
blocking2.0 --- -

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(2 files)

When using the harfbuzz font backend on windows, there are a few reftests that fail:

(1) text/wordwrap-03 - Fails because the test relies on the use of combining diacritics but does not guarantee that the (monospace) font chosen actually supports them, so results depend on how the font shaping engine handles this.

(2) font-features tests (several failures) - (a) The use of ZWNJ in the turkish-ref file disturbs default line spacing, because fallback chooses a font with different line metrics. (b) When DWrite is enabled, we also get a one-pixel discrepancy in gray levels where the glyphs "f" and "i" touch at a text-run boundary.
Blocks: 569531
blocking2.0: --- → ?
OS: Mac OS X → Windows 7
This fixes the text/wordwrap-03 reftest for windows+harfbuzz by ensuring that we use a font with adequate diacritic-positioning support (Consolas on Win7; DejaVu Sans Mono otherwise, via @font-face).
Assignee: nobody → jfkthame
Attachment #468665 - Flags: review?(jdaggett)
This fixes the font-features reftests for windows+harfbuzz by (a) setting a larger line-height, so that font fallback on the ZWNJ character doesn't perturb line spacing; and (b) enlarging the font to avoid a discrepancy that occurs under DWrite/D2D where the antialiasing of glyphs "f" and "i" in separate text-runs overlap each other by one pixel at the original size.
Attachment #468668 - Flags: review?(jdaggett)
Attachment #468665 - Flags: review?(jdaggett) → review+
Attachment #468668 - Flags: review?(jdaggett) → review+
With gfx.font_rendering.harfbuzz.level=1, all tests now pass on tryserver under Win2003.

On Win7, there are three remaining failures:

REFTEST TEST-UNEXPECTED-FAIL | file:///c:/talos-slave/tryserver_win7_test-reftest/build/reftest/tests/layout/reftests/bidi/267459-1.html |
REFTEST TEST-UNEXPECTED-FAIL | file:///c:/talos-slave/tryserver_win7_test-reftest/build/reftest/tests/layout/reftests/bidi/305643-1.html |
REFTEST TEST-UNEXPECTED-FAIL | file:///c:/talos-slave/tryserver_win7_test-reftest/build/reftest/tests/layout/reftests/svg/text-gradient-02.svg |

The first two are minor (subpixel) glyph rendering discrepancies between text drawn LTR and RTL; the third is imperceptible to my eyes but is apparently a difference in a gradient.
Pushed a followup to mark the font-features-turkish tests as random on windows due to tinderbox orange:
http://hg.mozilla.org/mozilla-central/rev/e3fe95511fc2

I think this depends on the windows/uniscribe version, but the test is basically meaningless until we flip on the harfbuzz pref. At that point a number of the font-features-* tests will become useful there as well.
Resolving this, as there's nothing left to do here; we've turned on harfbuzz and reftests are passing happily on all our Windows platforms.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0
You need to log in before you can comment on or make changes to this bug.