[cairo] postscript bug, text output is truncated (not shapes)
Adrian Johnson
ajohnson at redneon.com
Fri Oct 10 07:14:00 PDT 2008
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