freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Confusion about bidirectional line breaks...


From: Owen Taylor
Subject: Re: [Freetype] Confusion about bidirectional line breaks...
Date: Mon, 25 Oct 2004 15:42:00 -0400

On Sun, 2004-10-24 at 20:17 -0700, Paul Pedriana wrote:
> The Unicode bidi algorithm
> (www.unicode.org/reports/tr9/) states:
> 
>    The process of breaking a paragraph into one 
>    or more lines that fit within particular bounds 
>    is outside the scope of the bidirectional 
>    algorithm. Where character shaping is involved, 
>    it can be somewhat more complicated. Logically
>    there are the following steps:
> 
>    1 The levels of the text are determined according 
>      to the bidirectional algorithm.
>    2 The characters are shaped into glyphs according 
>      to their context (taking embedding levels into
>      account for mirroring!).
>    3 The accumulated widths of those glyphs (in 
>      logical order) are used to determine line breaks.
>    4 For each line, rules L1-L4 are used to reorder 
>      the characters on that line.
>    5 The glyphs corresponding to the characters on 
>      the line are displayed in that order.
> 
> So as I'm reading this, glyphs are shaped (#2) before
> line breaks happen (#3) which is before reordering
> occurs (#4). I must be missing something, because I
> don't see how you can do line breaks properly before
> you have done reordering. Won't the order of the words
> on the line possibly be very different, thus changing
> how the line is properly broken?

[ Rather off-topic for this list... ]

Line breaks are chosen based on the logical order of characters, not
their visual order on the line. So, yes, if you break before reordering
you get a different result from breaking after reordering, but the
break-before-reordering result is the correct one.

Regards,
                                                Owen

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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