#!/bin/sh
# link in all fonts from a FreeBSD system and let pstill sort the good ones out
# may not work on some distributions

cd PSFonts 2> /dev/null
echo "Current directory: `pwd`"
echo "- Linking fonts - this may not work on some setups or if X11 is"
echo "- not installed. Source is /usr/X11R6/lib/X11/fonts/Type1/*"
echo "- Starting in 10 seconds..."
echo
sleep 10
for file in /usr/X11R6/lib/X11/fonts/Type1/*
do
newname=`pwd`/`basename $file`
echo $file
ln -s $file $newname
done
echo
echo "- Ok, done. You may copy additional PFA or PFB fonts to this directory"
echo "- then running  'pstill -v -I' from the pstill main directory"
echo "- Remember that PStill needs at least Courier as font otherwise"
echo "- you are going to see black dots instead of text"
echo 
echo "Waiting now 10 seconds, then starting to convert the fonts you just"
echo "linked in the PSFonts font pool, stand by..."
sleep 10
cd ..
./pstill -v -I
echo
echo "Done - PStill just displayed a list of installed fonts you can use"
echo "You may want to add additional fonts to PSFonts, just copy files"
echo "named abcdef.pfa or abcdef.pfb to this directory, then run 'pstill -v -I'"
echo "again in the pstill base directory: `pwd`"

