rougier / svg-lib

Emacs SVG libraries for creatings tags, icons and bars
GNU General Public License v3.0
335 stars 30 forks source link

vscode collection icons not rendered #43

Closed noblekid96 closed 6 months ago

noblekid96 commented 6 months ago

I recently upgraded svg-lib to 0.3 and noticed that vscode collection svgs are not rendered. I use svg-lib in conjunction with kind-icon and after some troubleshooting with the author of kind-icon we traced the issue to svg-lib.

Tried running the following snippet with emacs

(package-initialize)
(require 'svg-lib)
(insert-image (svg-lib-icon "symbol-event"
                '( :collection "vscode"
                   :face font-lock-variable-name-face
                   :padding 0 :stroke 0 :margin 0 :radius 0
                   :height 1.0 :scale 1.0 :background nil)))

I expected this result image

but got this instead (no icon rendered).

image

I'm using Emacs 29.1 on MacOS (emacs-mac port) with Doom Emacs framework

I also checked that the vscode icons are in the right directory image

Let me know if there is anything I can do to help troubleshoot

jdtsmith/kind-icon#42

jdtsmith commented 6 months ago

The error seems to have crept in a1e2607, which is after the version 0.3 tagged on elpa.

rougier commented 6 months ago

Same here. But (insert-image (svg-lib-tag "[vscode:symbol-event]")) is working. It is also the case for you?

rougier commented 6 months ago

This one also works:

(insert-image (svg-lib-icon "symbol-event" 'font-lock-variable-name-face
                :collection "vscode"
                :padding 0 :stroke 2 :margin 0 :radius 0
                :height 1.0 :scale 1.0))

so my new code is wrong when I read the style

jdtsmith commented 6 months ago

Yes your 2nd works for me as well on the latest master, must be a style issue.