[pango/win32-fixes: 3/3] testmisc.c: Fix builds without FontConfig/PangoFT2
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/win32-fixes: 3/3] testmisc.c: Fix builds without FontConfig/PangoFT2
- Date: Mon, 9 Aug 2021 08:31:10 +0000 (UTC)
commit 4eaebb6184f251c1741b35a3fa984a426cc7684e
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Aug 9 16:26:58 2021 +0800
testmisc.c: Fix builds without FontConfig/PangoFT2
Some tests used items from PangoFT2, which may not have been enabled on
platforms where that was optionally built.
tests/testmisc.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/tests/testmisc.c b/tests/testmisc.c
index 54566f78..d8275aad 100644
--- a/tests/testmisc.c
+++ b/tests/testmisc.c
@@ -22,7 +22,10 @@
#include "config.h"
#include <glib.h>
#include <pango/pangocairo.h>
+
+#ifdef HAVE_CAIRO_FREETYPE
#include <pango/pango-ot.h>
+#endif
/* test that we don't crash in shape_tab when the layout
* is such that we don't have effective attributes
@@ -245,6 +248,7 @@ test_gravity_for_script (void)
}
}
+#ifdef HAVE_CAIRO_FREETYPE
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static void
@@ -264,6 +268,7 @@ test_language_to_tag (void)
}
G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
static void
test_fallback_shape (void)
@@ -383,7 +388,9 @@ main (int argc, char *argv[])
g_test_add_func ("/gravity/from-matrix", test_gravity_from_matrix);
g_test_add_func ("/gravity/for-script", test_gravity_for_script);
g_test_add_func ("/layout/fallback-shape", test_fallback_shape);
+#ifdef HAVE_CAIRO_FREETYPE
g_test_add_func ("/language/to-tag", test_language_to_tag);
+#endif
g_test_add_func ("/bidi/get-cursor-crash", test_get_cursor_crash);
g_test_add_func ("/bidi/get-cursor", test_get_cursor);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]