[cairo] cairo without X dependencies, server-side svg to png rendering?

Carl Worth cworth at east.isi.edu
Tue Apr 20 13:18:48 PDT 2004


On Sun, 18 Apr 2004 13:44:47 -0500, Jeff Kowalczyk wrote:
> I've been looking for a long time for a library that would render a decent
> subset of svg for use in web applications. Ideally, I would render png
> directly to http output, without temporary files.

Cairo plus libsvg-cairo can do exactly this today.

> A few months ago I read some encouraging posts here about rendering
> backends that could eventually allow cairo to function without
> X-windows-releated dependencies. Typical linux web servers omit many of
> these dependencies.

Cairo includes an image backend that has no dependency except for
libpixman, (which is more or less a "part" of cairo anyway). There's a
png backend to, which may make things even more convenient. No
tremporary files involved --- all the png backend needs is a valid
FILE *, so stdout works just fine.

And David Reveman recently committed fancy logic to the configure script
so that any of the optional backends, (xlib, xcb, glitz (OpenGL), etc.)
are automatically disabled if the dependencies are not available. So the
build environment should do exactly what you want already. If it
doesn't, please let us know as that would be a bug.

I'm currently in the process of moving libsvg-cairo to the
cairographics.org CVS server, (it's currently over at xsvg.org which is
a misleading name for it). I'm also stripping the X dependencies out of
the xsvg program to make a tiny little svg2png program which will
demonstrate exactly the kind of functionality you describe.

-Carl




More information about the cairo mailing list