ugh, the zfill string method doesn't exist in 2.2.1 and earlier :-(
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@366 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
parent
e3b3ada254
commit
f7f0f74419
@ -1,5 +1,8 @@
|
|||||||
TTX/FontTools Version 2.0 beta 2 (released ??? 2002)
|
TTX/FontTools Version 2.0 beta 2 (released ??? 2002)
|
||||||
|
|
||||||
|
- Fixed ttx -l: it turned out this part of the code didn't work with
|
||||||
|
Python 2.2.1 and earlier. My bad to do most of my testing with a
|
||||||
|
different version than I shipped TTX with :-(
|
||||||
- Fixed bug in ClassDef format 1 subtable (Andreas Seidel bumped into
|
- Fixed bug in ClassDef format 1 subtable (Andreas Seidel bumped into
|
||||||
this one).
|
this one).
|
||||||
|
|
||||||
|
@ -128,6 +128,7 @@ class Options:
|
|||||||
|
|
||||||
|
|
||||||
def ttList(input, output, options):
|
def ttList(input, output, options):
|
||||||
|
import string
|
||||||
ttf = TTFont(input)
|
ttf = TTFont(input)
|
||||||
reader = ttf.reader
|
reader = ttf.reader
|
||||||
tags = reader.keys()
|
tags = reader.keys()
|
||||||
@ -138,7 +139,7 @@ def ttList(input, output, options):
|
|||||||
print format % ("----", "----------", "-------", "-------")
|
print format % ("----", "----------", "-------", "-------")
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
entry = reader.tables[tag]
|
entry = reader.tables[tag]
|
||||||
checksum = "0x" + hex(entry.checkSum)[2:].zfill(8)
|
checksum = "0x" + string.zfill(hex(entry.checkSum)[2:], 8)
|
||||||
print format % (tag, checksum, entry.length, entry.offset)
|
print format % (tag, checksum, entry.length, entry.offset)
|
||||||
print
|
print
|
||||||
ttf.close()
|
ttf.close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user