-
Notifications
You must be signed in to change notification settings - Fork 4
/
preflight
executable file
·54 lines (44 loc) · 2.66 KB
/
preflight
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
54
#!/bin/sh
# Update UFO after any edits other than with FontForge and prior to commit
# Stop on any errors
set -e
# Check and normalize all UFOs first -- assumes no other steps de-normalize
echo
echo "Normalizing UFOs..."
psfnormalize -p scrlevel=w -p checkfix=check source/masters/Lateef-ExtraLight.ufo &
psfnormalize -p scrlevel=w -p checkfix=check source/masters/Lateef-Regular.ufo &
psfnormalize -p scrlevel=w -p checkfix=check source/masters/Lateef-ExtraBold.ufo &
wait
echo
echo "Updating glyph orders in Regular..."
# setting both to the same order
psfsetglyphorder -q -p checkfix=none --header DesignerOrder,DesignerOrder --field public.glyphOrder,com.schriftgestaltung.glyphOrder -i source/glyph_data.csv source/masters/*-Regular.ufo
echo
echo "Updating production names in Regular..."
psfsetpsnames -q -p checkfix=none -i source/glyph_data.csv source/masters/*-Regular.ufo
echo
echo "Syncing glyph orders, psnames, and other metadata to other UFOs..."
psfsyncmasters -p scrlevel=w source/lateef.designspace
echo
echo "Syncing kerning information from Regular to ExtraLight and ExtraBold UFOs..."
# kerning.plist and groups.plist
cp source/masters/Lateef-Regular.ufo/kerning.plist \
source/masters/Lateef-Regular.ufo/groups.plist \
source/masters/Lateef-ExtraLight.ufo/
cp source/masters/Lateef-Regular.ufo/kerning.plist \
source/masters/Lateef-Regular.ufo/groups.plist \
source/masters/Lateef-ExtraBold.ufo/
echo
echo "Updating classes.xml..."
python3 tools/absgenclasses.py -p scrlevel=w -c source/classes.xml -i source/glyph_data.csv --ucdxml source/additional_ucd.xml source/masters/*-Regular.ufo source/classes.xml
echo
echo "Building internal fea..."
makefea -o source/masters/Lateef-Regular.ufo/features.fea -i source/opentype/main.feax -c source/classes.xml --omitaps "_above _aboveLeft _below _center _ring _through above aboveLeft below center ring through entry exit alefUnused" source/masters/Lateef-Regular.ufo &
makefea -o source/masters/Lateef-ExtraLight.ufo/features.fea -i source/opentype/main.feax -c source/classes.xml --omitaps "_above _aboveLeft _below _center _ring _through above aboveLeft below center ring through entry exit alefUnused" source/masters/Lateef-ExtraLight.ufo &
makefea -o source/masters/Lateef-ExtraBold.ufo/features.fea -i source/opentype/main.feax -c source/classes.xml --omitaps "_above _aboveLeft _below _center _ring _through above aboveLeft below center ring through entry exit alefUnused" source/masters/Lateef-ExtraBold.ufo &
wait
echo
echo "Updating woff metadata files..."
psfmakewoffmetadata -q -n lateef -i org.sil.fonts -o source/Lateef-WOFF-metadata.xml source/masters/*-Regular.ufo
echo
echo "preflight completed!"