5b374a84f38d5abcb0be907a281369ad286deffa
[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 "19 February 2018" "c2man fribidi-bidi.h" "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 extern 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 Since there are 23 possible values for a \fBconst FriBidiCharType\fR, they are not all listed here.
42 .TP
43 .B "const FriBidiStrIndex len"
44 Input length of the line.
45 .TP
46 .B "const FriBidiStrIndex off"
47 Input offset of the beginning of the line
48 in the paragraph.
49 .TP
50 .B "const FriBidiParType base_dir"
51 Resolved paragraph base direction.
52 .sp
53 Possible values for a \fBconst FriBidiParType\fR are as follows:
54 .RS 0.75in
55 .PD 0
56 .ft B
57 .nr TL \w'FRIBIDI_PAR_WLTR'u+0.2i
58 .ft R
59 .TP \n(TLu
60 \fBFRIBIDI_PAR_LTR\fR
61 Left-To-Right paragraph.
62 .TP \n(TLu
63 \fBFRIBIDI_PAR_RTL\fR
64 Right-To-Left paragraph.
65 .TP \n(TLu
66 \fBFRIBIDI_PAR_ON\fR
67 DirectiOn-Neutral paragraph.
68 .TP \n(TLu
69 \fBFRIBIDI_PAR_WLTR\fR
70 Weak Left To Right paragraph.
71 .TP \n(TLu
72 \fBFRIBIDI_PAR_WRTL\fR
73 Weak Right To Left paragraph.
74 .RE
75 .PD
76 .TP
77 .B "FriBidiLevel *embedding_levels"
78 Input list of embedding levels,
79 as returned by
80 fribidi_get_par_embedding_levels.
81 .TP
82 .B "FriBidiChar *visual_str"
83 Visual string to reorder.
84 .TP
85 .B "FriBidiStrIndex *map"
86 A map of string indices which is reordered
87 to reflect where each glyph ends up.
88 .SH "DESCRIPTION"
89 This function reorders the characters in a line of text from logical to
90 final visual order.  This function implements part 4 of rule L1, and rules
91 L2 and L3 of the Unicode Bidirectional Algorithm available at
92 http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels.
93
94 As a side effect it also sets position maps if not NULL.
95
96 You should provide the resolved paragraph direction and embedding levels as
97 set by fribidi_get_par_embedding_levels().  Also note that the embedding
98 levels may change a bit.  To be exact, the embedding level of any sequence
99 of white space at the end of line is reset to the paragraph embedding level
100 (That is part 4 of rule L1).
101
102 Note that the bidi types and embedding levels are not reordered.  You can
103 reorder these (or any other) arrays using the map later.  The user is
104 responsible to initialize map to something sensible, like an identity
105 mapping, or pass NULL if no map is needed.
106
107 There is an optional part to this function, which is whether non-spacing
108 marks for right-to-left parts of the text should be reordered to come after
109 their base characters in the visual string or not.  Most rendering engines
110 expect this behavior, but console-based systems for example do not like it.
111 This is controlled by the FRIBIDI_FLAG_REORDER_NSM flag.  The flag is on
112 in FRIBIDI_FLAGS_DEFAULT.
113 .SH "RETURNS"
114 Maximum level found in this line plus one, or zero if any error
115 occurred (memory allocation failure most probably).
116 .SH "SEE ALSO"
117 fribidi_shape_arabic(3),
118 fribidi_get_par_direction(3),
119 fribidi_get_par_embedding_levels_ex(3),
120 fribidi_get_bidi_type(3),
121 fribidi_get_bidi_types(3),
122 fribidi_get_bidi_type_name(3),
123 fribidi_debug_status(3),
124 fribidi_set_debug(3),
125 fribidi_charset_to_unicode(3),
126 fribidi_unicode_to_charset(3),
127 fribidi_parse_charset(3),
128 fribidi_mirroring_status(3),
129 fribidi_set_mirroring(3),
130 fribidi_reorder_nsm_status(3),
131 fribidi_set_reorder_nsm(3),
132 fribidi_log2vis_get_embedding_levels(3),
133 fribidi_get_type(3),
134 fribidi_get_type_internal(3),
135 fribidi_remove_bidi_marks(3),
136 fribidi_log2vis(3),
137 fribidi_get_par_embedding_levels(3),
138 fribidi_join_arabic(3),
139 fribidi_get_joining_type(3),
140 fribidi_get_joining_types(3),
141 fribidi_get_joining_type_name(3),
142 fribidi_get_mirror_char(3),
143 fribidi_shape_mirroring(3),
144 fribidi_get_bracket(3),
145 fribidi_get_bracket_types(3),
146 fribidi_shape(3)