From ce522410f26648af01372cc96fe689cf3b3a7c84 Mon Sep 17 00:00:00 2001 From: jvr Date: Mon, 25 Aug 2003 07:37:25 +0000 Subject: [PATCH] small nits git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@418 4cde692c-a291-49d1-8350-778aa11640f8 --- Lib/fontTools/cffLib.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Lib/fontTools/cffLib.py b/Lib/fontTools/cffLib.py index 373352bbe..b1c7edc42 100644 --- a/Lib/fontTools/cffLib.py +++ b/Lib/fontTools/cffLib.py @@ -1,7 +1,7 @@ """cffLib.py -- read/write tools for Adobe CFF fonts.""" # -# $Id: cffLib.py,v 1.30 2003-08-24 19:56:16 jvr Exp $ +# $Id: cffLib.py,v 1.31 2003-08-25 07:37:25 jvr Exp $ # import struct, sstruct @@ -42,7 +42,7 @@ class CFFFontSet: return len(self.fontNames) def keys(self): - return self.fontNames[:] + return list(self.fontNames) def values(self): return self.topDictIndex @@ -262,7 +262,6 @@ class FDArrayIndexCompiler(IndexCompiler): children.extend(fontDict.getChildren(strings)) return children - def toFile(self, file): offsets = self.getOffsets() writeCard16(file, len(self.items)) @@ -284,8 +283,6 @@ class FDArrayIndexCompiler(IndexCompiler): self.parent.rawDict["FDArray"] = pos - - class GlobalSubrsCompiler(IndexCompiler): def getItems(self, items, strings): out = [] @@ -1336,9 +1333,6 @@ class DictCompiler: l = len(argType) assert len(value) == l, "value doesn't match arg type" for i in range(l): - # why was this here? arg = argType[l - i - 1] - # In the case of the ROS, it assigns exactly the - # wrong handler types arg = argType[i] v = value[i] arghandler = getattr(self, "arg_" + arg) @@ -1392,7 +1386,7 @@ class TopDictCompiler(DictCompiler): encoding = self.dictObj.Encoding if not isinstance(encoding, StringType): children.append(EncodingCompiler(strings, encoding, self)) - if hasattr(self.dictObj, "FDSelect"): + if hasattr(self.dictObj, "FDSelect"): # I have not yet supported merging a ttx CFF-CID font, as there are interesting # issues about merging the FDArrays. Here I assume that # either the font was read from XML, and teh FDSelect indices are all @@ -1412,7 +1406,7 @@ class TopDictCompiler(DictCompiler): items.append(charStrings[name]) charStringsComp = CharStringsCompiler(items, strings, self) children.append(charStringsComp) - if hasattr(self.dictObj, "FDArray"): + if hasattr(self.dictObj, "FDArray"): # I have not yet supported merging a ttx CFF-CID font, as there are interesting # issues about merging the FDArrays. Here I assume that the FDArray info is correct # and complete.