-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwscript
51 lines (41 loc) · 1.7 KB
/
wscript
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
#! /usr/bin/python3
# this is a smith configuration file
# set the default output folders
DOCDIR = ['documentation', 'web']
generated = 'generated/'
# set package name
APPNAME = "Ruwudu"
# set the font family name
FAMILY = APPNAME
# Get version info from Regular UFO; must be first function call:
getufoinfo('source/masters/' + FAMILY + '-Regular' + '.ufo')
# set up FTML tests
ftmlTest('tools/ftml-smith.xsl')
# APs to omit:
OMITAPS = '--omitaps "topright, ogonek, caret_1, caret_2, caret_3, top_3, top_4, top_alef"'
typetunerfile = 'source/typetuner/feat_all.xml'
designspace('source/Ruwudu.designspace',
instanceparams='-l ' + generated + '{$FAMILY}_createinstances.log',
target = process('${DS:FILENAME_BASE}.ttf',
cmd('psfchangettfglyphnames ${SRC} ${DEP} ${TGT}', ['${source}']),
# Note: ttfautohint-generated hints don't maintain stroke thickness at joins (nor hamza), so we're not hinting these fonts
# cmd('${TTFAUTOHINT} -n -c -D arab -W ${DEP} ${TGT}')
# so instead we put in Google-recommend gasp and prep tables:
cmd('gftools fix-nonhinting --no-backup -q ${DEP} ${TGT}')
),
version = VERSION, # Needed to ensure dev information on version string
ap = generated + '${DS:FILENAME_BASE}.xml',
opentype = fea('generated/${DS:FILENAME_BASE}.fea',
mapfile = 'generated/${DS:FILENAME_BASE}.map',
master = 'source/opentype/main.feax',
make_params = OMITAPS
),
script = ['arab'],
pdf = fret(params='-m 25 -r -oi'),
woff = woff('web/${DS:FILENAME_BASE}',
metadata=f'../source/{FAMILY}-WOFF-metadata.xml',
),
typetuner = typetuner(typetunerfile),
)
def configure(ctx):
ctx.find_program('ttfautohint')