def fontWasModified(self, info): OutputWindow().clear() self.fillAnchorsAndMarksDicts() del self.glyphNamesList[:] del self.selectedGlyphNamesList[:] self.updateExtensionWindow()
# TODO: allow user to paste space-separated string of glyphs to limit check to ### SET THIS TO IGNORE GLYPHS YOU WANT TO LEAVE ALONE (e.g. experimental glyphs) ### glyphsToIgnore = "" #################################################################################### debug = False # will print full dictionaries files = getFile("Select files to check for point count similarity", allowsMultipleSelection=True, fileTypes=["ufo"]) fonts = [] pointsDict = {} OutputWindow().show() OutputWindow().clear() print("\nCOMPATIBILITY CHECK: GLYPH CONSISTENCY & POINT COUNTS\n\n") print("""\ 📊 Emoji are present to help you spot point number differences more quickly. Specific emoji have no meaning as to which numbers are correct or incorrect. The first count will be marked with 🍇, the next with 🥑, and so on.\n """) for file in files: font = OpenFont(file, showInterface=False) # fontName = (font.info.styleName).transl ate({ord(c): None for c in 'aeiou'}) # remove vowels to shorten fontName = (font.info.styleName)
# Run in (or via) RoboFont # clear output from mojo.UI import OutputWindow OutputWindow().clear() # imports import os import shutil import tempfile import defcon from fontTools.designspaceLib import * # make sources folder folder = 'sources' if os.path.exists(folder): shutil.rmtree(folder) os.makedirs(folder) # get a ds and font doc = DesignSpaceDocument() f = CurrentFont() ##### # parameters ##### # do and dont doSlant = True # if False these next two are False by default