michael orlitzky


libera te tutemet ex inferis

get it

Browse source
Clone it
git clone https://gitweb.michael.orlitzky.com/libsvgtiny-pixbuf.git

what is it?

A library that allows GTK to load SVG files without using librsvg. The main reason you would want to do that is because librsvg is a security nightmare. Nowadays librsvg is also less portable and more onerous to build than when it was written in C.



It's using GNU autotools, so run ./configure && make to build it, and then make install to copy the files where they belong.

That's half the battle; the other half is letting GTK know to use it. GTK maintains a cached list of known pixbuf loaders in the file given by GDK_PIXBUF_MODULE_FILE, which defaults to a system-specific location. To generate that cache, in general you have to run gdk-pixbuf-query-loaders with GDK_PIXBUF_MODULEDIR set to the directory where your pixbuf loaders live. But if you are using the default system GDK_PIXBUF_MODULE_FILE and the default system GDK_PIXBUF_MODULEDIR, then all you have to do is run

root # gdk-pixbuf-query-loaders --update-cache

as the superuser.

The libsvgtiny-pixbuf build system does its best to find the system pixbuf loader directory and to install itself there. So long as the --prefix and --libdir used to configure libsvgtiny-pixbuf are the same as those used to install gdk-pixbuf, you should be OK. The command

user $ pkg-config --variable gdk_pixbuf_moduledir gdk-pixbuf-2.0


will show you the proper location (the output above is not necessarily valid on anyone else's system).

In addition to the pixbuf loader, we also install a GTK thumbnailer entry, libsvgtiny.thumbnailer. Here also the build system tries to do the right thing, but the --datadir used to configure libsvgtiny-pixbuf must be the same as the --datadir that was used to configure your GTK. Usually they wind up in /usr/share/thumbnailers. I'm not aware of an environment-variable override.


There are many features in librsvg that haven't made it into libsvgtiny yet. The rendering simply isn't as good. Some of your icons will look weird.

How to report bugs

You can email them to me at michael@orlitzky.com, but SVG rendering issues should be reported on the libsvgtiny bug tracker.