# There's no need to chroot and do this during initial
# install, since there is a post-install script that
# does the same thing, saving time.
# Update X font indexes and the font cache:
if [ -x /usr/bin/mkfontdir ]; then
  /usr/bin/mkfontscale /usr/share/fonts/TTF
  /usr/bin/mkfontdir /usr/share/fonts/TTF
fi

if [ -x /usr/bin/fc-cache ]; then
  /usr/bin/fc-cache /usr/share/fonts/TTF
fi
( cd etc/fonts/conf.d ; rm -rf 41-ttf-arphic-uming.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/41-ttf-arphic-uming.conf 41-ttf-arphic-uming.conf )
( cd etc/fonts/conf.d ; rm -rf 25-ttf-arphic-uming-bitmaps.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/25-ttf-arphic-uming-bitmaps.conf 25-ttf-arphic-uming-bitmaps.conf )
( cd etc/fonts/conf.d ; rm -rf 35-ttf-arphic-uming-aliases.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/35-ttf-arphic-uming-aliases.conf 35-ttf-arphic-uming-aliases.conf )
( cd etc/fonts/conf.d ; rm -rf 64-ttf-arphic-uming.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/64-ttf-arphic-uming.conf 64-ttf-arphic-uming.conf )
( cd etc/fonts/conf.d ; rm -rf 25-ttf-arphic-uming-render.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/25-ttf-arphic-uming-render.conf 25-ttf-arphic-uming-render.conf )
( cd etc/fonts/conf.d ; rm -rf 90-ttf-arphic-uming-embolden.conf )
( cd etc/fonts/conf.d ; ln -sf ../conf.avail/90-ttf-arphic-uming-embolden.conf 90-ttf-arphic-uming-embolden.conf )
