1 /* fribidi-mirroring.h - get mirrored character
3 * Copyright (C) 2004 Sharif FarsiWeb, Inc
4 * Copyright (C) 2001, 2002, 2004 Behdad Esfahbod
5 * Copyright (C) 1999, 2000 Dov Grobgeld
7 * This file is part of GNU FriBidi.
9 * GNU FriBidi is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1
12 * of the License, or (at your option) any later version.
14 * GNU FriBidi is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with GNU FriBidi; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 * For licensing issues, contact <license@farsiweb.info> or write to
24 * Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran.
26 /* $Id: fribidi-mirroring.h,v 1.10 2004-09-28 07:58:57 behdad Exp $
28 * $Date: 2004-09-28 07:58:57 $
30 * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-mirroring.h,v $
33 * Behdad Esfahbod, 2001, 2002, 2004
34 * Dov Grobgeld, 1999, 2000
36 #ifndef _FRIBIDI_MIRRORING_H
37 #define _FRIBIDI_MIRRORING_H
39 #include "fribidi-common.h"
41 #include "fribidi-types.h"
42 #include "fribidi-bidi-types.h"
44 #include "fribidi-begindecls.h"
46 #define fribidi_get_mirror_char FRIBIDI_NAMESPACE(get_mirror_char)
47 /* fribidi_get_mirror_char - get mirrored character
49 * This function finds the mirrored equivalent of a character as defined in
50 * the file BidiMirroring.txt of the Unicode Character Database available at
51 * http://www.unicode.org/Public/UNIDATA/BidiMirroring.txt.
53 * If the input character is a declared as a mirroring character in the
54 * Unicode standard and has a mirrored equivalent. The matching mirrored
55 * character is put in the output, otherwise the input character itself is
58 * Returns: if the character has a mirroring equivalent or not.
60 FRIBIDI_ENTRY fribidi_boolean fribidi_get_mirror_char (
61 FriBidiChar ch, /* input character */
62 FriBidiChar *mirrored_ch /* output mirrored character */
65 #define fribidi_shape_mirroring FRIBIDI_NAMESPACE(shape_mirroring)
66 /* fribidi_shape_mirroring - do mirroring shaping
68 * This functions replaces mirroring characters on right-to-left embeddings in
69 * string with their mirrored equivalent as returned by
70 * fribidi_get_mirror_char().
72 * This function implements rule L4 of the Unicode Bidirectional Algorithm
73 * available at http://www.unicode.org/reports/tr9/#L4.
75 FRIBIDI_ENTRY void fribidi_shape_mirroring (
76 const FriBidiLevel *embedding_levels, /* input list of embedding
77 levels, as returned by
78 fribidi_get_par_embedding_levels */
79 const FriBidiStrIndex len, /* input string length */
80 FriBidiChar *str /* string to shape */
83 #include "fribidi-enddecls.h"
85 #endif /* !_FRIBIDI_MIRRORING_H */
93 * vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8: