summaryrefslogtreecommitdiff
path: root/fonts/utilities/a2ac/mkfnt
blob: 941d2fed0f64a0f72724d7276b56bd897a0a9aab (plain)
1
2
3
4
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
# This script prepares Czech and Slovak TeX font using a2ac and afm2tfm
# The name of output virtual font is prefixed by c and font encoding
# is chosen by ISO 8859-2 (more precisely by CS-encoding defined in files
# xl2.enc or xt2.enc).

if test $# -lt 2 ; then
  echo usage:
  echo '  ' mkfnt Full-PostScript-Name texname
  echo for example:
  echo '  ' mkfnt Times-Roman ptmr
  echo more advanced usage:
  echo '  ' mkfnt Full-PostScript-Name texname nextletters [afm2tfm options]
  echo where [afm2tfm options] have to end by -v or -V . For example:
  echo '  ' mkfnt Times-Roman ptmr c -V
  echo makes the cptmrc.vf: the Caps and Small Caps variant of Times-Roman.
  exit
fi

# You can edit the following paths in order to match with your system strategy.
# The currentdir variants of output can be used by any user.

# corrtabfile=/usr/lib/a2ac/cscorr.tab
corrtabfile=cscorr.tab
texfontpath=/usr/lib/texfm/fonts
# encfilepath=$texfontpath/enc
encfilepath=.
afminput=/usr/openwin/lib/fonts/afm
# vfoutput=$texfontpath/vf/dvips
vfoutput=.
# tfmoutput=$texfontpath/tfm
tfmoutput=.
# rtfmoutput=$texfontpath/tfm/dvips
rtfmoutput=.

a2ac $afminput/$1.afm $corrtabfile c$2.afm
if grep 'IsFixedPitch true' c$2.afm ; then
   encfile=$encfilepath/xt2.enc
else
   encfile=$encfilepath/xl2.enc
fi
if test $# -gt 2 ; then
   afmparam=$4 $5 $6 $7 $8 $9
else
   afmparam=-v
fi
echo afm2tfm c$2.afm -t $encfile $afmparam c$2$3.vpl $rtfmoutput/r$2.tfm
afm2tfm c$2.afm -t $encfile $afmparam c$2$3.vpl $rtfmoutput/r$2.tfm
vptovf c$2$3.vpl $vfoutput/c$2$3.vf $tfmoutput/c$2$3.tfm
rm c$2.afm c$2$3.vpl