[cairo-bugs] [Bug 10531] cairo nquartz backend floating point
precision issues
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Apr 5 15:23:44 PDT 2007
http://bugs.freedesktop.org/show_bug.cgi?id=10531
------- Comment #2 from Brian.Ewins at gmail.com 2007-04-05 15:23 PST -------
Good point Carl. And after 2048 pixels-width of Lorem Ipsum, I still couldn't
reproduce the bug.
_cairo_atsui_font_text_to_glyphs uses the glyph positions from ATSUI pretty
directly, but that isn't the case with Gecko - see eg
http://lxr.mozilla.org/seamonkey/source/gfx/thebes/src/gfxFont.cpp#191
> // Multiplying by the reciprocal may introduce tiny error here,
> // but we assume cairo is going to round coordinates at some stage
> // and this is faster
> glyph->x = ToDeviceUnits(x, devUnitsPerAppUnit);
So, to test this I made _cairo_atsui_font_text_to_glyphs increase all glyph
advances by 0.0001 pixels. This reproduces the bug - one glyph over the 2048
pixels gets enough cumulative shift to have a visible effect, and the patch
fixes it.
I could implement this as a test rather than a hack (by explicitly
mis-positioning a few hundred glyphs, then calling show_glyphs). I'm not sure
how worthwhile that is.
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the cairo-bugs
mailing list