[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):
|
def getCompiler(self, strings, parent, isCFF2=None):
|
||||||
return self.compilerClass(self, strings, parent, isCFF2=isCFF2)
|
return self.compilerClass(self, strings, parent, isCFF2=isCFF2)
|
||||||
|
|
||||||
|
def clear(self):
|
||||||
|
del self.items[:]
|
||||||
|
|
||||||
|
|
||||||
class GlobalSubrsIndex(Index):
|
class GlobalSubrsIndex(Index):
|
||||||
|
|
||||||
|
@ -470,9 +470,7 @@ def desubroutinize(self):
|
|||||||
del pd.Subrs
|
del pd.Subrs
|
||||||
if 'Subrs' in pd.rawDict:
|
if 'Subrs' in pd.rawDict:
|
||||||
del pd.rawDict['Subrs']
|
del pd.rawDict['Subrs']
|
||||||
# clear GlobalSubrsIndex
|
cff.GlobalSubrs.clear()
|
||||||
if cff.GlobalSubrs:
|
|
||||||
cff.GlobalSubrs.items = []
|
|
||||||
|
|
||||||
|
|
||||||
@_add_method(ttLib.getTableClass('CFF '))
|
@_add_method(ttLib.getTableClass('CFF '))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user