Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add headphone-off svg & json in icon folder #2445

Merged
merged 11 commits into from
Sep 12, 2024

Conversation

Need-an-AwP
Copy link
Contributor

@Need-an-AwP Need-an-AwP commented Sep 8, 2024

What is the purpose of this pull request?

  • New Icon
  • Bug fix
  • New Feature
  • Documentation update
  • Other:

Description

this headphone-off icon is based on headphone icon and mic-off icon
I followed the design style of the mic-off icon and modified the headphone icon with figma
i cannot run any build, optimize or test script on my pc, i always have different errors on running them
this change is committed with --no-verify

Icon use case

just like mic-off icon, headphone-off icon can be use to show audio output muted

Alternative icon designs

Icon Design Checklist

Concept

  • I have provided valid use cases for each icon.
  • I have not added any a brand or logo icon.
  • I have not used any hate symbols.
  • I have not included any religious or political imagery.

Author, credits & license

  • The icons are solely my own creation.
  • The icons were originally created in # by @
  • I've based them on the following Lucide icons: headphone, mic-off
  • I've based them on the following design:

Naming

  • I've read and followed the naming conventions
  • I've named icons by what they are rather than their use case.
  • I've provided meta JSON files in icons/[iconName].json.

Design

  • I've read and followed the icon design guidelines
  • I've made sure that the icons look sharp on low DPI displays.
  • I've made sure that the icons look consistent with the icon set in size, optical volume and density.
  • I've made sure that the icons are visually centered.
  • I've correctly optimized all icons to three points of precision.

Before Submitting

@github-actions github-actions bot added 🎨 icon About new icons 🫧 metadata Improved metadata labels Sep 8, 2024
Copy link

github-actions bot commented Sep 8, 2024

Added or changed icons

icons/headphone-off.svg

Preview cohesion icons/message-square-share.svg
icons/headphone-off.svg
icons/calendar-x-2.svg
Preview stroke widths icons/headphone-off.svg
icons/headphone-off.svg
icons/headphone-off.svg
DPI Preview (24px) icons/headphone-off.svg
Icon X-rays icons/headphone-off.svg
Icon Diffs icons/headphone-off.svg
Icons as code

Works for: lucide-react, lucide-react-native, lucide-preact, lucide-vue-next

const HeadphoneOffIcon = createLucideIcon('HeadphoneOff', [
  ["path",{"d":"M21 14h-1.343"}],
  ["path",{"d":"M9.128 3.47A9 9 0 0 1 21 12v3.343"}],
  ["path",{"d":"m2 2 20 20"}],
  ["path",{"d":"M20.414 20.414A2 2 0 0 1 19 21h-1a2 2 0 0 1-2-2v-3"}],
  ["path",{"d":"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 2.636-6.364"}]
])

@karsa-mistmere
Copy link
Member

Hi @Need-an-AwP,

Please split the path up into its separate parts, as some renderers end up with funky paths if they are merged.

The icon is mostly well designed, but the bottom parts need a larger gap between the diagonal line and the headphone (2px to be precise).

@Need-an-AwP
Copy link
Contributor Author

@karsa-mistmere
i adjusted that diagonal line and it is exactly the same as mic-off icon's diagonal line
i also seperated the path 😎

@karsa-mistmere
Copy link
Member

karsa-mistmere commented Sep 8, 2024

image

This gap is still smaller than 2px.

@Need-an-AwP
Copy link
Contributor Author

adjust the gap this time and seems like some automatic process went wrong

@karsa-mistmere
Copy link
Member

Sorry, evidently I wasn't clear enough: you should only have broken the path up into its elements, not separate path segments, e.g.:

image

Here's a fully optimized version with exactly 2px gaps:

icons
Open lucide studio

@Need-an-AwP
Copy link
Contributor Author

Need-an-AwP commented Sep 9, 2024

@karsa-mistmere
the original headphone icon use exactly the same path segments in headphone part
image

@karsa-mistmere
Copy link
Member

karsa-mistmere commented Sep 9, 2024

@karsa-mistmere the original headphone icon use exactly the same path segments in headphone part image

Again, it's not the segments, it's just that we do not allow combined paths, as they can be rendered funky in Figma for example. Every path should be a single path made up of any number and type of segments between two points, your original file had only two paths, one for the line, one for everything else. While the original headphone shape is a single line, this one is made up of four distinct paths.

@Need-an-AwP
Copy link
Contributor Author

@karsa-mistmere i rewrote each path, is this change ok?😥

@karsa-mistmere
Copy link
Member

@karsa-mistmere i rewrote each path, is this change ok?😥

Not quite, but it's close:

  • it would be better to keep the gap at exactly 2px (see above)
  • it would also be better not to duplicate segments and just add that extra bit of line as a separate path
image

@jguddas
Copy link
Member

jguddas commented Sep 9, 2024

@karsa-mistmere i rewrote each path, is this change ok?😥

Not quite, but it's close:

  • it would be better to keep the gap at exactly 2px (see above)
  • it would also be better not to duplicate segments and just add that extra bit of line as a separate path
image

Lucide studio has a tidy button that does that for you.

@karsa-mistmere
Copy link
Member

Lucide studio has a tidy button that does that for you.

It won't close the gaps that are too large though.

@Need-an-AwP
Copy link
Contributor Author

@karsa-mistmere is this gap enough
image

@karsa-mistmere
Copy link
Member

karsa-mistmere commented Sep 10, 2024

You can check via the icon x-rays if the gap is ideal, these lines should touch but not intersect:
image


I see you're using Figma, my modus operandi for creating perfect gaps is as follows:

  1. I first clone the diagonal line as a 8px stroke (that will make it 4px on each side)
image
  1. I convert it to an outline:
image
  1. I select and cut the highlighted line that now defines the 4px offset (2px gap + 1px from each 2px stroke line):
image
  1. I paste this line into the path while editing:
image
  1. Add intersection points where needed:
image
  1. Then delete the clutter:
image
  1. Paste the copied SVG into Lucide Studio...
image
  1. ...and click Tidy:
image

Ta-da! 🥳

@Need-an-AwP
Copy link
Contributor Author

thank u for the tutorial with a lot details, i used the method u provide redraw the icon and adjusted my svg code

icons/headphone-off.svg Outdated Show resolved Hide resolved
Co-authored-by: Karsa <contact@karsa.org>
Copy link
Member

@ericfennis ericfennis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent help over here!

I've one small comment for the meta file

icons/headphone-off.json Outdated Show resolved Hide resolved
Copy link
Member

@ericfennis ericfennis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @Need-an-AwP !

@karsa-mistmere karsa-mistmere merged commit 38e7431 into lucide-icons:main Sep 12, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 icon About new icons 🫧 metadata Improved metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants