5 echo "Usage: tfmtoafm FONT"
7 echo "example: tfmtoafm cmr10"
13 fontfile=`locate $1.tfm`
16 rm -f $t1 $t2 $font $afm
18 for i in `seq 1 127`; do printf "%d Character-%d\n" $i $i >> $t1; done
19 tfmtodit $fontfile $t1 $font
21 tail -127 $font | cut -f 1-2 > $t1
22 cat $t1 | cut -d, -f 1-2 > $t2
24 nl -ba $t2 | sed "s/,/ /g" | sed "s/^ *//" | sed "s/$/ /" | sed "s/^[0-9]*/C &;/" | sed "s/\([0-9]\)\([0-9][0-9][0-9][0-9][0-9]\) /\1.\2 /"g | sed "s/-[0-9]*/&; B 0.00 0.00 /" > $t1
30 # urg 0 is difficult but we need it
31 head -1 $t1 | sed "s/1;/0;/g" >> $afm