Imported Upstream version 0.19.4
[platform/upstream/fribidi.git] / doc / fribidi_reorder_line.3
1 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man!
2 .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST!
3 .TH "fribidi_reorder_line" 3 "25 August 2012" "GNU FriBidi 0.19.3" "Programmer's Manual"
4 .SH "NAME"
5 fribidi_reorder_line \- reorder a line of logical string to visual
6 .SH "SYNOPSIS"
7 .ft B
8 #include <fribidi.h>
9 .sp
10 FriBidiLevel fribidi_reorder_line
11 .br
12 (
13 .br
14         FriBidiFlags flags,
15 .br
16         const FriBidiCharType *bidi_types,
17 .br
18         const FriBidiStrIndex len,
19 .br
20         const FriBidiStrIndex off,
21 .br
22         const FriBidiParType base_dir,
23 .br
24         FriBidiLevel *embedding_levels,
25 .br
26         FriBidiChar *visual_str,
27 .br
28         FriBidiStrIndex *map
29 .br
30 );
31 .ft R
32 .SH "PARAMETERS"
33 .TP
34 .B "FriBidiFlags flags"
35 Reorder flags.
36 .TP
37 .B "const FriBidiCharType *bidi_types"
38 Input list of bidi types as returned by
39 fribidi_get_bidi_types().
40 .sp
41 Possible values for a \fBconst FriBidiCharType\fR are as follows:
42 .RS 0.75in
43 .PD 0
44 .ft B
45 .nr TL \w'FRIBIDI_TYPE_LTR'u+0.2i
46 .ft R
47 .TP \n(TLu
48 \fBFRIBIDI_TYPE_LTR\fR
49 Left-To-Right letter.
50 .TP \n(TLu
51 \fBFRIBIDI_TYPE_RTL\fR
52 Right-To-Left letter.
53 .TP \n(TLu
54 \fBFRIBIDI_TYPE_AL\fR
55 Arabic Letter.
56 .TP \n(TLu
57 \fBFRIBIDI_TYPE_EN\fR
58 European Numeral.
59 .TP \n(TLu
60 \fBFRIBIDI_TYPE_AN\fR
61 Arabic Numeral.
62 .TP \n(TLu
63 \fBFRIBIDI_TYPE_ES\fR
64 European number Separator.
65 .TP \n(TLu
66 \fBFRIBIDI_TYPE_ET\fR
67 European number Terminator.
68 .TP \n(TLu
69 \fBFRIBIDI_TYPE_CS\fR
70 Common Separator.
71 .TP \n(TLu
72 \fBFRIBIDI_TYPE_NSM\fR
73 Non Spacing Mark.
74 .TP \n(TLu
75 \fBFRIBIDI_TYPE_BN\fR
76 Boundary Neutral.
77 .TP \n(TLu
78 \fBFRIBIDI_TYPE_BS\fR
79 Block Separator.
80 .TP \n(TLu
81 \fBFRIBIDI_TYPE_SS\fR
82 Segment Separator.
83 .TP \n(TLu
84 \fBFRIBIDI_TYPE_WS\fR
85 WhiteSpace.
86 .TP \n(TLu
87 \fBFRIBIDI_TYPE_ON\fR
88 Other Neutral.
89 .TP \n(TLu
90 \fBFRIBIDI_TYPE_LRE\fR
91 Left-to-Right Embedding.
92 .TP \n(TLu
93 \fBFRIBIDI_TYPE_RLE\fR
94 Right-to-Left Embedding.
95 .TP \n(TLu
96 \fBFRIBIDI_TYPE_LRO\fR
97 Left-to-Right Override.
98 .TP \n(TLu
99 \fBFRIBIDI_TYPE_RLO\fR
100 Right-to-Left Override.
101 .TP \n(TLu
102 \fBFRIBIDI_TYPE_PDF\fR
103 Pop Directional Flag.
104 .RE
105 .PD
106 .TP
107 .B "const FriBidiStrIndex len"
108 Input length of the line.
109 .TP
110 .B "const FriBidiStrIndex off"
111 Input offset of the beginning of the line
112 in the paragraph.
113 .TP
114 .B "const FriBidiParType base_dir"
115 Resolved paragraph base direction.
116 .sp
117 Possible values for a \fBconst FriBidiParType\fR are as follows:
118 .RS 0.75in
119 .PD 0
120 .ft B
121 .nr TL \w'FRIBIDI_PAR_WLTR'u+0.2i
122 .ft R
123 .TP \n(TLu
124 \fBFRIBIDI_PAR_LTR\fR
125 Left-To-Right paragraph.
126 .TP \n(TLu
127 \fBFRIBIDI_PAR_RTL\fR
128 Right-To-Left paragraph.
129 .TP \n(TLu
130 \fBFRIBIDI_PAR_ON\fR
131 DirectiOn-Neutral paragraph.
132 .TP \n(TLu
133 \fBFRIBIDI_PAR_WLTR\fR
134 Weak Left To Right paragraph.
135 .TP \n(TLu
136 \fBFRIBIDI_PAR_WRTL\fR
137 Weak Right To Left paragraph.
138 .RE
139 .PD
140 .TP
141 .B "FriBidiLevel *embedding_levels"
142 Input list of embedding levels,
143 as returned by
144 fribidi_get_par_embedding_levels.
145 .TP
146 .B "FriBidiChar *visual_str"
147 Visual string to reorder.
148 .TP
149 .B "FriBidiStrIndex *map"
150 A map of string indices which is reordered
151 to reflect where each glyph ends up.
152 .SH "DESCRIPTION"
153 This function reorders the characters in a line of text from logical to
154 final visual order.  This function implements part 4 of rule L1, and rules
155 L2 and L3 of the Unicode Bidirectional Algorithm available at
156 http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels.
157
158 As a side effect it also sets position maps if not NULL.
159
160 You should provide the resolved paragraph direction and embedding levels as
161 set by fribidi_get_par_embedding_levels().  Also note that the embedding
162 levels may change a bit.  To be exact, the embedding level of any sequence
163 of white space at the end of line is reset to the paragraph embedding level
164 (That is part 4 of rule L1).
165
166 Note that the bidi types and embedding levels are not reordered.  You can
167 reorder these (or any other) arrays using the map later.  The user is
168 responsible to initialize map to something sensible, like an identity
169 mapping, or pass NULL if no map is needed.
170
171 There is an optional part to this function, which is whether non-spacing
172 marks for right-to-left parts of the text should be reordered to come after
173 their base characters in the visual string or not.  Most rendering engines
174 expect this behavior, but console-based systems for example do not like it.
175 This is controlled by the FRIBIDI_FLAG_REORDER_NSM flag.  The flag is on
176 in FRIBIDI_FLAGS_DEFAULT.
177 .SH "RETURNS"
178 Maximum level found in this line plus one, or zero if any error
179 occured (memory allocation failure most probably).
180 .SH "SEE ALSO"
181 fribidi_charset_to_unicode(3),
182 fribidi_unicode_to_charset(3),
183 fribidi_parse_charset(3),
184 fribidi_shape_arabic(3),
185 fribidi_get_par_direction(3),
186 fribidi_get_par_embedding_levels(3),
187 fribidi_get_bidi_type(3),
188 fribidi_get_bidi_types(3),
189 fribidi_get_bidi_type_name(3),
190 fribidi_debug_status(3),
191 fribidi_mirroring_status(3),
192 fribidi_set_mirroring(3),
193 fribidi_reorder_nsm_status(3),
194 fribidi_set_reorder_nsm(3),
195 fribidi_log2vis_get_embedding_levels(3),
196 fribidi_get_type(3),
197 fribidi_get_type_internal(3),
198 fribidi_remove_bidi_marks(3),
199 fribidi_log2vis(3),
200 fribidi_join_arabic(3),
201 fribidi_get_joining_type(3),
202 fribidi_get_joining_types(3),
203 fribidi_get_joining_type_name(3),
204 fribidi_get_mirror_char(3),
205 fribidi_shape_mirroring(3),
206 fribidi_shape(3)