blob: 7496f045ec9238c5504b04f244cb679b7767b4ca [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
Ebrahim Byagowicac483b2020-08-03 18:41:49 +04309And then run `meson setup` and make sure that `Introspection` is reported
10enabled in output.
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080011
12Compile and install.
13
Khaled Hosny06596cf2019-08-03 13:55:34 +020014Make sure you have the installation lib dir in `LD_LIBRARY_PATH`, as needed
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080015for the linker to find the library.
16
Khaled Hosny06596cf2019-08-03 13:55:34 +020017Then make sure you also have `GI_TYPELIB_PATH` pointing to the resulting
18`$prefix/lib/girepository-*` directory.
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080019
20Make sure you have pygobject installed. Then check that the following
Bruce Mitchener257d0e52018-10-19 22:49:21 +070021import works in your Python interpreter:
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080022
Ebrahim Byagowi5f7f0bf2018-03-29 04:22:53 +043023```python
24from gi.repository import HarfBuzz
25```
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080026
27If it does, you are ready to call HarfBuzz from Python! Congratulations.
Khaled Hosny06596cf2019-08-03 13:55:34 +020028See [`src/sample.py`](src/sample.py).
Behdad Esfahbod31d48dd2015-01-21 01:57:44 -080029
30The Python API will change. Let us know on the mailing list if you are
31using it, and send lots of feedback.