Skip to content

Commit

Permalink
Merge pull request #1981 from googlefonts/bugfix-delete-points-issue-…
Browse files Browse the repository at this point in the history
…1980

Fix bug with deleting multiple segments, one of which includes the starting point
  • Loading branch information
justvanrossum authored Jan 23, 2025
2 parents 7e209f2 + 8d9df9e commit 4bf5d24
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/fontra/client/core/path-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,12 +425,8 @@ export function deleteSelectedPoints(path, pointIndices) {
newPoints = computeHandlesFromFragment(curveType, fragment.contour);
} else {
newPoints = [];
path.setPointType(indices[0] + startPoint + indexBias, points[0].type, false);
path.setPointType(
indices.at(-1) + startPoint + indexBias,
points.at(-1).type,
false
);
path.setPointType(indices[0] + startPoint + 0, points[0].type, false);
path.setPointType(indices.at(-1) + startPoint + 0, points.at(-1).type, false);
}
for (const newPoint of newPoints) {
path.insertPoint(contourIndex, insertIndex, newPoint);
Expand Down

0 comments on commit 4bf5d24

Please sign in to comment.