<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - segmentation fault when using cairo_show_text inside evince backend"
href="https://bugs.freedesktop.org/show_bug.cgi?id=66871#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - segmentation fault when using cairo_show_text inside evince backend"
href="https://bugs.freedesktop.org/show_bug.cgi?id=66871">bug 66871</a>
from <span class="vcard"><a class="email" href="mailto:cogniti@gmail.com" title="Hodong Kim <cogniti@gmail.com>"> <span class="fn">Hodong Kim</span></a>
</span></b>
<pre>Librsvg uses pango for text rendering.
I have tested with librsvg inside evince sample backend.
It also occurs segmentation fault.
configure.ac:
PKG_CHECK_MODULES(EXAMPLE, [pangocairo librsvg-2.0])
example-page.c:
#include <librsvg/rsvg.h>
#include <librsvg/rsvg-cairo.h>
static void
draw_svg(cairo_t *cr)
{
GError *error = NULL;
RsvgHandle *handle;
rsvg_set_default_dpi (72.0);
handle = rsvg_handle_new_from_file
("/home/cogniti/projects/libexample/sample.svg", &error);
if (error != NULL)
printf (error->message);
rsvg_handle_render_cairo (handle, cr);
}
gboolean example_page_render (ExamplePage *page, cairo_t *cr)
{
g_return_val_if_fail (EXAMPLE_IS_PAGE (page), FALSE);
/* draw_text (cr);*/
/* draw_sample (cr);*/
draw_svg(cr);
return TRUE;
}
sample.svg:
<svg xmlns="<a href="http://www.w3.org/2000/svg">http://www.w3.org/2000/svg</a>" version="1.1">
<text x="10" y="20" style="fill:black;">"The quick brown fox jumps over the
lazy dog" is an English-language pangram—a phrase
<tspan x="10" y="45">that contains all of the letters of the English
alphabet. It has been used to test typewriters and computer keyboards,</tspan>
<tspan x="10" y="70">and in other applications involving all of the letters
in the English alphabet. Owing to its brevity and coherence,</tspan>
<tspan x="10" y="95">it has become widely known.</tspan>
</text>
</svg></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>