[Fribidi-discuss] FriBidi interface version 3 draft 1

Behdad Esfahbod behdad at bamdad.org
Sat Jun 8 15:42:44 EST 2002


Hi,

Attached is the first draft of fribidi interface version 3 which
will go in fribidi major version 1.

Currently it only contains the core functions.  Higher apis only 
use this functions.  I will add the higher levels in a few days.

Please let me know of any ideas, requests, ...

Yours,
-- 
Behdad Esfahbod				18 Khordad 1381, 2002 Jun 8 
http://behdad.org/			[Finger for Geek Code]

Got to be a joker, he just do what he please!
-------------- next part --------------
# FriBidi interface version 3 draft 1
# by Behdad Esfahbod <fribidi at behdad.org>
# Jun 8 2002

**** Primitive types:
typedef int32	FriBidiChar;
typedef int32	FriBidiStrIndex;
typedef int32	FriBidiCharType;
typedef int8	FriBidiLevel;

**** Structures:
typedef ...	FriBidiEnv;
#typedef ...	FriBidiCharSet;
#typedef ...	FriBidiRun;
#typedef ...	FriBidiList;

**** Legend:
#define env	FriBidiEnv *environ
#deifne len	FriBidiStrIndex length
#define logical	*FriBidiChar *logical_str
#define visual	FriBidiChar *visual_str
#define types	FriBidiCharType *bidi_types
#define level	FriBidiLevel *embedding_level_list
#define ltov	FriBidiStrIndex *position_L_to_V_list
#define vtol	FriBidiStrIndex *position_V_to_L_list
#define remove	boolean remove_bidi_marks
#define basedir	FriBidiCharType base_dir
#define prev	FriBidiStrIndex *prev_list
#define next	FriBidiStrIndex *next_list
#define vtog	FriBidiStrIndex *position_V_to_G_list
#define glyph	FriBidiStr *glyph_str

**** Core functions:

- fribidi_core_get_types
	(env, logical, len)
	=> (types)

- fribidi_core_par_get_levels
	(env, types, len, [basedir])
	=> (level, basedir)

- fribidi_core_line_reorder
	(env, logical, len, level, remove)
	=> ([visual], [ltov], [vtol])
	ASSERT(visual || ltov || vtol)

- fribidi_core_arabic_neighbor
	(env, logical, len)
	=> ([prev], [next])
	ASSERT(prev || next)

- fribidi_core_arabic_shape
	(env, visual, len, [prev], [next], [ltov], [vtol])
	=> (glyph, len, [vtog])
	ASSERT(prev || next)
	ASSERT(ltov || vtol)

* A complete hebrew rendering process:
	logical		=> fribidi_core_get_types	=> types
	*** break text into paragraphs ***
	types		=> fribidi_core_par_get_levels	=> levels
	*** break paragraphs into lines ***
	logical, levels	=> fribidi_core_line_reorder	=> visual

* A complete arabic rendering process:
	logical		=> fribidi_core_get_types	=> types
	logical		=> fribidi_core_arabic_neighbor	=> prev || next
	*** break text into paragraphs ***
	types		=> fribidi_core_par_get_levels	=> levels
	*** break paragraphs into lines ***
	logical, levels	=> fribidi_core_line_reorder	=> visual
	prev || next	=> fribidi_core_arabic_shape	=> glyph

**** End of Core functions


More information about the FriBidi mailing list