Changes to the index definition of the key, allowing for the key to appear in the root lib, and defining the order of inheritance
This commit is contained in:
parent
bc17e738f0
commit
adf7d6817f
@ -123,31 +123,38 @@ UFOs says.
|
|||||||
public.fontInfo
|
public.fontInfo
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
This lib key, when included in the ``<lib>`` element inside an ``<instance>`` or
|
This lib key, when included in the ``<lib>`` element inside an ``<instance>``
|
||||||
``<variable-font>`` tag, allows for direct manipulation of font info data in
|
or ``<variable-font>`` tag, or the ``<lib>`` element at the root of a
|
||||||
|
designspace document, allows for direct manipulation of font info data in
|
||||||
instances and variable fonts. The lib value must follow the
|
instances and variable fonts. The lib value must follow the
|
||||||
`UFO3 fontinfo.plist specification <https://unifiedfontobject.org/versions/ufo3/fontinfo.plist/>`_,
|
`UFO3 fontinfo.plist specification <https://unifiedfontobject.org/versions/ufo3/fontinfo.plist/>`_,
|
||||||
and should functionally appear to be a property list dictionary with the same
|
and should functionally appear to be a property list dictionary with the same
|
||||||
structure as the ``fontinfo.plist`` file in a UFO.
|
structure as the ``fontinfo.plist`` file in a UFO.
|
||||||
|
|
||||||
|
|
||||||
All font info items in the UFO fontinfo.plist specification should be able to
|
All font info items in the UFO fontinfo.plist specification should be able to
|
||||||
be defined in the ``public.fontInfo`` lib. Checking validity of the data using
|
be defined in the ``public.fontInfo`` lib. Checking validity of the data using
|
||||||
``fontTools.ufoLib.validators`` is recommended but not required.
|
``fontTools.ufoLib.validators`` is recommended but not required.
|
||||||
|
|
||||||
A tool generating the font should copy the font info directly from the
|
All font info items for a variable font or an instance must be inherited using
|
||||||
``public.fontInfo`` lib item to the instance or the variable font, superceding
|
the following order, in order of descending priority:
|
||||||
all other settings. All info **not** supplied in ``public.fontInfo`` must be
|
|
||||||
inherited from the name attributes in the ``<instance>`` or ``<variable-font>``
|
#. The ``public.fontInfo`` key in the ``<lib>`` element of the ``<variable-font>``
|
||||||
elements (first) and the UFO font info from the source at the origin (second).
|
or ``<instance>`` elements.
|
||||||
Absence of a key from the ``public.fontInfo`` lib does **not** mean a that piece
|
#. The ``<varaiable-font>`` or ``<instance>`` XML attributes for names (i.e.
|
||||||
of font info should be interpreted as being undefined unless it is also left
|
``familyname``, ``stylename``, etc.)
|
||||||
undefined in the other locations. In the case of information in ``public.fontInfo``
|
#. The ``public.fontInfo`` key found in the ``<lib>`` element of the designspace
|
||||||
conflicting with supplied name strings in the ``<instance>`` or ``<variable-font>``
|
document's root.
|
||||||
elements, or the info supplied from the source at the origin, the data in
|
#. The ``fontinfo.plist`` in the UFO source at the origin of the interpolation
|
||||||
``public.fontInfo`` must supercede that information because it is understood
|
space.
|
||||||
that the designer is using ``public.fontInfo`` to gain more granular control
|
|
||||||
over the resulting font.
|
Absence of a font info key from the value of a ``public.fontInfo`` lib does
|
||||||
|
**not** mean a that piece of font info should be interpreted as being undefined.
|
||||||
|
A tool generating the variable font or instance should continue on to the next
|
||||||
|
level of the inheritence order and apply the value found there, if any. If the
|
||||||
|
tool makes it to the end of the inheritence order without finding a valid value
|
||||||
|
for a given font info key, it should then be considered undefined. In the case
|
||||||
|
of any conflicting values for a font info key, the value highest in the
|
||||||
|
inheritance order must be chosen over the others.
|
||||||
|
|
||||||
Implementation and differences
|
Implementation and differences
|
||||||
==============================
|
==============================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user