[cairo] Can cairo generates <text> elements in the svg output ?

Emmanuel Pacaud emmanuel.pacaud at lapp.in2p3.fr
Sun Feb 27 10:45:53 PST 2011


Hi,

Le dimanche 27 février 2011 à 17:42 +0100, Jonathan Marchand a écrit : 
> I've produced a patch to make cairo use the <text> tag in the SVG
> output. It still a very naive patch because I'm new to cairo and I am
> not a C expert.

That's great news.

> It covers all my needs, and I don't know any bugs. However, it should be
> tested thoroughly. Is there a way or a procedure to assure the patch is
> usable ?

Cairo has a test suite that checks the output of the different backends
using a set of reference outputs.

This test suite uses librsvg for the rasterization of the file generated
by the SVG backend. The last time I've checked librsvg, its handling of
text features was not very good, so you have to expect false failures.

Emmanuel.

> On Fri, Nov 05, 2010 at 11:18:35AM +0100, Emmanuel Pacaud wrote:
> > Hi,
> > 
> > Le vendredi 05 novembre 2010 à 11:03 +0100, Jonathan Marchand a écrit : 
> > > Currently, cairo generates text in svg by means of path for each glyhs,
> > > there is no <text> elements generated. Thus, there is no way to extract
> > > the text from an output file.  This issue was addressed before[1], but
> > > it seems that today cairo still lacks this feature.
> > > 
> > > Is this feature planned ? Are there strong fundamentals motives against
> > > it ? Does it present technical difficulties to implement ?
> > 
> > To my knowledge, nobody is working on this feature. I've worked a bit on
> > it a couple of years ago, but didn't produce anything usable.
> > 
> > There's no motive against it. It would be nice to have both output
> > method available (<text> and <glyph>) though.
> > 
> > It should not be to difficult to implement, as the work for a text
> > output was already done for the PDF backend.
> > 
> > Emmanuel.
> > 




More information about the cairo mailing list