Doc/designspaceLib: clarify labelNames values must always be unicode

otherwise, on py27, we end up writing garbage bytes in name record
strings.
This commit is contained in:
Cosimo Lupo 2019-01-13 13:40:01 +00:00
parent acbc65c1a9
commit 1a07ba9bc4
No known key found for this signature in database
GPG Key ID: 59D54DB0C9976482
2 changed files with 3 additions and 2 deletions

View File

@ -277,7 +277,8 @@ AxisDescriptor object
dicts. MutatorMath + Varlib.
- ``labelNames``: dict. When defining a non-registered axis, it will be
necessary to define user-facing readable names for the axis. Keyed by
xml:lang code. Varlib.
xml:lang code. Values are required to be ``unicode`` strings, even if
they only contain ASCII characters.
- ``minimum``: number. The minimum value for this axis in user space.
MutatorMath + Varlib.
- ``maximum``: number. The maximum value for this axis in user space.

View File

@ -70,7 +70,7 @@ readable names for this axis if this is not an axis that is registered
by OpenType. Think "The label next to the slider". The attribute is a
dictionary. The key is the `xml language
tag <https://www.w3.org/International/articles/language-tags/>`__, the
value is a utf-8 string with the name. Whether or not this attribute is
value is a ``unicode`` string with the name. Whether or not this attribute is
used depends on the font building tool, the operating system and the
authoring software. This, at least, is the place to record it.