[pango/pango2: 144/178] Make test-font use our test fonts




commit 7f6de1ed5dd1bf1e0d899f2b17819e82f5c3c32e
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 18 11:45:09 2022 -0700

    Make test-font use our test fonts

 tests/meson.build | 2 +-
 tests/test-font.c | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/tests/meson.build b/tests/meson.build
index 735abc220..f6c40b376 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -32,7 +32,7 @@ if cairo_dep.found()
     [ 'test-ellipsize', [ 'test-ellipsize.c' ] ],
     [ 'markup-parse', [ 'markup-parse.c' , 'test-common.c' ] ],
     [ 'test-itemize', [ 'test-itemize.c', 'test-common.c' ] ],
-    [ 'test-font', [ 'test-font.c' ] ],
+    [ 'test-font', [ 'test-font.c', 'test-common.c' ] ],
     [ 'testattributes', [ 'testattributes.c', 'test-common.c' ] ],
     [ 'cxx-test', [ 'cxx-test.cpp' ] ],
     [ 'test-harfbuzz', [ 'test-harfbuzz.c' ] ],
diff --git a/tests/test-font.c b/tests/test-font.c
index 7c3b06db2..c457fac35 100644
--- a/tests/test-font.c
+++ b/tests/test-font.c
@@ -28,6 +28,8 @@
 #include <pango/pango-item-private.h>
 #include <pango/pango-font-private.h>
 
+#include "test-common.h"
+
 static PangoContext *context;
 
 static void
@@ -401,7 +403,7 @@ test_roundtrip_emoji (void)
   context = pango_context_new ();
 
   /* This is how pango_itemize creates the emoji font desc */
-  desc = pango_font_description_from_string ("Cantarell 11");
+  desc = pango_font_description_from_string ("DejaVu Sans Book 11");
   pango_font_description_set_family_static (desc, "emoji");
 
   font = pango_context_load_font (context, desc);
@@ -541,6 +543,8 @@ main (int argc, char *argv[])
 
   g_test_init (&argc, &argv, NULL);
 
+  install_fonts ();
+
   context = pango_context_new ();
 
   g_test_add_func ("/pango/font/metrics", test_metrics);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]