[gtk/wip/fanc999/fontchooser.win32.gtk3: 15/17] meson: Enable font tweaking on Windows without PangoFT
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/fanc999/fontchooser.win32.gtk3: 15/17] meson: Enable font tweaking on Windows without PangoFT
- Date: Thu, 18 Apr 2019 02:58:03 +0000 (UTC)
commit 4d0d1d0ca5a2615d5da4f1be90313e5c88c8ba12
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Apr 12 14:58:36 2019 +0800
meson: Enable font tweaking on Windows without PangoFT
We just need HarfBuzz and FreeType to enable the font tweaking on
Windows, but we can still enable PangoFT support if that is found.
demos/gtk-demo/meson.build | 17 +++++++++++++----
gtk/meson.build | 10 ++++++++++
meson.build | 2 +-
3 files changed, 24 insertions(+), 5 deletions(-)
---
diff --git a/demos/gtk-demo/meson.build b/demos/gtk-demo/meson.build
index 82e08973a5..38d366154d 100644
--- a/demos/gtk-demo/meson.build
+++ b/demos/gtk-demo/meson.build
@@ -76,9 +76,19 @@ demos = files([
gtkdemo_deps = [libgtk_dep]
-if harfbuzz_dep.found() and pangoft_dep.found()
+if harfbuzz_dep.found() and (pangoft_dep.found() or (os_win32 and ft2_dep.found()))
demos += files('font_features.c')
- gtkdemo_deps += [harfbuzz_dep, pangoft_dep]
+ demos_extra_sources += files([
+ '../../gtk/gtkpangofontutils.c'
+ ])
+
+ gtkdemo_deps += [harfbuzz_dep]
+ if pangoft_dep.found()
+ gtkdemo_deps += [pangoft_dep]
+ endif
+ if os_win32
+ gtkdemo_deps += [pangowin32_dep, ft2_dep]
+ endif
endif
if os_unix
@@ -89,8 +99,7 @@ gtkdemo_sources = demos + files([
'gtkfishbowl.c',
'gtkfishbowl.h',
'main.c',
-])
-
+]) + demos_extra_sources
geninclude = find_program('geninclude.py')
demos_h = custom_target(
diff --git a/gtk/meson.build b/gtk/meson.build
index ac8c1a9926..10582d5f7c 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -671,6 +671,12 @@ if os_win32
gtk_sources += gtk_win32_sources
endif
+if harfbuzz_dep.found() and ft2_dep.found()
+ gtk_sources += files([
+ 'gtkpangofontutils.c'
+ ])
+endif
+
gen_gtk_gresources_xml = find_program('gen-gtk-gresources-xml.py')
gtk_gresources_xml = configure_file(output: 'gtk.gresources.xml',
command: [
@@ -859,6 +865,10 @@ if win32_enabled
gtk_sources += gtk_use_win32_sources
gtk_deps += [ giowin32_dep, pangowin32_dep ]
+ if harfbuzz_dep.found() and not pangoft_dep.found()
+ gtk_deps += [ft2_dep]
+ endif
+
gtk_rc_body = configure_file(
input: 'gtk-win32.rc.body.in',
output: 'gtk-win32.rc.body',
diff --git a/meson.build b/meson.build
index 5e3c417b00..4194082e8f 100644
--- a/meson.build
+++ b/meson.build
@@ -405,7 +405,7 @@ else
pangoft_dep = dependency('pangoft2', required: false)
endif
-if pangoft_dep.found()
+if pangoft_dep.found() or os_win32
# Need at least 2.7.1 for FT_Get_Var_Design_Coordinates()
# We get the dependency itself from pango, but pango doesn't care
# about ft2 version, so an extra check is needed.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]