#FLM: Export glyphs naar tagged text OT from robofab.world import CurrentFont from robofab.interface.all.dialogs import GetFolder, ProgressBar mySize = 44.0 myLeading = 48.0 myFont = CurrentFont() myFontfam = myFont.info.otFamilyName myFontstyle = myFont.info.otStyleName myPagebreak = "" myPath = GetFolder() if myPath: myPath += ":" + myFontfam + "-" + myFontstyle + ".txt" myFile = open(myPath, "w") try: myFile.write("" + chr(10)) myFile.write(">" + chr(10)) myLine = myPagebreak + "" + myFontfam + "-" + myFontstyle + " glyph overview, generated 26 10 2004" + chr(10) + "Version " + str(myFont.info.versionMajor) + "." + str(myFont.info.versionMinor) + ", designed by " + myFont.info.designer + ", " + str(myFont.info.year) + "." + chr(10) + "" + chr(10) + " | " myFile.write(myLine) myBar = ProgressBar('Exporting glyphs...', len(myFont)) for myGlyph in range(1,len(myFont)): myLine = "<0xFFFD>| |" myFile.write(myLine) myBar.tick() myFile.write("") myPagebreak = "" myFile.close() myBar.close() print "Generated glyph overview for", myFontfam + "-" + myFontstyle except: myFile.close() print "An error occurred" print "Done"