<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Courier New, monospace" size="2">
<div>I am having problems building SVG with an older version of Cairo (1.2.4), and I’d like to see if anyone can help me figure out why.</div>
<div> </div>
<div>I have two servers that I am trying to build SVG files from, both using cairo, but different versions.</div>
<div>Server 1 –</div>
<div>Ubuntu 9.04, x windows</div>
<div>Cairo 1.8.8</div>
<div>Librsvg 2.26</div>
<div> </div>
<div>Server 2 –</div>
<div>RHEL5 (red hat), headless</div>
<div>Cairo 1.2.4</div>
<div>Librsvg 2.16</div>
<div> </div>
<div>On server 1, everything works fine with the sample code (CODE SAMPLE 1) below.</div>
<div>On server 2, the svg output looks like the second code sample (CODE SAMPLE 2) below. </div>
<div>It’s just a skeleton of an svg file. But the strange thing is that the width and height are filled into the svg output, but nothing else.</div>
<div> </div>
<div>Looking through past changelogs and such, cairo 1.2.4 should support SVG file output.</div>
<div>Is there something I could be missing that would cause server 2 to only partially work?</div>
<div> </div>
<div>I can not find a good list of required dependencies for SVG to work in cairo 1.2.4. </div>
<div>It worked out of the box with cairo 1.8.8.</div>
<div> </div>
<div>I, unfortunately, have no option to upgrade the version of cairo on server 2.</div>
<div> </div>
<div>Anybody have any ideas at all, every bit helps, and thank you in advance,</div>
<div><font face="Calibri, sans-serif"> </font></div>
<div>(see code below)</div>
<div><font face="Calibri, sans-serif"> </font></div>
<div>- Charlie</div>
<div> </div>
<div> </div>
<div> </div>
<div>################### BEGIN CODE SAMPLE 1 ###################</div>
<div>#include <cairo.h></div>
<div>#include <cairo-svg.h></div>
<div> </div>
<div>int main() {</div>
<div> </div>
<div> cairo_surface_t *surface;</div>
<div> cairo_t *cr;</div>
<div> </div>
<div> surface = cairo_svg_surface_create("svgfile.svg", 390, 60);</div>
<div> cr = cairo_create(surface);</div>
<div> </div>
<div> cairo_set_source_rgb(cr, 0, 0, 0);</div>
<div> cairo_select_font_face (cr, "Sans", CAIRO_FONT_SLANT_NORMAL,</div>
<div> CAIRO_FONT_WEIGHT_NORMAL);</div>
<div> cairo_set_font_size (cr, 40.0);</div>
<div> </div>
<div> cairo_move_to(cr, 10.0, 50.0);</div>
<div> cairo_show_text(cr, "Hello.");</div>
<div> </div>
<div> cairo_surface_destroy(surface);</div>
<div> cairo_destroy(cr);</div>
<div> </div>
<div> return 0;</div>
<div>}</div>
<div>################### END CODE SAMPLE 1 ###################</div>
<div> </div>
<div> </div>
<div>################### BEGIN CODE SAMPLE 2 ###################</div>
<div><?xml version="1.0" encoding="UTF-8"?></div>
<div><svg xmlns="<a href="http://www.w3.org/2000/svg"><font color="#0000FF"><u>http://www.w3.org/2000/svg</u></font></a>" xmlns:xlink="<a href="http://www.w3.org/1999/xlink"><font color="#0000FF"><u>http://www.w3.org/1999/xlink</u></font></a>" width="390pt"
height="60pt" viewBox="0 0 390 60" version="1.1"></div>
<div><defs></div>
<div><clipPath id="clip0"></div>
<div> <rect width="390" height="60"/></div>
<div></clipPath></div>
<div></defs></div>
<div><g id="surface0" clip-path="url(#clip0)"></div>
<div></g></div>
<div></svg></div>
<div>################### END CODE SAMPLE 2 ###################</div>
<div> </div>
<div><font face="Calibri, sans-serif"> </font></div>
<div><font face="Calibri, sans-serif"> </font></div>
</font>
</body>
</html>