After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 624917 - label: Draw all text using gtk_paint_layout()
label: Draw all text using gtk_paint_layout()
Status: RESOLVED OBSOLETE
Product: pango
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2010-07-21 12:28 UTC by Benjamin Otte (Company)
Modified: 2018-05-22 12:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
label: Draw all text using gtk_paint_layout() (11.03 KB, patch)
2010-07-21 12:28 UTC, Benjamin Otte (Company)
none Details | Review
patch against master (10.40 KB, patch)
2010-07-21 12:34 UTC, Benjamin Otte (Company)
rejected Details | Review

Description Benjamin Otte (Company) 2010-07-21 12:28:40 UTC
Previously, selected areas were overdrawn gdk_draw_layout(). Now we
insert the proper Pango markup to modify foreground and background
colors of the selection or active anchors. This way, we can use
gtk_paint_layout() unconditionally.
Comment 1 Benjamin Otte (Company) 2010-07-21 12:28:43 UTC
Created attachment 166273 [details] [review]
label: Draw all text using gtk_paint_layout()
Comment 2 Benjamin Otte (Company) 2010-07-21 12:32:56 UTC
This patch is fallout from my rendering-cleanup branch that I'd like to
a) get merged anyway, because it's useful (it fixes a FIXME)
b) have someone review it who knows a bit more about GtkLabel than me.
Comment 3 Benjamin Otte (Company) 2010-07-21 12:34:04 UTC
Created attachment 166274 [details] [review]
patch against master

Whoops, the first patch is against my branch which some changes already. This one applies to git master.
Comment 4 Matthias Clasen 2010-08-02 19:19:52 UTC
Looks reasonable in general. 
Why do you need to update the attributes in focus-out ?
Comment 5 Benjamin Otte (Company) 2010-08-04 17:29:19 UTC
Turns out that patch is broken.

Talking to Behdad and Owen presented the subtle issues with this patch: Create a label with the text "fi" and try selecting only one letter: It won't work. That's due "fi" being a single glyph (is that the correct term?) and Pango only changing colors at boundaries.
This is why this whole patch won't work and the text needs to be rendered clipped for the selection: We need partial glyph support.
Comment 6 Benjamin Otte (Company) 2010-08-04 17:35:10 UTC
Hrm, I guess with that, I can reassign to Pango. At least Behdad said he had an idea on how to fix color attributes to work on partial glyphs.
Comment 7 Behdad Esfahbod 2010-08-04 23:26:02 UTC
I have an idea of how to fix it, but to do it correctly is very complex.  and I mean VERY complex.
Comment 8 GNOME Infrastructure Team 2018-05-22 12:56:09 UTC
-- 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/pango/issues/177.