summaryrefslogtreecommitdiff
path: root/test/bitmap-font.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-04 21:35:51 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-05 09:46:34 +0100
commit9ef33a1d8c0476f4f1eeba4f26523fdeb6f7d809 (patch)
tree812ad0555f361914857bacad204916653e8a9a31 /test/bitmap-font.c
parentfba4cf1d94b3ab676e0b62ae3574bf1ee4e69de0 (diff)
test/bitmap-font: Destroy FcPattern
Diffstat (limited to 'test/bitmap-font.c')
-rw-r--r--test/bitmap-font.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/bitmap-font.c b/test/bitmap-font.c
index 1c137794..62e51eaf 100644
--- a/test/bitmap-font.c
+++ b/test/bitmap-font.c
@@ -101,13 +101,13 @@ draw (cairo_t *cr, int width, int height)
}
font_face = cairo_ft_font_face_create_for_pattern (pattern);
+ FcPatternDestroy (pattern);
status = cairo_font_face_status (font_face);
if (status) {
cairo_test_log (ctx, "Error creating font face for %s: %s\n",
filename,
cairo_status_to_string (status));
- FcPatternDestroy (pattern);
return cairo_test_status_from_status (ctx, status);
}
@@ -115,11 +115,11 @@ draw (cairo_t *cr, int width, int height)
cairo_test_log (ctx, "Unexpected value from cairo_font_face_get_type: %d (expected %d)\n",
cairo_font_face_get_type (font_face), CAIRO_FONT_TYPE_FT);
cairo_font_face_destroy (font_face);
- FcPatternDestroy (pattern);
return CAIRO_TEST_FAILURE;
}
cairo_set_font_face (cr, font_face);
+ cairo_font_face_destroy (font_face);
font_options = cairo_font_options_create ();
@@ -135,9 +135,6 @@ draw (cairo_t *cr, int width, int height)
cairo_font_extents (cr, &font_extents);
CHECK_FONT_EXTENTS ("default");
- FcPatternDestroy (pattern);
- cairo_font_face_destroy (font_face);
-
cairo_font_options_set_hint_metrics (font_options, CAIRO_HINT_METRICS_ON);
cairo_set_font_options (cr, font_options);
@@ -146,7 +143,6 @@ draw (cairo_t *cr, int width, int height)
cairo_move_to (cr, 1, font_extents.ascent - 1);
cairo_set_source_rgb (cr, 0.0, 0.0, 1.0); /* blue */
-
cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE);
cairo_set_font_options (cr, font_options);
CHECK_FONT_EXTENTS ("HINT_METRICS_ON HINT_STYLE_NONE");