Behdad Esfahbod | 31d48dd | 2015-01-21 01:57:44 -0800 | [diff] [blame] | 1 | To enable HarfBuzz bindings for Python among other languages, make sure |
Behdad Esfahbod | c60f3c8 | 2015-05-04 23:10:32 -0700 | [diff] [blame] | 2 | you have latest version of gobject-introspection available. On Ubuntu, |
| 3 | you can install that this way: |
| 4 | |
Ebrahim Byagowi | 5f7f0bf | 2018-03-29 04:22:53 +0430 | [diff] [blame] | 5 | ```bash |
| 6 | sudo apt-get install libgirepository1.0-dev |
| 7 | ``` |
Behdad Esfahbod | c60f3c8 | 2015-05-04 23:10:32 -0700 | [diff] [blame] | 8 | |
| 9 | And then run autogen.sh (if building from git), and then: |
Behdad Esfahbod | 31d48dd | 2015-01-21 01:57:44 -0800 | [diff] [blame] | 10 | |
Ebrahim Byagowi | 5f7f0bf | 2018-03-29 04:22:53 +0430 | [diff] [blame] | 11 | ```bash |
| 12 | ./configure --with-gobject --enable-introspection |
| 13 | ``` |
Behdad Esfahbod | 31d48dd | 2015-01-21 01:57:44 -0800 | [diff] [blame] | 14 | |
| 15 | Make sure that gobject-introspection is enabled then in the final report. |
| 16 | |
| 17 | Compile and install. |
| 18 | |
| 19 | Make sure you have the installation lib dir in LD_LIBRARY_PATH, as needed |
| 20 | for the linker to find the library. |
| 21 | |
| 22 | Then make sure you also have GI_TYPELIB_PATH pointing to the resulting |
| 23 | $prefix/lib/girepository-* directory. |
| 24 | |
| 25 | Make sure you have pygobject installed. Then check that the following |
| 26 | import works in your Python interpretter: |
| 27 | |
Ebrahim Byagowi | 5f7f0bf | 2018-03-29 04:22:53 +0430 | [diff] [blame] | 28 | ```python |
| 29 | from gi.repository import HarfBuzz |
| 30 | ``` |
Behdad Esfahbod | 31d48dd | 2015-01-21 01:57:44 -0800 | [diff] [blame] | 31 | |
| 32 | If it does, you are ready to call HarfBuzz from Python! Congratulations. |
| 33 | See src/sample.py. |
| 34 | |
| 35 | The Python API will change. Let us know on the mailing list if you are |
| 36 | using it, and send lots of feedback. |