Makefile.am | 2 +- configure.ac | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) New commits: commit 889097353ecd7b061ae7cf677e3db56db77a135f Author: Ryan Schmidt <git@xxxxxxxxxxxxxx> Date: Thu Jul 8 15:45:18 2021 -0500 Fix FC_DEFAULT_FONTS on macOS and with BSD sed Fix processing of FC_DEFAULT_FONTS when it contains multiple comma- separated values (i.e. on macOS/Darwin) and fix inserting it into fonts.conf when using BSD sed. Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/287 diff --git a/Makefile.am b/Makefile.am index 1ef3669..2f75fc9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -114,7 +114,7 @@ FC_CONFIGDIR = $(subst $(BASECONFIGDIR)/,,$(CONFIGDIR)) fonts.conf: fonts.conf.in Makefile sed \ -e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \ - -e 's,@FC_DEFAULT_FONTS\@,$(FC_DEFAULT_FONTS),g' \ + -e 's,@FC_DEFAULT_FONTS\@, $(FC_DEFAULT_FONTS),g' \ -e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \ -e 's,@CONFIGDIR\@,$(FC_CONFIGDIR),g' \ -e 's,@PACKAGE\@,$(PACKAGE),g' \ diff --git a/configure.ac b/configure.ac index 3bbd969..af2fd44 100644 --- a/configure.ac +++ b/configure.ac @@ -499,8 +499,11 @@ FC_DEFAULT_FONTS="" if test x${default_fonts+set} = xset; then fc_IFS=$IFS IFS="," - for p in "$default_fonts"; do - FC_DEFAULT_FONTS="$FC_DEFAULT_FONTS\t<dir>$p</dir>\n" + for p in $default_fonts; do + if test x"$FC_DEFAULT_FONTS" != x; then + FC_DEFAULT_FONTS="$FC_DEFAULT_FONTS " + fi + FC_DEFAULT_FONTS="$FC_DEFAULT_FONTS<dir>$p</dir>" done IFS=$fc_IFS fi