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
10.81k stars 494 forks source link

lucide.eot file missing in lucide-static #1367

Closed schmidt-oliver closed 1 year ago

schmidt-oliver commented 1 year ago

Prerequisites

Step to reproduce

Actual behavior

Any message or error

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

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.

ericfennis commented 1 year ago

@schmidt-oliver Thanks for pointing this out!

schmidt-oliver commented 1 year ago

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.

ericfennis commented 1 year ago

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 commented 1 year ago

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

schmidt-oliver commented 1 year ago

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 commented 1 year ago

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.

ericfennis commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

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!