rougier / svg-tag-mode

A minor mode for Emacs that replace keywords with nice SVG labels

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid image type ‘svg’

fniessen opened this issue · comments

Hello Nicolas. I'm very interested by this, but, on Windows, with Cygwin Emacs 27, I get the error

Invalid image type ‘svg’

I could launch this

(image-type-available-p 'svg)

and I do have a nil returned. Is it because of Windows?

Is there some way to fix this?

Best regards!

If it returns nil, I think it means you do not have svg support. Do you know if your emacs distribution comes with svg support ? It might also depends on the image magick library. I'm not too familiar with Windows but I think it should be possible to have svg support.

Hello.

From what I understand and quickly gathered, emacs leverages librsvg to display SVG images. What is the content of system-configuration-features on your side? Does it contain RSVG? If it does, it means that your build should support SVG rendering.

If it does, it sounds like you might lack librsvg and its dependencies.

system-configuration-features is a variable defined in ‘C source code’.
Its value is
"XPM JPEG TIFF GIF PNG SOUND DBUS GLIB NOTIFY GFILENOTIFY ACL GNUTLS LIBXML2 HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS XIM MODULES THREADS JSON PDUMPER LCMS2 GMP"

Probably introduced at or before Emacs version 25.1.

Documentation:
String listing some of the main features this Emacs was compiled with.
An element of the form "FOO" generally means that HAVE_FOO was
defined during the build.

This is mainly intended for diagnostic purposes in bug reports.
Don’t rely on it for testing whether a feature you want to use is available.

Hello Nicolas. No SVG in that list ;-(

Did you install the package emacs-w32? I checked its dependances, it doesn't seem to be built with SVG support, so the package will most likely not work on your instance of emacs.

You might have to use another package (for instance emacs-x11, but you will need to run a X server), another distribution (for instance the ones based on MinGW like GNU's releases) or build your own version with a patch to alter the feature set. There is an instance of such patch located here. Beware, it's 5 years old and probably not working on newer versions, it might give you a good idea of what to do to add feature back.

Yes, I'm using Emacs-W32.

Not keen on losing time with other versions, though, particularly because Cygwin's own Emacs version does understand the Cygwin paths, what other Windows versions do not do.

So, pretty blocked here, until / unless Cygwin would add the SVG support in its build.