[cairo-bugs] [Bug 66871] segmentation fault when using cairo_show_text inside evince backend

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jul 13 14:13:19 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=66871

--- Comment #4 from Hodong Kim <cogniti at gmail.com> ---
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="http://www.w3.org/2000/svg" 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>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20130713/cd329085/attachment.html>


More information about the cairo-bugs mailing list