when _getGlyphNamesFromCmap gets called by the cmap parser itself, the partially loaded subtable is removed and then restored later. However, when a TTFont instance is imported from XML rather than from binary file, its 'reader' attribute is None, and so the line: tempcmap = self['cmap'].getcmap(3, 1) will make TTFont.__getitem__ raise KeyError. It's better to fail nicely, and return a dummy glyphOrder based on maxp numGlyphs.