#!/bin/sh
# A wrapper for enscript which prints using an ISO-8859 character map
# Defaults to Latin-1 (Roman), but use -fn 5 for Latin-5 (Cyrillic)
# 				       -fn 7 for Latin-7 (Greek)
# Point size defaults to 12
# Usage: isoscrpt [-fn {1,5,7}] [-ps pointsize] [enscriptargs]
if [ ! "$ECI_ROOT" ]
 then
  echo "Must set ECI_ROOT before using!" 1>&2
  exit 10
fi
pt=12
fam=1
font=Times-Roman
while case "$1" in
   -ps) shift; pt=$1 ;;
   -fn) shift; fam=$1;case "$fam" in
			1);;
			5)font=Hershey-Cyrillic-;;
			7)font=Hershey-Greek-;;
                        *)echo "Usage: isoscrpt [-fn {1,5,7}] [-ps pointsize] [enscriptargs]" 1>&2
		          exit 11 ;;
		     esac;;
   -[xX?]) echo "Usage: isoscrpt [-fn {1,5,7}] [-ps pointsize] [enscriptargs]" 1>&2
           exit 10 ;;
   *) break ;;
  esac
 do
  shift
done
PSLIBDIR="$ECI_ROOT/lib/fonts/latin$fam"
export PSLIBDIR
enscript -g -f${font}ISO$pt $@



