def METHOD_NAME(self):
    self._cachedIntersections = OrderedDict()
    self._rulerPts = dict()
    line = self._rulerObject[0]
    # the default layer stores the width
    defaultGlyph = self._glyph.layerSet.defaultLayer.get(self._glyph.name)
    if defaultGlyph is not None:
        width = defaultGlyph.width
        info = defaultGlyph.font.info
        ascender = info.ascender or 750
        descender = info.descender or -250
        for x in (0, width):
            pt = bezierMath.lineIntersection(
                line.x1(),
                line.y1(),
                line.x2(),
                line.y2(),
                x,
                descender,
                x,
                ascender,
            )
            if pt is not None:
                self._appendIntersection(pt)
    for contour in self._glyph:
        segments = contour.segments
        for index, seg in enumerate(segments):
            if seg[-1].segmentType == "move":
                continue
            prev = segments[index - 1][-1]
            if seg[-1].segmentType == "curve":
                i = bezierMath.curveIntersections(
                    line.x1(),
                    line.y1(),
                    line.x2(),
                    line.y2(),
                    prev,
                    seg[0],
                    seg[1],
                    seg[2],
                )
                for pt in i:
                    self._appendIntersection(pt)
            elif len(seg) == 1:
                pt = bezierMath.lineIntersection(
                    line.x1(),
                    line.y1(),
                    line.x2(),
                    line.y2(),
                    prev.x,
                    prev.y,
                    seg[0].x,
                    seg[0].y,
                )
                if pt is not None:
                    self._appendIntersection(pt)