summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-08-25 20:37:55 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-08-29 08:08:26 +0100
commit7c499db8afe8a7cf8c512ec166fe7dbf11a25c02 (patch)
treecac0d2c804579d3fcd5bd2d21bb9fb7cad9e5984 /test
parentbdd3c5ba6987280b455229dd12b20c22159ce61c (diff)
[test] Minor tweak of ft-text-vertical-layout
Tidily destroy the font immediately after use.
Diffstat (limited to 'test')
-rw-r--r--test/ft-text-vertical-layout-type1.c6
-rw-r--r--test/ft-text-vertical-layout-type3.c5
2 files changed, 4 insertions, 7 deletions
diff --git a/test/ft-text-vertical-layout-type1.c b/test/ft-text-vertical-layout-type1.c
index 28e81e0e3..c6f26a66a 100644
--- a/test/ft-text-vertical-layout-type1.c
+++ b/test/ft-text-vertical-layout-type1.c
@@ -125,6 +125,7 @@ draw (cairo_t *cr, int width, int height)
}
cairo_set_scaled_font (cr, scaled_font);
+ cairo_scaled_font_destroy (scaled_font);
cairo_set_line_width (cr, 1.0);
cairo_set_source_rgb (cr, 0, 0, 0); /* black */
@@ -154,16 +155,13 @@ draw (cairo_t *cr, int width, int height)
extents.height + line_width);
cairo_stroke (cr);
- cairo_scaled_font_destroy (scaled_font);
-
return CAIRO_TEST_SUCCESS;
}
CAIRO_TEST (ft_text_vertical_layout_type1,
"Tests text rendering for vertical layout with Type1 fonts"
"\nCan fail if an incorrect font is loaded---need to bundle the desired font",
- "ft, text", /* keywords */
+ "ft, fc, text", /* keywords */
NULL, /* requirements */
WIDTH, HEIGHT,
NULL, draw)
-
diff --git a/test/ft-text-vertical-layout-type3.c b/test/ft-text-vertical-layout-type3.c
index 36a07557a..982680689 100644
--- a/test/ft-text-vertical-layout-type3.c
+++ b/test/ft-text-vertical-layout-type3.c
@@ -125,6 +125,7 @@ draw (cairo_t *cr, int width, int height)
}
cairo_set_scaled_font (cr, scaled_font);
+ cairo_scaled_font_destroy (scaled_font);
cairo_set_line_width (cr, 1.0);
cairo_set_source_rgb (cr, 0, 0, 0); /* black */
@@ -154,14 +155,12 @@ draw (cairo_t *cr, int width, int height)
extents.height + line_width);
cairo_stroke (cr);
- cairo_scaled_font_destroy (scaled_font);
-
return CAIRO_TEST_SUCCESS;
}
CAIRO_TEST (ft_text_vertical_layout_type3,
"Tests text rendering for vertical layout with TrueType fonts",
- "ft, text", /* keywords */
+ "ft, fc, text", /* keywords */
NULL, /* requirements */
WIDTH, HEIGHT,
NULL, draw)