Sophie

Sophie

distrib > Scientific%20Linux > 5x > i386 > by-pkgid > 55e30c2dc991879bf9c3d75707187609 > scriptlet

fonts-chinese-3.02-12.el5.noarch.rpm

POSTIN

/bin/sh
{
	umask 133
	touch /usr/share/fonts/chinese/TrueType 2> /dev/null && {
	    /usr/bin/ttmkfdir -d /usr/share/fonts/chinese/TrueType -o /usr/share/fonts/chinese/TrueType/fonts.scale
	    mkfontdir /usr/share/fonts/chinese/TrueType
	    /usr/sbin/chkfontpath -q -a /usr/share/fonts/chinese/TrueType
	    # if zysong font still around remove it from fonts.* files
	    if [ -f "/usr/share/fonts/chinese/TrueType/zysong.ttf" ]; then
	       for i in /usr/share/fonts/chinese/TrueType/fonts.{dir,scale}; do
	       	   sed -i -e "/^zysong.ttf/d" $i || :
	       	   ENTRIES=`tail --lines=+2 $i | wc -l`
	       	   sed -i -e "s/^[0-9]*$/${ENTRIES}/" $i
	       done
	    fi
	}

	touch /usr/share/fonts/chinese/misc 2> /dev/null && {
	    mkfontdir /usr/share/fonts/chinese/misc
            /usr/sbin/chkfontpath -q -a /usr/share/fonts/chinese/misc
	}
	# update fontconfig cache
        [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache /usr/share/fonts

	# make symlinks for java referring to old path and fonts
	ln -sf ../../chinese/TrueType/uming.ttf /usr/share/fonts/zh_TW/TrueType/bsmi00lp.ttf || :

}

POSTUN

/bin/sh
if [ "$1" = 0 ];
then
    umask 133
    /usr/sbin/chkfontpath -q -r /usr/share/fonts/chinese/TrueType
    /usr/sbin/chkfontpath -q -r /usr/share/fonts/chinese/misc
    
    #Update fontconfig cache
    [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache 2> /dev/null
fi