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

lucide.eot file missing in lucide-static #1367

Closed
schmidt-oliver opened this issue Jun 16, 2023 · 9 comments · Fixed by #1599
Closed

lucide.eot file missing in lucide-static #1367

schmidt-oliver opened this issue Jun 16, 2023 · 9 comments · Fixed by #1599
Labels
🐛 bug Something isn't working

Comments

@schmidt-oliver
Copy link
Contributor

Prerequisites

  • Version: V. 0.244.0
  • Are you running from source/main: no
  • Are you using a released build: lucide-static, import using parceljs
  • Operating system: Unix
  • Bits: 64 bits

Step to reproduce

  • npm install lucide-static
  • Go to node_modules/lucide-static/font/.
  • See that lucide.eot is missing.
  • Try to @import "~lucide-static/font/Lucide.css";
  • Getting error

Actual behavior

  • npm install lucide-static
  • Go to node_modules/lucide-static/font/.
  • Find the file lucide.eot
  • Try to @import "~lucide-static/font/Lucide.css";
  • File found, so no error occurs

Any message or error

@parcel/resolver-default: Cannot load file '../node_modules/lucide-static/font/lucide.eot' in './src'.

Resources

  • No resources

Comment

Hello together, other packages like those from @fontsource only serve woff2 and woff files in their css, isn't that enough? Or is it possible to provide a css file with only the icon classes and their unicode content, so that you can add the rest yourself? Thank you.

@schmidt-oliver schmidt-oliver added the 🐛 bug Something isn't working label Jun 16, 2023
@ericfennis
Copy link
Member

@schmidt-oliver Thanks for pointing this out!

@schmidt-oliver
Copy link
Contributor Author

I found out that you are using fontcustom based on ruby and python to create the font files. There is an interesting node package called svgtofont. Eventually it is a great alternative. I will take a look and try it out.

Copy link
Member

Thanks for pointing out. Currenty I'm nog really happy with fontcustom. It's also not very well maintained. We currently have some open issues with the font. We really need stable hex values for the icons. We currently have some open issues about it: #514, #926 and #538. So a custom icon-codepoints map for the font bundler is a must.
I was looking at fantasticon but maybe svgtofont is also a good one to look at.

@schmidt-oliver
Copy link
Contributor Author

Thank you and good to know. I will take this into account in my tests.

@schmidt-oliver
Copy link
Contributor Author

Hey, I checked out the library svgtofont. The custom icon-codepoints wouldn't be a problem here. But there is a huge problem with native shapes. The converted icons look like crap. Eventually I missed something. Take a look if you want at my test repo.

I will check out fantasticicon next.

@schmidt-oliver
Copy link
Contributor Author

fantasticon and svgtofont use the same dependencies for creating fonts. fantasticicon V. 2.0.0 doesn't worked for me (No SVGs found in ...), so I tried V. 1.3.2. The converted icons looks same.

    "svg2ttf": "~6.0.3",
    "svgicons2svgfont": "~12.0.0",
    "ttf2eot": "~3.1.0",
    "ttf2woff": "~3.0.0",
    "ttf2woff2": "~5.0.0",

The problem exists in svgicons2svgfont, which is used as the first step in creating the fonts. It was reported on 17 August 2020. The library is no longer used and maintained by the developer. If the icon shapes are converted to paths before the icons are used, everything should work properly. Possibly this will be fixed in one of the 3 libraries.

Copy link
Member

@schmidt-oliver Thanks for digging into this. I think this is not really a problem. Ok, will try to explain why.
When we used fontcustom the icons looked crap as well, not because of the antive shapes but because of the stroke-widths we use in the icons.
We fixed this by outlining all the icons and use this to create the font. See script: build:outline-icons in root package.json, the package and scripts are located under "tools/outline-svg".
This will create a directory called "outlined" in the root with all the icons with outlined vectors. And those we can use to make the fonts.

@schmidt-oliver
Copy link
Contributor Author

@ericfennis I noticed that we missed to adjust the Github workflow for new releases. Can you please adapt it like the one for lucide-static? Thank you.

https://github.com/lucide-icons/lucide/blob/4cc4468d2f2832be31670f67216a4f73abd3f591/.github/workflows/release.yml#L188-L189C8

@ericfennis
Copy link
Member

You're right, I thought we did this already. Yess I will.
I will reopen this one, to make sure we don't forget this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants