fontbuild: add disabled code as reference for performing overlap elimination as a separate step

This commit is contained in:
Rasmus Andersson 2018-09-30 16:59:23 -07:00
parent f8d9bd31b0
commit 83a462bc65

View file

@ -24,6 +24,7 @@ from fontTools.pens.reverseContourPen import ReverseContourPen
from glyphsLib.interpolation import apply_instance_data
from mutatorMath.ufo.document import DesignSpaceDocumentReader
from multiprocessing import Process, Queue
# from ufo2ft.filters.removeOverlaps import RemoveOverlapsFilter
log = logging.getLogger(__name__)
stripItalic_re = re.compile(r'(?:^|\b)italic(?:\b|$)', re.I | re.U)
@ -114,6 +115,13 @@ class VarFontProject(FontProject):
decomposeGlyphs.add(glyph.name)
self.decompose_glyphs(ufos, lambda g: g.name in decomposeGlyphs)
# for ufo in ufos:
# filter = RemoveOverlapsFilter(backend='pathops')
# filter.start()
# for g in ufo:
# filter.filter(g)
self.save_otfs(ufos, ttf=True, interpolatable=True, **kwargs)