Re: Implement BIDI algorithm by line

2011-08-23 Thread Richard Wordingham
On Tue, 23 Aug 2011 10:02:05 +0800
li bo  wrote:

> ...But I don't know why user must take
> a paragraph as a unit to determine the embedding levels. Why can't i
> shape the text first and then wrapping the line, and determining the
> embedding levels for characters within a line. finally, reordering
> the characters within a line. If a paragraph is too long, i think
> it's a big memory occupied. This would be a limit in embedding
> system such as mobile phone.

There is one problem with processing the text line-by-line - W5 'ET ET
EN -> EN EN EN' and N1 can both require one to examine the last
character in the paragraph, however many lines away it be.  Apart from
that, the process is just simpler to describe if one performs the
algorithm step by step.

Richard.



Re: Implement BIDI algorithm by line

2011-08-22 Thread li bo
Sorry, Asmus, what do you mean?

On Tue, Aug 23, 2011 at 2:44 AM, Asmus Freytag  wrote:

> Huh? What context is this in?
>
>
> On 8/22/2011 11:18 AM, CE Whitehead wrote:
>
> Hi.
>
> I think many line breaks within paragraphs are soft line breaks but that
> embedding levels have to be taken into account when deciding the width of
> the glyphs; that's as near as I can tell.
>
> Here is the description of the algorithm -- is this what you have read?
> http://unicode.org/reports/tr9/
> Some rules are in fact applied after the line wrapping (after the soft
> breaks) --
> "The following rules describe the logical process of finding the correct
> display order. As opposed to resolution phases, these rules act on a
> per-line basis* and are applied after any line wrapping is applied to the
> paragraph.*
> Logically there are the following steps:
>
>- The levels of the text are determined according to the previous
>rules.
>- The characters are shaped into glyphs according to their context *(taking
>the embedding levels into account for mirroring).*
>- The accumulated widths of those glyphs *(in logical order)* are used
>to determine line breaks.
>- For each line, rules L1 
> –L4are
>  used to reorder the characters on that line."
>
>
>
> (I'd have to reread the whole document on line breaking then on bidi to
> answer this truely; sorry; hope this helps anyway)
> --C. E. Whitehead
> cewcat...@hotmail.com
>
>
>


Re: Implement BIDI algorithm by line

2011-08-22 Thread li bo
 Yes, this is the algorithm I have read.  http://unicode.org/reports/tr9/
But I don't know why user must take a paragraph as a unit to determine the
embedding levels. Why can't i shape the text first and then wrapping the
line, and determining the embedding levels for characters within a line.
finally, reordering the characters within a line.
If a paragraph is too long, i think it's a big memory occupied. This would
be a limite in embedding system such as mobile phone.
On Tue, Aug 23, 2011 at 2:18 AM, CE Whitehead  wrote:

>  Hi.
>
> I think many line breaks within paragraphs are soft line breaks but that
> embedding levels have to be taken into account when deciding the width of
> the glyphs; that's as near as I can tell.
>
> Here is the description of the algorithm -- is this what you have read?
> http://unicode.org/reports/tr9/
> Some rules are in fact applied after the line wrapping (after the soft
> breaks) --
> "The following rules describe the logical process of finding the correct
> display order. As opposed to resolution phases, these rules act on a
> per-line basis* and are applied after any line wrapping is applied to the
> paragraph.*
> Logically there are the following steps:
>
>- The levels of the text are determined according to the previous
>rules.
>- The characters are shaped into glyphs according to their context *(taking
>the embedding levels into account for mirroring).*
>- The accumulated widths of those glyphs *(in logical order)* are used
>to determine line breaks.
>- For each line, rules L1 
> –L4are
>  used to reorder the characters on that line."
>
>
>
> (I'd have to reread the whole document on line breaking then on bidi to
> answer this truely; sorry; hope this helps anyway)
> --C. E. Whitehead
> cewcat...@hotmail.com
>


Re: Implement BIDI algorithm by line

2011-08-22 Thread Asmus Freytag

Huh? What context is this in?

On 8/22/2011 11:18 AM, CE Whitehead wrote:

Hi.

I think many line breaks within paragraphs are soft line breaks but 
that embedding levels have to be taken into account when deciding the 
width of the glyphs; that's as near as I can tell.


Here is the description of the algorithm -- is this what you have read?
http://unicode.org/reports/tr9/
Some rules are in fact applied after the line wrapping (after the soft 
breaks) --
"The following rules describe the logical process of finding the 
correct display order. As opposed to resolution phases, these rules 
act on a per-line basis/and are applied *after* any line wrapping is 
applied to the paragraph./

Logically there are the following steps:

  * The levels of the text are determined according to the previous rules.
  * The characters are shaped into glyphs according to their context
/(taking the embedding levels into account for mirroring)./
  * The accumulated widths of those glyphs /(in logical order)/ are
used to determine line breaks.
  * For each line, rules L1 –L4
 are used to reorder the
characters on that line."



(I'd have to reread the whole document on line breaking then on bidi 
to answer this truely; sorry; hope this helps anyway)

--C. E. Whitehead
cewcat...@hotmail.com




Implement BIDI algorithm by line

2011-08-22 Thread CE Whitehead

Hi.

I think many line breaks within paragraphs are soft line breaks but that 
embedding levels have to be taken into account when deciding the width of the 
glyphs; that's as near as I can tell.

Here is the description of the algorithm -- is this what you have read?
http://unicode.org/reports/tr9/
Some rules are in fact applied after the line wrapping (after the soft breaks) 
--
"The following rules describe the logical process of finding the correct 
display order.

As opposed to resolution phases, 
  these rules act on a per-line basis and are applied after any line wrapping 
is 
  applied to the paragraph.
  Logically there are the following steps: 
  The levels of the text are determined according to the previous rules.The 
characters are shaped into glyphs according to their context (taking the 
embedding 
levels into account for mirroring).The accumulated widths of those glyphs 
(in logical order) are used to determine line 
breaks.For each line, rules L1–L4 are used to reorder the characters on 
that line."

(I'd have to reread the whole document on line breaking then on bidi to answer 
this truely; sorry; hope this helps anyway)
--C. E. Whitehead
cewcat...@hotmail.com 
  

Implement BIDI algorithm by line

2011-08-22 Thread li bo
Hi all,
I have a question about the BIDI algorithm implementation. Bidi algorithm
describe that one must resolving embedding level in a paragraph before break
paragraph into lines. I don't understand why. Should we firstly break
paragraph into lines and remember the paragraph level, and then resolving
the embedding levels for each character in lines? If we do it like this,
what issues would be occurred?

Thanks a lot!