Merge pull request #2570 from fonttools/cff-TopDictIndex

[cffLib] Fix calls to TopDictIndex()
This commit is contained in:
Khaled Hosny 2022-04-01 00:24:17 +02:00 committed by GitHub
commit 4bb0e776a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,7 +337,7 @@ class CFFFontSet(object):
topDict = TopDict(
GlobalSubrs=self.GlobalSubrs,
cff2GetGlyphOrder=cff2GetGlyphOrder)
self.topDictIndex = TopDictIndex(None, cff2GetGlyphOrder, None)
self.topDictIndex = TopDictIndex(None, cff2GetGlyphOrder)
self.topDictIndex.append(topDict)
for element in content:
if isinstance(element, str):
@ -375,7 +375,7 @@ class CFFFontSet(object):
filled via :meth:`decompile`.)"""
self.major = 2
cff2GetGlyphOrder = self.otFont.getGlyphOrder
topDictData = TopDictIndex(None, cff2GetGlyphOrder, None)
topDictData = TopDictIndex(None, cff2GetGlyphOrder)
topDictData.items = self.topDictIndex.items
self.topDictIndex = topDictData
topDict = topDictData[0]