-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpreflight
executable file
·41 lines (31 loc) · 1.83 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
#!/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 checkfix=fix source/masters/*-Regular.ufo &
psfnormalize -p checkfix=fix source/masters/*-Bold.ufo &
wait
echo
echo "Updating woff metadata xml file..."
psfmakewoffmetadata -q -n Harmattan -i org.sil.fonts source/masters/*-Regular.ufo -o "source/Harmattan-WOFF-metadata.xml"
echo
echo "Updating glyph orders in Regular..."
psfsetglyphorder -q -p checkfix=none -p backup=False --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 -p backup=False -i source/glyph_data.csv source/masters/*-Regular.ufo
echo
echo "Syncing glyph orders, psnames, and other metadata to other UFOs..."
psfsyncmasters -q source/*.designspace
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/Harmattan-Regular.ufo/features.fea -i source/opentype/main.feax -c source/classes.xml --ignoreglyphs --omitaps "_above,_below,_center,_ring,_through,_H,_L,_O,_U,_R,above,below,center,ring,through,H,L,O,U,R,entry,exit" source/masters/*-Regular.ufo
makefea -o source/masters/Harmattan-Bold.ufo/features.fea -i source/opentype/main.feax -c source/classes.xml --ignoreglyphs --omitaps "_above,_below,_center,_ring,_through,_H,_L,_O,_U,_R,above,below,center,ring,through,H,L,O,U,R,entry,exit" source/masters/*-Bold.ufo
echo
echo "preflight completed!"