SuSE Trutypefonts

Post Reply
Message
Author
spfef
Posts: 6
Joined: 19. Dec 2001 15:28

SuSE Trutypefonts

#1 Post by spfef »

Hallo,

bei SuSE 7.2 wie auch bei der 7.3 ist ja ein Script dabei welches Trutypefonts vom Microsoft Server zieht. Bei der 7.2 sind es allerdings weniger als bei der 7.3. Also Script von der 7.3 angepasst ud siehe da, geht nicht.
Kann mal jemand auf seiner 7.3 nachsehen worum es sich bei "cabextract" handelt?
Ist das ein Script oder ein Binary?
Auf dem SuSE Server habe ich kein RPM gefunden.
Könnte mir jemand vielleicht aus der 7.3 das script "fetchmsttfonts" sowie das Skript, bzw. rpm von cabextract zumailen?

Vielen Dank!

S. Pfeffer

pfeffer2@gmx.de

Descartes

Re: SuSE Trutypefonts

#2 Post by Descartes »

/usr/X11R6/bin/fetchmsttfonts.sh

<blockquote><pre><font size="1" face="">code:</font><hr><font face="Courier New" size="2">
#!/bin/sh

/usr/X11R6/bin/fetchmsttfonts
read
</font><hr></pre></blockquote>

Descartes

Re: SuSE Trutypefonts

#3 Post by Descartes »

/usr/X11R6/bin/fetchmsttfonts

<blockquote><pre><font size="1" face="">code:</font><hr><font face="Courier New" size="2">
#!/bin/sh

FONTS=" \
http://www.microsoft.com/typography/dow ... bdin32.exe \
http://www.microsoft.com/typography/dow ... dale32.exe \
http://www.microsoft.com/typography/dow ... ebuc32.exe \
http://www.microsoft.com/typography/dow ... orgi32.exe \
http://www.microsoft.com/typography/dow ... rdan32.exe \
http://www.microsoft.com/typography/dow ... omic32.exe \
http://www.microsoft.com/typography/dow ... ialb32.exe \
http://www.microsoft.com/typography/dow ... pact32.exe \
http://www.microsoft.com/typography/dow ... rial32.exe \
http://www.microsoft.com/typography/dow ... imes32.exe \
http://www.microsoft.com/typography/dow ... urie32.exe \
"

WGET_OPTIONS="-q --proxy=on"
EULA="http://www.microsoft.com/typography/fontpack/eula.htm"

if [ "`id -u`" != "0" ]; then
echo "error: You must be root to use this program!"
exit 1
fi

if [ -z $http_proxy ]; then
echo
echo "note: No proxy is used. Please set the environment variable \"http_proxy\""
echo "note: to your favorite proxy, if you want to use a proxy for the download."
echo "note:"
echo "note: bash: export http_proxy=\"http://proxy.provider.de:3128/\""
echo "note: tcsh: setenv http_proxy \"http://proxy.provider.de:3128/\""
fi

echo
echo "By continuing with this program you log on to the Microsoft(c)-Webserver."
echo "Accepting the following Terms and conditions results in a contract between the"
echo "user and Microsoft(c). Neither SuSE nor the vendor of this installation media"
echo "is part of this contract. SuSE will not take any liability for the software"
echo "which can be found on the Microsoft(c) Webserver."
echo
echo -n "Continue? [yes/NO] "

read answer
if [ "$answer" != "yes" ]; then
exit 0
fi

mkdir -p /usr/X11R6/lib/X11/fonts/truetype/tmp
cd /usr/X11R6/lib/X11/fonts/truetype/tmp

lynx -dump $EULA|grep EULA &> /dev/null
if [ $? -ne 0 ]; then
echo "error: EULA not found. Aborting now!"
cd .. && rm -rf tmp
exit 1
fi

lynx -dump $EULA | less
echo -n "Do you accept all of the terms of EULA ? [yes/NO] "
read answer
if [ "$answer" != "yes" ]; then
echo "warning: EULA not accepted. Aborting now!"
cd .. && rm -rf tmp
exit 0
fi

for archive in $FONTS; do
file=`echo $archive|awk -F "/" '{print $NF}'`
rm -f $file
echo "$file:"
echo -n " Fetching ... "
wget $WGET_OPTIONS $archive
if [ $? -ne 0 ]; then
rm -f $file
echo "failed ... deleted!"
continue
fi
echo done
echo -n " Extracting ... "
cabextract -v $file &> /dev/null
if [ $? -ne 0 ]; then
rm -f $file
echo "failed ... deleted!"
else
cabextract $file &> /dev/null
echo "done"
for i in *.TTF *.ttf; do
lower=`echo $i|tr [:upper:] [:lower:]`
mv $i ../$lower &> /dev/null
done
fi
done

cd .. && rm -rf tmp
chmod 644 *.ttf

echo

if [ -x /usr/X11R6/bin/ttmkfdir ]; then
echo -n "Creating fonts.scale ... "
/usr/X11R6/bin/ttmkfdir|grep ttf > fonts.scale.msttfonts
echo "done"
else
echo "error: ttmkfdir (SuSE package ttmkfdir) is required to create fonts.scale!"
exit 1
fi

chmod 644 fonts.scale.msttfonts

if [ -x /usr/X11R6/bin/mkfontdir ]; then
echo -n "Creating fonts.dir ... "
echo 0 > fonts.scale
ls fonts.scale.* &> /dev/null && cat fonts.scale.* >> fonts.scale
/usr/X11R6/bin/mkfontdir -e /usr/X11R6/lib/X11/fonts/encodings/large -e /usr/X11R6/lib/X11/fonts/encodings
echo "done"
else
echo "error: mkfontdir is required to created fonts.dir!"
exit 1
fi

chmod 644 fonts.scale fonts.dir
rm -f encodings.dir
</font><hr></pre></blockquote>

Descartes

Re: SuSE Trutypefonts

#4 Post by Descartes »

/usr/bin/cabextract ist ein ELF Binary das du im Quellcode auch von <a href="http://www.kyz.uklinux.net/cabextract.php3#download" target="_blank"><!--auto-->http://www.kyz.uklinux.net/cabextract.p ... <!--auto--> bekommst.

spfef
Posts: 6
Joined: 19. Dec 2001 15:28

Re: SuSE Trutypefonts

#5 Post by spfef »

Danke,

habe eben nochmal gesucht und siehe da es ist auch auf dem SuSE ftp. Zwar etwas versteckt aber unter ftp.gwdg.de/pub/linux/suse/ftp.suse.com/suse/i386/supplementary/X/XFree86/XFree86-4.1.0-SuSE/src/xf86tools ist es zu finden.

Vielen Dank für die Mühe die ihr Euch gemacht habt.

Schöne Weihnachten!
Last edited by spfef on 23. Dec 2001 20:21, edited 1 time in total.

Post Reply