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, 2017 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 <fribidi.license@gmail.com> or write to
24 * Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran.
27 * Behdad Esfahbod, 2001, 2002, 2004
28 * Dov Grobgeld, 1999, 2000
30 #ifndef _FRIBIDI_MIRRORING_H
31 #define _FRIBIDI_MIRRORING_H
33 #include "fribidi-common.h"
35 #include "fribidi-types.h"
36 #include "fribidi-bidi-types.h"
38 #include "fribidi-begindecls.h"
40 /* fribidi_get_mirror_char - get mirrored character
42 * This function finds the mirrored equivalent of a character as defined in
43 * the file BidiMirroring.txt of the Unicode Character Database available at
44 * http://www.unicode.org/Public/UNIDATA/BidiMirroring.txt.
46 * If the input character is a declared as a mirroring character in the
47 * Unicode standard and has a mirrored equivalent. The matching mirrored
48 * character is put in the output, otherwise the input character itself is
51 * Returns: if the character has a mirroring equivalent or not.
53 FRIBIDI_ENTRY fribidi_boolean fribidi_get_mirror_char (
54 FriBidiChar ch, /* input character */
55 FriBidiChar *mirrored_ch /* output mirrored character */
58 /* fribidi_shape_mirroring - do mirroring shaping
60 * This functions replaces mirroring characters on right-to-left embeddings in
61 * string with their mirrored equivalent as returned by
62 * fribidi_get_mirror_char().
64 * This function implements rule L4 of the Unicode Bidirectional Algorithm
65 * available at http://www.unicode.org/reports/tr9/#L4.
67 FRIBIDI_ENTRY void fribidi_shape_mirroring (
68 const FriBidiLevel *embedding_levels, /* input list of embedding
69 levels, as returned by
70 fribidi_get_par_embedding_levels */
71 const FriBidiStrIndex len, /* input string length */
72 FriBidiChar *str /* string to shape */
75 #include "fribidi-enddecls.h"
77 #endif /* !_FRIBIDI_MIRRORING_H */
85 * vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8: