GNOME Bugzilla – Bug 626406
Smarter/prettier highlighting of text
Last modified: 2018-05-22 13:58:16 UTC
I’m wondering if it is possible to use Cairo to highlight text and boxes in a smarter way. One possibility is to use a flood fill and an XOR composite mode. This would make it possible to use theme colors and still be robust across white-on-black or black-on-white (and in-between) documents.
Which problem do you try to solve here, as "prettier" is subjective?
The point was that it’s always a light-blue alpha-composited highlight, which reduces visibility in many situations. A different compositing mode would alleviate that.
Created attachment 236726 [details] Differences in search term highlighting between Okular and Evince I think "prettier" might be the wrong word here. Evince's highlighting is currently very hard to see, especially when compared to Okular (see attached Screenshot). A default color change or at least a related configuration option is very much necessary, more from a functional than an aesthetic standpoint.
It seems to me this depends on the theme installed.
I would argue then that this theme dependency should be changed. Your choice of system theme should not impede search functionality in evince. In this regard aesthetics should take a step back for function, I think. When working with physical documents you don't choose neon colours because you particularly like them, but because they provide the best visibility. The same principle should apply to digital documents as well.
(In reply to comment #5) > I would argue then that this theme dependency should be changed. Your choice of > system theme should not impede search functionality in evince. In this regard > aesthetics should take a step back for function, I think. > > When working with physical documents you don't choose neon colours because you > particularly like them, but because they provide the best visibility. The same > principle should apply to digital documents as well. A theme is not only a matter of aesthetics. Themes allows better accessibility support for color-blinded people, or who need high-contrast, etc. If the there were the issue (which I do not know, but it seems so), then the theme should be fixed. As far as I see in the screenshot, it is not the default theme (Adwaita) because it looks totally different to what I have in my computer.
Created attachment 237736 [details] test PDF It's not just the theme. Any particular color can lead to problems if it's just overlaid like a transparency. Normally for text selection you XOR the colors. If the background is dark, you make the text light, if the background is light you make the text dark. It's not about the subjective hue, it's about contrast.
Created attachment 237743 [details] Differences in search term highlighting under different themes and in comparison to Okular I agree with Tobias Wolf. The coulours themselves aren't as much of an issue as the way in which they are applied to the document. The attached test case shows how highlighted search terms render under four different themes (including Greybird, Ambiance, Clearlooks and HighContrast) in evince as compared to Okular. You can see that the XOR method, which Okular employs, results in the most visible highlighting. Out of the five renderings it is the only one that immediately leaps out at you.
The reason is mostly historic. Cairo didn't use to support the "XOR" method as described in the last comments. But newer versions of cairo do support it, so I don't see a reason to not change it. That being said, this does not have a very high priority, so you could probably try to cook a patch by your self.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/168.