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 118546 - Bidi direction via attributes
Bidi direction via attributes
Status: RESOLVED DUPLICATE of bug 70399
Product: pango
Classification: Platform
Component: general
1.2.x
Other Linux
: Normal normal
: future
Assigned To: pango-maint
pango-maint
Depends on:
Blocks: 135836
 
 
Reported: 2003-07-29 04:28 UTC by Owen Taylor
Modified: 2008-01-22 22:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2003-07-29 04:28:14 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 &#x200N; 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.
Comment 1 Owen Taylor 2003-07-29 14:17:03 UTC
The above reference 70451
Comment 2 Dov Grobgeld 2003-07-30 04:31:27 UTC
Note overlap with bug #70399.
Comment 3 Owen Taylor 2004-12-13 20:40:13 UTC

*** This bug has been marked as a duplicate of 70399 ***