[cffLib.specializer] Enforce minimum number of arguments in all ops
This commit is contained in:
parent
0cbe43483d
commit
4fd719159a
@ -97,10 +97,12 @@ class _GeneralizerDecombinerCommandsMap(object):
|
||||
|
||||
@staticmethod
|
||||
def rlineto(args):
|
||||
if not args: raise ValueError(args)
|
||||
for args in _everyN(args, 2):
|
||||
yield ('rlineto', args)
|
||||
@staticmethod
|
||||
def hlineto(args):
|
||||
if not args: raise ValueError(args)
|
||||
it = iter(args)
|
||||
try:
|
||||
while True:
|
||||
@ -110,6 +112,7 @@ class _GeneralizerDecombinerCommandsMap(object):
|
||||
pass
|
||||
@staticmethod
|
||||
def vlineto(args):
|
||||
if not args: raise ValueError(args)
|
||||
it = iter(args)
|
||||
try:
|
||||
while True:
|
||||
@ -119,6 +122,7 @@ class _GeneralizerDecombinerCommandsMap(object):
|
||||
pass
|
||||
@staticmethod
|
||||
def rrcurveto(args):
|
||||
if not args: raise ValueError(args)
|
||||
for args in _everyN(args, 6):
|
||||
yield ('rrcurveto', args)
|
||||
@staticmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user