2 * fribidi-shape.h - shaping
4 * $Id: fribidi-shape.h,v 1.2 2006-01-14 12:09:29 behdad Exp $
6 * $Date: 2006-01-14 12:09:29 $
8 * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-shape.h,v $
11 * Behdad Esfahbod, 2004, 2005
13 * Copyright (C) 2004 Sharif FarsiWeb, Inc
14 * Copyright (C) 2004, 2005 Behdad Esfahbod
16 * This library is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public
18 * License as published by the Free Software Foundation; either
19 * version 2.1 of the License, or (at your option) any later version.
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
26 * You should have received a copy of the GNU Lesser General Public License
27 * along with this library, in a file named COPYING; if not, write to the
28 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
29 * Boston, MA 02110-1301, USA
31 * For licensing issues, contact <license@farsiweb.info>.
33 #ifndef _FRIBIDI_SHAPE_H
34 #define _FRIBIDI_SHAPE_H
36 #include "fribidi-types.h"
37 #include "fribidi-flags.h"
38 #include "fribidi-bidi-types.h"
39 #include "fribidi-joining-types.h"
41 #include "fribidi-begindecls.h"
44 #define fribidi_shape FRIBIDI_NAMESPACE(shape)
45 /* fribidi_shape - do bidi-aware shaping
47 * This function does all shaping work that depends on the resolved embedding
48 * levels of the characters. Currently it does mirroring and Arabic shaping,
49 * but the list may grow in the future. This function is a wrapper around
50 * fribidi_shape_mirroring and fribidi_shape_arabic.
52 * The flags parameter specifies which shapings are applied. The only flags
53 * affecting the functionality of this function are those beginning with
54 * FRIBIDI_FLAG_SHAPE_. Of these, only FRIBIDI_FLAG_SHAPE_MIRRORING is on
55 * in FRIBIDI_FLAGS_DEFAULT. For details of the Arabic-specific flags see
56 * fribidi_shape_arabic. If ar_props is NULL, no Arabic shaping is performed.
58 * Feel free to do your own shaping before or after calling this function,
59 * but you should take care of embedding levels yourself then.
61 FRIBIDI_ENTRY void fribidi_shape (
62 FriBidiFlags flags, /* shaping flags */
63 const FriBidiLevel *embedding_levels, /* input list of embedding
64 levels, as returned by
65 fribidi_get_par_embedding_levels */
66 const FriBidiStrIndex len, /* input string length */
67 FriBidiArabicProp *ar_props, /* input/output Arabic properties as
68 * computed by fribidi_join_arabic */
69 FriBidiChar *str /* string to shape */
73 #include "fribidi-enddecls.h"
75 #endif /* !_FRIBIDI_SHAPE_H */
77 * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent