diff --git a/Lib/fontTools/cffLib/__init__.py b/Lib/fontTools/cffLib/__init__.py index 568fe4939..403ef7399 100644 --- a/Lib/fontTools/cffLib/__init__.py +++ b/Lib/fontTools/cffLib/__init__.py @@ -99,7 +99,7 @@ class CFFFontSet(object): self.hdrSize = 5 writer.add(sstruct.pack(cffHeaderFormat, self)) # Note: topDictSize will most likely change in CFFWriter.toFile(). - self.topDictSize = topCompiler.getTopDictLen() + self.topDictSize = topCompiler.getDataLength() writer.add(struct.pack(">H", self.topDictSize)) else: self.hdrSize = 4 @@ -426,10 +426,6 @@ class TopDictIndexCompiler(IndexCompiler): class TopDictDataCompiler(TopDictIndexCompiler): - def getTopDictLen(self): - topDictLen = self.items[0].getDataLength() - return topDictLen - def getOffsets(self): offsets = [0, self.items[0].getDataLength()] return offsets @@ -664,10 +660,6 @@ class TopDictIndex(Index): dataLength = len(self) return dataLength - def toFile(self, file): - topDict = self.items[0] - topDict.toFile(file) - def toXML(self, xmlWriter, progress): for i in range(len(self)): xmlWriter.begintag("FontDict", index=i)