summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-02-16 16:30:16 +0900
committerNorbert Preining <norbert@preining.info>2024-02-16 16:30:16 +0900
commit9e8e5ba373fb2afa0e85444d3a86aaba9132bd3e (patch)
treefb49f469a6c987f2b9c27fc463368512aa7f2f64
parentc06baa89590a7bce3e6001517e16eb8c8563f386 (diff)
xetex postaction: make sure we don't pick up envvarsdev/xetex-post-fontconfig
-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);