[cairo] Text output in SVG target
hjk at linutronix.de
Mon Jan 7 10:17:34 PST 2008
When I output text to an SVG target, the resulting SVG file is very
large. Cairo doesn't simply save the string (together with font, size,
position etc), but generates a path from it and saves all the
Maybe it has to be that way for certain operations, I don't know. But
I've got an application at the moment where I have to render some
simple graphics and a lot of text, first to a screen and then the same
to an SVG file. Size of the file is critical in that application.
Cairo seemed to be ideally suited for the purpose, as I can use the
same library for screen output and file generation. But the ridiculous
size of the resulting SVG files makes it unusable for that application.
Question: Is there really no way to embed simple text in an SVG file,
or did I miss something? Just to be clear, I think of something like
<text x="100" y="150" font-family="Verdana" font-size="35">
If Cairo cannot produce such output at the moment, would it be possible
to add, or is it completely against some Cairo concepts?
Any other ideas?
More information about the cairo