Bug 65989

Summary: Text selections are drawn over each other
Product: poppler Reporter: Jason Crain <jason>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: PDF with closely spaced lines of text
image of PDF as rendered by poppler-glib-demo
Draw glyphs after selection background

Description Jason Crain 2013-06-21 03:01:36 UTC
Created attachment 81144 [details]
PDF with closely spaced lines of text

When multiple lines of text are selected, TextSelectionPainter will draw selections over each other, hiding the previous line with the selection background of the current line.  Attached PDF has closely spaced lines of text to show this issue.

This is easiest to see on the selections page of popper-glib-demo.  Evince has its own issue which makes this a bit harder to see.
Comment 1 Jason Crain 2013-06-21 03:04:14 UTC
Created attachment 81145 [details]
image of PDF as rendered by poppler-glib-demo

Image of this PDF with the selection rendered by poppler-glib-demo.
Comment 2 Jason Crain 2013-06-21 03:09:23 UTC
Created attachment 81146 [details] [review]
Draw glyphs after selection background

Attached patch changes TextSelectionPainter so that glyphs are drawn only after the entire background is drawn.
Comment 3 Carlos Garcia Campos 2013-06-21 16:36:33 UTC
Comment on attachment 81146 [details] [review]
Draw glyphs after selection background

Review of attachment 81146 [details] [review]:
-----------------------------------------------------------------

This is a great idea. Pushed to git master, thank you!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.