X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage4%2Fconfigure-fonts;h=9b0caf413a488f20efbfde02ff1d2065df27946b;hb=0315072ae3bd307eee71718e1a59f923edcbdaca;hp=be9b4581932ade2afc0fb0e29507f8acb8685850;hpb=afdcc2624aec2f5aaaf00aa211455ba54eaf0703;p=hvlinux.git diff --git a/stage4/configure-fonts b/stage4/configure-fonts index be9b458..9b0caf4 100755 --- a/stage4/configure-fonts +++ b/stage4/configure-fonts @@ -1,15 +1,24 @@ -#!/bin/sh -set -o errexit +#!/bin/bash -# First argument of this script is the package name. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos +source ../config/sysinfos source ../functions -source ../packages-list +source ../config/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 +ln -svfT /usr/lib/X11/fonts/OTF /usr/share/fonts/X11-OTF +ln -svfT /usr/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!\(\)! ${X11_FONTS_DIR}\n\1!" /etc/fonts/local.conf +fi + +# Updating cache database. +fc-cache -f exit $?