diff --git a/xorg-x11-fonts.spec b/xorg-x11-fonts.spec index 64eeb06..fc49b0d 100644 --- a/xorg-x11-fonts.spec +++ b/xorg-x11-fonts.spec @@ -30,7 +30,7 @@ Summary: X.Org X11 fonts Name: xorg-x11-fonts Version: 0.99.0 -Release: 7 +Release: 8 License: Various licenses Group: User Interface/X URL: http://www.x.org @@ -477,17 +477,35 @@ done { FONTDIR=%{_x11fontdir}/misc mkfontdir $FONTDIR + # NOTE: We add the ":unscaled" suffix to avoid ugly bitmap fonts. /usr/sbin/chkfontpath -qa %{_x11fontdir}/misc:unscaled - # FIXME: This should only be done on upgrades. - # Remove the Speedo directory from xfs config as X.Org no longer provides - # Speedo font support. - /usr/sbin/chkfontpath -qr %{_x11fontdir}/Speedo - # NOTE: Remove the non :unscaled version of misc font directory from - # configuration to undo a temporary workaround that was added in 0.99.0-5 - /usr/sbin/chkfontpath -qr %{_x11fontdir}/misc + + if [ "$1" -ge "1" ] ; then + # Remove the Speedo directory from xfs config as X.Org no longer provides + # Speedo font support. + /usr/sbin/chkfontpath -qr %{_x11fontdir}/Speedo + + # NOTE: Remove the non :unscaled version of misc font directory from + # configuration to undo a temporary workaround that was added in 0.99.0-5 + XFSCONFIG=/etc/X11/fs/config + # XFS config file upgrade munging + if [ -f $XFSCONFIG ] ; then + # On upgrades, remove 'misc' without :unscaled from the XFS config + # file to avoid ugly scaled bitmap fonts. chkfontpath can't be used + # as it is buggy and will remove the :unscaled entry also. + if grep -q "%{_x11fontdir}/misc," $XFSCONFIG &> /dev/null ; then + for fpe in misc ; do + sed -ie "\#^.*%{_x11fontdir}/${fpe},.*#d" $XFSCONFIG + done + fi + fi + fi +# FIXME: chkfontpath is broken, and removes both misc and misc:unscaled +# /usr/sbin/chkfontpath -qr %{_x11fontdir}/misc + fc-cache $FONTDIR -} +} || : # &> /dev/null || : %postun base @@ -1440,7 +1458,11 @@ rm -rf $RPM_BUILD_ROOT %ghost %verify(not md5 size mtime) %{_x11fontdir}/cyrillic/fonts.cache-* %changelog -* Wed Nov 22 2005 Mike A. Harris 0.99.0-7 +* Fri Nov 25 2005 Mike A. Harris 0.99.0-8 +- Due to a bug in chkfontpath which will remove both 'misc' and 'misc:unscaled' + from the fontpath, use sed magic to do it instead, based of xfs scripts. + +* Wed Nov 23 2005 Mike A. Harris 0.99.0-7 - Undo the workaround implemented in build 0.99.0-5, and make the misc fonts directory ":unscaled" again. - Invoke chkfontpath to remove the bare 'misc' font path without the :unscaled