#!/bin/sh # Make the dvips-encoded vf/tfm using afm2tfm # Karl Berry, Sebastian Rahtz 1995--1997 # Assumes teTeX/web2c 7 setup name=$1 OUT=$2 mkdir -p $OUT/tfm mkdir -p $OUT/vf mkdir -p $OUT/dvips TEXINPUTS=`kpsexpand '\$TEXMF'`/fonts/afm//: export TEXINPUTS base_enc=8r.enc user_enc=dvips.enc v_or_V=-v base=$name afm=$name famcode=`expr $name : '\(...\)'` a2t_options= # If we have a natural afm file (e.g., pagko), then we just use # that. Otherwise (e.g., pplro), we manipulate the roman. Check this first, # because the natural file might be almost anything (e.g., uaqrrc is not # smallcaps). AFM=`kpsewhich tex ${name}8a.afm 2> /dev/null` base=`echo $name | sed 's/$/8r/'` if test "${AFM}y" = "y" then # Determine the AFM file to read for this, and/or the extra options for # afm2tfm, and/or the name of the base font for the VF. case $name in *on) afm=`echo $name | sed 's/on$/o/'` # oblique narrow -> oblique base=`echo $name | sed 's/on$/o8rn/'` a2t_options="-e .82";; *rn) afm=`echo $name | sed 's/rn$//'` # upright narrow -> rm base=`echo $name | sed 's/rn$/r8rn/'` a2t_options="-e .82";; *c) afm=`echo $name | sed 's/c$//'` # caps and small caps -> rm base=`echo $name | sed 's/c$/8r/'` v_or_V=-V;; *u) afm=`echo $name | sed 's/u$/i/'` # unslanted italic -> italic base=`echo $name | sed 's/u$/u8r/'` a2t_options="-s -.1763";; *re) afm=`echo $name | sed 's/re$//'` # extended -> rm base=`echo $name | sed 's/re$/r8re/'` a2t_options="-e 1.2";; *o) afm=`echo $name | sed 's/o$//'` # constructed oblique -> rm base=`echo $name | sed 's/o$/o8r/'` a2t_options="-s .167";; esac fi cmd="afm2tfm `kpsewhich tex ${afm}8a.afm` -u -p $base_enc -t $user_enc \ $a2t_options \ $v_or_V $name.vpl \ ${base}.tfm" echo $cmd $cmd >map cat map # We don't want the raw tfm unless we had funny options if test "$a2t_options"x = "x" then echo ZAP ${base}.tfm rm ${base}.tfm else echo LEAVE ${base}.tfm fi # Times-Roman and obliqued Times-Roman can use the Greek letters from Symbol. if test $base = ptmr || test $base = ptmro; then test $user_enc != 8r.enc && ed $name.vpl <$base.ed fi vptovf $name.vpl $name.vf $name.tfm rm $name.vpl echo moving ${famcode}*.tfm to ${OUT} mv ${famcode}*.tfm ${OUT}/tfm echo moving ${famcode}*.vf to ${OUT} mv ${famcode}*.vf ${OUT}/vf grep Extend map >> ${OUT}/dvips/${famcode}.map grep Slant map >> ${OUT}/dvips/${famcode}.map sort ${OUT}/dvips/${famcode}.map | uniq > x.map mv x.map ${OUT}/dvips/${famcode}.map rm map sort ${OUT}/dvips/config.${famcode} | uniq > config.x mv config.x ${OUT}/dvips/config.${famcode} exit 0