Layout does not align text to pixel boundaries, so, with font drawing backends that snap glyph positions to pixels (ft, win32 [gdi] - any others?), it is important that inter-glyph spacing within words is always an integer number of pixels. This ensures that the drawing backend snaps all of the word's glyphs in the same direction and so inter-glyph spacing remains the same. With harfbuzz shaping enabled, the inter-glyph spacing is not always integer, which results in sometimes adjacent glyphs getting pixel-snapped in opposite directions, changing the inter-glyph spacing by almost +/- 1 pixel. I suspect the non-integer spacing is coming from the kerning.
Created attachment 487492 [details] testcase This testcase needs DejaVu Sans installed. Expected results: "burn fox" at all three text positions. Actual results: At one text position, it looks like "bum fox". Also the "ox" spacing is too close on the first line.
The bug already exists on MS XP (and, I assume, other systems using win32/GDI). This needs to be resolved for bug 569770 because DejaVu Sans is the most commonly used font on Linux systems and is the UI font on most Linux systems.
blocking2.0: --- → ?
It would probably usually be enough to just touch up the kerning adjustments but it probably makes more sense to do the rounding on the final hb-calculated advance in gfxHarfBuzzShaper::SetGlyphsFromRun (for font-backend/surface combinations that snap to pixels). http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxHarfBuzzShaper.cpp#1012 That way plain glyph metrics (for unhinted fonts) would not need rounding until after kerning is applied, and I guess there could also be other non-integer adjustments applied by the shaper.
Looks like the same bug, thanks.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 605043
You need to log in before you can comment on or make changes to this bug.