diff --git a/package.json b/package.json index 7da7eba..aad659b 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "dependencies": { "patel": ">=0.30.0", "node-sfnt": ">=0.0.20", - "bezier-js": "*", + "bezier-js": "^2.0.0", "yargs": "*", "libspiro-js": ">=0.3.0", "toml": ">=2.3.0", diff --git a/support/glyph.ptl b/support/glyph.ptl index c120c70..41225e0 100644 --- a/support/glyph.ptl +++ b/support/glyph.ptl @@ -190,7 +190,7 @@ export all : class Glyph local p2 ocontour.(j + 1) local p3 ocontour.(j + 2) local strand : new Bezier p0.x p0.y p1.x p1.y p2.x p2.y p3.x p3.y - local ts [strand.inflections].y + local ts [strand.extremas].y piecewise (!ts || ts.length < 1) : contour.push p1 p2 p3 true : begin @@ -210,7 +210,7 @@ export all : class Glyph local p2 ocontour.(j + 1) if [not p2.onCurve] : set p2 : new Point [mix p1.x p2.x 0.5] [mix p1.y p2.y 0.5] true local strand : new Bezier p0.x p0.y p1.x p1.y p2.x p2.y - local ts [strand.inflections].y + local ts [strand.extremas].y piecewise (!ts || ts.length < 1) : contour.push p1 p2 true : begin