[pango] ci: Use an existing font
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] ci: Use an existing font
- Date: Tue, 16 Jul 2019 20:03:56 +0000 (UTC)
commit fe9122fb1b6cedd5d1bab46e550cd2bdc90bee82
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jul 16 16:03:14 2019 -0400
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.
tests/test-font.c | 9 +++++++--
1 file 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 ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]