Déplacé variable GATEWAY dans script de configuration de carte réseau
[hvlinux.git] / stage4 / configure-fonts
index be9b458..eab4954 100755 (executable)
@@ -8,8 +8,21 @@ source ../sysinfos
 source ../functions
 source ../packages-list
 
+# When all of the fonts have been installed, the system must be configured so
+# that Fontconfig can find the TrueType fonts since they are outside of the
+# default search path of /usr/share/fonts.
 install -v -d -m755 /usr/share/fonts
 ln -svfT ${XORG_PREFIX}/lib/X11/fonts/OTF /usr/share/fonts/X11-OTF
 ln -svfT ${XORG_PREFIX}/lib/X11/fonts/TTF /usr/share/fonts/X11-TTF
 
+X11_FONTS_DIR="/usr/share/fonts/X11"
+
+if ! grep "${X11_FONTS_DIR}" /etc/fonts/local.conf 1> /dev/null 2>&1; then
+    # Adding X fonts directory to local configuration file
+    sed -i -e "s!\(</fontconfig>\)!    <dir>${X11_FONTS_DIR}</dir>\n\1!" /etc/fonts/local.conf
+fi
+
+# Updating cache database.
+fc-cache -f
+
 exit $?