GNOME Bugzilla – Bug 434212
Right and center alignment stumbles on trailing spaces
Last modified: 2007-05-01 02:04:08 UTC
Please describe the problem: Right and center alignment failes because Pango forgets to strip trailing spaces on line breaking text. This seems to be a regression introduced some time after Pango 1.10. Don't know the exact version, when the regression happend. Steps to reproduce: 1. Apply the first patch 2. Create hello.txt with the content "Hello World." 3. Run "pango-view -w 60 --alignment=center" and "pango-view -w 60 --alignment=right". Actual results: Lines ending with spaces are not aligned properly as their trailing spaces push them to the left. Expected results: Last letters of right aligned text to be positioned in line and centered text to really be centered. Does this happen every time? Yes. Other information:
Created attachment 87200 [details] Broken center alignment On the left side the gap is 6 pixels, on the right it are 11 pixels...
Created attachment 87201 [details] Broken right alignment For glyphs like dots the current behaviour even could make some kind of sense, but if the result becomes non-discutable, when the last glyph is a letter.
Created attachment 87203 [details] [review] [pango-view] Add option for testing text alignment. Let's start with supporting alignment testing in pango-view.
Created attachment 87204 [details] [review] [pango-view] Add option for testing text alignment. Gah, I am too stupid to use git-update-index.
Please rename that to --align. Also, this is a dupe of bug 355789. I'm dupping. Please reattach your patch there after renaming. Thanks. (and yes, I envy you having a pango git checkout.) *** This bug has been marked as a duplicate of 355789 ***