From 1345ae8693a95d3bf7c4c7f43ce0fd97fca7f23f Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Fri, 14 Jun 2019 11:24:33 +0100 Subject: [PATCH] instancer: don't define self in terms of mutator, just say what it is --- Lib/fontTools/varLib/instancer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Lib/fontTools/varLib/instancer.py b/Lib/fontTools/varLib/instancer.py index 6a142ada4..67b85f406 100644 --- a/Lib/fontTools/varLib/instancer.py +++ b/Lib/fontTools/varLib/instancer.py @@ -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.