summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/fonts/ai/processfonts
blob: 506416ffbb46eca8153d3afcf11bb9c2a734428d (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
#!/usr/bin/perl

# Written by Skip Collins <bernard.collins@jhuapl.edu>
use Cwd;
$currentdir = cwd;
$remaptmp = "/var/tmp/remaptmp";
mkdir($remaptmp, 0777);
$configfiles[0]=`kpsewhich -format="dvips config" psfonts.cm`;
$configfiles[1]=`kpsewhich -format="dvips config" psfonts.ams`;
$fontlist = "";
$i=0;
foreach $cfg (@configfiles) {
    open(INPUT,$cfg) || die "Can't open font list";
    while (<INPUT>) {
	$string = $_;
	$string =~ s/\s*\w*\s*$//;
	$fontlist[$i] = $string;
	$i++;
    }
    close(INPUT);
}
chdir($remaptmp);
foreach $i (@fontlist) {
    system("tftopl -charcode-format=octal $i $i");
    system("remap $i");
    system("vptovf $i");
    system("pltotf ai$i");
    system("mv ai$i.tfm $currentdir");
    system("mv $i.vf $currentdir");
}

#system("rm -rf $remaptmp");