fribidi_get_par_embedding_levels_ex(3)

fribidi_get_par_embedding_levels_ex3

Get bidi embedding levels of a paragraph

Usage

#include <../fribidi/lib/fribidi.h>

FriBidiLevel fribidi_get_par_embedding_levels_ex
(

const FriBidiCharType *bidi_types,

const FriBidiBracketType *bracket_types,

const FriBidiStrIndex len,

FriBidiParType *pbase_dir,

FriBidiLevel *embedding_levels
);

Parameters

const FriBidiCharType *bidi_types

Input list of bidi types as returned by fribidi_get_bidi_types().

Since there are 23 possible values for a const FriBidiCharType, they are not all listed here.

const FriBidiBracketType *bracket_types

Input list of bracket types as returned by fribidi_get_bracket_types().

const FriBidiStrIndex len

Input string length of the paragraph.

FriBidiParType *pbase_dir

Requested and resolved paragraph base direction.

Possible values for a FriBidiParType are as follows:

FRIBIDI_PAR_LTR

Left-To-Right paragraph.

FRIBIDI_PAR_RTL

Right-To-Left paragraph.

FRIBIDI_PAR_ON

DirectiOn-Neutral paragraph.

FRIBIDI_PAR_WLTR

Weak Left To Right paragraph.

FRIBIDI_PAR_WRTL

Weak Right To Left paragraph.

FriBidiLevel *embedding_levels

Output list of embedding levels.

Overview

This function finds the bidi embedding levels of a single paragraph, as defined by the Unicode Bidirectional Algorithm available at http://www.unicode.org/reports/tr9/. This function implements rules P2 to I1 inclusive, and parts 1 to 3 of L1, except for rule X9 which is implemented in fribidi_remove_bidi_marks(). Part 4 of L1 is implemented in fribidi_reorder_line().

There are a few macros defined in fribidi-bidi-types.h to work with this embedding levels.

Returns

Maximum level found plus one, or zero if any error occurred (memory allocation failure most probably).

Releases

5 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11–12
  3. 13
  4. Arch

From fribidi 1.0.18-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.