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",
|
"locargs",
|
||||||
metavar="AXIS=LOC",
|
metavar="AXIS=LOC",
|
||||||
nargs="*",
|
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, "
|
"the tag of a variation axis, followed by '=' and one of number, "
|
||||||
"number:number or the literal string 'drop'. "
|
"number:number or the literal string 'drop'. "
|
||||||
"E.g.: wdth=100 or wght=75.0:125.0 or wght=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
|
# Change maxp attributes as IDEF is added
|
||||||
if 'maxp' in varfont:
|
if 'maxp' in varfont:
|
||||||
maxp = varfont['maxp']
|
maxp = varfont['maxp']
|
||||||
if hasattr(maxp, "maxInstructionDefs"):
|
setattr(maxp, "maxInstructionDefs", 1 + getattr(maxp, "maxInstructionDefs", 0))
|
||||||
maxp.maxInstructionDefs += 1
|
setattr(maxp, "maxStackElements", max(len(loc), getattr(maxp, "maxStackElements", 0)))
|
||||||
else:
|
|
||||||
setattr(maxp, "maxInstructionDefs", 1)
|
|
||||||
if hasattr(maxp, "maxStackElements"):
|
|
||||||
maxp.maxStackElements = max(len(loc), maxp.maxStackElements)
|
|
||||||
else:
|
|
||||||
setattr(maxp, "maxInstructionDefs", len(loc))
|
|
||||||
|
|
||||||
if 'name' in varfont:
|
if 'name' in varfont:
|
||||||
log.info("Pruning name table")
|
log.info("Pruning name table")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user