GNOME Bugzilla – Bug 153578
Text shrinks during printing
Last modified: 2008-09-09 17:39:46 UTC
statfuns.xls' I20, "Status message", extends into cell J20 on screen. When printing, I is the last column on page 1 and I20 extend into the margin. That looks crazy. (The same thing happens with new and old printing code.) I am not sure what the right thing to do is.
*** Bug 160600 has been marked as a duplicate of this bug. ***
Because my bug was marked as a duplicate of this one and I really don't understand what the above problem description is talking about, I just want to add mime. A cell which fits its content on the screen exactly (using auto-fit) is to small for the content on printing and print preview. However, the text doesn't flow over the cell borders - it is clipped.
*** Bug 159802 has been marked as a duplicate of this bug. ***
Still occuring with most recent code using GtkPrint.
This in fact appears to have nothing to do with the fact that text size changes as the resolution changes. For the examples I have looked at, layout size in fact decreases as the resolution of the medium increases, from a natural layout size of 341 x 27 to a size of 280 x 20 after recontexting. The problem is that the cell size is only 254 x 20 so the question arises why the content fits into the cell in display...
Okay: the problem seems to be a confusion between pixels and points. The text layout is done in pixels that are then interpreted as points when the text is printed. Since the scale factor between points and pixels is not 1, the problem occurs. This also explains why the width and height passed to print_cell_gtk differes from that passed to draw_cell. (The former is in points, the latter in pixels.)
I have fixed the points/pixels confusion in print_cell_gtk. Texts will now frequently appear to small. This is primarily due to the change in resolution. At least pango yields smaller layouts for the higher resolution context. Since this still needs to be fixed I am leaving this bug open with an "underflow" in the subject line.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
*** Bug 551542 has been marked as a duplicate of this bug. ***