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

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


Hi,

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

Yours,
behdad


On Mon, 25 Feb 2002, Dominique Unruh wrote:

> [All examples use the CapRTL charset]
>=20
> When in an r2l part of a text there are NSM's, they are reordered like
> the surrounding characters, e.g.
>=20
> A`O =3D> O`A
> a`o =3D> a`o
>=20
> 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):
>=20
> A`O =3D> O`A =3D> =D3A
> a`o =3D> a`o =3D> =E1o
>=20
> The first line is not how the rendering should be. The l2r text is OK.
>=20
> 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).
>=20
> We get this result (orig =3D> reordered =3D> swap NSM =3D> rendered):
>=20
> A`O =3D> O`A =3D> OA` =3D> O=C1
> a`o =3D> a`o =3D> a`o =3D> =E1o
>=20
> This rendering is what we expect.
>=20
>=20
> 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.
>=20
> Further I included a test tests/test_UTF-8_nsmswap.{input,reference}.
>=20
> DniQ.
>=20

--=20
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=
copes.=20
	-- Edsger W. Dijkstra, computer science professor=20






More information about the FriBidi mailing list