[cffLib.specializer] Leave 1 stack free area for subroutinizer use
This commit is contained in:
parent
d3229d5777
commit
41a21cce27
@ -493,7 +493,9 @@ def specializeCommands(commands,
|
|||||||
if d0 is None: continue
|
if d0 is None: continue
|
||||||
new_op = d0+d+'curveto'
|
new_op = d0+d+'curveto'
|
||||||
|
|
||||||
if new_op and len(args1) + len(args2) <= maxstack:
|
# Make sure the stack depth does not exceed (maxstack - 1), so
|
||||||
|
# that subroutinizer can insert subroutine calls at any point.
|
||||||
|
if new_op and len(args1) + len(args2) <= maxstack - 1:
|
||||||
commands[i-1] = (new_op, args1+args2)
|
commands[i-1] = (new_op, args1+args2)
|
||||||
del commands[i]
|
del commands[i]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user