[cairo] cairo never render text in svg
Kreller, Marcus
MKreller at ime-actia.de
Thu Jun 28 04:28:32 PDT 2007
Thanks for answer,
I dont now that exist some extra functions/utilities to open SVG and so I dont try rsvg-view or rsvg-convert but I will do this. Can you give me a code example how to use rsvg-view and/or rsvg-convert?
Thats the way I go:
/* Initialize rsvg */
rsvg_init();
/* Open handle for SVG-file */
g_my_svg = rsvg_handle_new_from_file(bufFilename, &pError);
.
/* Create Cairo surface */
cairo_surface_t *cairo_surface = cairo_win32_surface_create(hdc);
cairo_t *cr = cairo_create(cairo_surface);
/* Scale */
.
rsvg_handle_render_cairo(g_my_svg, cr);
.
/* Clean up cairo */
/* Clean up rsvg */
Marcus
-----Ursprüngliche Nachricht-----
Von: cairo-bounces at cairographics.org [mailto:cairo-bounces at cairographics.org] Im Auftrag von Emmanuel Pacaud
Gesendet: Donnerstag, 28. Juni 2007 11:30
An: Kreller, Marcus
Cc: cairo at cairographics.org
Betreff: Re: [cairo] cairo never render text in svg
Le jeudi 28 juin 2007 à 11:04 +0200, Kreller, Marcus a écrit :
> Hi,
>
> for one of my projects in Visual C++ 6.0 under WinXP I render SVGs with
> librsvg 2.16.1. These SVGs
> contain some text tags like this:
>
> <text x="10" y="10" >...</text>
>
> Cairo with librsvg works fine but all redered SVGs displayed without
> text. No error or something else.
> I put the sources of cairo, librsvg and pango (v 1.16) into my project
> to debug someone, but I dont find the reason. I tested my svgs
> additional with Firefox and Gimp and here the text was diplayed.
> These programs also use cairo+librsvg+pango to picture svgs.
>
Could you send us a sample file ?
Did you try to render these files with the rsvg-view utility that comes
with librsvg ? Or rsvg-convert ?
Emmanuel.
--
Emmanuel PACAUD
Groupe Virgo
LAPP - Laboratoire d'Annecy-le-Vieux de physique des particules
9, chemin de Bellevue - BP 110
74941 Annecy-le-Vieux CEDEX
France
Tél: (+33)4 50 09 17 89 - Fax: (+33)4 50 27 94 95
_______________________________________________
cairo mailing list
cairo at cairographics.org
http://cairographics.org/cgi-bin/mailman/listinfo/cairo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tiger.svg
Type: application/octet-stream
Size: 97363 bytes
Desc: tiger.svg
Url : http://cairographics.org/archives/cairo/attachments/20070628/bd4d4335/attachment-0001.obj
More information about the cairo
mailing list