summaryrefslogtreecommitdiff
path: root/tests/test-font.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-font.c')
-rw-r--r--tests/test-font.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test-font.c b/tests/test-font.c
index 486504f9..d02c7932 100644
--- a/tests/test-font.c
+++ b/tests/test-font.c
@@ -164,9 +164,12 @@ test_extents (void)
PangoGlyphString *glyphs;
PangoRectangle ink, log;
PangoContext *context;
+ PangoFontDescription *desc;
context = pango_font_map_create_context (pango_cairo_font_map_get_default ());
- pango_context_set_font_description (context, pango_font_description_from_string ("Cantarell 11"));
+ desc = pango_font_description_from_string("Cantarell 11");
+ pango_context_set_font_description (context, desc);
+ pango_font_description_free (desc);
items = pango_itemize (context, str, 0, strlen (str), NULL, NULL);
glyphs = pango_glyph_string_new ();