Merge pull request #2212 from fonttools/mutator-trivial-fixes
Mutator trivial fixes
This commit is contained in:
commit
e41c3b8b08
@ -1315,7 +1315,7 @@ def parseArgs(args):
|
||||
"locargs",
|
||||
metavar="AXIS=LOC",
|
||||
nargs="*",
|
||||
help="List of space separated locations. A location consist in "
|
||||
help="List of space separated locations. A location consists of "
|
||||
"the tag of a variation axis, followed by '=' and one of number, "
|
||||
"number:number or the literal string 'drop'. "
|
||||
"E.g.: wdth=100 or wght=75.0:125.0 or wght=drop",
|
||||
|
@ -345,14 +345,8 @@ def instantiateVariableFont(varfont, location, inplace=False, overlap=True):
|
||||
# Change maxp attributes as IDEF is added
|
||||
if 'maxp' in varfont:
|
||||
maxp = varfont['maxp']
|
||||
if hasattr(maxp, "maxInstructionDefs"):
|
||||
maxp.maxInstructionDefs += 1
|
||||
else:
|
||||
setattr(maxp, "maxInstructionDefs", 1)
|
||||
if hasattr(maxp, "maxStackElements"):
|
||||
maxp.maxStackElements = max(len(loc), maxp.maxStackElements)
|
||||
else:
|
||||
setattr(maxp, "maxInstructionDefs", len(loc))
|
||||
setattr(maxp, "maxInstructionDefs", 1 + getattr(maxp, "maxInstructionDefs", 0))
|
||||
setattr(maxp, "maxStackElements", max(len(loc), getattr(maxp, "maxStackElements", 0)))
|
||||
|
||||
if 'name' in varfont:
|
||||
log.info("Pruning name table")
|
||||
|
Loading…
x
Reference in New Issue
Block a user