diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-07-16 16:03:14 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-07-16 16:03:14 -0400 |
commit | fe9122fb1b6cedd5d1bab46e550cd2bdc90bee82 (patch) | |
tree | 60d9e2ade92d601bfed12c5b889f1b8eac1249e1 /tests | |
parent | 0491c54d808fbe31a34ebd8056aa1715d90f1c37 (diff) | |
download | pango-fe9122fb1b6cedd5d1bab46e550cd2bdc90bee82.tar.gz |
ci: Use an existing font
We don't care about the particular font here, we just
want to list font metrics of an existing font.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-font.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test-font.c b/tests/test-font.c index f4c73f69..dac89e50 100644 --- a/tests/test-font.c +++ b/tests/test-font.c @@ -123,7 +123,12 @@ test_metrics (void) PangoFontMetrics *metrics; char *str; - desc = pango_font_description_from_string ("Cantarell 11"); + + if (strcmp (G_OBJECT_TYPE_NAME (pango_context_get_font_map ()), "PangoCairoWin32FontMap") == 0) + desc = pango_font_description_from_string ("Verdana 11"); + else + desc = pango_font_description_from_string ("Cantarell 11"); + str = pango_font_description_to_string (desc); metrics = pango_context_get_metrics (context, desc, pango_language_get_default ()); @@ -164,10 +169,10 @@ main (int argc, char *argv[]) context = pango_font_map_create_context (pango_cairo_font_map_get_default ()); + g_test_add_func ("/pango/font/metrics", test_metrics); g_test_add_func ("/pango/fontdescription/parse", test_parse); g_test_add_func ("/pango/fontdescription/roundtrip", test_roundtrip); g_test_add_func ("/pango/fontdescription/variation", test_variation); - g_test_add_func ("/pango/font/metrics", test_metrics); return g_test_run (); } |