Skip to content

Commit

Permalink
Hm, the current logic is only good for smooth points (proper tangents…
Browse files Browse the repository at this point in the history
…). Not sure what to do with the sharp situation
  • Loading branch information
justvanrossum committed Feb 26, 2025
1 parent e9ec5a9 commit 2d981f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fontra/client/core/path-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,8 @@ function simpleTangentDeletion(points) {
(acc, pt) => acc + (!pt.type ? 1 : 0),
0
);
const firstBetweenIsOnCurve = !betweenPoints[0].type;
const lastBetweenIsOnCurve = !betweenPoints.at(-1).type;
const firstBetweenIsOnCurve = betweenPoints[0].smooth;
const lastBetweenIsOnCurve = betweenPoints.at(-1).smooth;

if (numOnCurvePoints === 2 && firstBetweenIsOnCurve && lastBetweenIsOnCurve) {
return betweenPoints.slice(1, -1);
Expand Down

0 comments on commit 2d981f2

Please sign in to comment.