[cffLib.specializer] Simplify vsindex protocol
This commit is contained in:
parent
3d2df43a67
commit
c22f7d5af4
@ -43,10 +43,8 @@ def programToCommands(program, getNumRegions=None):
|
|||||||
hintmask/cntrmask argument, as well as stray arguments at the end of the
|
hintmask/cntrmask argument, as well as stray arguments at the end of the
|
||||||
program (🤷).
|
program (🤷).
|
||||||
'getNumRegions' may be None, or a callable object. It must return the
|
'getNumRegions' may be None, or a callable object. It must return the
|
||||||
number of regions. 'getNumRegions' takes a single argument, vsindex. If
|
number of regions. 'getNumRegions' takes a single argument, vsindex. It
|
||||||
the vsindex argument is None, getNumRegions returns the default number
|
returns the numRegions for the vsindex.
|
||||||
of regions for the charstring, else it returns the numRegions for
|
|
||||||
the vsindex.
|
|
||||||
The Charstring may or may not start with a width value. If the first
|
The Charstring may or may not start with a width value. If the first
|
||||||
non-blend operator has an odd number of arguments, then the first argument is
|
non-blend operator has an odd number of arguments, then the first argument is
|
||||||
a width, and is popped off. This is complicated with blend operators, as
|
a width, and is popped off. This is complicated with blend operators, as
|
||||||
@ -61,7 +59,7 @@ def programToCommands(program, getNumRegions=None):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
seenWidthOp = False
|
seenWidthOp = False
|
||||||
vsIndex = None
|
vsIndex = 0
|
||||||
lenBlendStack = 0
|
lenBlendStack = 0
|
||||||
lastBlendIndex = 0
|
lastBlendIndex = 0
|
||||||
commands = []
|
commands = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user