1fribidi_reorder_line(3)       Programmer's Manual      fribidi_reorder_line(3)
2
3
4

NAME

6       fribidi_reorder_line - reorder a line of logical string to visual
7

SYNOPSIS

9       #include <fribidi.h>
10
11       FriBidiLevel fribidi_reorder_line
12       (
13            FriBidiFlags flags,
14            const FriBidiCharType *bidi_types,
15            const FriBidiStrIndex len,
16            const FriBidiStrIndex off,
17            const FriBidiParType base_dir,
18            FriBidiLevel *embedding_levels,
19            FriBidiChar *visual_str,
20            FriBidiStrIndex *map
21       );
22

PARAMETERS

24       FriBidiFlags flags
25              Reorder flags.
26
27       const FriBidiCharType *bidi_types
28              Input     list     of     bidi     types    as    returned    by
29              fribidi_get_bidi_types().
30
31              Possible values for a const FriBidiCharType are as follows:
32              FRIBIDI_TYPE_LTR  Left-To-Right letter.
33              FRIBIDI_TYPE_RTL  Right-To-Left letter.
34              FRIBIDI_TYPE_AL   Arabic Letter.
35              FRIBIDI_TYPE_EN   European Numeral.
36              FRIBIDI_TYPE_AN   Arabic Numeral.
37              FRIBIDI_TYPE_ES   European number Separator.
38              FRIBIDI_TYPE_ET   European number Terminator.
39              FRIBIDI_TYPE_CS   Common Separator.
40              FRIBIDI_TYPE_NSM  Non Spacing Mark.
41              FRIBIDI_TYPE_BN   Boundary Neutral.
42              FRIBIDI_TYPE_BS   Block Separator.
43              FRIBIDI_TYPE_SS   Segment Separator.
44              FRIBIDI_TYPE_WS   WhiteSpace.
45              FRIBIDI_TYPE_ON   Other Neutral.
46              FRIBIDI_TYPE_LRE  Left-to-Right Embedding.
47              FRIBIDI_TYPE_RLE  Right-to-Left Embedding.
48              FRIBIDI_TYPE_LRO  Left-to-Right Override.
49              FRIBIDI_TYPE_RLO  Right-to-Left Override.
50              FRIBIDI_TYPE_PDF  Pop Directional Flag.
51
52       const FriBidiStrIndex len
53              Input length of the line.
54
55       const FriBidiStrIndex off
56              Input offset of the beginning of the line in the paragraph.
57
58       const FriBidiParType base_dir
59              Resolved paragraph base direction.
60
61              Possible values for a const FriBidiParType are as follows:
62              FRIBIDI_PAR_LTR   Left-To-Right paragraph.
63              FRIBIDI_PAR_RTL   Right-To-Left paragraph.
64              FRIBIDI_PAR_ON    DirectiOn-Neutral paragraph.
65              FRIBIDI_PAR_WLTR  Weak Left To Right paragraph.
66              FRIBIDI_PAR_WRTL  Weak Right To Left paragraph.
67
68       FriBidiLevel *embedding_levels
69              Input   list   of   embedding    levels,    as    returned    by
70              fribidi_get_par_embedding_levels.
71
72       FriBidiChar *visual_str
73              Visual string to reorder.
74
75       FriBidiStrIndex *map
76              A map of string indices which is reordered to reflect where each
77              glyph ends up.
78

DESCRIPTION

80       This function reorders the characters in a line of text from logical to
81       final  visual  order.   This function implements part 4 of rule L1, and
82       rules L2 and L3 of the Unicode  Bidirectional  Algorithm  available  at
83       http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels.
84
85       As a side effect it also sets position maps if not NULL.
86
87       You  should provide the resolved paragraph direction and embedding lev‐
88       els as set by fribidi_get_par_embedding_levels().  Also note  that  the
89       embedding levels may change a bit.  To be exact, the embedding level of
90       any sequence of white space at the end of line is reset  to  the  para‐
91       graph embedding level (That is part 4 of rule L1).
92
93       Note  that  the bidi types and embedding levels are not reordered.  You
94       can reorder these (or any other) arrays using the map later.  The  user
95       is  responsible  to initialize map to something sensible, like an iden‐
96       tity mapping, or pass NULL if no map is needed.
97
98       There is an optional part to this function, which is whether  non-spac‐
99       ing  marks  for  right-to-left parts of the text should be reordered to
100       come after their base characters in the visual  string  or  not.   Most
101       rendering  engines  expect this behavior, but console-based systems for
102       example   do   not   like   it.    This   is    controlled    by    the
103       FRIBIDI_FLAG_REORDER_NSM     flag.      The     flag     is    on    in
104       FRIBIDI_FLAGS_DEFAULT.
105

RETURNS

107       Maximum level found in this line plus one, or zero if any error occured
108       (memory allocation failure most probably).
109

SEE ALSO

111       fribidi_charset_to_unicode(3),           fribidi_unicode_to_charset(3),
112       fribidi_parse_charset(3),                      fribidi_shape_arabic(3),
113       fribidi_get_par_direction(3),      fribidi_get_par_embedding_levels(3),
114       fribidi_get_bidi_type(3),                    fribidi_get_bidi_types(3),
115       fribidi_get_bidi_type_name(3), fribidi_debug_status(3), fribidi_mirror‐
116       ing_status(3), fribidi_set_mirroring(3), fribidi_reorder_nsm_status(3),
117       fribidi_set_reorder_nsm(3),    fribidi_log2vis_get_embedding_levels(3),
118       fribidi_get_type(3),                      fribidi_get_type_internal(3),
119       fribidi_remove_bidi_marks(3),   fribidi_log2vis(3),   fribidi_join_ara‐
120       bic(3),   fribidi_get_joining_type(3),    fribidi_get_joining_types(3),
121       fribidi_get_joining_type_name(3),           fribidi_get_mirror_char(3),
122       fribidi_shape_mirroring(3), fribidi_shape(3)
123
124
125
126GNU FriBidi 0.19.2              30 January 2006        fribidi_reorder_line(3)
Impressum