[cffLib]: add clear() method to Index class to empty in-place
This commit is contained in:
parent
97006a0d67
commit
8e8da97a4c
@ -607,6 +607,9 @@ class Index(object):
|
||||
def getCompiler(self, strings, parent, isCFF2=None):
|
||||
return self.compilerClass(self, strings, parent, isCFF2=isCFF2)
|
||||
|
||||
def clear(self):
|
||||
del self.items[:]
|
||||
|
||||
|
||||
class GlobalSubrsIndex(Index):
|
||||
|
||||
|
@ -470,9 +470,7 @@ def desubroutinize(self):
|
||||
del pd.Subrs
|
||||
if 'Subrs' in pd.rawDict:
|
||||
del pd.rawDict['Subrs']
|
||||
# clear GlobalSubrsIndex
|
||||
if cff.GlobalSubrs:
|
||||
cff.GlobalSubrs.items = []
|
||||
cff.GlobalSubrs.clear()
|
||||
|
||||
|
||||
@_add_method(ttLib.getTableClass('CFF '))
|
||||
|
Loading…
x
Reference in New Issue
Block a user