BiDi algorithm for ICU
-
UBiDiLevel
-
UBiDiLevel is the type of the level values in this
BiDi implementation
-
#define UBIDI_DEFAULT_LTR
- If there is no strong character, then set the paragraph level to 0 (left-to-right).
-
#define UBIDI_DEFAULT_RTL
- If there is no strong character, then set the paragraph level to 1 (right-to-left).
-
#define UBIDI_MAX_EXPLICIT_LEVEL
- Maximum explicit embedding level
(The maximum resolved level can be up to
UBIDI_MAX_EXPLICIT_LEVEL+1
).
-
#define UBIDI_LEVEL_OVERRIDE
- Bit flag for level input: overrides directional properties.
-
UBiDiDirection
UBiDiDirection
values indicate the text direction.
-
UBiDi
-
Forward declaration of the
UBiDi
structure for the declaration of
the API functions
-
ubidi_open
-
Allocate a
UBiDi
structure
-
ubidi_openSized
-
Allocate a
UBiDi
structure with preallocated memory
for internal structures
-
ubidi_close
-
ubidi_close()
must be called to free the memory
associated with a UBiDi object
-
ubidi_setPara
-
Perform the Unicode BiDi algorithm
-
ubidi_setLine
-
ubidi_getLine()
sets a UBiDi
to
contain the reordering information, especially the resolved levels,
for all the characters in a line of text
-
ubidi_getDirection
-
Get the directionality of the text
-
ubidi_getLength
-
Get the length of the text
-
ubidi_getParaLevel
-
Get the paragraph level of the text
-
ubidi_getLevelAt
-
Get the level for one character
-
ubidi_getLevels
-
Get an array of levels for each character
-
ubidi_getLogicalRun
-
Get a logical run
-
ubidi_countRuns
-
Get the number of runs
-
ubidi_getVisualRun
-
Get one run's logical start, length, and directionality,
which can be 0 for LTR or 1 for RTL
-
ubidi_getVisualIndex
-
Get the visual position from a logical text position
-
ubidi_getLogicalIndex
-
Get the logical text position from a visual position
-
ubidi_getLogicalMap
-
Get a logical-to-visual index map (array) for the characters in the UBiDi
(paragraph or line) object
-
ubidi_getVisualMap
-
Get a visual-to-logical index map (array) for the characters in the UBiDi
(paragraph or line) object
-
ubidi_reorderLogical
-
This is a convenience function that does not use a UBiDi object
-
ubidi_reorderVisual
-
This is a convenience function that does not use a UBiDi object
-
ubidi_invertMap
-
Invert an index map
-
Sample code for the ICU BiDi API
-
BiDi algorithm for ICU
This is an implementation of the Unicode Bidirectional algorithm.
The algorithm is defined in the
Unicode Technical Report 9,
version 5, also described in The Unicode Standard, Version 3.0 .
General remarks about the API:
In functions with an error code parameter,
the pErrorCode
pointer must be valid
and the value that it points to must not indicate a failure before
the function call. Otherwise, the function returns immediately.
After the function call, the value indicates success or failure.
The limit
of a sequence of characters is the position just after their
last character, i.e., one more than that position.
Some of the API functions provide access to runs
.
Such a run
is defined as a sequence of characters
that are at the same embedding level
after performing the BiDi algorithm.
- Author:
- Markus W. Scherer
- Version:
- 1.0
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de