[cairo] postscript bug, text output is truncated (not shapes)

Carl Worth cworth at cworth.org
Mon Oct 13 11:09:25 PDT 2008

On Mon, 2008-10-13 at 10:56 -0700, Charles سمير Doutriaux wrote:
> OK I need help here, because this used to work under 1.6.4, and i see  
> that you closed the bug report as a "not a bug" but it is still  
> inconsistent EVEN if i'm defining the page in a bad way.

It's inconsistent because we changed things since 1.6.4.

With 1.6.4 if you asked cairo to render tons of text to a PDF or
PostScript file, but most of that was outside the page boundaries, then
cairo would generate a much larger file than necessary, (including data
for all of the "off page" text).

We implemented an optimization to simply drop the "off page" text.

> I can understand you're argument about cutting glyph "outside of the  
> page" but then why is it just cutting glyphs, and not the lines and  
> other shapes.

Because that's the only optimization we've implemented so far---and it
was just easier that way. We might certainly also optimize other
graphics in a similar way in the future.

Basically, you shouldn't rely on the behavior you get for the "off page"
portion of any graphics elements. Cairo will not guarantee that they
will be present.

> I think the reason i was doing the rotate on a portrait page, is  
> because like that I can use the  exact same calls for png/pdf/svg and  
> for postscript. I'm not 100% positive (it's been a long time this code  
> worked great!) but if i remember correctly it was due to the origin of  
> the page being different in postscript

If you have any more details here, then I would appreciate you sharing
them. There shouldn't be any difference in how you runder to PDF,
PostScript, SVG, etc. That's one of the defining characteristics of
cairo. There's certainly not a different page origin with any of cairo's
backends---it's the same in all cases.

So if there *is* any substantive difference, then that's a bug in cairo.

Or if there's something that gave you the impression that you needed to
do something "special" for PostScript, then we should fix that too.
Please let us know.

But for now, you should be able to just tell cairo the correct page
dimensions and the undesired behavior will go away, right?

Have fun,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.cairographics.org/archives/cairo/attachments/20081013/f935559a/attachment.pgp 

More information about the cairo mailing list