instancer: don't define self in terms of mutator, just say what it is

This commit is contained in:
Cosimo Lupo 2019-06-14 11:24:33 +01:00
parent 65b0609be1
commit 1345ae8693
No known key found for this signature in database
GPG Key ID: 20D4A261E4A0E642

View File

@ -1,8 +1,9 @@
""" Partially instantiate a variable font.
This is similar to fontTools.varLib.mutator, but instead of creating full
instances (i.e. static fonts) from variable fonts, it creates "partial"
variable fonts, only containing a subset of the variation space.
The module exports an `instantiateVariableFont` function and CLI that allow to
create full instances (i.e. static fonts) from variable fonts, as well as "partial"
variable fonts that only contain a subset of the original variation space.
For example, if you wish to pin the width axis to a given location while keeping
the rest of the axes, you can do:
@ -44,6 +45,7 @@ advance what the default value for that axis is, one can pass a `None` value:
From the console script, this is equivalent to passing `wght=drop` as input.
This module is similar to fontTools.varLib.mutator, which it's intended to supersede.
Note that, unlike varLib.mutator, when an axis is not mentioned in the input
location, the varLib.instancer will keep the axis and the corresponding deltas,
whereas mutator implicitly drops the axis at its default coordinate.