diff --git a/test/fallback-resolution.c b/test/fallback-resolution.c index b14cc1e91..bf83e312b 100644 --- a/test/fallback-resolution.c +++ b/test/fallback-resolution.c @@ -32,6 +32,7 @@ #include #include #include +#include #ifdef HAVE_UNISTD_H #include @@ -270,6 +271,23 @@ generate_reference (double ppi_x, double ppi_y, const char *filename) cr = cairo_create (surface); cairo_surface_destroy (surface); + /* As we wish to mimic a PDF surface, copy across the default font options + * from the PDF backend. + */ + { + cairo_surface_t *pdf; + cairo_font_options_t *options; + + options = cairo_font_options_create (); + + pdf = cairo_pdf_surface_create ("tmp.pdf", 1, 1); + cairo_surface_get_font_options (pdf, options); + cairo_surface_destroy (pdf); + + cairo_set_font_options (cr, options); + cairo_font_options_destroy (options); + } + #if SET_TOLERANCE cairo_set_tolerance (cr, 3.0); #endif @@ -351,7 +369,7 @@ preamble (cairo_test_context_t *ctx) #if GENERATE_REFERENCE for (n = 0; n < num_ppi; n++) { char *ref_name; - xasprintf (&ref_name, "fallback-resolution.ppi%gx%g.ref.png", + xasprintf (&ref_name, "reference/fallback-resolution.ppi%gx%g.ref.png", ppi[n].x, ppi[n].y); generate_reference (ppi[n].x, ppi[n].y, ref_name); free (ref_name); diff --git a/test/reference/fallback-resolution.ppi144x144.ref.png b/test/reference/fallback-resolution.ppi144x144.ref.png index cbe93ca67..fd0666a42 100644 Binary files a/test/reference/fallback-resolution.ppi144x144.ref.png and b/test/reference/fallback-resolution.ppi144x144.ref.png differ diff --git a/test/reference/fallback-resolution.ppi144x72.ref.png b/test/reference/fallback-resolution.ppi144x72.ref.png index 4c16ca14a..ec6685cc0 100644 Binary files a/test/reference/fallback-resolution.ppi144x72.ref.png and b/test/reference/fallback-resolution.ppi144x72.ref.png differ diff --git a/test/reference/fallback-resolution.ppi288x72.ref.png b/test/reference/fallback-resolution.ppi288x72.ref.png index b21358767..969c04f17 100644 Binary files a/test/reference/fallback-resolution.ppi288x72.ref.png and b/test/reference/fallback-resolution.ppi288x72.ref.png differ diff --git a/test/reference/fallback-resolution.ppi576x72.ref.png b/test/reference/fallback-resolution.ppi576x72.ref.png index b63e66e28..bbab0653e 100644 Binary files a/test/reference/fallback-resolution.ppi576x72.ref.png and b/test/reference/fallback-resolution.ppi576x72.ref.png differ diff --git a/test/reference/fallback-resolution.ppi72x144.ref.png b/test/reference/fallback-resolution.ppi72x144.ref.png index 9d232c071..3f5562967 100644 Binary files a/test/reference/fallback-resolution.ppi72x144.ref.png and b/test/reference/fallback-resolution.ppi72x144.ref.png differ diff --git a/test/reference/fallback-resolution.ppi72x288.ref.png b/test/reference/fallback-resolution.ppi72x288.ref.png index fdbc38202..9d50b64d6 100644 Binary files a/test/reference/fallback-resolution.ppi72x288.ref.png and b/test/reference/fallback-resolution.ppi72x288.ref.png differ diff --git a/test/reference/fallback-resolution.ppi72x576.ref.png b/test/reference/fallback-resolution.ppi72x576.ref.png index c943f0834..7b4d62e19 100644 Binary files a/test/reference/fallback-resolution.ppi72x576.ref.png and b/test/reference/fallback-resolution.ppi72x576.ref.png differ diff --git a/test/reference/fallback-resolution.ppi72x72.ref.png b/test/reference/fallback-resolution.ppi72x72.ref.png index 5d1df2cc1..690c0af2d 100644 Binary files a/test/reference/fallback-resolution.ppi72x72.ref.png and b/test/reference/fallback-resolution.ppi72x72.ref.png differ