[cantarell-fonts/default-vf: 8/8] Build and install only VF by default
- From: Nikolaus Waxweiler <nwaxweiler src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cantarell-fonts/default-vf: 8/8] Build and install only VF by default
- Date: Thu, 29 Jul 2021 20:59:35 +0000 (UTC)
commit 97f4ec5c137815696d72f8cfc5d9462e06a38919
Author: Nikolaus Waxweiler <madigens gmail com>
Date: Tue Apr 20 22:27:49 2021 +0100
Build and install only VF by default
meson.build | 4 +++-
meson_options.txt | 3 +++
src/meson.build | 30 ++++++++++++++++--------------
3 files changed, 22 insertions(+), 15 deletions(-)
---
diff --git a/meson.build b/meson.build
index caa025f1..7c5117ac 100644
--- a/meson.build
+++ b/meson.build
@@ -11,7 +11,9 @@ endif
useprebuilt = get_option('useprebuilt')
if useprebuilt == false
python3 = import('python').find_installation('python3')
- make_static_fonts = join_paths(meson.current_source_dir(), 'scripts', 'make-static-fonts.py')
+ if get_option('buildstatics') == true
+ make_static_fonts = join_paths(meson.current_source_dir(), 'scripts', 'make-static-fonts.py')
+ endif
make_variable_font = join_paths(meson.current_source_dir(), 'scripts', 'make-variable-font.py')
psautohint = find_program('psautohint')
subdir('src')
diff --git a/meson_options.txt b/meson_options.txt
index 37e175be..38480b80 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,3 +6,6 @@ option('useprebuilt', type : 'boolean', value : false,
option('buildappstream', type : 'boolean', value : true,
description : 'Build Appstream metadata file')
+
+option('buildstatics', type : 'boolean', value : false,
+ description : 'Build static fonts in addition to the variable font')
diff --git a/src/meson.build b/src/meson.build
index 236aff85..37928aab 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,17 +1,19 @@
-custom_target(
- 'cantarell-static-fonts',
- input: 'Cantarell.designspace',
- output: [
- 'Cantarell-Thin.otf',
- 'Cantarell-Light.otf',
- 'Cantarell-Regular.otf',
- 'Cantarell-Bold.otf',
- 'Cantarell-ExtraBold.otf',
- ],
- command: [python3, make_static_fonts, '@INPUT@', psautohint, '@OUTDIR@'],
- install: true,
- install_dir: fontsdir,
-)
+if get_option('buildstatics') == true
+ custom_target(
+ 'cantarell-static-fonts',
+ input: 'Cantarell.designspace',
+ output: [
+ 'Cantarell-Thin.otf',
+ 'Cantarell-Light.otf',
+ 'Cantarell-Regular.otf',
+ 'Cantarell-Bold.otf',
+ 'Cantarell-ExtraBold.otf',
+ ],
+ command: [python3, make_static_fonts, '@INPUT@', psautohint, '@OUTDIR@'],
+ install: true,
+ install_dir: fontsdir,
+ )
+endif
custom_target(
'cantarell-variable-font',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]