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>
This commit is contained in:
Chris Wilson 2012-03-08 15:27:03 +00:00
parent 1952fec829
commit c0eaaa1680
9 changed files with 19 additions and 1 deletions

View file

@ -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);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB