#30 traceback on amd64 with DejaVuSans.ttf

closed-fixed
nobody
TrueType (18)
5
2007-11-14
2007-07-28
Paul Wise
No

http://bugs.debian.org/434377

ttx crashes on amd64 when decompiling DejaVuSans.ttf from dejavu 2.18

% ttx DejaVuSans.ttf
Dumping "DejaVuSans.ttf" to "DejaVuSans.ttx"...
Dumping 'GlyphOrder' table...
Dumping 'head' table...
Dumping 'hhea' table...
Dumping 'maxp' table...
Dumping 'OS/2' table...
Dumping 'hmtx' table...
Dumping 'cmap' table...
Dumping 'fpgm' table...
Dumping 'prep' table...
Dumping 'cvt ' table...
Dumping 'loca' table...
Traceback (most recent call last):
File "/usr/bin/ttx", line 11, in ?
ttx.main(sys.argv[1:])
File "/usr/lib/python2.4/site-packages/FontTools/fontTools/ttx.py", line 292, in main
process(jobs, options)
File "/usr/lib/python2.4/site-packages/FontTools/fontTools/ttx.py", line 277, in process
action(input, output, options)
File "/usr/lib/python2.4/site-packages/FontTools/fontTools/ttx.py", line 170, in ttDump
disassembleInstructions=options.disassembleInstructions)
File "/usr/lib/python2.4/site-packages/FontTools/fontTools/ttLib/__init__.py", line 262, in saveXML
self._tableToXML(tableWriter, tag, progress)
File "/usr/lib/python2.4/site-packages/FontTools/fontTools/ttLib/__init__.py", line 277, in _tableToXML
table = self[tag]
File "/usr/lib/python2.4/site-packages/FontTools/fontTools/ttLib/__init__.py", line 367, in __getitem__
table.decompile(data, self)
File "/usr/lib/python2.4/site-packages/FontTools/fontTools/ttLib/tables/_g_l_y_f.py", line 37, in decompile
glyphdata = data[last:next]
TypeError: slice indices must be integers or None

Discussion

  • Paul Wise
    Paul Wise
    2007-11-14

    Logged In: YES
    user_id=35028
    Originator: YES

    Fixed in Lib/fontTools/ttLib/tables/_g_l_y_f.py 1.20 by casting next/last to integers before using them.

     
  • Paul Wise
    Paul Wise
    2007-11-14

    • status: open --> closed-fixed