def processFont(self, filepath): extension = filepath[filepath.rindex('.'):] ftFont = None # print # print 'filepath', filepath try: ftFont = TFFreetypeFont(filepath) postscript_name = ftFont.postscriptName if postscript_name in self.processedPostscriptNames: return # print '\t', 'postscript_name', postscript_name self.processedPostscriptNames.add(postscript_name) characterToGlyphIndexMap = ftFont.getCharacterToGlyphIndexMap() except Exception, e: print 'error filepath', filepath print e.message traceback.print_exc() del ftFont return