200 lines
7.4 KiB
HTML
200 lines
7.4 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of fribidi_reorder_line</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>fribidi_reorder_line</H1>
|
|
Section: Programmer's Manual (3)<BR>Updated: 20 July 2018<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
fribidi_reorder_line - reorder a line of logical string to visual
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>
|
|
#include <<A HREF="file:///usr/include/fribidi.h">fribidi.h</A>>
|
|
<P>
|
|
extern FriBidiLevel fribidi_reorder_line
|
|
<BR>
|
|
|
|
(
|
|
<BR>
|
|
|
|
<TT> </TT>FriBidiFlags flags,<BR>
|
|
<BR>
|
|
|
|
<TT> </TT>const FriBidiCharType *bidi_types,<BR>
|
|
<BR>
|
|
|
|
<TT> </TT>const FriBidiStrIndex len,<BR>
|
|
<BR>
|
|
|
|
<TT> </TT>const FriBidiStrIndex off,<BR>
|
|
<BR>
|
|
|
|
<TT> </TT>const FriBidiParType base_dir,<BR>
|
|
<BR>
|
|
|
|
<TT> </TT>FriBidiLevel *embedding_levels,<BR>
|
|
<BR>
|
|
|
|
<TT> </TT>FriBidiChar *visual_str,<BR>
|
|
<BR>
|
|
|
|
<TT> </TT>FriBidiStrIndex *map<BR>
|
|
<BR>
|
|
|
|
);
|
|
</B>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>PARAMETERS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>FriBidiFlags flags</B>
|
|
|
|
<DD>
|
|
Reorder flags.
|
|
<DT id="2"><B>const FriBidiCharType *bidi_types</B>
|
|
|
|
<DD>
|
|
Input list of bidi types as returned by
|
|
fribidi_get_bidi_types().
|
|
<P>
|
|
Since there are 23 possible values for a <B>const FriBidiCharType</B>, they are not all listed here.
|
|
<DT id="3"><B>const FriBidiStrIndex len</B>
|
|
|
|
<DD>
|
|
Input length of the line.
|
|
<DT id="4"><B>const FriBidiStrIndex off</B>
|
|
|
|
<DD>
|
|
Input offset of the beginning of the line
|
|
in the paragraph.
|
|
<DT id="5"><B>const FriBidiParType base_dir</B>
|
|
|
|
<DD>
|
|
Resolved paragraph base direction.
|
|
<P>
|
|
Possible values for a <B>const FriBidiParType</B> are as follows:
|
|
<DL COMPACT><DT id="6"><DD>
|
|
|
|
<B>
|
|
|
|
</B>
|
|
<DL COMPACT>
|
|
<DT id="7"><B>FRIBIDI_PAR_LTR</B><DD>
|
|
Left-To-Right paragraph.
|
|
<DT id="8"><B>FRIBIDI_PAR_RTL</B><DD>
|
|
Right-To-Left paragraph.
|
|
<DT id="9"><B>FRIBIDI_PAR_ON</B><DD>
|
|
DirectiOn-Neutral paragraph.
|
|
<DT id="10"><B>FRIBIDI_PAR_WLTR</B><DD>
|
|
Weak Left To Right paragraph.
|
|
<DT id="11"><B>FRIBIDI_PAR_WRTL</B><DD>
|
|
Weak Right To Left paragraph.
|
|
</DL>
|
|
</DL>
|
|
|
|
|
|
<DT id="12"><B>FriBidiLevel *embedding_levels</B>
|
|
|
|
<DD>
|
|
Input list of embedding levels,
|
|
as returned by
|
|
fribidi_get_par_embedding_levels.
|
|
<DT id="13"><B>FriBidiChar *visual_str</B>
|
|
|
|
<DD>
|
|
Visual string to reorder.
|
|
<DT id="14"><B>FriBidiStrIndex *map</B>
|
|
|
|
<DD>
|
|
A map of string indices which is reordered
|
|
to reflect where each glyph ends up.
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
This function reorders the characters in a line of text from logical to
|
|
final visual order. This function implements part 4 of rule L1, and rules
|
|
L2 and L3 of the Unicode Bidirectional Algorithm available at
|
|
<A HREF="http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels.">http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels.</A>
|
|
<P>
|
|
As a side effect it also sets position maps if not NULL.
|
|
<P>
|
|
You should provide the resolved paragraph direction and embedding levels as
|
|
set by fribidi_get_par_embedding_levels(). Also note that the embedding
|
|
levels may change a bit. To be exact, the embedding level of any sequence
|
|
of white space at the end of line is reset to the paragraph embedding level
|
|
(That is part 4 of rule L1).
|
|
<P>
|
|
Note that the bidi types and embedding levels are not reordered. You can
|
|
reorder these (or any other) arrays using the map later. The user is
|
|
responsible to initialize map to something sensible, like an identity
|
|
mapping, or pass NULL if no map is needed.
|
|
<P>
|
|
There is an optional part to this function, which is whether non-spacing
|
|
marks for right-to-left parts of the text should be reordered to come after
|
|
their base characters in the visual string or not. Most rendering engines
|
|
expect this behavior, but console-based systems for example do not like it.
|
|
This is controlled by the FRIBIDI_FLAG_REORDER_NSM flag. The flag is on
|
|
in FRIBIDI_FLAGS_DEFAULT.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>RETURNS</H2>
|
|
|
|
Maximum level found in this line plus one, or zero if any error
|
|
occurred (memory allocation failure most probably).
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_shape_arabic">fribidi_shape_arabic</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_par_direction">fribidi_get_par_direction</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_par_embedding_levels_ex">fribidi_get_par_embedding_levels_ex</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_bidi_type">fribidi_get_bidi_type</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_bidi_types">fribidi_get_bidi_types</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_bidi_type_name">fribidi_get_bidi_type_name</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_debug_status">fribidi_debug_status</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_set_debug">fribidi_set_debug</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_charset_to_unicode">fribidi_charset_to_unicode</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_unicode_to_charset">fribidi_unicode_to_charset</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_parse_charset">fribidi_parse_charset</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_mirroring_status">fribidi_mirroring_status</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_set_mirroring">fribidi_set_mirroring</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_reorder_nsm_status">fribidi_reorder_nsm_status</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_set_reorder_nsm">fribidi_set_reorder_nsm</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_log2vis_get_embedding_levels">fribidi_log2vis_get_embedding_levels</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_type">fribidi_get_type</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_type_internal">fribidi_get_type_internal</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_par_embedding_levels">fribidi_get_par_embedding_levels</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_join_arabic">fribidi_join_arabic</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_joining_type">fribidi_get_joining_type</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_joining_types">fribidi_get_joining_types</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_joining_type_name">fribidi_get_joining_type_name</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_mirror_char">fribidi_get_mirror_char</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_shape_mirroring">fribidi_shape_mirroring</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_bracket">fribidi_get_bracket</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_get_bracket_types">fribidi_get_bracket_types</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_shape">fribidi_shape</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+fribidi_remove_bidi_marks">fribidi_remove_bidi_marks</A>(3)
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="15"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="16"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="17"><A HREF="#lbAD">PARAMETERS</A><DD>
|
|
<DT id="18"><A HREF="#lbAE">DESCRIPTION</A><DD>
|
|
<DT id="19"><A HREF="#lbAF">RETURNS</A><DD>
|
|
<DT id="20"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:43 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|