Debian Codegraph @

texmf-dist/doc/fonts/drm/allcomp.sh

raw
1 #!/bin/bash
2 # +AMDG
3
4 re="^drm([m|b|bx|c|sym]*)([n|it|sl|sc]*)([0-9]{1,2})$";
5 ifmath="mmi";
6 ifomx="omx";
7 ifmathsym="sy[0-9]";
8 font=$1;
9 fname="./drm";
10 fenc="T1";
11 commands="\\sample\\bye";
12 if [[ $font =~ $ifmath ]]; then
13 fenc="OML";
14 commands="\\table\\math\\bye";
15 fi
16 if [[ $font =~ $ifomx ]]; then
17 fenc="OMX";
18 commands="\\table\\math\\bye";
19 fi
20 if [[ $font =~ $ifmathsym ]]; then
21 fenc="OMS";
22 commands="\\table\\math\\bye";
23 fi
24 [[ $font =~ $re ]] && fweight="${BASH_REMATCH[1]}" &&
25 fshape="${BASH_REMATCH[2]}" && fsize="${BASH_REMATCH[3]}";
26 if [[ $fshape == "" ]]; then
27 fshape="m";
28 fi
29 if [[ $fweight == "" ]]; then
30 fweight="n";
31 elif [[ $fweight == "sym" ]]; then
32 fweight="n";
33 fname="drmsym";
34 fi
35 #echo "fweight = $fweight; fshape = $fshape; fsize = $fsize";
36 nfssfontin=$(cat <<ENDFONTIN
37 $font
38 $commands
39 $fenc
40 $fname
41 $fweight
42 $fshape
43 $fsize
44 $commands
45 ENDFONTIN
46 )
47 echo $nfssfontin;
48
49 rm $1*pk; rm $1*gf;
50 mf "\mode=localfont; input $1";
51 gftopk $1.600gf $1.pk;
52 echo "$nfssfontin" | pdflatex nfssfont;