-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·21 lines (14 loc) · 757 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
variant=Serif
subdirs='ExtraLight Light Regular Medium SemiBold Bold Heavy'
mkdir -p OTF
for dir in $subdirs; do
cd "$dir/OTC"
echo "Building OTF fonts.... $dir"
makeotf -f cidfont.ps.OTC.CL -omitMacNames -ff features.OTC.CL -fi cidfontinfo.OTC.CL -mf ../../FontMenuNameDB -r -nS -cs 3 -ch "../../UniSourceHan${variant}CL-UTF32-H" -ci "../../SourceHan${variant}_CL_sequences.txt" ; tx -cff +S cidfont.ps.OTC.CL CFF.OTC.CL ; sfntedit -a CFF=CFF.OTC.CL "SourceHan${variant}C-$dir.otf"
mv "SourceHan${variant}C-$dir.otf" ../../OTF
rm CFF.OTC.CL
cd ../../
done
zip "SourceHan${variant}C-OTF.zip" LICENSE.txt OTF/*
sha512sum "SourceHan${variant}C-OTF.zip" | sed -r 's|([0-9a-z]+).*|\1|g' > "SourceHan${variant}C-OTF.zip.sha512sum"