instancer: drop STAT when varfont fully instanced
varLib.mutator does the same. Ideally we would keep STAT if has any extra (inter-family) DesignAxis or it font was only partially instanced. We can improve on this later as needed.
This commit is contained in:
parent
8eed2a2ec0
commit
b8a33d0c75
@ -570,6 +570,15 @@ def instantiateVariableFont(varfont, axis_limits, inplace=False, optimize=True):
|
||||
|
||||
instantiateFvar(varfont, axis_limits)
|
||||
|
||||
if "fvar" not in varfont and "STAT" in varfont:
|
||||
# Drop the entire STAT table when the varfont is fully instanced (or keep it
|
||||
# as is if only partially instanced).
|
||||
# TODO(anthrotype) Only drop DesignAxis and corresponding AxisValue records
|
||||
# for the pinned axes that were removed from fvar. STAT design axes may be a
|
||||
# superset of fvar axes (e.g. can include axes for an entire family).
|
||||
log.info("Dropping STAT table")
|
||||
del varfont["STAT"]
|
||||
|
||||
return varfont
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user