• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..19-Oct-2021-

.ci/H19-Oct-2021-1814

bin/H19-Oct-2021-2,7911,915

doc/H19-Oct-2021-10885

gen.tab/H19-Oct-2021-2,7942,091

lib/H19-Oct-2021-7,9494,520

m4/H19-Oct-2021-126117

.indent.proH A D19-Oct-2021245 1716

.travis.ymlH A D19-Oct-2021721 3430

AUTHORSH A D19-Oct-20211.6 KiB4136

COPYINGH A D19-Oct-202125.8 KiB505418

ChangeLog.oldH A D19-Oct-202131.5 KiB704616

HISTORYH A D19-Oct-20211.5 KiB3023

Makefile.amH A D19-Oct-20212.3 KiB8051

NEWSH A D19-Oct-20215.4 KiB154109

READMEH A D19-Oct-202114 21

README.mdH A D19-Oct-20216.1 KiB174113

THANKSH A D19-Oct-20211.2 KiB4128

TODOH A D19-Oct-20212.6 KiB8954

USERSH A D19-Oct-20211.9 KiB3736

appveyor.ymlH A D19-Oct-2021401 2517

autogen.shH A D19-Oct-2021786 3626

configure.acH A D19-Oct-20214.6 KiB168142

fribidi.pc.inH A D19-Oct-2021296 1411

git.mkH A D19-Oct-202112.3 KiB401293

meson.buildH A D19-Oct-20212.9 KiB10990

README

1See README.md
2

README.md

1# GNU FriBidi
2
3The Free Implementation of the [Unicode Bidirectional Algorithm].
4
5## Background
6
7One of the missing links stopping the penetration of free software in Middle
8East is the lack of support for the Arabic and Hebrew alphabets. In order to
9have proper Arabic and Hebrew support, the bidi algorithm needs to be implemented. It is our hope that this library will stimulate more free software in the Middle Eastern countries.
10
11See [`HISTORY`](./HISTORY) on how the project started and evolved.
12
13
14## Audience
15
16It is our hope that this library will stimulate the implementation of Hebrew and
17Arabic support in lots of Free Software.
18
19GNU FriBidi is already being used in projects like Pango (resulting in [GTK+] and [GNOME] using GNU FriBidi), AbiWord, MLTerm, MPlayer, BiCon, and vlc.
20
21See [`USERS`](./USERS) for a list of projects using GNU FriBidi.
22
23
24## Dependencies
25
26GNU FriBidi does not depend on any other library. It uses either the GNU Build System or meson for build and installation.
27
28
29## Downloading
30
31The latest version of GNU FriBidi may be found at:
32<https://github.com/fribidi/fribidi>
33
34
35## Building
36
37Start with running the [`autogen.sh`](./autogen.sh) script and follow the
38instructions. Alternatively use `meson`.
39
40
41## License
42
43GNU FriBidi is Free Software; you can redistribute it and/or modify it under the
44terms of the [GNU Lesser General Public License] as published by the Free Software
45
46Foundation; either version 2.1 of the License, or (at your option) any later
47version.
48
49GNU FriBidi is distributed in the hope that it will be useful, but WITHOUT ANY
50WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
51PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
52
53You should have received a copy of the GNU Lesser General Public License along
54with GNU FriBidi, in a file named COPYING; if not, write to the Free Software
55Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
56
57### Commercial licensing
58
59For commercial licensing options, contact <fribidi.license@gmail.com>.
60
61## Implementation
62
63The library implements the algorithm described in the "Unicode Standard Annex
64\#9, The Bidirectional Algorithm", available at
65<http://www.unicode.org/unicode/reports/tr9/>.
66
67The library uses Unicode (UTF-32) entirely. The character properties are
68automatically extracted from the Unicode data files, available from
69<http://www.unicode.org/Public/UNIDATA/>. This means that every Unicode
70character is treated in strict accordance with the Unicode specification.
71
72There is a limited support for character set conversion from/to the UTF-32
73encoding. Data in these character sets must be converted into UTF-32 before the
74library may be used. iconv(3) can always do a better job on that, so you may
75find that the character sets conversion code is typically turned off on POSIX
76machines.
77
78
79### Conformance Status
80
81GNU FriBidi has been tested exhaustively against the [Unicode Reference Code],
82and to the best of our knowledge, it completely conforms to the specification,
83always producing the same result as the Reference Code.
84
85
86### API
87
88The simplest way of accessing the API is through the convenience function `fribidi_log2vis` which has the following signature:
89
90```c
91fribidi_boolean fribidi_log2vis(
92    /* input */
93    FriBidiChar     *str,
94    FriBidiStrIndex len,
95    FriBidiCharType *pbase_dir,
96    /* output */
97    FriBidiChar     *visual_str,
98    FriBidiStrIndex *position_L_to_V_list,
99    FriBidiStrIndex *position_V_to_L_list,
100    FriBidiLevel    *embedding_level_list
101)
102```
103
104Where...
105
106* `str` is the Unicode input string.
107* `len` is the length of the Unicode string (`str`).
108* `pbase_dir` is the input and output base direction. If `pbase_dir ==
109  FRIBIDI_TYPE_ON` then `fribidi_log2vis()` calculates the base direction on its
110  own, according to the bidi algorithm.
111* `visual_str` is the reordered output unicode string.
112* `position_L_to_V_list` maps the positions in the logical string to positions
113  in the visual string.
114* `position_V_to_L_list` maps the positions in the visual string to the
115  positions in the logical string.
116* `embedding_level_list` returns the classification of each character. Here,
117  even numerical levels indicate LTR characters, and odd levels indicate RTL
118  characters. The main use of this list is in interactive applications where,
119  for example, the embedding level determines cursor display.
120
121If any of the output pointers is equal to `NULL`, then that information is not
122calculated.
123
124Note that a call to `fribidi_log2vis()` is a convenience function to calling the following three functions in order:
125
1261. `fribidi_get_bidi_types()`
1272. `fribidi_get_par_embedding_levels_ex()`
1283. `fribidi_reorder_line()`
129
130## How it looks like
131
132Have a look at [`test/`](./test) directory, to see some input and outputs.
133
134The `CapRTL` charset means that CAPITAL letters are right to left, and digits
1356, 7, 8, 9 are Arabic digits, try 'fribidi --charsetdesc CapRTL' for the full
136description.
137
138
139## Executable
140
141There is also a command-line utilitity called `fribidi` that loops over the text
142of a file and performs the bidi algorithm on each line, also used for testing
143the algorithm.
144
145Run `fribidi --help` to learn about usage.
146
147The command-line utility is known to have problems with line-breaking and
148logical-to-vertical/vertical-to-logical lists.
149
150
151## Bug Reports and Feedback
152
153Report bugs and general feedback at: <https://github.com/fribidi/fribidi/issues>
154
155The mailing list is the place for additional technical discussions and user
156questions: <https://lists.freedesktop.org/mailman/listinfo/fribidi>
157
158
159## Maintainers and Contributors
160
161* Dov Grobgeld <dov.grobgeld@gmail.com> - Original author and current maintainer
162* Behdad Esfahbod <behdad@gnu.org> - Author of most of the code
163
164See also [`AUTHORS`](./AUTHORS) and [`THANKS`](./THANKS) for the complete list
165of contributors.
166
167
168[Unicode Bidirectional Algorithm]: https://www.unicode.org/reports/tr9/
169[Unicode Reference Code]: https://www.unicode.org/reports/tr9/#Reference_Code
170[Mirroring]: https://www.unicode.org/reports/tr9/#Mirroring
171[GTK+]: https://www.gtk.org/
172[GNOME]: https://www.gnome.org/
173[GNU Lesser General Public License]: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
174