#
# NAME:
#
#   	truetype_font_install installs all the TrueType fonts
#
# SYNOPSIS:	
#
#	truetype_font_install source_directory destination_directory
#
#
# DESCRIPTION:
#
#	truetype_font_install is a Bourne shell script used to 
#	convert all the .ttf font files in the specified source directory 
#	and places the resultant .font files in the destination directory
#
#  EXAMPLES:
#
#	For Window NT 3.5 
#
#	>truetype_font_install $(windir)/system
#			$(NEXT_ROOT)/usr/NextLibrary/Fonts
#
#	For Window NT 4.0
#
#	>truetype_font_install $(windir)/Fonts 
#			$(NEXT_ROOT)/usr/NextLibrary/Fonts
#
case $# in
	2 )
		echo "truetype_font_install : installing fonts from" $1;;
	* )
		echo "truetype_font_install : usage";
		echo "      truetype_font_install source_directory destination_directory";;
esac

if test ! -d $1
then
	echo "truetype_font_install : invalid source directory" $1
	exit 1
fi
if test ! -d $2
then
	echo "truetype_font_install : invalid destination directory" $2
	exit 1
fi

for file in $1/*.ttf $1/*.TTF
do
	if test -f $file
	then
		ttf2font -o $2 -q $file
	fi
done
