[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cairo
Subject:    Re: [cairo] rounding glyph positions
From:       Matthias Clasen <matthias.clasen () gmail ! com>
Date:       2019-08-02 15:24:18
Message-ID: CAFwd_vBQ6q-DZCmz-ezXTiiasm1aHtsPZcEcK8kg_tO1JyY_Ug () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Fri, Aug 2, 2019 at 10:21 AM Uli Schlachter <psychon@znc.in> 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 <psychon@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@znc.in>
>
> commit d24e9881de7b392cfce1d82c9861553ece558aaf
> Author: Uli Schlachter <psychon@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@znc.in>
>
> commit b514863a0ee8e6c4f0a994f6f5e7db18ce290e79
> Author: Uli Schlachter <psychon@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@znc.in>
>
> commit 6bfe71124b56b496056b77b3b51eef4d656ccf54
> Author: Uli Schlachter <psychon@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@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).
>
>
>
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.

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Fri, Aug 2, 2019 at 10:21 AM Uli Schlachter &lt;<a \
href="mailto:psychon@znc.in">psychon@znc.in</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="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 still<br>
tried to sort out the mess that is the test suite:<br>
<br>
commit cee1dadc66107e1cc6bcac7718e0b67969141876<br>
Author: Uli Schlachter &lt;<a href="mailto:psychon@znc.in" \
                target="_blank">psychon@znc.in</a>&gt;<br>
Date:     Thu Oct 21 22:14:57 2010 +0200<br>
<br>
      Other backends: Set round_glyph_positions to OFF<br>
<br>
      This sets CAIRO_ROUND_GLYPH_POS_OFF in all surface backends that<br>
didn&#39;t use<br>
      CAIRO_ROUND_GLYPH_POS_ON.<br>
<br>
      Signed-off-by: Uli Schlachter &lt;<a href="mailto:psychon@znc.in" \
target="_blank">psychon@znc.in</a>&gt;<br> <br>
commit d24e9881de7b392cfce1d82c9861553ece558aaf<br>
Author: Uli Schlachter &lt;<a href="mailto:psychon@znc.in" \
                target="_blank">psychon@znc.in</a>&gt;<br>
Date:     Thu Oct 21 14:03:38 2010 +0200<br>
<br>
      raster backends: Set round_glpyh_positions to ON<br>
<br>
      This fixes &quot;text-rotate&quot; in the test suite for the image backend \
and<br>  &quot;overlapping-glyphs&quot; for the xcb backend.<br>
<br>
      Signed-off-by: Uli Schlachter &lt;<a href="mailto:psychon@znc.in" \
target="_blank">psychon@znc.in</a>&gt;<br> <br>
commit b514863a0ee8e6c4f0a994f6f5e7db18ce290e79<br>
Author: Uli Schlachter &lt;<a href="mailto:psychon@znc.in" \
                target="_blank">psychon@znc.in</a>&gt;<br>
Date:     Thu Oct 21 13:59:25 2010 +0200<br>
<br>
      Actually implement round_glpyh_positions<br>
<br>
      The previous commit only added this option and made sure it gets<br>
set, but it<br>
      didn&#39;t actually have any effect. This commit now implements this \
option.<br> <br>
      Signed-off-by: Uli Schlachter &lt;<a href="mailto:psychon@znc.in" \
target="_blank">psychon@znc.in</a>&gt;<br> <br>
commit 6bfe71124b56b496056b77b3b51eef4d656ccf54<br>
Author: Uli Schlachter &lt;<a href="mailto:psychon@znc.in" \
                target="_blank">psychon@znc.in</a>&gt;<br>
Date:     Thu Oct 21 13:52:33 2010 +0200<br>
<br>
      font options: Add private round_glpyh_positions field<br>
<br>
      Signed-off-by: Uli Schlachter &lt;<a href="mailto:psychon@znc.in" \
target="_blank">psychon@znc.in</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 (= some higher power has to declare that the<br>
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 hint-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 glyph positions \
either.<br></div></div></div>


[Attachment #6 (text/plain)]

-- 
cairo mailing list
cairo@cairographics.org
https://lists.cairographics.org/mailman/listinfo/cairo

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic