GNOME Bugzilla – Bug 345386
Language and direction propagation in and between PangoLayouts
Last modified: 2018-05-22 12:18:33 UTC
Currently Gtk+ propagates paragraph base direction from neighbouring paragraphs such that paragraphs with no strong direction take the direction of adjacent paragraphs. That works really good. Same thing should happen with language selection for characters in the Common script. The goal is to fix having something like this: https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=103679 Now that case cannot be solved completely, but can be improved. And while doing this, makes sense to do these: 1) implement propagation in PangoLayout 2) add API to allow propagation to happen automatically (link PangoLayout's together?) #2 is needed, as Gtk+ uses one PangoLayout per paragraph. Even if it was not, it definitely makes sense to break a long document into multiple PangoLayouts, so it's not unusual. Anyway, I'm not sure how to approach #2. What comes to my mind is to add callback functions to context for getting "previous" and "next" layouts of a PangoLayout. We can also add a couple convenience functions that implement those for in-memory text buffers. We don't have any callback API in Pango currently. With that in place, the direction propagation logic in Gtk+ can be removed and everybody use the Pango API. Owen, how would you approach this problem?
The attachment btw is from this downstream bug: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=129541 And a WONTFIXed bug about it is bug 321113.
-- 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/48.