Re: rounding glyph positions

Matthias Clasen <[email protected]> Fri, 2 Aug 2019 11:24:18 -0400
Newsgroups gmane.comp.lib.cairo
Message-ID <CAFwd_vBQ6q-DZCmz-ezXTiiasm1aHtsPZcEcK8kg_tO1JyY_Ug@mail.gmail.com>
--===============1924940339==
Content-Type: multipart/alternative; boundary="0000000000005eace1058f23f47c"

--0000000000005eace1058f23f47c
Content-Type: text/plain; charset="UTF-8"

On Fri, Aug 2, 2019 at 10:21 AM Uli Schlachter <[email protected]> wrote:

> 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 <[email protected]>
> 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 <[email protected]>
>
> commit d24e9881de7b392cfce1d82c9861553ece558aaf
> Author: Uli Schlachter <[email protected]>
> 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 <[email protected]>
>
> commit b514863a0ee8e6c4f0a994f6f5e7db18ce290e79
> Author: Uli Schlachter <[email protected]>
> 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 <[email protected]>
>
> commit 6bfe71124b56b496056b77b3b51eef4d656ccf54
> Author: Uli Schlachter <[email protected]>
> Date:   Thu Oct 21 13:52:33 2010 +0200
>
>     font options: Add private round_glpyh_positions field
>
>     Signed-off-by: Uli Schlachter <[email protected]>
>
> 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).
>
>
>
I might suggest to simply reuse hint-metrics for this purpose, based
on the theory that if you don't want hinted metrics, you probably don't
want rounded glyph positions either.

--0000000000005eace1058f23f47c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Fri, Aug 2, 2019 at 10:21 AM Uli S=
chlachter &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrot=
e:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
On 01.08.19 23:00, Matthias Clasen wrote:<br>
&gt; But I&#39;d still like to understand what the rationale is for a) this=
 being<br>
&gt; separate from hint metrics<br>
&gt; and b) this not being settable.<br>
<br>
the rationale basically is &quot;the test suite&#39;s reference images are<=
br>
correct by definition, so how can we make cairo generate this output&quot;?=
<br>
According to &quot;git blame&quot;, I introduced this option back when I st=
ill<br>
tried to sort out the mess that is the test suite:<br>
<br>
commit cee1dadc66107e1cc6bcac7718e0b67969141876<br>
Author: Uli Schlachter &lt;<a href=3D"mailto:[email protected]" target=3D"_bla=
nk">[email protected]</a>&gt;<br>
Date:=C2=A0 =C2=A0Thu Oct 21 22:14:57 2010 +0200<br>
<br>
=C2=A0 =C2=A0 Other backends: Set round_glyph_positions to OFF<br>
<br>
=C2=A0 =C2=A0 This sets CAIRO_ROUND_GLYPH_POS_OFF in all surface backends t=
hat<br>
didn&#39;t use<br>
=C2=A0 =C2=A0 CAIRO_ROUND_GLYPH_POS_ON.<br>
<br>
=C2=A0 =C2=A0 Signed-off-by: Uli Schlachter &lt;<a href=3D"mailto:psychon@z=
nc.in" target=3D"_blank">[email protected]</a>&gt;<br>
<br>
commit d24e9881de7b392cfce1d82c9861553ece558aaf<br>
Author: Uli Schlachter &lt;<a href=3D"mailto:[email protected]" target=3D"_bla=
nk">[email protected]</a>&gt;<br>
Date:=C2=A0 =C2=A0Thu Oct 21 14:03:38 2010 +0200<br>
<br>
=C2=A0 =C2=A0 raster backends: Set round_glpyh_positions to ON<br>
<br>
=C2=A0 =C2=A0 This fixes &quot;text-rotate&quot; in the test suite for the =
image backend and<br>
=C2=A0 =C2=A0 &quot;overlapping-glyphs&quot; for the xcb backend.<br>
<br>
=C2=A0 =C2=A0 Signed-off-by: Uli Schlachter &lt;<a href=3D"mailto:psychon@z=
nc.in" target=3D"_blank">[email protected]</a>&gt;<br>
<br>
commit b514863a0ee8e6c4f0a994f6f5e7db18ce290e79<br>
Author: Uli Schlachter &lt;<a href=3D"mailto:[email protected]" target=3D"_bla=
nk">[email protected]</a>&gt;<br>
Date:=C2=A0 =C2=A0Thu Oct 21 13:59:25 2010 +0200<br>
<br>
=C2=A0 =C2=A0 Actually implement round_glpyh_positions<br>
<br>
=C2=A0 =C2=A0 The previous commit only added this option and made sure it g=
ets<br>
set, but it<br>
=C2=A0 =C2=A0 didn&#39;t actually have any effect. This commit now implemen=
ts this option.<br>
<br>
=C2=A0 =C2=A0 Signed-off-by: Uli Schlachter &lt;<a href=3D"mailto:psychon@z=
nc.in" target=3D"_blank">[email protected]</a>&gt;<br>
<br>
commit 6bfe71124b56b496056b77b3b51eef4d656ccf54<br>
Author: Uli Schlachter &lt;<a href=3D"mailto:[email protected]" target=3D"_bla=
nk">[email protected]</a>&gt;<br>
Date:=C2=A0 =C2=A0Thu Oct 21 13:52:33 2010 +0200<br>
<br>
=C2=A0 =C2=A0 font options: Add private round_glpyh_positions field<br>
<br>
=C2=A0 =C2=A0 Signed-off-by: Uli Schlachter &lt;<a href=3D"mailto:psychon@z=
nc.in" target=3D"_blank">[email protected]</a>&gt;<br>
<br>
Looking at the git history for the reference images... I am not quite<br>
sure where it came from. Back in 2010, I was assuming that the reference<br=
>
images are correct, I guess. Since then, I saw others fixing test<br>
failures by just declaring the current cairo output as the reference. I<br>
never tried to do that since I do not what each test actually really<br>
tests and if the difference that makes the test fail is a bug or not.<br>
<br>
What to do with this information... well, I do not know. If you want,<br>
you can revert the above four commits, but I would hope that this does<br>
not regress the test suite (=3D some higher power has to declare that the<b=
r>
current reference images are wrong and the new output is correct and<br>
should be the new reference image).<br>
<br><br></blockquote><div><br></div><div>I might suggest to simply reuse hi=
nt-metrics for this purpose, based</div><div>on the theory that if you don&=
#39;t want hinted metrics, you probably don&#39;t</div><div>want rounded gl=
yph positions either.<br></div></div></div>

--0000000000005eace1058f23f47c--

--===============1924940339==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

LS0gCmNhaXJvIG1haWxpbmcgbGlzdApjYWlyb0BjYWlyb2dyYXBoaWNzLm9yZwpodHRwczovL2xp
c3RzLmNhaXJvZ3JhcGhpY3Mub3JnL21haWxtYW4vbGlzdGluZm8vY2Fpcm8=

--===============1924940339==--