blob: d9aaf898717d3d1e5abcedd9a8802608f1a6787b [file] [log] [blame] [view]
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -08001To enable HarfBuzz bindings for Python among other languages, make sure
Behdad Esfahbodc60f3c82015-05-04 23:10:32 -07002you have latest version of gobject-introspection available. On Ubuntu,
3you can install that this way:
4
Ebrahim Byagowi5f7f0bf2018-03-29 04:22:53 +04305```bash
6sudo apt-get install libgirepository1.0-dev
7```
Behdad Esfahbodc60f3c82015-05-04 23:10:32 -07008
Khaled Hosny06596cf2019-08-03 13:55:34 +02009And then run `autogen.sh` (if building from git), and then:
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080010
Ebrahim Byagowi5f7f0bf2018-03-29 04:22:53 +043011```bash
12./configure --with-gobject --enable-introspection
13```
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080014
Khaled Hosny06596cf2019-08-03 13:55:34 +020015Make sure that gobject-introspection is reported enabled then in the `configure` script output.
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080016
17Compile and install.
18
Khaled Hosny06596cf2019-08-03 13:55:34 +020019Make sure you have the installation lib dir in `LD_LIBRARY_PATH`, as needed
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080020for the linker to find the library.
21
Khaled Hosny06596cf2019-08-03 13:55:34 +020022Then make sure you also have `GI_TYPELIB_PATH` pointing to the resulting
23`$prefix/lib/girepository-*` directory.
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080024
25Make sure you have pygobject installed. Then check that the following
Bruce Mitchener257d0e52018-10-19 22:49:21 +070026import works in your Python interpreter:
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080027
Ebrahim Byagowi5f7f0bf2018-03-29 04:22:53 +043028```python
29from gi.repository import HarfBuzz
30```
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080031
32If it does, you are ready to call HarfBuzz from Python! Congratulations.
Khaled Hosny06596cf2019-08-03 13:55:34 +020033See [`src/sample.py`](src/sample.py).
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080034
35The Python API will change. Let us know on the mailing list if you are
36using it, and send lots of feedback.