diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/pylib/fontbuild/Build.pyx | 12 | ||||
-rw-r--r-- | misc/pylib/fontbuild/mix.pyx | 17 |
2 files changed, 16 insertions, 13 deletions
diff --git a/misc/pylib/fontbuild/Build.pyx b/misc/pylib/fontbuild/Build.pyx index 554003b50..2832aa28e 100644 --- a/misc/pylib/fontbuild/Build.pyx +++ b/misc/pylib/fontbuild/Build.pyx @@ -62,9 +62,9 @@ class FontProject: self.builddir = "out" self.decompose = self.config.get("glyphs","decompose").split() self.predecompose = self.config.get("glyphs","predecompose").split() - self.lessItalic = self.config.get("glyphs","lessitalic").split() - self.deleteList = self.config.get("glyphs","delete").split() - self.noItalic = self.config.get("glyphs","noitalic").split() + self.lessItalic = set(self.config.get("glyphs","lessitalic").split()) + self.deleteList = set(self.config.get("glyphs","delete").split()) + self.noItalic = set(self.config.get("glyphs","noitalic").split()) self.buildOTF = False self.compatible = False @@ -89,11 +89,13 @@ class FontProject: n = names.split("/") log("---------------------\n%s %s\n----------------------" %(n[0],n[1])) + if isinstance( mix, Mix): log(">> Mixing masters") - f = mix.generateFont(self.basefont) + f = mix.generateFont(self.basefont, self.deleteList) else: f = mix.copy() + deleteGlyphs(f, self.deleteList) if italic == True: log(">> Italicizing") @@ -166,7 +168,7 @@ class FontProject: if not self.compatible: cleanCurves(f) - deleteGlyphs(f, self.deleteList) + # deleteGlyphs(f, self.deleteList) log(">> Generating font files") ufoName = self.generateOutputPath(f, "ufo") diff --git a/misc/pylib/fontbuild/mix.pyx b/misc/pylib/fontbuild/mix.pyx index b47a38796..7034a189d 100644 --- a/misc/pylib/fontbuild/mix.pyx +++ b/misc/pylib/fontbuild/mix.pyx @@ -284,17 +284,18 @@ class Mix: ffont.kerning = self.mixKerns() return ffont - def generateFont(self, baseFont): + def generateFont(self, baseFont, ignoreGlyphs=None): newFont = baseFont.copy() #self.mixStems(newFont) todo _ fix stems code for g in newFont: - gF = self.mixGlyphs(g.name) - if gF == None: - g.mark = True - elif isinstance(gF, RGlyph): - newFont[g.name] = gF.copy() - else: - gF.copyToGlyph(g) + if not ignoreGlyphs or g.name not in ignoreGlyphs: + gF = self.mixGlyphs(g.name) + if gF == None: + g.mark = True + elif isinstance(gF, RGlyph): + newFont[g.name] = gF.copy() + else: + gF.copyToGlyph(g) newFont.kerning.clear() newFont.kerning.update(self.mixKerns() or {}) |