<div dir="ltr"><div><div><div><div>On Wed, Jul 1, 2015 at 12:00 PM, Andrea Canciani <span dir="ltr"><<a href="mailto:ranma42@gmail.com" target="_blank">ranma42@gmail.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">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></blockquote><div><br><div><div>This commit is the first of a series which seems inconvenient to send by e-mail, because it updates a bunch of reference images.<br></div>I pushed a branch for it here: <a href="http://cgit.freedesktop.org/~ranma42/cairo/log/?h=quartz-update-ref">http://cgit.freedesktop.org/~ranma42/cairo/log/?h=quartz-update-ref</a><br></div>Under
 the assumption that e7acf4b6dc6666c2a2c54fb08e9ad6f01a1d415f is 
reverted, this branch fixes some minor glitches in the quartz backend 
and, much more interestingly, it updates the reference images, so that 
regressions (like that I introduced in the quartz font backend right 
before 1.14) are easily spotted.<br><div><br></div><div>Andrea<br></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>
 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, CAIRO_FONT_WEIGHT_NORMAL);<br>
+    cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", 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 twice. */<br>
-    cairo_select_font_face (cr, "sans",<br>
+    cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans",<br>
                            CAIRO_FONT_SLANT_NORMAL, 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, 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 (CAIRO_TEST_FONT_FAMILY " Sans",<br>
                                                     CAIRO_FONT_SLANT_NORMAL,<br>
                                                     CAIRO_FONT_WEIGHT_NORMAL);<br>
<span class=""><font color="#888888"><br>
--<br>
2.3.2 (Apple Git-55)<br>
<br>
</font></span></blockquote></div><br></div></div></div></div></div></div>