-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathnarrowmerge.sh
executable file
·48 lines (34 loc) · 1.11 KB
/
narrowmerge.sh
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
#!/bin/sh
# $Id$
# This script will merge new glyphs into the condensed faces.
# It scans for Condensed faces in the current directory and creates
# new files called DejaVuCondensed*.sfd.merged
# The script requires that all fonts are normalized with
# sfdnormalize.pl. The newly created .merged file is automatically
# normalized
for tofile in *Condensed*.sfd; do
fromfile=`echo $tofile | sed 's,Condensed,,'`
echo "Merging: $fromfile"
# making new narrow font
./narrow.pe 90 $fromfile
# normalizing the new narrow font
./sfdnormalize.pl $fromfile.narrow
# merging the new normalized narrow font into the existing Condensed font
mergelist=`./merge.pl $fromfile.narrow.norm $tofile $tofile.merged`
# normalizing the new merged font
./sfdnormalize.pl $tofile.merged
# removing files that aren't needed anymore
if [ -e $fromfile.narrow ]; then
rm $fromfile.narrow
fi
if [ -e $fromfile.narrow.norm ]; then
rm $fromfile.narrow.norm
fi
if [ -e $tofile.merged ]; then
rm $tofile.merged
fi
# renaming normalized file
if [ -e $tofile.merged.norm ]; then
mv $tofile.merged.norm $tofile.merged
fi
done