[GRASS-dev] ERROR: Cairo_draw_bitmap: Failed to create source

Markus Neteler neteler at osgeo.org
Sat Aug 15 13:14:28 EDT 2009


Hi,

I am trying to render PDFs from screen output (6.5, for 7 see below) and ran
into this error:

# minimalistic example
d.erase
echo "Ciao" | d.text at=15,92 -b size=4 font=Vera

d.out.file output format=pdf
Using the Cairo driver.
Saving display from Monitor: [x0] to <output.pdf>.
Image size [1276 x 966]
ERROR: Cairo_draw_bitmap: Failed to create source
ERROR eof from graphics driver.
WARNING: Socket is already in use or not accepting connections.
WARNING: Use d.mon to select a monitor
ERROR: No graphics device selected
WARNING: Error - Monitor 'cairo' was not running
Screen export complete. (writing the file may take a small amount of time)
Image crop [1276 x 759]
Done.

If I don't define a Freetype font it works. Would it be possible to
get Freetype supported in CAIRO output ()? Eventually I'd need PDF
output with vectors ideally remaining vectors...


GRASS 7 - no success at all:

export GRASS_RENDER_IMMEDIATE=CAIRO
export GRASS_PNGFILE=map.pdf
d.rast map=elevation.10m
 100%
ERROR: write_image: unknown file type: .pdf

I have installed:
rpm -qa | grep cairo
lib64cairomm1.0_1-1.8.0-1mdv2009.1
lib64cairo2-1.8.6-3mdv2009.1
python-cairo-1.8.2-1mdv2009.1
lib64cairo-devel-1.8.6-3mdv2009.1
libcairo2-1.8.6-3mdv2009.1

I see also:
rpm -qil lib64cairo-devel-1.8.6-3mdv2009.1
...
/usr/include/cairo/cairo-ft.h
/usr/include/cairo/cairo-pdf.h
/usr/include/cairo/cairo-ps.h
/usr/include/cairo/cairo-svg.h
...
/usr/lib64/libcairo.la
/usr/lib64/libcairo.so

Not sure what I am missing here.

Markus


More information about the grass-dev mailing list