Beispiel #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())
Beispiel #2
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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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