fontconfig: Branch 'master' - 3 commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 configure.ac     |   49 ++++++++++++++++++++++++++++++++-----------------
 fonts.conf.in    |    2 +-
 meson.build      |    9 +++++++--
 src/fcinit.c     |    2 +-
 test/meson.build |    2 +-
 5 files changed, 42 insertions(+), 22 deletions(-)

New commits:
commit 31edc2880eee9576fb91164909290e8b76da5ef9
Author: Niklas Guertler <profclonk@xxxxxxxxx>
Date:   Wed Sep 30 14:53:14 2020 +0200

    Increased timeout for meson tests to 600sec to make tests work on Darwin

diff --git a/test/meson.build b/test/meson.build
index 6b29409..96b30a9 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -39,7 +39,7 @@ foreach test_data : tests
     dependencies: extra_deps,
   )
 
-  test(test_name, exe)
+  test(test_name, exe, timeout: 600)
 endforeach
 
 # FIXME: run-test.sh stuff
commit 25845543286c345c80b4dc9c37bcf5e461cf5900
Author: Niklas Guertler <profclonk@xxxxxxxxx>
Date:   Wed Sep 30 09:58:47 2020 +0200

    Add <dir> XML tags to default values for FC_DEFAULT_FONTS on non-Darwin systems

diff --git a/meson.build b/meson.build
index 4b53495..debdcef 100644
--- a/meson.build
+++ b/meson.build
@@ -212,8 +212,8 @@ else
     conf.set_quoted('FC_DEFAULT_FONTS', '<dir>/System/Library/Fonts</dir> <dir>/Library/Fonts</dir> <dir>~/Library/Fonts</dir> <dir>/System/Library/Assets/com_apple_MobileAsset_Font3</dir> <dir>/System/Library/Assets/com_apple_MobileAsset_Font4</dir>')
     fonts_conf.set('FC_DEFAULT_FONTS', '<dir>/System/Library/Fonts</dir> <dir>/Library/Fonts</dir> <dir>~/Library/Fonts</dir> <dir>/System/Library/Assets/com_apple_MobileAsset_Font3</dir> <dir>/System/Library/Assets/com_apple_MobileAsset_Font4</dir>')
   else
-    conf.set_quoted('FC_DEFAULT_FONTS', '/usr/share/fonts')
-    fonts_conf.set('FC_DEFAULT_FONTS', '/usr/share/fonts')
+    conf.set_quoted('FC_DEFAULT_FONTS', '<dir>/usr/share/fonts</dir>')
+    fonts_conf.set('FC_DEFAULT_FONTS', '<dir>/usr/share/fonts</dir>')
   endif
   fc_cachedir = join_paths(prefix, get_option('localstatedir'), 'cache', meson.project_name())
   thread_dep = dependency('threads')
commit bc84228a2e00b7ef4d7641fcfd0c08340828819b
Author: Niklas Guertler <profclonk@xxxxxxxxx>
Date:   Tue Sep 15 17:12:53 2020 +0200

    Allow multiple default system font directories in the fallback config, and set them to the default dirs on Darwin.

diff --git a/configure.ac b/configure.ac
index f3189a7..de6d810 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,14 +89,17 @@ PKGCONFIG_REQUIRES=
 PKGCONFIG_REQUIRES_PRIVATELY=
 
 dnl ==========================================================================
-case "$host" in
-  *-*-mingw*)
-    os_win32=yes
-    ;;
-  *)
-    os_win32=no
+AC_CANONICAL_HOST
+case "${host_os}" in
+	cygwin*|mingw*)
+		os_win32=yes
+		;;
+	darwin*)
+		os_darwin=yes
+		;;
 esac
 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
+AM_CONDITIONAL(OS_DARWIN, test "$os_darwin" = "yes")
 
 dnl ==========================================================================
 dnl gettext stuff
@@ -474,28 +477,40 @@ esac
 #
 
 AC_ARG_WITH(default-fonts,
-	[AC_HELP_STRING([--with-default-fonts=DIR],
-			[Use fonts from DIR when config is busted])],
+	[AC_HELP_STRING([--with-default-fonts=DIR1,DIR2,...],
+			[Use fonts from DIR1,DIR2,... when config is busted])],
 	default_fonts="$withval", default_fonts=yes)
 
 case "$default_fonts" in
 yes)
 	if test "$os_win32" = "yes"; then
-		FC_DEFAULT_FONTS="WINDOWSFONTDIR"
-		AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "WINDOWSFONTDIR", 
-				   [Windows font directory])
+		FC_DEFAULT_FONTS_IN="WINDOWSFONTDIR"
+	elif test "$os_darwin" = "yes"; then
+		FC_DEFAULT_FONTS_IN="/System/Library/Fonts,/Library/Fonts,~/Library/Fonts,/System/Library/Assets/com_apple_MobileAsset_Font3,/System/Library/Assets/com_apple_MobileAsset_Font4"
 	else
-		FC_DEFAULT_FONTS="/usr/share/fonts"
-		AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "/usr/share/fonts", 
-				   [System font directory])
+		FC_DEFAULT_FONTS_IN="/usr/share/fonts"
 	fi
 	;;
 *)
-	FC_DEFAULT_FONTS="$default_fonts"
-	AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "$default_fonts",
-			   [System font directory])
+	FC_DEFAULT_FONTS_IN="$default_fonts"
 	;;
 esac
+			   
+AC_SUBST(FC_DEFAULT_FONTS_IN)
+
+case "$FC_DEFAULT_FONTS_IN" in
+"")
+	FC_DEFAULT_FONTS=""
+	;;
+*)
+	FC_DEFAULT_FONTS=`echo $FC_DEFAULT_FONTS_IN | 
+			sed -e 's/^/<dir>/' -e 's/$/<\/dir>/' -e 's/,/<\/dir> <dir>/g'`
+	;;
+esac
+
+
+AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "$FC_DEFAULT_FONTS",
+			   [System font directory])
 
 AC_SUBST(FC_DEFAULT_FONTS)
 
diff --git a/fonts.conf.in b/fonts.conf.in
index e6561ae..734e722 100644
--- a/fonts.conf.in
+++ b/fonts.conf.in
@@ -24,7 +24,7 @@
 
 <!-- Font directory list -->
 
-	<dir>@FC_DEFAULT_FONTS@</dir>
+	@FC_DEFAULT_FONTS@
 	@FC_FONTPATH@
 	<dir prefix="xdg">fonts</dir>
 	<!-- the following element will be removed in the future -->
diff --git a/meson.build b/meson.build
index b066392..4b53495 100644
--- a/meson.build
+++ b/meson.build
@@ -208,8 +208,13 @@ if host_machine.system() == 'windows'
   fonts_conf.set('FC_DEFAULT_FONTS', 'WINDOWSFONTDIR')
   fc_cachedir = 'LOCAL_APPDATA_FONTCONFIG_CACHE'
 else
-  conf.set_quoted('FC_DEFAULT_FONTS', '/usr/share/fonts')
-  fonts_conf.set('FC_DEFAULT_FONTS', '/usr/share/fonts')
+  if host_machine.system() == 'darwin'
+    conf.set_quoted('FC_DEFAULT_FONTS', '<dir>/System/Library/Fonts</dir> <dir>/Library/Fonts</dir> <dir>~/Library/Fonts</dir> <dir>/System/Library/Assets/com_apple_MobileAsset_Font3</dir> <dir>/System/Library/Assets/com_apple_MobileAsset_Font4</dir>')
+    fonts_conf.set('FC_DEFAULT_FONTS', '<dir>/System/Library/Fonts</dir> <dir>/Library/Fonts</dir> <dir>~/Library/Fonts</dir> <dir>/System/Library/Assets/com_apple_MobileAsset_Font3</dir> <dir>/System/Library/Assets/com_apple_MobileAsset_Font4</dir>')
+  else
+    conf.set_quoted('FC_DEFAULT_FONTS', '/usr/share/fonts')
+    fonts_conf.set('FC_DEFAULT_FONTS', '/usr/share/fonts')
+  endif
   fc_cachedir = join_paths(prefix, get_option('localstatedir'), 'cache', meson.project_name())
   thread_dep = dependency('threads')
   conf.set('HAVE_PTHREAD', 1)
diff --git a/src/fcinit.c b/src/fcinit.c
index 99df9b4..c05cdc5 100644
--- a/src/fcinit.c
+++ b/src/fcinit.c
@@ -41,7 +41,7 @@ FcInitFallbackConfig (const FcChar8 *sysroot)
     FcConfig	*config;
     const FcChar8 *fallback = (const FcChar8 *) ""	\
 	"<fontconfig>" \
-	"  <dir>" FC_DEFAULT_FONTS "</dir>" \
+	FC_DEFAULT_FONTS \
 	"  <dir prefix=\"xdg\">fonts</dir>" \
 	"  <cachedir>" FC_CACHEDIR "</cachedir>" \
 	"  <cachedir prefix=\"xdg\">fontconfig</cachedir>" \
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/fontconfig



[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux