[cairo] Text output in SVG target
domlachowicz at gmail.com
Mon Jan 7 13:14:48 PST 2008
On Jan 7, 2008 1:17 PM, Hans-Jürgen Koch <hjk at linutronix.de> wrote:
> 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
No, there isn't. Cairo passes the glyph information to the backend,
not the text.
> <text x="100" y="150" font-family="Verdana" font-size="35">
> Hello world!
> If Cairo cannot produce such output at the moment, would it be possible
> to add, or is it completely against some Cairo concepts?
It should eventually be possible.
SVG fonts aren't widely-supported by the more popular renderers. Nor
are embedded CSS fonts.
The best solution for getting reasonably accurate, portable output
that looks the same across viewers and regardless of what fonts are
installed is to embed the glyph as a series of paths. Of course, this
comes at the expense of the file's size and human-readability.
More information about the cairo