rougier / svg-lib

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

VSCode icons support #27

Closed grolongo closed 1 year ago

grolongo commented 1 year ago

Hello, would it be possible for svg-lib to add support for VSCode icons?
They use Creative Commons Attribution 4.0 International for their license and their repository is here:
https://github.com/microsoft/vscode-icons

rougier commented 1 year ago

I think it might be possible. Note that you can modify the list of repositories such as to include it. Did you already made some experiments with them?

grolongo commented 1 year ago

So those icons are included with company and they work pretty well, but I didn't try to use them from your package directly.
I'll do that with the examples from your demo and report back.

grolongo commented 1 year ago

So I tested after adding:

(add-to-list 'svg-lib-icon-collections '("vscode-light" . "https://raw.githubusercontent.com/microsoft/vscode-icons/main/icons/light/%s.svg"))
(add-to-list 'svg-lib-icon-collections '("vscode-dark" . "https://raw.githubusercontent.com/microsoft/vscode-icons/main/icons/dark/%s.svg"))

Thing is vscode icons have 2 versions, light and dark, but I fail to see the difference when used with svg-lib, so I'm not sure if the two sources are necessary. Anyway here is the few test results, not sure if that's enough testing to be included in your package. Let me know.

vscode-svg-test

rougier commented 1 year ago

dark / light does not really mater since svg-lib will replace colors. If you want to use dark or light, you can define a style to be used with the icon.

grolongo commented 1 year ago

Indeed: Screenshot (250)

So can we add

("vscode-light" .
     "https://raw.githubusercontent.com/microsoft/vscode-icons/main/icons/light/%s.svg")

to svg-lib-icon-collections?

rougier commented 1 year ago

Yes. Maybe with the name vscode sinstead of vscode-light. Do you want to make a PR?

grolongo commented 1 year ago

I'm closing the issue.