Closed r4lv closed 4 days ago
Some additions:
potrace
. While that is quite genius, I think that is at the root of the problem.
potrace
, and shows the same rendering issue.Hmm interesting. Good you find this issue. Yeah I think you solution is better, It felt a bit hacky how we outlined the paths. But it worked well, so far. The only think we should check if inkscape is correctly rendering the icons, we still have some issues with rendering icons in other design programs, see #443 .
Maybe you also like to join this issue: #514 , I'm not sure yet how to solve this.
Hi
@GladysAssistant we want's to migrate from feather to lucide ( for obvious reason :) )
But we have some weird issue, is this the same problem described here ?
Left is Lucide font and right is Feather font
Can someone check if this is still an issue. We made some changes in the build of the icons. And maybe this issue is fixed.
As long as I set the font weight to normal !important;
it renders fine.
I've run a test. Here is a PDF using the font as of 0.17.13 that I generated with PDFKit on Node, which confirmed the issue existed. And here is another PDF using the latest font and I don't see any issues in rendering.
Prerequisites
Step to reproduce
Dear Lucide team,
I am using the font file from
lucide-static
in my LaTeX documents (using the XeLaTeX engine, which supports open type fonts). I noticed that in the resulting PDF, many icons have inconsistent stroke widths on some of their paths. This is only visible in smaller zoom levels, the symbol looks fine when I zoom in a lot. This seems to happen in all versions of thelucide-static
ttf build, I tested it with the oldest stable 0.16.23 too.On the left you see the original
lucide-static
icon, on the right I created a font myself (more on that below) — you'll notice that for the left symbol, the upper (right) path is thinner than the lower (left) one:I created an Overleaf with the TeX source code (…not sure if you need an account to edit it, though - let me know):
https://www.overleaf.com/read/rfhcvtzbyfkc
Here is the resulting PDF:
lucide_font_stroke.pdf
I tested the PDF with multiple rendering engines — the bug occurs in
The bug does not occur, e.g. both icons look the same in
Possible workaround
Before you released
lucide-static
, I used a custom-built font file for my latex documents. This rendering issue does not happen the way I build the font. I think the problem lies in the./scripts/outlineSvg.js
script, which uses the svg-outline-stroke npm package. Instead, I used a combination of svgo and inkscape's CLI, before passing the (modified) svg-files to fontcustom.Here is an example script which uses svgo and inkscape:
This is only marginally related to Lucide itself — I thought that it might be interesting to share it with you nontheless.
Happy to hear your thoughts!