emacs-bidi
[Top][All Lists]
Advanced

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

Re: [emacs-bidi] Embedding levels of formatting codes


From: Behdad Esfahbod
Subject: Re: [emacs-bidi] Embedding levels of formatting codes
Date: Wed, 17 Oct 2001 03:08:14 +0330 (IRT)

On Tue, 16 Oct 2001, Eli Zaretskii wrote:

[snip]
> Sure, it's quite clear from the text that this is just a lip service,
> not something that someone imlpemented.  But I still would like to
> understand what does this say.  One thing I don't understand is this
> part:
> 
>    ``instead of removing the format codes, assign the embedding 
>      level to each embedding character''
> 
> What is ``the embedding level'' which I should assign to those codes?

It means:

  ``X9'. With each RLE, LRE, RLO, LRO, PDF, and BN character, set it's
    level to the current embedding level, then turn it's type to BN.''

> And also this one:
> 
>    ``In rule X10, assign L or R to the last of a sequence of adjacent BNs 
>      according to the eor / sor, and set the level to the higher of the
>      two levels.''
> 
> Do you even understand what are they trying to tell here?  What does
> ``according to the eor / sor'' mean in practical terms?  What ``two
> levels'' do they mean in the last part of this sentence?

For each run, the spec has defined sor and eor levels, the sor is the 
level of previous run, and eor is the level of next run, now:

  ``X10'. With each maximal sequence of adjacent BNs, set it's level
    to the higher of sor and eor, name this level x, then if x is  
    even, change the bidi type of the last character in sequence, to 
    ltr, and otherwise, change it to rtl.''

> > I won't recommend implementing something based on this section.
> 
> Actually, what I wrote is based on that section, and it seems to work
> fairly well.  Most of what they say there is not very important
> anyway, since the algorithm mostly works on each level run separately,
> and formatting codes almost always (with the exception of LRM and RLM)
> change the level, i.e. end the current level run and start another.

Ok, but lots of bugs arise in the run boundaries, are you trying to be 
strictly UAX#9 conformant, or some very small exceptions are not too 
important to you?

> > A good way should be something like FriBidi has implemented.
> 
> Unfortunately, I cannot follow the FriBidi lead in a sequential
> implementation.  See my other mail.

Ok :-).

behdad





reply via email to

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