BidiMirrored property and ancient scripts (Was Re: Plain text custom fraction input)

Eli Zaretskii eliz at
Sat Jul 25 09:26:14 CDT 2015

> Date: Sat, 25 Jul 2015 14:36:51 +0100
> From: Richard Wordingham <richard.wordingham at>
> > > The issue lies with the wording of condition (1).  One might expect
> > > it to apply only to characters with a bidirectional type of L.
> > I see no reason to restrict this to L characters.  I'd be interested
> > to hear your rationale for that.
> A) A strong character's form in the corresponding directional context
> is the form identified by the Unicode charts.  If it is of type AL or
> R, it will , by definition, not be mirrored.
> B) A weak or neutral character's form in the charts is the form that
> occurs in the left-to-right direction.  Such a character has
> Bidi-mirrored set to Yes if it has different forms for left-to-right and
> right-to-left.  By rule L4, it will be mirrored if it receives a
> resolved direction of R.
> C) A character of type L may need to be mirrored if it receives a
> resolved directionality of R.  The most notable example is Egyptian
> hieroglyphs, but the same applies to Greek.

Mirroring is not changing a character's shape.  It is a replacement of
a character's glyph with a glyph of a different character.

Thus, your reasons make no sense to me, because a character's shape,
any character's shape, be it L, R, AL, or anything else, is immutable.

> There is a definite hole in my argument for non-spacing marks; marks
> used primarily in the Arabic script are shown in a form they take in a
> right-to-left context.

I don't think it's a hole.  I think your interpretation of this is
entirely wrong.

> > > My surmise is that it attempts to address text whose directionality
> > > is not known before rendering.
> > 
> > Indeed, UBA mirroring is only relevant to neutral characters.
> Then how do you explain condition (2):
> "Characters with a resolved directionality of L and whose
> bidirectional type is R or AL"

I never saw an example of it.  Can you show something like that?

Note that those conditions are "at least one of", so they are not all
required to be true at the same time.

> Obviously these characters are not neutral characters.  The only way
> they can acquire a resolved directionality of R is by application of
> RLO.

You mean, resolved directionality of L and LRO, right?

Anyway, let's talk about a concrete example of applying this rule,
shall we?  I'm guessing this is for some very specific characters in a
script I never used.

> > I don't think so.  I agree with those who maintain that boustrophedon
> > is unidirectional text, and so out of scope for the UBA.
> There are three main parts to the UBA:
> 1) Interpreting the text as nested runs of text in the same order.

I take it that by this you mean resolving the level of each
character.  To me, that is the main part of the UBA; all the rest is
almost trivial.

> 2) Sorting out the left-to-right order in which to write them (L2)
> 3) Sorting out mirroring (L4)
> Interpreting LRO and RLO is part of (1).  I'd like to know what the
> justification for have directionality overrides is.

One justification is when you want to present characters in some
particular order that overrides their innate bidirectional properties.
For example, imagine you want to tell your readers what will some
bidirectional text look like after reordering by the UBA, and you want
to do that without relying on the UBA implementation of whatever
software is used to view your presentation.

> Where we may part company is in our view of Hebrew text (no Arabic
> numbers) with parentheses in a right-to-left paragraph.  I think such
> text is really just as unidirectional as equivalent Latin text in a
> left-to-right paragraph.

No, not as soon as numbers or Latin characters are involved, IMO.

> However, one needs the UBA to sort out the rendering of the
> parentheses in the Hebrew text.

Not really, you can short-cut it, the same as in strictly
left-to-right text.

> Indeed, one may rely on the bidi algorithm to declare the Latin
> example unidirectional.

One might, but to what purpose and goal?

> If one can determine that text to be rendered boustrophedon is genuinely
> 'unidirectional', it seems entirely reasonable to call upon the Bidi
> algorithm to sort out the mirroring of glyphs on a *line* once one has
> chosen the direction of a line.

No, not as soon as characters of different or weak/neutral
directionality are involved, IMO.

More information about the Unicode mailing list