[pango/pango-1-48-win32: 2/2] testmisc.c: Fix builds without PangoFT2
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango-1-48-win32: 2/2] testmisc.c: Fix builds without PangoFT2
- Date: Fri, 12 Nov 2021 02:59:22 +0000 (UTC)
commit c7ecf11183eeb8bd94f589fc8fb490b5aceb5755
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Nov 12 10:57:13 2021 +0800
testmisc.c: Fix builds without PangoFT2
Builds using the pango_ot_*() APIs rely on PangoFT2, so only build these items
if we are building PangoFT2.
tests/testmisc.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/tests/testmisc.c b/tests/testmisc.c
index fe2e9075..42bdfdcd 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_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
@@ -247,6 +250,7 @@ test_gravity_for_script (void)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+#ifdef HAVE_FREETYPE
static void
test_language_to_tag (void)
{
@@ -262,6 +266,7 @@ test_language_to_tag (void)
g_assert_true (lang2 == lang);
}
+#endif
G_GNUC_END_IGNORE_DEPRECATIONS
@@ -319,7 +324,10 @@ 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_FREETYPE
g_test_add_func ("/language/to-tag", test_language_to_tag);
+#endif
return g_test_run ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]