diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-09-06 14:31:43 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-09-06 14:31:43 -0400 |
commit | 7b36ee404c22495e33c66cc4d755671a16089bdf (patch) | |
tree | a6bb712d7272baa4de075803b223ba23bdedf20f /tests/test-layout.c | |
parent | f7ffec46581ee8d45c7d9480168a167c86c766d3 (diff) | |
download | pango-7b36ee404c22495e33c66cc4d755671a16089bdf.tar.gz |
Try to fix the test on build.gnome.org
For some reason, the test-layout test does not show the
font size when run on build.gnome.org. Try harder to make
it use the Cantarell 11 font that I want it to use.
Diffstat (limited to 'tests/test-layout.c')
-rw-r--r-- | tests/test-layout.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test-layout.c b/tests/test-layout.c index a56cdae8..bed7c4a6 100644 --- a/tests/test-layout.c +++ b/tests/test-layout.c @@ -404,6 +404,7 @@ test_file (const gchar *filename, GString *string) gint ellipsize_at = 0; PangoEllipsizeMode ellipsize = PANGO_ELLIPSIZE_NONE; PangoWrapMode wrap = PANGO_WRAP_WORD; + PangoFontDescription *desc; if (!g_file_get_contents (filename, &contents, &length, &error)) { @@ -420,6 +421,11 @@ test_file (const gchar *filename, GString *string) parse_params (contents, &width, &ellipsize_at, &ellipsize, &wrap); layout = pango_layout_new (context); + + desc = pango_font_description_from_string ("Cantarell 11"); + pango_layout_set_font_description (layout, desc); + pango_font_description_free (desc); + pango_layout_set_markup (layout, markup, length); g_free (contents); @@ -497,7 +503,6 @@ main (int argc, char *argv[]) GError *error = NULL; const gchar *name; gchar *path; - PangoFontDescription *desc; g_setenv ("LC_ALL", "C", TRUE); setlocale (LC_ALL, ""); @@ -505,9 +510,6 @@ main (int argc, char *argv[]) g_test_init (&argc, &argv, NULL); context = pango_font_map_create_context (pango_cairo_font_map_get_default ()); - desc = pango_font_description_from_string ("Cantarell 11"); - pango_context_set_font_description (context, desc); - pango_font_description_free (desc); /* allow to easily generate expected output for new test cases */ if (argc > 1) |