[gtk/wip/fanc999/fontchooser.win32.gtk3: 246/248] 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: 246/248] meson: Enable font tweaking on Windows without PangoFT
- Date: Fri, 12 Apr 2019 07:10:54 +0000 (UTC)
commit 25611523a5acf9524e01194a2f868f948a5493f7
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 | 21 ++++++++++++++++-----
gtk/meson.build | 9 +++++++++
meson.build | 2 +-
3 files changed, 26 insertions(+), 6 deletions(-)
---
diff --git a/demos/gtk-demo/meson.build b/demos/gtk-demo/meson.build
index e2af42c8c4..6e250e30f7 100644
--- a/demos/gtk-demo/meson.build
+++ b/demos/gtk-demo/meson.build
@@ -73,18 +73,29 @@ demos = files([
gtkdemo_deps = [libgtk_dep]
-if harfbuzz_dep.found() and pangoft_dep.found()
+demos_extra_sources = files([
+ 'main.c'
+])
+
+if harfbuzz_dep.found() and (pangoft_dep.found() or os_win32)
demos += files('font_features.c')
- gtkdemo_deps += [harfbuzz_dep, pangoft_dep]
+ gtkdemo_deps += [harfbuzz_dep]
+ if pangoft_dep.found()
+ gtkdemo_deps += [pangoft_dep]
+ endif
+ if os_win32 and ft2_dep.found()
+ gtkdemo_deps += [pangowin32_dep, ft2_dep]
+ demos_extra_sources += files([
+ '../../gtk/gtkpangofontutils.c'
+ ])
+ endif
endif
if os_unix
demos += files('pagesetup.c')
endif
-gtkdemo_sources = demos + files([
- 'main.c',
-])
+gtkdemo_sources = demos + demos_extra_sources
geninclude = find_program('geninclude.py')
diff --git a/gtk/meson.build b/gtk/meson.build
index 93e029f42c..747a05473c 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -669,6 +669,11 @@ gtk_win32_sources = files(
if os_win32
# FIXME these sources should not be added to generate_gir?
gtk_sources += gtk_win32_sources
+ if harfbuzz_dep.found() and ft2_dep.found()
+ gtk_sources += files([
+ 'gtkpangofontutils.c'
+ ])
+ endif
endif
gen_gtk_gresources_xml = find_program('gen-gtk-gresources-xml.py')
@@ -859,6 +864,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 fb3454c545..9c7ba1b1b7 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]