File indexing completed on 2025-01-26 05:08:06
0001 #!/bin/sh 0002 0003 # SPDX-FileCopyrightText: 2009 Craig Drummond <craig@kde.org> 0004 # SPDX-License-Identifier: GPL-2.0-or-later 0005 0006 if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then 0007 echo "KDE Font Installer helper application - used to configure X11 font folders." 0008 echo "" 0009 echo "Usage: $1 <folder> [<folder> ... <folder>]" 0010 fi 0011 0012 IFS=" 0013 " 0014 0015 suffix=".fontinst-$$" 0016 0017 for d in $* ; do 0018 for f in fonts.scale fonts.dir ; do 0019 # Call standard xorg app... 0020 if [ "$f" = "fonts.scale" ] ; then 0021 mkfontscale "$d" 0022 else 0023 mkfontdir "$d" 0024 fi 0025 0026 if [ -f "$d/$f" ] ; then 0027 # Remove any disabled (ie. hidden) fonts 0028 egrep "\-" "$d/$f" | egrep "^[^\.]" > "$d/$f$suffix" 0029 wc -l "$d/$f$suffix" | awk '{print $1}' > "$d/$f" 0030 cat "$d/$f$suffix" >> "$d/$f" 0031 rm "$d/$f$suffix" 0032 fi 0033 done 0034 done 0035 0036 # Tell X to refresh its font list 0037 xset fp rehash