Changed sourceDescriptor object attribute to layerName.

Changed non-standard axis name to all caps.
This commit is contained in:
Erik van Blokland 2018-04-28 13:01:25 +02:00
parent 1c6c35dc38
commit 1fededb376
3 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@ A couple of differences between things that use designspaces:
- Varlib does not support anisotropic interpolations.
- MutatorMath and Superpolator will extrapolate over the boundaries of
the axes. Varlib can not.
the axes. Varlib can not (at the moment).
- Varlib requires much less data to define an instance than
MutatorMath.
- The goals of Varlib and MutatorMath are different, so not all
@ -129,8 +129,8 @@ Attributes
- ``path``: string. Absolute path to the source file, calculated from
the document path and the string in the filename attr. MutatorMath +
Varlib.
``layer``: string. The name of the layer in the source to look for
outline data. Defaults to ``None`` which means the foreground layer.
``layerName``: string. The name of the layer in the source to look for
outline data. Default ``None`` which means ``foreground``.
- ``font``: Any Python object. Optional. Points to a representation of
this source font that is loaded in memory, as a Python object
(e.g. a ``defcon.Font`` or a ``fontTools.ttFont.TTFont``). The default
@ -541,8 +541,7 @@ Attributes
to the root path of this document. The path can be at the same level
as the document or lower.
- ``layer``: optional, string. The name of the layer in the source file.
If no layer is given assume it is the foreground layer. The layer names
should follow the conventions layed out in the .. _http://unifiedfontobject.org/versions/ufo3/layercontents.plist/
If no layer attribute is given assume it is the foreground layer.
.. 31-lib-element:

View File

@ -111,6 +111,7 @@ outline geometry, kerning and font.info that we want to work with.
- The **path** attribute is the absolute path to an existing UFO.
- The **name** attribute is a unique name for this source used to keep
track it.
- The **layerName** attribute is the name of the UFO3 layer. Default None for ``foreground``.
So go ahead and add another master:

View File

@ -143,7 +143,7 @@ def test_fill_document(tmpdir):
a3.maximum = 666
a3.default = 444
a3.name = "spooky"
a3.tag = "spok"
a3.tag = "SPOK"
a3.map = [(0.0, 10.0), (401.0, 66.0), (1000.0, 990.0)]
#doc.addAxis(a3) # uncomment this line to test the effects of default axes values
# write some rules