fvwmorg/fvwm3

SVG icons no longer work after updating to FVWM3 1.1.2

Closed this issue · 8 comments

After updating FVWM3 to version 1.1.2, SVG icons stopped working in my configuration. Previously, the following settings worked correctly:

ButtonStyle 1 Pixmap thunder.svg  -- Flat  
ButtonStyle 2 Pixmap window-close-symbolic.svg -- Flat  
ButtonStyle 4 Pixmap window-maximize-symbolic.svg -- Flat  
ButtonStyle 6 Pixmap window-minimize-symbolic.svg -- Flat  

However, after the update, the icons are not displayed at all.

Does it help if you specify the size of the svg, such as thunder.svg:25x25?

Yes, specifying the size helped, but only for thunder.svg. Other SVG icons still don't work. Honestly, I don't remember exactly where I got these icons—either I downloaded them or created them myself in Inkscape. Now, I need to investigate further, compare thunder.svg with the others, and figure out what makes it display correctly in FVWM3. Previously, everything worked out of the box, and FVWM3 would automatically adjust the SVG size as needed.

There was a change in librsvg where the api fvwm3 was using had been deprecated. Unfortunately changing to a new api requires the client doing more of the work to determine icon size, and seems there is still some cases and svg icons size cannot be determined. You can also specify the size (height and width) or viewport in the xml file that creates the svg file, which is probably why one icon works and others don't.

Yes, thanks. I already noticed that in commit 2400f8d, the following includes were removed:

#include "glib.h"  
#include "librsvg/rsvg.h"  

I suspected this might have affected SVG support. Now I'm wondering—what should other users do if they want to use SVG icons in FVWM3? Is there any guide or recommended approach for creating or obtaining SVG icons that will display correctly?

Alright, I think I’ve figured it out. My other icons were missing the viewBox attribute. Strangely, this wasn’t an issue before.

Yes, thanks. I already noticed that in commit 2400f8d, the following includes were removed:

#include "glib.h"
#include "librsvg/rsvg.h"

I suspected this might have affected SVG support.

Unrelated - This is tidying up includes that aren't being used that a "helpful" tool added.

I've also hit this. Patch #1171 just has FVWM try harder to find workable dimensions. Displaying something is better than nothing, it returns to pre-1.1.2 levels of display.

@ThomasAdam - I understand that this is intentional; do we log anywhere that we're unable to load SVG dimensions? That might be a compromise between inferring icon dimensions and silently not loading SVGs that previously worked.

Downstream bug, for reference: https://bugs.gentoo.org/955273