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

Charles سمير Doutriaux doutriaux1 at LLNL.gov
Mon Oct 13 10:56:00 PDT 2008


Hi Adrian,

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.

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.

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

C.

On Oct 10, 2008, at 7:14 AM, Adrian Johnson wrote:

> Charles سمير Doutriaux wrote:
>> Ok i'm reposting this to the list so we can involve more people.
>> I now understand what Carl  "sees"
>> Actually i use plain "gs" to look at the files, it understand the
>> actual size of the postscript and displays the whole thing, you can
>> also simply send them to a printer
>> in ggv i used to see the same thing as you but then simply telling it
>> what the page size actuall is did fix the "viewing" problem.
>> Once it understand that the page is actually portrait not landscape
>> and that it displays the whole thing, (or you sent it to the printer
>> under Linux/Mac) you will see that the plot is drawn correctly except
>> for the text part that is not drawn since 1.7.4
>
> Since 1.7.4 cairo removes glyphs that are outside of the page. If  
> this is causing a problem for you it means you have not correctly  
> set the page size.
>
>> Please let me know if you can reproduce this, it is consitent for me
>> under multiple Linux type and Mac OS 10.4 and 10.5
>> Also, if you can tell me how i should initialise my postscript in
>> order to have it "landscape" right away it would be great. I am still
>> wondering why i need to declare it 792,612 and then rotate in order  
>> to
>> draw with the same function as say png/pdf, etc...
>
> There are two ways of creating a landscape page:
>
> 1. Create a Portrait page (612,792) then rotate user-space by 90  
> degrees so that that x-axis of user-space is aligned with the long  
> side of the page.
>
> 2. Create a Landscape page (792,612). Do not rotate user-space.
>
> If after changing your code to ensure you are always drawing within  
> the bounds of the page you are having problems with getting the  
> correct page orientation on your screen or printer there are a  
> couple of options:
>
> 1. Check if there is a DSC comment for page orientation and use the
>   following functions for inserting DSC comments into the PS output:
>     cairo_ps_surface_dsc_begin_setup ()
>     cairo_ps_surface_dsc_begin_setup ()
>     cairo_ps_surface_dsc_comment ()
>
> 2. Use the CUPS options when printing. eg
>  lpr -o landscape
>
>
>> C.
>> _______________________________________________
>> cairo mailing list
>> cairo at cairographics.org
>> http:// lists.cairographics.org/mailman/listinfo/cairo
>
>



More information about the cairo mailing list