summaryrefslogtreecommitdiff
path: root/fonts/drm/scripts/convert.sh
blob: 538cfb913e1446830cc39d7bd9b188c71861dcdb (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
#/bin/bash
# +AMDG

rm *.pfb *.pfa *.afm;
for file in `ls drm*[0-9]*.mf`; do
	mftrace --formats="pfa,pfb,afm" $file;
	./fontconvert.sh ${file%%.*}.pfa;
done;
echo "Verifying conversion of all fonts...";
if [[ `ls drm*[0-9]*.mf | wc -l` == `ls *.pfb | wc -l` ]]; then
	echo "All fonts converted; `ls drm*[0-9]*.mf | wc -l` ";
	echo "Metafonts present, `ls *.pfb | wc -l` Type 1 fonts ";
	echo "present.";
else
	echo "Missed some: `ls drm*[0-9]*.mf | wc -l` Metafont ";
	echo "fonts present, only `ls *.pfb | wc -l` converted.";
	echo "Missing font(s):";
	rm onefile; rm twofile;
	for file in `ls drm*[0-9]*.mf`; do
		echo ${file%%.*} >> onefile;
	done;
	for file in `ls *.pfb`; do
		echo ${file%%.*} >> twofile;
	done;
	echo "\t`diff --suppress-common-lines onefile twofile`";
fi