summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2021-08-14 15:38:14 +0930
committerAdrian Johnson <ajohnson@redneon.com>2022-02-27 20:20:24 +1030
commit5635c75a2c99a901fa1410d4a297c1a1c913c0ee (patch)
tree36983c34acfa163f6d476f1e90c3ddaa7e5747c2 /meson.build
parentfdf2a9b4c0b610ef5dc328c7a095ff8e6e263f05 (diff)
downloadcairo-5635c75a2c99a901fa1410d4a297c1a1c913c0ee.tar.gz
dwrite: add color font support
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build22
1 files changed, 18 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index f5aab34b4..d7dd9b428 100644
--- a/meson.build
+++ b/meson.build
@@ -503,18 +503,32 @@ if host_machine.system() == 'windows'
]
cpp_compiler = meson.get_compiler('cpp')
- direct2d_dep = cpp_compiler.find_library('d2d1', required: false)
+ d2d_dep = cpp_compiler.find_library('d2d1', required: false)
dwrite_dep = cpp_compiler.find_library('dwrite', required: false)
- direct2d_header = cpp_compiler.has_header('d2d1.h')
+ d2d_header = cpp_compiler.has_header('d2d1.h')
+ d2d_3_header = cpp_compiler.has_header('d2d1_3.h')
dwrite_header = cpp_compiler.has_header('dwrite.h')
+ dwrite_3_header = cpp_compiler.has_header('dwrite_3.h')
+ wincodec_dep = cpp_compiler.find_library('windowscodecs', required: false)
+ wincodec_header = cpp_compiler.has_header('wincodec.h')
- if direct2d_dep.found() and dwrite_dep.found() and direct2d_header and dwrite_header
+ if d2d_dep.found() and dwrite_dep.found() and d2d_header and dwrite_header and wincodec_dep.found() and wincodec_header
feature_conf.set('CAIRO_HAS_DWRITE_FONT', 1)
built_features += [{
'name': 'cairo-win32-dwrite-font',
'description': 'Microsoft Windows DWrite font backend',
- 'deps': [dwrite_dep, direct2d_dep],
+ 'deps': [dwrite_dep, d2d_dep, wincodec_dep],
}]
+ deps += [dwrite_dep, d2d_dep, wincodec_dep]
+
+ if cpp_compiler.has_header('d2d1_3.h')
+ conf.set('HAVE_D2D1_3_H', 1)
+ endif
+
+ # Exclude MinGW dwrite_3.h because it has a broken definition of DWRITE_COLOR_GLYPH_RUN1.
+ if cpp_compiler.has_header('dwrite_3.h') and cpp_compiler.get_define('__MINGW32__') == ''
+ conf.set('HAVE_DWRITE_3_H', 1)
+ endif
endif
endif