#!/bin/sh # # This script converts an Adobe Font Metric file for a special font to # TeX font metric, and installs it in a distribution directory. It uses # afm2tfm. # # (c) Sebastian Rahtz June 6th 1994 # revised December 11 1995 # # Options: # -download means that the lines written to psfonts. have "&2; shift;; *) break;; esac done # Provide a usage message to refresh human memories. if test \( $# -ne 3 \) then echo "Usage: make-one [-download] [-out ] font family foundry" exit 1 fi # # work out the family name and an 8 character abbreviation # FONT=$1 F=`echo $FONT | sed 's/\(...\).*/\1/'` FF=`grep FamilyName $FONT.afm | sed 's/.*FamilyName //'` FAMILY=$2 FOUNDRY=$3 if test "$OUTDIR"x = "x" then OUT=../$FOUNDRY/$FAMILY else OUT=${OUTDIR}/${FAMILY} fi echo "Work on $FONT / $FAMILY / $FOUNDRY -> $OUT" # # Copy necessary AFM file from ../afm directory # if test -d ../afm/$FOUNDRY/$F then cp ../afm/$FOUNDRY/$F/$FONT.afm . if test ! -r $FONT.afm then echo "Don't see AFM file $FONT.afm" exit 1 fi else echo "Don't see family directory ../afm/$FOUNDRY/$F" exit 1 fi # ./afm2tfm $FONT # # psfonts.map entries # X=`grep FontName $FONT.afm | sed 's/FontName \([A-z0-9\-]*\).*/\1/'` if test "$DOWNLOAD"x != x then echo $FONT $X "<"$FONT.pfb > ${F}.map else echo $FONT $X > ${F}.map fi # # dvips config file # echo "p +${F}.map" > config.${F} # # fd file # echo "% LaTeX2e fd file for $FF font. for PSNFSS " `date +%Y/%m/%d` > U$F.fd echo '\DeclareFontFamily{U}{'$F'}{}' >> U$F.fd echo '\DeclareFontShape{U}{'$F'}{m}{n}{<->'$FONT'}{}' >> U$F.fd echo '\endinput' >> U$F.fd # install directories # if test ! -d ${OUT} then mkdir ${OUT} mkdir ${OUT}/dvips mkdir ${OUT}/tex mkdir ${OUT}/afm mkdir ${OUT}/tfm fi ${CP} ${FONT}.afm ${OUT}/afm ${CP} U${F}.fd ${OUT}/tex ${CP} $FONT.tfm ${OUT}/tfm ${CP} config.${F} ${OUT}/dvips ${CP} ${F}.map ${OUT}/dvips cat > ${OUT}/README <