| 1 |
--- |
| 2 |
title: Instance |
| 3 |
--- |
| 4 |
An object representing a named or static instance. |
| 5 |
* When writing to Babelfont-JSON, this class must be serialized without newlines |
| 6 |
## Instance.name |
| 7 |
|
| 8 |
* Python type: `I18NDictionary` |
| 9 |
|
| 10 |
* **Required field** |
| 11 |
|
| 12 |
The name of this instance. *Localizable.* |
| 13 |
|
| 14 |
|
| 15 |
## Instance.location |
| 16 |
|
| 17 |
* Python type: `dict` |
| 18 |
|
| 19 |
* **Required field** |
| 20 |
|
| 21 |
A dictionary mapping axis tags to coordinates in order to locate this instance in the design space. |
| 22 |
|
| 23 |
|
| 24 |
## Instance.styleName |
| 25 |
|
| 26 |
* Python type: `I18NDictionary` |
| 27 |
|
| 28 |
The style name of this instance. *Localizable.* |
| 29 |
|
| 30 |
|
| 31 |
## Instance._formatspecific |
| 32 |
|
| 33 |
* Python type: `dict` |
| 34 |
|
| 35 |
|
| 36 |
Each object in Babelfont has an optional attached dictionary to allow the storage |
| 37 |
of format-specific information. Font creation software may store any additional |
| 38 |
information that they wish to have preserved on import and export under a |
| 39 |
namespaced (reverse-domain) key in this dictionary. For example, information |
| 40 |
specific to the Glyphs software should be stored under the key `com.glyphsapp`. |
| 41 |
The value stored under this key may be any data serializable in JSON; typically |
| 42 |
it will be a `dict`. |
| 43 |
|
| 44 |
Note that there is an important distinction between the Python object format |
| 45 |
of this field and the Babelfont-JSON representation. When stored to JSON, this key |
| 46 |
is exported not as `_formatspecific` but as a simple underscore (`_`). |
| 47 |
|
| 48 |
|
| 49 |
|