#!/bin/sh
if [ x$1 = x -o x$1 = x ]
then
  echo "Usage: mkdevpbm hfont_path groff_font_path"
  exit 1
fi
install -d -m 755 $2/devpbm
# Also change gromgr when editing below
cat > $2/devpbm/DESC << 'EOF'
res 288
hor 1
vert 1
unitwidth 9
sizes 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
      21 22 23 24 25 26 27 28 29 30 32 34 36 38 40
      45 50 55 60 66 72 78 84 90 102 108 0
fonts 12 R I B S RS RD RC RT ID IT SS GS
tcommand
postpro gropbm
EOF

./widths R iso < $1/roman.s > $2/devpbm/R
./widths I iso < $1/italic.t > $2/devpbm/I
./widths B iso < $1/roman.t > $2/devpbm/B
./widths S special < $1/special.s > $2/devpbm/S

./widths RS iso < $1/roman.s > $2/devpbm/RS
./widths RD iso < $1/roman.d > $2/devpbm/RD
./widths RC iso < $1/roman.c > $2/devpbm/RC
./widths RT iso < $1/roman.t > $2/devpbm/RT
./widths ID iso < $1/italic.d > $2/devpbm/ID
./widths IT iso < $1/italic.t > $2/devpbm/IT
./widths SS iso < $1/script.s > $2/devpbm/SS
./widths GS special < $1/greek.s > $2/devpbm/GS
exit 0
