-
Notifications
You must be signed in to change notification settings - Fork 2
/
build_ttf.py
executable file
·57 lines (40 loc) · 1.06 KB
/
build_ttf.py
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
55
56
57
#! /usr/bin/env python
import hindkit as kit
kit.confirm_version('0.3.2')
kit.constants.paths.GOADB = 'GlyphOrderAndAliasDB_TTF'
# - - -
family = kit.Family(
trademark = 'Mogra',
script = 'Gujarati',
hide_script_name = True,
)
family.set_masters(
masters = [kit.Master(family, 'Regular', 0)],
modules = [
'kerning',
'mark_positioning',
'mark_to_mark_positioning',
# 'devanagari_matra_i_variants',
],
)
family.set_styles([('Regular', 0, 400)])
family.styles[0]._file_name = 'Mogra-Regular.ttf'
kit.constants.paths.GOADB = 'GlyphOrderAndAliasDB_TTF'
# - - -
builder = kit.Builder(family)
builder.fontrevision = '1.000'
builder.set_options([
'prepare_styles', # stage i
'prepare_features', # stage ii
'compile', # stage iii
# 'makeinstances', #!
'checkoutlines', #!
# 'autohint', #!
# 'do_style_linking',
'use_os_2_version_4',
'prefer_typo_metrics',
'is_width_weight_slope_only',
])
# builder.generate_designspace()
builder.generate_fmndb()
builder.build()