def getMorfFont(self, sender): f = CurrentFont() self.font = f self.currentRecipe = self.font.lib['morf']['recipes'].keys()[ self.w.recipe.get()] recipe = self.currentRecipe nf = f.copy() nf.info.styleName = self.currentRecipe glyphs = f.keys() for gn in glyphs: g = f[gn] #if 1: if 'morf' in g.lib.keys() and recipe in g.lib['morf'].keys(): self.widthBy = g.lib['morf'][recipe]['widthBy'] self.heightBy = g.lib['morf'][recipe]['heightBy'] self.factor = g.lib['morf'][recipe]['factor'] self.weightByX = g.lib['morf'][recipe]['weightByX'] self.weightByY = g.lib['morf'][recipe]['weightByY'] else: self.getDefaultValues() # self.getDefaultValues() path = GetMorfGlyph(g, self.factor, self.weightByX, self.weightByY, self.widthBy, self.heightBy).path if path and type(path) != type(""): # print g nf.newGlyph(g.name) nf[g.name].width = g.width * self.widthBy writePathInGlyph(path, nf[g.name]) nf[g.name].round() else: continue nf.showUI()