mateosss / matter

Customizable GRUB theme inspired by Material Design
Boost Software License 1.0
868 stars 50 forks source link

Bundle svg converter into Matter #46

Open mateosss opened 4 years ago

mateosss commented 4 years ago

As of now Matter has two dependencies.

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.

dexpota commented 4 years ago

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 commented 4 years ago

Yes! the target is to

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

heyzec commented 3 years ago

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 commented 3 years ago

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 https://github.com/ImageMagick/ImageMagick/discussions/2216 for more information about that.

heyzec commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

mateosss commented 3 years ago

That's very nice!

heyzec commented 3 years ago

What do you think about the lxml dependency required?

mateosss commented 3 years ago

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.