<div dir="ltr">On Fri, Jul 17, 2015 at 9:16 PM, Bryce Harrington <span dir="ltr"><<a href="mailto:bryce@osg.samsung.com" target="_blank">bryce@osg.samsung.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, Jul 11, 2015 at 01:01:22AM +0200, Andrea Canciani wrote:<br>
> On Sat, Jul 11, 2015 at 12:17 AM, Bryce Harrington <<a href="mailto:bryce@osg.samsung.com">bryce@osg.samsung.com</a>><br>
<span class="">> wrote:<br>
><br>
> > On Wed, Jul 01, 2015 at 02:50:38PM +0200, Andrea Canciani wrote:<br>
</span>> > > On Wed, Jul 1, 2015 at 12:00 PM, Andrea Canciani <<a href="mailto:ranma42@gmail.com">ranma42@gmail.com</a>><br>
<span class="">> > wrote:<br>
> > ><br>
> > > > This makes the results of the test suite more stable across different<br>
> > > > environments, because it does not rely anymore on<br>
> > > > CAIRO_FONT_FAMILY_DEFAULT (which on Windows is "Arial", on Mac<br>
> > > > "Helvetica").<br>
> > > ><br>
> > > > This change should not affect Linux environments, assuming that the<br>
> > > > default font is already set to "DejaVu Sans".<br>
> > > ><br>
> > ><br>
> > > This commit is the first of a series which seems inconvenient to send by<br>
> > > e-mail, because it updates a bunch of reference images.<br>
> > > I pushed a branch for it here:<br>
> > > <a href="http://cgit.freedesktop.org/~ranma42/cairo/log/?h=quartz-update-ref" rel="noreferrer" target="_blank">http://cgit.freedesktop.org/~ranma42/cairo/log/?h=quartz-update-ref</a><br>
</span><span class="">> > > Under the assumption that e7acf4b6dc6666c2a2c54fb08e9ad6f01a1d415f is<br>
> > > reverted,<br>
> ><br>
> > Why is this branch depending on that assumption?<br>
><br>
><br>
> The branch itself does not require that commit to be reverted (and it does<br>
> not include the revert).<br>
> The assumption is only required in order to get no failures in the tests.<br>
> This comes from the fact that:<br>
>  1. the branch was started before e7acf4b6dc6666c2a2c54fb08e9ad6f01a1d415f<br>
>  2. e7acf4b6dc6666c2a2c54fb08e9ad6f01a1d415f causes several failures in<br>
> image (as well as quartz and other backends).<br>
><br>
><br>
> > And can you provide a pointer to where this got discussed?<br>
> ><br>
><br>
> The patch/revert is being discussed here:<br>
> <a href="https://bugs.freedesktop.org/show_bug.cgi?id=88663" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=88663</a><br>
<br>
</span>Thanks, looks like there is consensus there, so I've reverted this patch.<br></blockquote><div><br></div><div>I tested the patch on top of master (6951fb4238706522d357fd25236b17492baea1b0) in a Linux environment (ArchLinux running in a VM) and it does not seem to cause regressions in the test suite.<br></div><div>If nobody complains, I'll push it and the other quartz-specific patches by the end of the week.<br><br></div><div>Andrea<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Bryce<br>
<div><div class="h5"><br>
> Andrea<br>
><br>
><br>
> > > this branch fixes some minor glitches in the quartz backend and,<br>
> > > much more interestingly, it updates the reference images, so that<br>
> > > regressions (like that I introduced in the quartz font backend right<br>
> > before<br>
> > > 1.14) are easily spotted.<br>
> > ><br>
> > > Andrea<br>
> > ><br>
> > ><br>
> > > > ---<br>
> > > >  test/cairo-test.c        | 4 ++++<br>
> > > >  test/clip-zero.c         | 2 +-<br>
> > > >  test/pthread-show-text.c | 4 ++--<br>
> > > >  test/show-glyphs-many.c  | 2 +-<br>
> > > >  test/text-cache-crash.c  | 4 ++--<br>
> > > >  test/user-font-proxy.c   | 2 +-<br>
> > > >  6 files changed, 11 insertions(+), 7 deletions(-)<br>
> > > ><br>
> > > > diff --git a/test/cairo-test.c b/test/cairo-test.c<br>
> > > > index a351b01..6f8cb79 100644<br>
> > > > --- a/test/cairo-test.c<br>
> > > > +++ b/test/cairo-test.c<br>
> > > > @@ -915,6 +915,10 @@ REPEAT:<br>
> > > >      cairo_paint (cr);<br>
> > > >      cairo_restore (cr);<br>
> > > ><br>
> > > > +    cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans",<br>
> > > > +                           CAIRO_FONT_SLANT_NORMAL,<br>
> > > > +                           CAIRO_FONT_WEIGHT_NORMAL);<br>
> > > > +<br>
> > > >      /* Set all components of font_options to avoid backend differences<br>
> > > >       * and reduce number of needed reference images. */<br>
> > > >      font_options = cairo_font_options_create ();<br>
> > > > diff --git a/test/clip-zero.c b/test/clip-zero.c<br>
> > > > index 5afd1b5..302b2b1 100644<br>
> > > > --- a/test/clip-zero.c<br>
> > > > +++ b/test/clip-zero.c<br>
> > > > @@ -46,7 +46,7 @@ draw (cairo_t *cr, int width, int height)<br>
> > > >      cairo_stroke_preserve (cr);<br>
> > > >      cairo_paint (cr);<br>
> > > ><br>
> > > > -    cairo_select_font_face (cr, "sans", CAIRO_FONT_SLANT_NORMAL,<br>
> > > > CAIRO_FONT_WEIGHT_NORMAL);<br>
> > > > +    cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans",<br>
> > > > CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);<br>
> > > >      cairo_show_text (cr, "ABC");<br>
> > > ><br>
> > > >      cairo_mask (cr, cairo_get_source (cr));<br>
> > > > diff --git a/test/pthread-show-text.c b/test/pthread-show-text.c<br>
> > > > index 0e070b7..0f076cb 100644<br>
> > > > --- a/test/pthread-show-text.c<br>
> > > > +++ b/test/pthread-show-text.c<br>
> > > > @@ -63,7 +63,7 @@ draw_thread (void *arg)<br>
> > > >      cairo_paint (cr);<br>
> > > >      cairo_set_source_rgb (cr, 0, 0, 0);<br>
> > > ><br>
> > > > -    cairo_select_font_face (cr, "serif",<br>
> > > > +    cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Serif",<br>
> > > >                             CAIRO_FONT_SLANT_NORMAL,<br>
> > > >                             CAIRO_FONT_WEIGHT_NORMAL);<br>
> > > >      cairo_set_font_size (cr, NUM_ITERATIONS);<br>
> > > > @@ -74,7 +74,7 @@ draw_thread (void *arg)<br>
> > > >      for (i = 0; i < NUM_ITERATIONS; i++) {<br>
> > > >         char buf[2];<br>
> > > ><br>
> > > > -        cairo_select_font_face (cr, "serif",<br>
> > > > +       cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Serif",<br>
> > > >                                 CAIRO_FONT_SLANT_NORMAL,<br>
> > > >                                 CAIRO_FONT_WEIGHT_NORMAL);<br>
> > > >         cairo_set_font_size (cr, i);<br>
> > > > diff --git a/test/show-glyphs-many.c b/test/show-glyphs-many.c<br>
> > > > index f689fe0..e16282c 100644<br>
> > > > --- a/test/show-glyphs-many.c<br>
> > > > +++ b/test/show-glyphs-many.c<br>
> > > > @@ -126,7 +126,7 @@ draw (cairo_t *cr, int width, int height)<br>
> > > >      cairo_set_source_rgb (cr, 1, 1, 1);<br>
> > > >      cairo_paint (cr);<br>
> > > ><br>
> > > > -    cairo_select_font_face (cr, "Sans",<br>
> > > > +    cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans",<br>
> > > >                             CAIRO_FONT_SLANT_NORMAL,<br>
> > > >                             CAIRO_FONT_WEIGHT_NORMAL);<br>
> > > >      cairo_set_font_size (cr, TEXT_SIZE);<br>
> > > > diff --git a/test/text-cache-crash.c b/test/text-cache-crash.c<br>
> > > > index 4786af4..27fe8cb 100644<br>
> > > > --- a/test/text-cache-crash.c<br>
> > > > +++ b/test/text-cache-crash.c<br>
> > > > @@ -66,11 +66,11 @@ static cairo_test_status_t<br>
> > > >  draw (cairo_t *cr, int width, int height)<br>
> > > >  {<br>
> > > >      /* Once there was a bug that choked when selecting the same font<br>
> > > > twice. */<br>
> > > > -    cairo_select_font_face (cr, "sans",<br>
> > > > +    cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans",<br>
> > > >                             CAIRO_FONT_SLANT_NORMAL,<br>
> > > > CAIRO_FONT_WEIGHT_BOLD);<br>
> > > >      cairo_set_font_size (cr, 40.0);<br>
> > > ><br>
> > > > -    cairo_select_font_face (cr, "sans",<br>
> > > > +    cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans",<br>
> > > >                             CAIRO_FONT_SLANT_NORMAL,<br>
> > > > CAIRO_FONT_WEIGHT_BOLD);<br>
> > > >      cairo_set_font_size (cr, 40.0);<br>
> > > >      cairo_move_to (cr, 10, 50);<br>
> > > > diff --git a/test/user-font-proxy.c b/test/user-font-proxy.c<br>
> > > > index 6a39d8e..e4063f0 100644<br>
> > > > --- a/test/user-font-proxy.c<br>
> > > > +++ b/test/user-font-proxy.c<br>
> > > > @@ -127,7 +127,7 @@ _user_font_face_create (cairo_font_face_t **out)<br>
> > > >      /* This also happens to be default font face on cairo_t, so does<br>
> > > >       * not make much sense here.  For demonstration only.<br>
> > > >       */<br>
> > > > -    fallback_font_face = cairo_toy_font_face_create ("",<br>
> > > > +    fallback_font_face = cairo_toy_font_face_create<br>
> > > > (CAIRO_TEST_FONT_FAMILY " Sans",<br>
> > > ><br>
> > > >  CAIRO_FONT_SLANT_NORMAL,<br>
> > > ><br>
> > > >  CAIRO_FONT_WEIGHT_NORMAL);<br>
> > > ><br>
> > > > --<br>
> > > > 2.3.2 (Apple Git-55)<br>
> > > ><br>
> > > ><br>
> ><br>
> > > --<br>
> > > cairo mailing list<br>
</div></div>> > > <a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
> > > <a href="http://lists.cairographics.org/mailman/listinfo/cairo" rel="noreferrer" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br>
> ><br>
> ><br>
</blockquote></div><br></div></div>