Modify the operation of the Bidi algorithm such that it
approximates an "inverse Bidi" algorithm. This method
must be called before
setPara()
.
The normal operation of the Bidi algorithm as described
in the Unicode Technical Report is to take text stored in logical
(keyboard, typing) order and to determine the reordering of it for visual
rendering.
Some legacy systems store text in visual order, and for operations
with standard, Unicode-based algorithms, the text needs to be transformed
to logical order. This is effectively the inverse algorithm of the
described Bidi algorithm. Note that there is no standard algorithm for
this "inverse Bidi" and that the current implementation provides only an
approximation of "inverse Bidi".
With isInversed
set to true
,
this method changes the behavior of some of the subsequent methods
in a way that they can be used for the inverse Bidi algorithm.
Specifically, runs of text with numeric characters will be treated in a
special way and may need to be surrounded with LRM characters when they are
written in reordered sequence.
Output runs should be retrieved using getVisualRun()
.
Since the actual input for "inverse Bidi" is visually ordered text and
getVisualRun()
gets the reordered runs, these are actually
the runs of the logically ordered output.
Calling this method with argument isInverse
set to
true
is equivalent to calling setReorderingMode
with argument reorderingMode
set to REORDER_INVERSE_NUMBERS_AS_L
.
Calling this method with argument isInverse
set to
false
is equivalent to calling setReorderingMode
with argument reorderingMode
set to REORDER_DEFAULT
.