[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] infinite loop/autohinter crash
From: |
Werner LEMBERG |
Subject: |
Re: [Devel] infinite loop/autohinter crash |
Date: |
Fri, 14 Dec 2001 01:13:43 +0100 (CET) |
> Is there a utility I can use to simply dump the contents of the ttf
> file in some readable format?
Yes, fonttools (from fonttools.sf.net). It first indicates a corrupt
cmap table:
Dumping "flunk.ttf" to "flunk"...
Dumping 'OS/2' table...
Traceback (most recent call last):
File "/usr/local/bin/ttDump", line 100, in ?
splitTables=splitTables, disassembleInstructions=disassembleInstructions)
File
"/usr/lib/python2.1/site-packages/FontTools/fontTools/ttLib/__init__.py", line
210, in saveXML
table = self[tag]
File
"/usr/lib/python2.1/site-packages/FontTools/fontTools/ttLib/__init__.py", line
316, in __getitem__
table.decompile(data, self)
File
"/usr/lib/python2.1/site-packages/FontTools/fontTools/ttLib/tables/_c_m_a_p.py",
line 35, in decompile
table.decompile(data[offset:offset+int(length)], ttFont)
File
"/usr/lib/python2.1/site-packages/FontTools/fontTools/ttLib/tables/_c_m_a_p.py",
line 191, in decompile
assert len(data) == length, "corrupt cmap table (%d, %d)" % (len(data),
length)
AssertionError: corrupt cmap table (544, 556)
Using `-x cmap' to skip the cmap table, it then complains about an
incorrect glyph table:
Traceback (most recent call last):
File "/usr/local/bin/ttDump", line 100, in ?
splitTables=splitTables, disassembleInstructions=disassembleInstructions)
File
"/usr/lib/python2.1/site-packages/FontTools/fontTools/ttLib/__init__.py", line
210, in saveXML
table = self[tag]
File
"/usr/lib/python2.1/site-packages/FontTools/fontTools/ttLib/__init__.py", line
316, in __getitem__
table.decompile(data, self)
File
"/usr/lib/python2.1/site-packages/FontTools/fontTools/ttLib/tables/_g_l_y_f.py",
line 35, in decompile
glyphName = glyphOrder[i]
IndexError: list index out of range
Repeating the game, you get an incorrect htmx table:
too much data for hmtx/vmtx table
Traceback (most recent call last):
File "/usr/local/bin/ttDump", line 100, in ?
splitTables=splitTables, disassembleInstructions=disassembleInstructions)
File
"/usr/lib/python2.1/site-packages/FontTools/fontTools/ttLib/__init__.py", line
210, in saveXML
table = self[tag]
File
"/usr/lib/python2.1/site-packages/FontTools/fontTools/ttLib/__init__.py", line
316, in __getitem__
table.decompile(data, self)
File
"/usr/lib/python2.1/site-packages/FontTools/fontTools/ttLib/tables/_h_m_t_x.py",
line 44, in decompile
glyphName = ttFont.getGlyphName(i)
File
"/usr/lib/python2.1/site-packages/FontTools/fontTools/ttLib/__init__.py", line
429, in getGlyphName
return self.getGlyphOrder()[glyphID]
IndexError: list index out of range
The remaining tables are completely useless. It seems that your
translation process is severely broken.
Just, any chance to make ttDump continue? Since FreeType 1 can
display the font (albeit incompletely), the errors aren't apparently
too severe.
Werner