6.1. SVG and PDF document versions
When using default settings, CairoGraphics will create SVG version 1.1 output. This SVG version does not support all available composite operator choices (comp-op) though, and so for some comp-op values used in style sheets Cairo will fall back to bitmap rendering and you will end up with a SVG document that only contains one single image tag, and the actual rendered map being one large embedded bitmap image.
To prevent this you need to explicitly set the SVG version to produce to version 1.2:
surface.restrict_to_version(cairo.SVGVersion.VERSION_1_2);
Same for PDF, here you need to enforce the use of PDF version 1.5:
surface.restrict_to_version(cairo.PDFVersion.VERSION_1_5);
TODO: Cairo version dependency