googlefonts / glyphsLib

A bridge from Glyphs source files (.glyphs) to UFOs
Apache License 2.0
178 stars 51 forks source link

Infinite loop in .segments with quadratic curves #949

Closed simoncozens closed 8 months ago

simoncozens commented 8 months ago

(I didn't want to have quadratic curves in there, but still...)

        p = GSPath()
        p.nodes = [
            GSNode((327, 185), "offcurve"),
            GSNode((299, 210), "offcurve"),
            GSNode((297, 266), "curve" ),
            GSNode((294, 351), "offcurve"),
            GSNode((297, 434), "qcurve" ),
            GSNode((299, 490), "offcurve"),
            GSNode((328, 515), "offcurve"),
            GSNode((371, 515), "curve" ),
            GSNode((414, 515), "offcurve"),
            GSNode((443, 490), "offcurve"),
            GSNode((445, 434), "curve" ),
            GSNode((448, 351), "offcurve"),
            GSNode((445, 266), "qcurve" ),
            GSNode((443, 210), "offcurve"),
            GSNode((415, 185), "offcurve"),
            GSNode((371, 185), "curve")
        ]
        p.segments