diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-08 15:27:03 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-08 15:32:39 +0000 |
commit | c0eaaa1680ff95abb1b897cd98266a4ed5ce6287 (patch) | |
tree | 865f05895adb493e9acc8174b95256128a8117c1 /test | |
parent | 1952fec8294b6473cb1c0719d1ef0fb0b864b6b6 (diff) |
test: Refresh the fallback-resolution reference images
Despite copying across the font options from the PDF backend, it still
looks like the image surface is override the glyph placement... Odd.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'test')
-rw-r--r-- | test/fallback-resolution.c | 20 | ||||
-rw-r--r-- | test/reference/fallback-resolution.ppi144x144.ref.png | bin | 8697 -> 8746 bytes | |||
-rw-r--r-- | test/reference/fallback-resolution.ppi144x72.ref.png | bin | 8445 -> 8531 bytes | |||
-rw-r--r-- | test/reference/fallback-resolution.ppi288x72.ref.png | bin | 7166 -> 7203 bytes | |||
-rw-r--r-- | test/reference/fallback-resolution.ppi576x72.ref.png | bin | 6432 -> 6457 bytes | |||
-rw-r--r-- | test/reference/fallback-resolution.ppi72x144.ref.png | bin | 8677 -> 8710 bytes | |||
-rw-r--r-- | test/reference/fallback-resolution.ppi72x288.ref.png | bin | 7231 -> 7224 bytes | |||
-rw-r--r-- | test/reference/fallback-resolution.ppi72x576.ref.png | bin | 6523 -> 6604 bytes | |||
-rw-r--r-- | test/reference/fallback-resolution.ppi72x72.ref.png | bin | 8510 -> 8579 bytes |
9 files changed, 19 insertions, 1 deletions
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 <stdio.h> #include <stdlib.h> #include <cairo.h> +#include <cairo-pdf.h> #ifdef HAVE_UNISTD_H #include <unistd.h> @@ -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 Binary files differindex cbe93ca67..fd0666a42 100644 --- a/test/reference/fallback-resolution.ppi144x144.ref.png +++ b/test/reference/fallback-resolution.ppi144x144.ref.png diff --git a/test/reference/fallback-resolution.ppi144x72.ref.png b/test/reference/fallback-resolution.ppi144x72.ref.png Binary files differindex 4c16ca14a..ec6685cc0 100644 --- a/test/reference/fallback-resolution.ppi144x72.ref.png +++ b/test/reference/fallback-resolution.ppi144x72.ref.png diff --git a/test/reference/fallback-resolution.ppi288x72.ref.png b/test/reference/fallback-resolution.ppi288x72.ref.png Binary files differindex b21358767..969c04f17 100644 --- a/test/reference/fallback-resolution.ppi288x72.ref.png +++ b/test/reference/fallback-resolution.ppi288x72.ref.png diff --git a/test/reference/fallback-resolution.ppi576x72.ref.png b/test/reference/fallback-resolution.ppi576x72.ref.png Binary files differindex b63e66e28..bbab0653e 100644 --- a/test/reference/fallback-resolution.ppi576x72.ref.png +++ b/test/reference/fallback-resolution.ppi576x72.ref.png diff --git a/test/reference/fallback-resolution.ppi72x144.ref.png b/test/reference/fallback-resolution.ppi72x144.ref.png Binary files differindex 9d232c071..3f5562967 100644 --- a/test/reference/fallback-resolution.ppi72x144.ref.png +++ b/test/reference/fallback-resolution.ppi72x144.ref.png diff --git a/test/reference/fallback-resolution.ppi72x288.ref.png b/test/reference/fallback-resolution.ppi72x288.ref.png Binary files differindex fdbc38202..9d50b64d6 100644 --- a/test/reference/fallback-resolution.ppi72x288.ref.png +++ b/test/reference/fallback-resolution.ppi72x288.ref.png diff --git a/test/reference/fallback-resolution.ppi72x576.ref.png b/test/reference/fallback-resolution.ppi72x576.ref.png Binary files differindex c943f0834..7b4d62e19 100644 --- a/test/reference/fallback-resolution.ppi72x576.ref.png +++ b/test/reference/fallback-resolution.ppi72x576.ref.png diff --git a/test/reference/fallback-resolution.ppi72x72.ref.png b/test/reference/fallback-resolution.ppi72x72.ref.png Binary files differindex 5d1df2cc1..690c0af2d 100644 --- a/test/reference/fallback-resolution.ppi72x72.ref.png +++ b/test/reference/fallback-resolution.ppi72x72.ref.png |