summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-06-18 12:29:45 -0700
committerMatthias Clasen <mclasen@redhat.com>2022-06-22 13:57:26 -0400
commit6d61bd91af1d0988f5392d2525b7ce76d1b0f77d (patch)
tree140f7ef86bdf8013da59b0e392497e7e5837c158
parent7f6de1ed5dd1bf1e0d899f2b17819e82f5c3c32e (diff)
downloadpango-6d61bd91af1d0988f5392d2525b7ce76d1b0f77d.tar.gz
Use test font setup for the thread test
-rw-r--r--tests/meson.build2
-rw-r--r--tests/test-pangocairo-threads.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/tests/meson.build b/tests/meson.build
index f6c40b37..ec344cc0 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -43,7 +43,7 @@ if cairo_dep.found()
[ 'test-layout', [ 'test-layout.c', 'test-common.c' ] ],
[ 'test-fontsets', [ 'test-fontsets.c', 'test-common.c' ] ],
[ 'testrandom', [ 'testrandom.c' ] ],
- [ 'test-pangocairo-threads', [ 'test-pangocairo-threads.c' ] ],
+ [ 'test-pangocairo-threads', [ 'test-pangocairo-threads.c', 'test-common.c' ] ],
]
endif
diff --git a/tests/test-pangocairo-threads.c b/tests/test-pangocairo-threads.c
index 429e3011..0daa950a 100644
--- a/tests/test-pangocairo-threads.c
+++ b/tests/test-pangocairo-threads.c
@@ -3,6 +3,8 @@
#include <pango/pango.h>
#include <pango/pangocairo.h>
+#include "test-common.h"
+
#define WIDTH 100
#define HEIGHT 100
const char *text = "Hamburgerfonts\nวิวิวิวิวิวิ\nبهداد";
@@ -55,6 +57,8 @@ thread_func (gpointer data)
PangoLayout *layout;
int i;
+ install_fonts ();
+
cairo_t *cr = cairo_create (surface);
layout = create_layout (cr);
@@ -147,6 +151,8 @@ main (int argc, char **argv)
{
g_test_init (&argc, &argv, NULL);
+ install_fonts ();
+
if (argc > 1)
num_threads = atoi (argv[1]);
if (argc > 2)