summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2022-08-16 16:42:39 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2022-09-26 11:04:26 +0800
commit3ab3e076665d0722d6f12938f3bddf263322539b (patch)
tree5ca543b46cf49b81ab34c8b62184050fa6a03558
parentbbd537da6aa8abe41f79a54bcb695651071a342a (diff)
downloadpango-3ab3e076665d0722d6f12938f3bddf263322539b.tar.gz
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.
-rw-r--r--meson.build18
1 files changed, 18 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index f233079a..840d37f6 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