Annotation of researchv10no/cmd/postscript/printfont/printfont.sh, revision 1.1.1.1

1.1       root        1: #
                      2: # Formatted dump of encoded characters in one or more PostScript fonts.
                      3: # Arguments should be PostScript font names or the word all, which dumps
                      4: # all ROM and disk based fonts.
                      5: #
                      6: 
                      7: POSTLIB=/usr/lib/postscript
                      8: PROLOGUE=$POSTLIB/printfont.ps
                      9: 
                     10: OPTIONS=
                     11: COPYFILE=
                     12: MODE=portrait
                     13: FONTENCODING=Default
                     14: 
                     15: NONCONFORMING="%!PS"
                     16: ENDPROLOG="%%EndProlog"
                     17: BEGINSETUP="%%BeginSetup"
                     18: ENDSETUP="%%EndSetup"
                     19: TRAILER="%%Trailer"
                     20: 
                     21: SETUP=setup
                     22: 
                     23: while [ -n "$1" ]; do
                     24:     case $1 in
                     25:        -a)  shift; OPTIONS="$OPTIONS /axescount $1 def";;
                     26:        -a*) OPTIONS="$OPTIONS /axescount `echo $1 | sed s/-a//` def";;
                     27: 
                     28:        -b)  shift; OPTIONS="$OPTIONS /radix $1 def";;
                     29:        -b*) OPTIONS="$OPTIONS /radix `echo $1 | sed s/-b//` def";;
                     30: 
                     31:        -c)  shift; OPTIONS="$OPTIONS /#copies $1 store";;
                     32:        -c*) OPTIONS="$OPTIONS /#copies `echo $1 | sed s/-c//` store";;
                     33: 
                     34:        -f)  shift; OPTIONS="$OPTIONS /labelfont /$1 def";;
                     35:        -f*) OPTIONS="$OPTIONS /labelfont /`echo $1 | sed s/-f//` def";;
                     36: 
                     37:        -g)  shift; OPTIONS="$OPTIONS /graynotdef $1 def";;
                     38:        -g*) OPTIONS="$OPTIONS /graynotdef `echo $1 | sed s/-g//` def";;
                     39: 
                     40:        -p)  shift; MODE=$1;;
                     41:        -p*) MODE=`echo $1 | sed s/-p//`;;
                     42: 
                     43:        -q)  OPTIONS="$OPTIONS /longnames false def /charwidth false def";;
                     44: 
                     45:        -m)  shift; OPTIONS="$OPTIONS /magnification $1 def";;
                     46:        -m*) OPTIONS="$OPTIONS /magnification `echo $1 | sed s/-m//` def";;
                     47: 
                     48:        -v)  OPTIONS="$OPTIONS /longnames true def /charwidth true def";;
                     49: 
                     50:        -w)  shift; OPTIONS="$OPTIONS /linewidth $1 def";;
                     51:        -w*) OPTIONS="$OPTIONS /linewidth `echo $1 | sed s/-w//` def";;
                     52: 
                     53:        -x)  shift; OPTIONS="$OPTIONS /xoffset $1 def";;
                     54:        -x*) OPTIONS="$OPTIONS /xoffset `echo $1 | sed s/-x//` def";;
                     55: 
                     56:        -y)  shift; OPTIONS="$OPTIONS /yoffset $1 def";;
                     57:        -y*) OPTIONS="$OPTIONS /yoffset `echo $1 | sed s/-y//` def";;
                     58: 
                     59:        -z)  shift; OPTIONS="$OPTIONS /zerocell $1 def";;
                     60:        -z*) OPTIONS="$OPTIONS /zerocell `echo $1 | sed s/-z//` def";;
                     61: 
                     62:        -C)  shift; COPYFILE="$COPYFILE $1";;
                     63:        -C*) COPYFILE="$COPYFILE `echo $1 | sed s/-C//`";;
                     64: 
                     65:        -E)  shift; FONTENCODING=$1;;
                     66:        -E*) FONTENCODING=`echo $1 | sed s/-E//`;;
                     67: 
                     68:        -L)  shift; PROLOGUE=$1;;
                     69:        -L*) PROLOGUE=`echo $1 | sed s/-L//`;;
                     70: 
                     71:        -*)  echo "$0: illegal option $1" >&2; exit 1;;
                     72: 
                     73:        *)   break;;
                     74:     esac
                     75:     shift
                     76: done
                     77: 
                     78: case "$MODE" in
                     79:     l*) OPTIONS="$OPTIONS /landscape true def";;
                     80:     *) OPTIONS="$OPTIONS /landscape false def";;
                     81: esac
                     82: 
                     83: echo $NONCONFORMING
                     84: cat $PROLOGUE
                     85: echo $ENDPROLOG
                     86: echo $BEGINSETUP
                     87: cat ${COPYFILE:-/dev/null}
                     88: echo $OPTIONS
                     89: 
                     90: case "$FONTENCODING" in
                     91:     /*) cat $FONTENCODING;;
                     92:     ?*) cat ${POSTLIB}/${FONTENCODING}.enc 2>/dev/null
                     93: esac
                     94: 
                     95: echo $SETUP
                     96: echo $ENDSETUP
                     97: 
                     98: for i do
                     99:     case "$i" in
                    100:        all) echo AllFonts;;
                    101:        /*)  echo "$i PrintFont";;
                    102:        ?*)  echo "/$i PrintFont";;
                    103:     esac
                    104: done
                    105: 
                    106: echo $TRAILER
                    107: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.