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       extern 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              Since there are 23 possible values for a const  FriBidiCharType,
32              they are not all listed here.
33
34       const FriBidiStrIndex len
35              Input length of the line.
36
37       const FriBidiStrIndex off
38              Input offset of the beginning of the line in the paragraph.
39
40       const FriBidiParType base_dir
41              Resolved paragraph base direction.
42
43              Possible values for a const FriBidiParType are as follows:
44              FRIBIDI_PAR_LTR   Left-To-Right paragraph.
45              FRIBIDI_PAR_RTL   Right-To-Left paragraph.
46              FRIBIDI_PAR_ON    DirectiOn-Neutral paragraph.
47              FRIBIDI_PAR_WLTR  Weak Left To Right paragraph.
48              FRIBIDI_PAR_WRTL  Weak Right To Left paragraph.
49
50       FriBidiLevel *embedding_levels
51              Input    list    of    embedding    levels,   as   returned   by
52              fribidi_get_par_embedding_levels.
53
54       FriBidiChar *visual_str
55              Visual string to reorder.
56
57       FriBidiStrIndex *map
58              A map of string indices which is reordered to reflect where each
59              glyph ends up.
60

DESCRIPTION

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

RETURNS

89       Maximum  level  found  in  this  line  plus  one,  or zero if any error
90       occurred (memory allocation failure most probably).
91

SEE ALSO

93       fribidi_shape_arabic(3),                  fribidi_get_par_direction(3),
94       fribidi_get_par_embedding_levels_ex(3),       fribidi_get_bidi_type(3),
95       fribidi_get_bidi_types(3),               fribidi_get_bidi_type_name(3),
96       fribidi_debug_status(3),  fribidi_set_debug(3), fribidi_charset_to_uni‐
97       code(3),    fribidi_unicode_to_charset(3),    fribidi_parse_charset(3),
98       fribidi_mirroring_status(3),                  fribidi_set_mirroring(3),
99       fribidi_reorder_nsm_status(3),              fribidi_set_reorder_nsm(3),
100       fribidi_log2vis_get_embedding_levels(3),           fribidi_get_type(3),
101       fribidi_get_type_internal(3),             fribidi_remove_bidi_marks(3),
102       fribidi_log2vis(3),                fribidi_get_par_embedding_levels(3),
103       fribidi_join_arabic(3), fribidi_get_joining_type(3),  fribidi_get_join‐
104       ing_types(3),     fribidi_get_joining_type_name(3),    fribidi_get_mir‐
105       ror_char(3),    fribidi_shape_mirroring(3),     fribidi_get_bracket(3),
106       fribidi_get_bracket_types(3), fribidi_shape(3)
107
108
109
110c2man fribidi-bidi.h           19 February 2018        fribidi_reorder_line(3)
Impressum