Debian Codegraph @

docs/Master.md

raw
1 ---
2 title: Master
3 ---
4 A font master.
5 ## Master.name
6
7 * Python type: `I18NDictionary`
8
9 * **Required field**
10
11 *Localizable.*
12
13
14 ## Master.id
15
16 * Python type: `str`
17
18 * **Required field**
19
20 An ID used to refer to this master in the
21 `Layer._master` field. (This is allows the user to change the master name
22 without the layers becoming lost.)
23
24
25 ## Master.location
26
27 * Python type: `dict`
28
29 A dictionary mapping axis tags to coordinates
30 in order to locate this instance in the design space.
31 *If not provided, defaults to* `None`.
32
33
34 ## Master.guides
35
36 * Python type: [[`Guide`](Guide.html)]
37
38 * When writing to Babelfont-JSON, each item in the list must be placed on a separate line.
39
40 A list of guides.
41
42
43 ## Master.metrics
44
45 * Python type: `dict`
46
47 A dictionary mapping metric names (string) to metric value (integer). The following
48 metric names are reserved: `xHeight,capHeight,ascender,descender`. Other metrics may be added to this dictionary
49 as needed by font clients, but their interpretation is not guaranteed to be
50 compatible between clients.
51
52
53 ## Master.kerning
54
55 * Python type: `dict`
56
57 * When writing to Babelfont-JSON, each item in the list must be placed on a separate line.
58
59 I'll be honest, I haven't worked out how this is meant to work.
60
61
62 ## Master.font
63
64 * Python type: `object`
65
66 * This field only exists as an attribute of the the Python object and should not be written to Babelfont-JSON.
67
68 Within the Python object, provides a reference to the font object containing this master.
69 *If not provided, defaults to* `None`.
70
71
72 ## Master.customOpenTypeValues
73
74 * Python type: [[`OTValue`](OTValue.html)]
75
76 Any values to be placed in OpenType tables on export to override defaults
77
78
79 ## Master._formatspecific
80
81 * Python type: `dict`
82
83
84 Each object in Babelfont has an optional attached dictionary to allow the storage
85 of format-specific information. Font creation software may store any additional
86 information that they wish to have preserved on import and export under a
87 namespaced (reverse-domain) key in this dictionary. For example, information
88 specific to the Glyphs software should be stored under the key `com.glyphsapp`.
89 The value stored under this key may be any data serializable in JSON; typically
90 it will be a `dict`.
91
92 Note that there is an important distinction between the Python object format
93 of this field and the Babelfont-JSON representation. When stored to JSON, this key
94 is exported not as `_formatspecific` but as a simple underscore (`_`).
95
96
97