示例#1
0
def removeGlyphOverlap(glyph):
    """Remove overlaps in contours from a glyph."""
    #TODO(jamesgk) verify overlaps exist first, as per library's recommendation
    manager = BooleanOperationManager()
    contours = glyph.contours
    glyph.clearContours()
    manager.union(contours, glyph.getPointPen())
示例#2
0
文件: Build.py 项目: ssddn/roboto
def removeGlyphOverlap(glyph):
    """Remove overlaps in contours from a glyph."""
    # TODO(jamesgk) verify overlaps exist first, as per library's recommendation
    manager = BooleanOperationManager()
    contours = glyph.contours
    glyph.clearContours()
    manager.union(contours, glyph.getPointPen())
示例#3
0
    def remove_overlaps(self, ufo):
        """Remove overlaps in a UFO's glyphs' contours."""

        for glyph in ufo:
            manager = BooleanOperationManager()
            contours = glyph.contours
            glyph.clearContours()
            manager.union(contours, glyph.getPointPen())
示例#4
0
    def remove_overlaps(self, ufo):
        """Remove overlaps in a UFO's glyphs' contours."""

        for glyph in ufo:
            manager = BooleanOperationManager()
            contours = glyph.contours
            glyph.clearContours()
            manager.union(contours, glyph.getPointPen())
示例#5
0
def removeOverlap(ufo):
    """Removes overlap by combining overlapping contours. Not really necessary,
    but some font rendering systems need this."""
    manager = BooleanOperationManager()
    for glyph in ufo:
        contours = list(glyph)
        glyph.clearContours()
        manager.union(contours, glyph.getPointPen())
示例#6
0
    def remove_overlaps(self, ufo):
        """Remove overlaps in a UFO's glyphs' contours, decomposing first."""

        for glyph in ufo:
            self.decompose_glyph(ufo, glyph)
            manager = BooleanOperationManager()
            contours = glyph.contours
            glyph.clearContours()
            manager.union(contours, glyph.getPointPen())
示例#7
0
    def remove_overlaps(self, ufos):
        """Remove overlaps in UFOs' glyphs' contours."""

        manager = BooleanOperationManager()
        for ufo in ufos:
            print('>> Removing overlaps for ' + self._font_name(ufo))
            for glyph in ufo:
                contours = list(glyph)
                glyph.clearContours()
                manager.union(contours, glyph.getPointPen())
示例#8
0
    def remove_overlaps(self, ufos):
        """Remove overlaps in UFOs' glyphs' contours."""

        manager = BooleanOperationManager()
        for ufo in ufos:
            print('>> Removing overlaps for ' + self._font_name(ufo))
            for glyph in ufo:
                contours = list(glyph)
                glyph.clearContours()
                manager.union(contours, glyph.getPointPen())
示例#9
0
 def removeOverlap(self):
     """Removes overlap by combining overlapping contours. Not really necessary,
     but some font rendering systems need this."""
     manager = BooleanOperationManager()
     for glyph in self.UFO:
         contours = list(glyph)
         glyph.clearContours()
         try:
             manager.union(contours, glyph.getPointPen())
         except:
             m = 1