-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprepare.bash
More file actions
executable file
·53 lines (45 loc) · 905 Bytes
/
prepare.bash
File metadata and controls
executable file
·53 lines (45 loc) · 905 Bytes
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
52
53
#!/bin/bash
export ufo=results/ufo
# grep -E "faces|styles" wscript | grep = > wscript.py
rm -f *.sfd
pushd ${src}/archive
prep=unhinted
tmp=tmp.ttf
rm -rf $prep
mkdir $prep
for ttf in *.ttf
do
rm -f $tmp
hackos2 -t 0 $ttf $tmp
ttfstriphints $tmp ${prep}/${ttf}
rm -f $tmp
done
popd
rm -f ${src}/*-???*.sfd
export FLOWARGS=""
rm -rf .lock-smithresults results
smith distclean -l
smith configure -l
smith build -l
pushd ${ufo}
for ttf in *.ttf
do
echo $ttf
# create sfd files
sfd="$(basename $ttf .ttf).sfd"
fontforge -script ${nlci}/ttf2sfd.ff $ttf $sfd
done
# check sfd files
echo "Checking for duplicate glyphs"
for sfd in *.sfd
do
grep StartChar $sfd /dev/null | sort | uniq -d
done
echo "Checking for matching glyph inventory"
for sfd in *.sfd
do
grep StartChar $sfd | sort > ${sfd}.glyphs
done
sha1sum *.glyphs | sort
popd
cp -p -v ${ufo}/*.sfd ${src}