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

Bundle svg converter into Matter #46

Open
mateosss opened this issue Sep 28, 2020 · 10 comments
Open

Bundle svg converter into Matter #46

mateosss opened this issue Sep 28, 2020 · 10 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mateosss
Copy link
Owner

As of now Matter has two dependencies.

  • ImageMagick: which brings the convert command for convertig icons in svg to png
  • Inkscape: big in size but improves the default ImageMagick svg converter a lot, without it, icons usually look odd.

These packages seem to be bringing a lot of trouble, it would be great to have an svg converter bundled directly into Matter so that there would be no more problems with dependencies.

@mateosss mateosss added help wanted Extra attention is needed good first issue Good for newcomers Hacktoberfest labels Sep 28, 2020
@dexpota
Copy link

dexpota commented Sep 30, 2020

Do you want to replace the external dependency on the command convert with a library to use inside the python script, right? If you want to assign this issue to me I can take care of it.

@mateosss
Copy link
Owner Author

Yes! the target is to

  • Reduce dependencies for the user, in size and quantity
  • Still get good quality conversions that look well on grub

I'll assign this issue to you then. Thanks!

@heyzec
Copy link
Collaborator

heyzec commented Mar 14, 2021

Hi, are there any updates to this issue? I have weird problem with the icons on the grub menu. Icons that are more complex, such as Windows and Ubuntu are not being converted properly.

out

I digged around and found out this problem is due to ImageMagick's convert command not working properly, not a bug in Matter. I am putting this issue here because this bug should go away if Matter's dependency on ImageMagick is removed.

@mateosss
Copy link
Owner Author

Do you have Inkscape installed? ImageMagick tries to use the Inkscape SVG converter and if it does not find it uses its own converter which is not the best. Your PNG output looks like it is not using Inkscape's converter.

See ImageMagick/ImageMagick#2216 for more information about that.

@heyzec
Copy link
Collaborator

heyzec commented Mar 15, 2021

You were right, using --verbose on the convert command showed it was using its internal converter and not inkscape, which was least expected to me because I have inkscape installed. I spend two hours figuring out how to get it to use inkscape (including building ImageMagick-7 from source, using the Magick's AppImage and tweaking the delegates config) to no avail. I shall patiently wait for matter's own converter to be bundled instead :D

@mateosss
Copy link
Owner Author

Oof! Sorry for that, what distro are you using? Maybe it would be better to open a new issue for tracking this particular problem.

@heyzec
Copy link
Collaborator

heyzec commented Mar 31, 2021

I've got a partial solution to remove the ImageMagick dependency. Do take a look at this branch :D

@mateosss
Copy link
Owner Author

That's very nice!

@heyzec
Copy link
Collaborator

heyzec commented Apr 2, 2021

What do you think about the lxml dependency required?

@mateosss
Copy link
Owner Author

mateosss commented Apr 2, 2021

I think it would be better to use the xml package that is part of the standard library.

Though if there is a reason for using lxml instead let me know.

heyzec added a commit to heyzec/matter that referenced this issue Apr 2, 2021
Other changes:
- Edited main script to prioritise using inkscape, but will fallback
to ImageMagick's convert if inkscape not found.
mateosss added a commit that referenced this issue Apr 4, 2021
Partial solution to remove ImageMagick dependency (#46)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants