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

Behdad Esfahbod behdad at bamdad.org
Mon Feb 25 09:15:06 EST 2002


Thanks a lot for the patch. This was a known problem of fribidi,=20
in fact the only missing part of UAX#9.

It was in the plan for 0.1.0 which will be the next release, but=20
now I will prepare 0.10.2 and release it.

To Omer: Don't worry about your patch, I will do everything for=20
the mean time.

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				6 Esfand 1380, 2002 Feb 25=20
<behdad at bamdad dot org>		[Finger for Geek Code]

The only thing that experience teaches us is that experience teaches
us nothing.
	-- Andre Maurois (Emile Herzog)





More information about the FriBidi mailing list