Error in Pango while using cairo/librsvg

Discussion in 'Python' started by Hilmar Bunjes, Jun 15, 2009.

  1. Hi,
    I try using Python (on Windows) with Cairo and librsvg to convert a svg
    file to a png image. I got some help from the German python newsgroup to
    get this running but now I run into some problems with pango I don't
    know how to solve.

    Running the python script in the console it tells me:
    (python.exe:4908): Pango-CRITICAL **:
    pango_win32_font_map_get_font_cache: assertion `font_map != NULL' failed
    Pango:ERROR:pangowin32.c:838:pango_win32_font_finalize: assertion
    failed: (win32font->fontmap != NULL)

    This application has requested the Runtime to terminate it in an unusual
    Please contact the application's support team for more information.

    The script I run is:
    and the is:
    I have the GIMP 2.6 bin folder in my path so all DLLs are used from that

    I have no idea why the error is raised. I also tried to "import pango"
    in the script but then it tells me:
    Can anybody help my with the svg2png conversion here?

    Hilmar Bunjes, Jun 15, 2009
    1. Advertisements

  2. Hilmar Bunjes

    saxi Guest

    I use pyWxSVG to convert a svg file to a png image.
    pyWxSVG is svg canvas for wxPython.
    View and print svg file or svg content, convert svg to raster
    graphics. Open svg, svgz file as wx.Image, use wx.BITMAP_TYPE_SVG,
    wx.BITMAP_TYPE_SVGZ type. Partial support svg format. Tested with
    Python 2.5 and wxPython Path parser and elliptical arc
    approximation from Enable.
    saxi, Jun 30, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.