GNOME Bugzilla – Bug 113931
Support attributes that cover only part of a cluster
Last modified: 2018-05-22 12:02:35 UTC
Sometimes - see bug 104976 - you actually want attributes covering only part of a logical cluster. An approach that occurs to me is to simply stick all attributes that touch any part of the run into glyph_item->item->analysis.extra_attrs *with the correct start_index/end_index (same index system as glyph_item->glyphs->log_clusters[]) A simple client would just render all the attributes, but a more sophisticated client would be able to: A) Currently use the simple linear mapping we use, for say, hit point detection B) In the future, possibly use some extended Pango interface (needing engine support) to understand the structure of the cluster better, possibly using information such as the "Ligature Caret" information in the OpenType GDEF table.
Created attachment 16966 [details] [review] Small start on necesary changes
The change I'm putting in for bug 104976 is a start - it sets things up so all attributes that touch a cluster are added to the cluster. The next part of the change would be to work on having accurate ranges for the attributes in item->extra_attrs. This will require changes in pango_item_split() (attached) pango_glyph_item_apply_attrs(), pango_itemize(). From there, you could work on making the rendering code (in Pango and GTK+) use that information and linear character division. Finally, would be the question of adding interfaces for more complicated sub-cluster division between characters, as described above.
Created attachment 109331 [details] gtk-ligature-underline-problem.png DejaVu, the default font of most distros has the ligatures, which with this feature lacking causes confusing display of accesskey in the menu.
-- 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/8.