GNOME Bugzilla – Bug 152265
Line breaks differ between screen and printing
Last modified: 2007-11-08 22:49:14 UTC
The attached spreadsheet contains the string "qwerty" in A1, and nothing else. The attached .png file shows what happens when printing it. We see the character "y". On top of it, there is several characters' width of pixledirt. What happens is that the text is wider on paper than on screen. It is wrapped inside the cell, and all but the lowest few pixels of the first line are clipped. It would be better to show the complete first line and clip the second if necessary. Another issue is that when the space to the right or below is empty, it may be better to let the text overflow into that space. Didn't printing use to work that way?
Created attachment 31451 [details] Example spreadsheet
Created attachment 31452 [details] Result of printing, converted to png
Why is the line wider during printing? I thought all this client-side font business should take care of that.
Fonts do not scale linearly wtih change in resolution. A string at 75 dpi may have a differnet width than one at 300, 600 or 1200 dpi. There is already a bug open about that.
Jon-Kare wrote: "It would be better to show the complete first line and clip the second if necessary." Well, you specified bottom alignment for the cell, so the bottom of the text will be aligned with the bottom of the cell. If you wanted to see the top of the cell you could have chosen top alignment. I think this is not really a bug but just a result of the chosen format for the cell. (Of course the fact that we need to wrap should be a bug!)
I now see that "wrap text" is actually checked for this cell. This makes it NOTABUG. Now I wonder how the cell ended up with "wrap text". Oh, well.
> Fonts do not scale linearly wtih change in resolution. This is also true in TeX and a bit (because there is more to small font sizes that simple scaling). It's a bit of a problem here, though. We might have to silently allow minor overshooting, say .5pt
Mostly fixed in cvs with the new printing code: if the screen layout has only one line, we now turn off wrapping for the printing layout.
We will need pango support for the general solution to this.
I think the remaining issue is really the change of line breaks for wrapped text between screen display and printing. So the subject should reflect this.
Bugs 323315, 152265 and 1060029 essentially describe the same situation: the character sizes vary slightly between screen rendering and printing. As a consequence the line breaks and line heights vary. Since these are all the same problem and 323315 provides a workaround we consolidate them to 323315. *** This bug has been marked as a duplicate of 323315 ***