[Fribidi-discuss] Order of combining sequences in R2L text

Behdad Esfahbod behdad at bamdad.org
Fri Mar 15 08:04:03 EST 2002


I have applied your patch to CVS, BTW the patch had bugs in=20
reordering which I fixed.


On Mon, 25 Feb 2002, Dominique Unruh wrote:

> [All examples use the CapRTL charset]
> When in an r2l part of a text there are NSM's, they are reordered like
> the surrounding characters, e.g.
> A`O =3D> O`A
> a`o =3D> a`o
> But if we want to use this reordered text in an application, which
> supports combining sequences, we'll probably get the following
> results (orig =3D> reordered =3D> rendered):
> A`O =3D> O`A =3D> =D3A
> a`o =3D> a`o =3D> =E1o
> The first line is not how the rendering should be. The l2r text is OK.
> By adding a further step after reordering, we get around this
> problem. Every sequence of the form NSM NSM ... NSM CHAR we invert,
> iff it is in an odd level (i.e. r2l).
> We get this result (orig =3D> reordered =3D> swap NSM =3D> rendered):
> A`O =3D> O`A =3D> OA` =3D> O=C1
> a`o =3D> a`o =3D> a`o =3D> =E1o
> This rendering is what we expect.
> I have attached a patch to fribidi-0.10.1, which realizes the ideas
> above. It adds functions fribidi_set_swap_nsm(boolean) and
> fribidi_swap_nsm_status() to fribidi.c, to control this behaviour
> (disabled per default), and the option --swapnsm to fribidi_main.c.
> Further I included a test tests/test_UTF-8_nsmswap.{input,reference}.
> DniQ.

Behdad Esfahbod				24 Esfand 1380, 2002 Mar 15=20
<behdad at bamdad dot org>		[Finger for Geek Code]

Computer Science is no more about computers than astronomy is about teles=
	-- Edsger W. Dijkstra, computer science professor=20

More information about the FriBidi mailing list