[pango/pango1-dwrite] meson.build: Check for GDI and DirectWrite support in HarfBuzz



commit 132c960815067cadfccf0a95f65d9653cd332025
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Tue Aug 16 16:42:39 2022 +0800

    meson.build: Check for GDI and DirectWrite support in HarfBuzz
    
    These support are not enabled by default when building HarfBuzz, but if one or
    both are enabled, we can simplify the codepath to create the needed hb_face_t.
    
    This was not added previously as the needed HarfBuzz GDI API was not available
    at the time the code was written and we are only integrating DirectWrite now.

 meson.build | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
---
diff --git a/meson.build b/meson.build
index 4661a4902..60ede5bf4 100644
--- a/meson.build
+++ b/meson.build
@@ -278,6 +278,24 @@ harfbuzz_dep = dependency('harfbuzz',
                           fallback: ['harfbuzz', 'libharfbuzz_dep'],
                           default_options: ['coretext=enabled'])
 
+if host_system == 'windows'
+  if cpp.has_header_symbol(
+      'hb-directwrite.h',
+      'hb_directwrite_face_create',
+      dependencies: harfbuzz_dep,
+      prefix: '#include <dwrite.h>',
+    )
+    pango_conf.set('HAVE_HARFBUZZ_DIRECT_WRITE', 1)
+  endif
+  if cc.has_header_symbol(
+      'hb-gdi.h',
+      'hb_gdi_face_create',
+      dependencies: harfbuzz_dep,
+    )
+    pango_conf.set('HAVE_HARFBUZZ_GDI', 1)
+  endif
+endif
+
 pango_deps += harfbuzz_dep
 
 # If option is 'auto' or 'enabled' it is not required to find fontconfig on the


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