[cairo] rounding glyph positions

Uli Schlachter psychon at znc.in
Fri Aug 2 14:21:33 UTC 2019


Hi,

On 01.08.19 23:00, Matthias Clasen wrote:
> But I'd still like to understand what the rationale is for a) this being
> separate from hint metrics
> and b) this not being settable.

the rationale basically is "the test suite's reference images are
correct by definition, so how can we make cairo generate this output"?
According to "git blame", I introduced this option back when I still
tried to sort out the mess that is the test suite:

commit cee1dadc66107e1cc6bcac7718e0b67969141876
Author: Uli Schlachter <psychon at znc.in>
Date:   Thu Oct 21 22:14:57 2010 +0200

    Other backends: Set round_glyph_positions to OFF

    This sets CAIRO_ROUND_GLYPH_POS_OFF in all surface backends that
didn't use
    CAIRO_ROUND_GLYPH_POS_ON.

    Signed-off-by: Uli Schlachter <psychon at znc.in>

commit d24e9881de7b392cfce1d82c9861553ece558aaf
Author: Uli Schlachter <psychon at znc.in>
Date:   Thu Oct 21 14:03:38 2010 +0200

    raster backends: Set round_glpyh_positions to ON

    This fixes "text-rotate" in the test suite for the image backend and
    "overlapping-glyphs" for the xcb backend.

    Signed-off-by: Uli Schlachter <psychon at znc.in>

commit b514863a0ee8e6c4f0a994f6f5e7db18ce290e79
Author: Uli Schlachter <psychon at znc.in>
Date:   Thu Oct 21 13:59:25 2010 +0200

    Actually implement round_glpyh_positions

    The previous commit only added this option and made sure it gets
set, but it
    didn't actually have any effect. This commit now implements this option.

    Signed-off-by: Uli Schlachter <psychon at znc.in>

commit 6bfe71124b56b496056b77b3b51eef4d656ccf54
Author: Uli Schlachter <psychon at znc.in>
Date:   Thu Oct 21 13:52:33 2010 +0200

    font options: Add private round_glpyh_positions field

    Signed-off-by: Uli Schlachter <psychon at znc.in>

Looking at the git history for the reference images... I am not quite
sure where it came from. Back in 2010, I was assuming that the reference
images are correct, I guess. Since then, I saw others fixing test
failures by just declaring the current cairo output as the reference. I
never tried to do that since I do not what each test actually really
tests and if the difference that makes the test fail is a bug or not.

What to do with this information... well, I do not know. If you want,
you can revert the above four commits, but I would hope that this does
not regress the test suite (= some higher power has to declare that the
current reference images are wrong and the new output is correct and
should be the new reference image).

Hope this helps at least a bit,
Uli
-- 
Who needs a ~/.signature anyway?


More information about the cairo mailing list