<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hi all,<div><br class="webkit-block-placeholder"></div><div>First of all sorry for my bad english.</div><div><br class="webkit-block-placeholder"></div><div>I am new of the Cairo graphics library and I have a question/problem that I try to explain:</div><div><br class="webkit-block-placeholder"></div><div>I am developing a small project (web server) with cairo-perl binding to generate images from biological data in Cairo, the Idea is that the user can generate a first version of the image and modify it with his favorite software (usally in my field the software is Illustrator... sigh!)</div><div>The Web Server with Cairo run on a Linux server 2.6.17 gentoo ia64, I made the Illustrator test on a laptop G4 with OSX 1.4.11</div><div><br class="webkit-block-placeholder"></div><div>So the idea is that the software generate a PDF that can be opened with illustrator and modified.</div><div><br class="webkit-block-placeholder"></div><div>THE QUESTIONS:</div><div><br class="webkit-block-placeholder"></div><div>1) for lines, rectangles and filled rectangle the problem is that the fill and the stroke of a rectangle are separeted objects for Illustrator (so the user must delete the fill of an object and reapply another fill inside illustrator). </div><div><br class="webkit-block-placeholder"></div><div>May be I call fill and stoke function in the wrong way, actually I am doing something like this (in Perl):</div><div><br class="webkit-block-placeholder"></div><div>$cr -> rectangle(10,10,50,50);</div><div>$cr -> fill;</div><div>$cr -> rectangle(10,10,50,50);</div><div>$cr -> stroke</div><div><br class="webkit-block-placeholder"></div><div> Do you thinking that recycling the Path can solve this problem?</div><div><br class="webkit-block-placeholder"></div><div>2)... the real problem are FONTS, consider this small script:</div><div><br class="webkit-block-placeholder"></div><div>#!/usr/bin/perl</div><div>use strict;</div><div>use warnings;</div><div>use Cairo;</div><div>my $output = $ARGV[0];</div><div>my $pdfsurf = Cairo::PdfSurface->create($output, 256,256);</div><div>my $pdfcr = Cairo::Context->create ($pdfsurf);</div><div>$pdfcr -> select_font_face('monospace','normal','normal');</div><div>$pdfcr -> set_font_size (40);</div><div>$pdfcr->move_to(70,70);</div><div>$pdfcr->show_text('HELLO');</div><div>$pdfcr->show_page;</div><div><br></div><div>On my Web server (linux gentoo) I got the output in attachment (linux_hello.pdf), </div><div><br class="webkit-block-placeholder"></div><div></div></body></html>