#
# Shell script to convert an Adobe type1 font to the .mf font format used by
# Eddie.
#
#!/bin/csh

if ($#argv == 2) goto goodargs
echo ""
echo "Shell script to convert an Adobe type1 font to the .mf font format."
echo "Usage: convert <font directory> <font name>"
echo ""
echo "Example: convert /usr/lib/DPS/outline/base Courier"
echo ""
echo "To install a new font in Eddie, just move the <font>.mf file in the"
echo "$EDDIERESOURCE/fonts directory and add a new line in the font.dir file."
echo ""
exit 1

goodargs:
echo "Creating $2.mf file..."
decoder -A $1/$2 > /usr/tmp/font.dec
fromtype1 /usr/tmp/font.dec /usr/tmp/font.of 1.0
meshfont /usr/tmp/font.of $2.mf
rm -f /usr/tmp/font.{of,dec} 

# Note:
# The third argument of the fromtype1 program controls the quality of the
# resulting font.  The lower the better. Try values between 0.1 and 5.0.
# Never use 0.0 because meshfont won't like it.

