[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emacs-bidi] Re: improving bidi documents display

From: Martin J. Dürst
Subject: Re: [emacs-bidi] Re: improving bidi documents display
Date: Fri, 04 Mar 2011 19:34:39 +0900
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20100722 Eudora/3.0.4

Hello Eli,

On 2011/03/02 13:02, Eli Zaretskii wrote:
Date: Wed, 02 Mar 2011 10:50:19 +0900
From: "Martin J. Dürst"
CC: address@hidden, address@hidden, address@hidden,
         address@hidden, address@hidden

Okay, we'll wait. But please note that we are interested not in the
reordering of the text inside each property, but in the text inside the
properties participating in the overall bidi algorithm and reordering of
the underlying text.

For that, the display strings don't need to have text in them.  You
can just have an overlay with a special property, no?

That would be possible. It would essentially mean simulating Bidi control characters/structure with overlays. As an example, to simulate embeddings and override (I'll call these bidi ranges from now on), we would need an overlay that covers the bidi range, with a new property (let's name it bidi-range just for the moment) that takes four different values corresponding to LRE, RLE, LRO, and RLO. Because the overlay indicates the extent of the bidi range, there is no need for something like the PDF character.

As an equivalent for LRM and RLM, the most straightforward way to implement them would be a property (maybe the same as above) that can take the values LRM-before, LRM-after, RLM-before, and RLM-after.

The above is a very direct simulation; I don't know how much easier it would be to implement than just Bidi processing the before and after text in an overlay.

There are some issues with the proposal above. First, if two overlays indicating bidi ranges overlap without one of them completely being contained in the other, then it has to be defined exactly what that means. (It's not possible to have such a case when using bidi control characters.) Second, there may be a case where one wants a Bidi mark (LRM or RLM) both before and after a character (or range of characters). Actually, that's quite a frequent case. That could be addressed by having bidi-mark-before and bidi-mark-after properties (or two separate overlays).

It may also be possible to have some more elaborate bidi properties on overlays. One example would be to have a property to set the bidi class of a character. Strong LTR and strong RTL in particular would be quite helpful. Currently, we simulate them by having LRMs or RLMs before and after a character. Another idea is to have something equivalent to bidi insulation as currently being discussed for HTML5/CSS3. See http://www.w3.org/International/docs/html-bidi-requirements/#bidi-isolation for a problem description, http://dev.w3.org/html5/spec/Overview.html#the-bdi-element for the HTML5 solution, and http://dev.w3.org/csswg/css3-writing-modes/#unicode-bidi for the corresponding piece of technology in CSS. Bidi isolation can be simulated with the existing bidi control characters, but it's necessary to look at the bidi classes of surrounding characters.

Regards,    Martin.

#-# Martin J. Dürst, Professor, Aoyama Gakuin University
#-# http://www.sw.it.aoyama.ac.jp   mailto:address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]