I'm using Cairo/RSVG based solution for rasterizing SVG to PNG. It's already beeb described on StackOverflow in Convert SVG to PNG in Python. However, this solution doesn't seem to work with custom fonts.
I've found this page describing embedding SVG fonts.
I've tried to include them from external SVG via XLink, as described in example. I've tried embedding the font directly in the same SVG file. Having failed with that, I've tried CSS Web Fonts syntax. None of the 3 methods works when rendering with Cairo (nor does it work in the Ubuntu's default viewer Eye of GNOME).
I've tried ImageMagick, with exactly same results as Cairo.
On the other hand with all 3 font embedding methods, fonts are rendered fine in WebKit, either using Google Chrome or webkit2png.py. However, if possible I'd like to avoid using QT WebKit on server, as it's non-trivial setup (including xvfb etc.), and I'm afraid that might not result very efficient nor stable.
Is there any alternative method of rendering SVG to PNG from Python?