[cairo] Announcing HarfPy
ldo at geek-central.gen.nz
Fri Aug 5 05:19:19 UTC 2016
On Tue, 2 Aug 2016 15:29:03 +1200, I wrote:
> Following on from my Python wrapper for FriBidi, here
> <https://github.com/ldo/harfpy> is one for HarfBuzz.
I have expanded the readme with a couple of walk-through examples: an
adaptation of the very basic hello-harfbuzz example, and a more detailed
one showing how to render a full line of bidirectional text, using
FriBidi (via PyBidi <https://github.com/ldo/pybidi>), Cairo (via Qahirah
<https://github.com/ldo/qahirah>) and FreeType (via python_freetype
There seem to be a few gaps between the various APIs that I had to fill
in with convenience wrappers. For example, HarfBuzz can only deal with
a single directional run at a time, whereas FriBidi doesn’t provide any
straightforward way of extracting these.
I also provided a convenience routine that takes the information from
the HarfBuzz get_glyph_infos and get_glyph_positions calls, and
turns that into a sequence of Cairo glyphs.
More information about the cairo