| 1 |
/* FriBidi |
| 2 |
* fribidi-joining.h - Arabic joining algorithm |
| 3 |
* |
| 4 |
* Authors: |
| 5 |
* Behdad Esfahbod, 2004 |
| 6 |
* |
| 7 |
* Copyright (C) 2004 Sharif FarsiWeb, Inc |
| 8 |
* Copyright (C) 2004 Behdad Esfahbod |
| 9 |
* |
| 10 |
* This library is free software; you can redistribute it and/or |
| 11 |
* modify it under the terms of the GNU Lesser General Public |
| 12 |
* License as published by the Free Software Foundation; either |
| 13 |
* version 2.1 of the License, or (at your option) any later version. |
| 14 |
* |
| 15 |
* This library is distributed in the hope that it will be useful, |
| 16 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 |
* Lesser General Public License for more details. |
| 19 |
* |
| 20 |
* You should have received a copy of the GNU Lesser General Public License |
| 21 |
* along with this library, in a file named COPYING; if not, write to the |
| 22 |
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 23 |
* Boston, MA 02110-1301, USA |
| 24 |
* |
| 25 |
* For licensing issues, contact <[email protected]>. |
| 26 |
*/ |
| 27 |
#ifndef _FRIBIDI_JOINING_H |
| 28 |
#define _FRIBIDI_JOINING_H |
| 29 |
|
| 30 |
#include "fribidi-common.h" |
| 31 |
|
| 32 |
#include "fribidi-types.h" |
| 33 |
#include "fribidi-bidi-types.h" |
| 34 |
#include "fribidi-joining-types.h" |
| 35 |
|
| 36 |
#include "fribidi-begindecls.h" |
| 37 |
|
| 38 |
/* fribidi_join_arabic - do Arabic joining |
| 39 |
* |
| 40 |
* This function does the Arabic joining algorithm. Means, given Arabic |
| 41 |
* joining types of the characters in ar_props (don't worry, |
| 42 |
* FriBidiJoiningType can be casted to FriBidiArabicProp automagically), this |
| 43 |
* function modifies this properties to grasp the effect of neighboring |
| 44 |
* characters. You probably need this information later to do Arabic shaping. |
| 45 |
* |
| 46 |
* This function implements rules R1 to R7 inclusive (all rules) of the Arabic |
| 47 |
* Cursive Joining algorithm of the Unicode standard as available at |
| 48 |
* http://www.unicode.org/versions/Unicode4.0.0/ch08.pdf#G7462. It also |
| 49 |
* interacts correctly with the bidirection algorithm as defined in Section |
| 50 |
* 3.5 Shaping of the Unicode Bidirectional Algorithm available at |
| 51 |
* http://www.unicode.org/reports/tr9/#Shaping. |
| 52 |
* |
| 53 |
* There are a few macros defined in fribidi-joining-types.h for querying the |
| 54 |
* Arabic properties computed by this function. |
| 55 |
*/ |
| 56 |
FRIBIDI_ENTRY void fribidi_join_arabic ( |
| 57 |
const FriBidiCharType *bidi_types, /* input list of bidi types as |
| 58 |
returned by |
| 59 |
fribidi_get_bidi_types() */ |
| 60 |
const FriBidiStrIndex len, /* input string length */ |
| 61 |
const FriBidiLevel *embedding_levels, /* input list of embedding |
| 62 |
levels, as returned by |
| 63 |
fribidi_get_par_embedding_levels */ |
| 64 |
FriBidiArabicProp *ar_props /* Arabic properties to analyze, initialized by |
| 65 |
joining types, as returned by |
| 66 |
fribidi_get_joining_types */ |
| 67 |
); |
| 68 |
|
| 69 |
#include "fribidi-enddecls.h" |
| 70 |
|
| 71 |
#endif /* !_FRIBIDI_JOINING_H */ |
| 72 |
/* Editor directions: |
| 73 |
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent |
| 74 |
*/ |