fribidi_shape(3)
β¨ NAME β¨
okay so welcome to the fribidi_shape(3) page from the Programmer's Manual, bestie π this is the one and only:
fribidi_shape β do bidi-aware shaping. literally the whole point, no cap π
π¦ SYNOPSIS π¦
#include <../fribidi/lib/fribidi.h>
void fribidi_shape
(
FriBidiFlags flags,
const FriBidiLevel *embedding_levels,
const FriBidiStrIndex len,
FriBidiArabicProp *ar_props,
FriBidiChar *str
);
π«Ά PARAMETERS π«Ά
FriBidiFlags flagsβ shaping flags, bestie. this is where you tell it what kind of shaping energy you want β¨const FriBidiLevel *embedding_levelsβ input list of embedding levels, as returned byfribidi_get_par_embedding_levels. it's giving βthe levels already got resolved, now we shapeβ πconst FriBidiStrIndex lenβ input string length. yes, the length. gotta know how much string we're dealing with πFriBidiArabicProp *ar_propsβ input/output Arabic properties as computed byfribidi_join_arabic. note the input/output situation, okay? it can come back changed π₯FriBidiChar *strβ string to shape. this is the main character, fr fr π
π DESCRIPTION π
so this function does all shaping work that depends on the resolved embedding levels of the characters. currently it does mirroring and Arabic shaping, but the list may grow in the future β so don't be surprised if future-you sees more in here π this function is a wrapper around fribidi_shape_mirroring and fribidi_shape_arabic, iykyk.
the flags parameter specifies which shapings are applied. the only flags affecting the functionality of this function are those beginning with FRIBIDI_FLAG_SHAPE_. of these, only FRIBIDI_FLAG_SHAPE_MIRRORING is on in FRIBIDI_FLAGS_DEFAULT. for details of the Arabic-specific flags see fribidi_shape_arabic. and bestie, important: if ar_props is NULL, no Arabic shaping is performed. periodt π«Ά
feel free to do your own shaping before or after calling this function, but you should take care of embedding levels yourself then. like, go off, do your thing, just handle those levels on your own if you're going rogue π
π SEE ALSO π
the whole friend group, bestie β every single one of these cuties is linked:
fribidi_shape_arabic(3)fribidi_get_par_direction(3)fribidi_get_par_embedding_levels_ex(3)fribidi_reorder_line(3)fribidi_get_bidi_type(3)fribidi_get_bidi_types(3)fribidi_get_bidi_type_name(3)fribidi_charset_to_unicode(3)fribidi_unicode_to_charset(3)fribidi_parse_charset(3)fribidi_debug_status(3)fribidi_set_debug(3)fribidi_mirroring_status(3)fribidi_set_mirroring(3)fribidi_reorder_nsm_status(3)fribidi_set_reorder_nsm(3)fribidi_log2vis_get_embedding_levels(3)fribidi_get_type(3)fribidi_get_type_internal(3)fribidi_get_par_embedding_levels(3)fribidi_join_arabic(3)fribidi_get_joining_type(3)fribidi_get_joining_types(3)fribidi_get_joining_type_name(3)fribidi_get_mirror_char(3)fribidi_shape_mirroring(3)fribidi_get_bracket(3)fribidi_get_bracket_types(3)fribidi_remove_bidi_marks(3)fribidi_log2vis(3)
this iconic little page came from c2man fribidi-shape.h and is dated 29 October 2026 β mwah, slay, bye bestie ππ
π¦ where this page comes from
- arch rolling: fribidi 1.0.18-1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms