GNOME Bugzilla – Bug 118546
Bidi direction via attributes
Last modified: 2008-01-22 22:21:01 UTC
In the GTK+ changes from bug 70541, it's clear that pango_layout_set_base_direction() would be nice to have, but there's no way to pass that information into pango_itemize(). Also, it would be nice to be able to have HTML style <span dir="rtl">blah</span> in GMarkup, rather than having to do do bidi formatting with ȀN; escapes The solution here, seems to be to add some sort of PangoAttribute that allowed setting Bidi direction. Since you want to allow nesting, you can't just have an attributes with values of RTL/LTR. A scheme that perhaps would work is to have a integer-valued property along the lines of the resolved bidi-levels. So, 001112222 abcdefghi Would result in ab<LRE>cde<RLE>fghi<PDF><PDF> being passed to fribidi. It's relatively easy to implement code that takes a UTF-8 string and attribute list, inserts control codes, calls pango_log2vis_get_embedding_levels(), and then strip the control codes out of the result, A point neding consideration in the above scheme is perhaps what (if anything) to do about overrides.
The above reference 70451
Note overlap with bug #70399.
*** This bug has been marked as a duplicate of 70399 ***