[gtk/backport-font-feature-pango-hb: 5/5] Meson: Enable font features demo on later Pango versions




commit f5229b8ee426dbe4e23cb1d043221f9606965311
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Nov 25 18:56:24 2021 +0800

    Meson: Enable font features demo on later Pango versions
    
    ...even if PangoFT2 is not present, provided that Pango 1.44.0+ and
    HarfBuzz 2.2.0+ are installed.  The demo now has added support for later
    Pango versions that use HarfBuzz for shaping on all supported platforms.

 demos/gtk-demo/meson.build | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/demos/gtk-demo/meson.build b/demos/gtk-demo/meson.build
index 82e08973a5..bd391cc982 100644
--- a/demos/gtk-demo/meson.build
+++ b/demos/gtk-demo/meson.build
@@ -76,6 +76,17 @@ demos = files([
 
 gtkdemo_deps = [libgtk_dep]
 
+if pango_dep.version().version_compare('>=1.44.0')
+  if harfbuzz_dep.found() and \
+     cc.has_header_symbol(
+       'hb-ot.h',
+       'hb_ot_var_get_axis_count', 
+               dependencies: harfbuzz_dep
+     )
+    demos += files('font_features.c')
+    gtkdemo_deps += [harfbuzz_dep]
+  endif
+endif
 if harfbuzz_dep.found() and pangoft_dep.found()
   demos += files('font_features.c')
   gtkdemo_deps += [harfbuzz_dep, pangoft_dep]


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