summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlpostcode/xetex.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlpostcode/xetex.pl')
-rw-r--r--Master/tlpkg/tlpostcode/xetex.pl14
1 files changed, 13 insertions, 1 deletions
diff --git a/Master/tlpkg/tlpostcode/xetex.pl b/Master/tlpkg/tlpostcode/xetex.pl
index 7b691425175..855ed44402c 100644
--- a/Master/tlpkg/tlpostcode/xetex.pl
+++ b/Master/tlpkg/tlpostcode/xetex.pl
@@ -1,6 +1,6 @@
# $Id$
# post action for xetex to handle system font stuff.
-# Copyright 2008, 2009, 2011 Norbert Preining
+# Copyright 2008-2024 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
@@ -36,9 +36,21 @@ sub do_remove {
sub do_install {
# fontconfig-related stuff.
+ # We must not use any environment variable for FONTCONFIG_PATH
+ # as this is used in distributions to point to /etc/fonts
+ # We also remove that tree before recreating it, so make sure
+ # we only use the definitions in one of the texmf.cnf files,
+ # but not the environment.
+ delete $ENV{'FONTCONFIG_PATH'};
+ delete $ENV{'FC_CACHEDIR'};
+ # The defaults are
+ # FONTCONFIG_FILE = fonts.conf
+ # FONTCONFIG_PATH = $TEXMFSYSVAR/fonts/conf
+ # FC_CACHEDIR = $TEXMFSYSVAR/fonts/cache
chomp( my $fcache = `kpsewhich -var-value=FC_CACHEDIR` ) ;
chomp( my $fconf = `kpsewhich -var-value=FONTCONFIG_PATH` ) ;
if (-r "$texdir/bin/windows/xetex.exe") {
+ # WHY WHY do we create and then delete the directories???
# we have installed w32, so put it into texmfsysvar.
mkdirhier($fcache);
mkdirhier($fconf);