lucide-icons / lucide

Beautiful & consistent icon toolkit made by the community. Open-source project and a fork of Feather Icons.
https://lucide.dev
ISC License
11.51k stars 525 forks source link

fix(icons): optimised `puzzle` icon #2603

Closed jamiemlaw closed 1 week ago

jamiemlaw commented 2 weeks ago

What is the purpose of this pull request?

Description

Redraws a number of curves as arcs, simplifying the total number of path segments.

Before Submitting

github-actions[bot] commented 2 weeks ago

Added or changed icons

icons/puzzle.svg
Preview cohesion icons/square-square.svg
icons/puzzle.svg
icons/philippine-peso.svg
Preview stroke widths icons/puzzle.svg
icons/puzzle.svg
icons/puzzle.svg
DPI Preview (24px) icons/puzzle.svg
Icon X-rays icons/puzzle.svg
Icon Diffs icons/puzzle.svg
Icons as code Works for: `lucide-react`, `lucide-react-native`, `lucide-preact`, `lucide-vue-next` ```ts const PuzzleIcon = createLucideIcon('Puzzle', [ ["path",{"d":"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z"}] ]) ```
jamiemlaw commented 1 week ago

If that were the only change, it would bring the corners too close to the edge of frame.

Trying some slight redraws with the goal to keep the diagonal lines on-grid. These aren't final, but they illustrate a couple of potential issues:

icons
Open lucide studio

The north-each and south-west sticky-out-bits are now aligned to half pixels, making them blurry at low resultions

icons
Open lucide studio

Bringing them in further and the optical volume is somewhat reduced from what it was previously, and it introduces some 2-pixel-gap violations.