Streamlined Cython bindings for the harfbuzz shaping engine
Project description
uharfbuzz
Streamlined Cython bindings for the HarfBuzz shaping engine.
Example
import uharfbuzz as hb
import sys
with open(sys.argv[1], 'rb') as fontfile:
fontdata = fontfile.read()
text = sys.argv[2]
face = hb.Face(fontdata)
font = hb.Font(face)
upem = face.upem
font.scale = (upem, upem)
hb.ot_font_set_funcs(font)
buf = hb.Buffer()
buf.add_str(text)
buf.guess_segment_properties()
features = {"kern": True, "liga": True}
hb.shape(font, buf, features)
infos = buf.glyph_infos
positions = buf.glyph_positions
for info, pos in zip(infos, positions):
gid = info.codepoint
cluster = info.cluster
x_advance = pos.x_advance
x_offset = pos.x_offset
y_offset = pos.y_offset
print(f"gid{gid}={cluster}@{x_advance},{x_offset}+{y_offset}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
uharfbuzz-0.7.0.zip
(28.3 kB
view hashes)
Built Distributions
uharfbuzz-0.7.0-cp38-cp38-win32.whl
(264.6 kB
view hashes)
uharfbuzz-0.7.0-cp37-cp37m-win32.whl
(264.1 kB
view hashes)
uharfbuzz-0.7.0-cp36-cp36m-win32.whl
(264.1 kB
view hashes)
Close
Hashes for uharfbuzz-0.7.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1818b6c0714cb6fc80711dc3bd98b3114c62c2b8632e84d1cc4aa20f25714faa |
|
MD5 | bc509e3c9c825e527e3613b6e5e6bcba |
|
BLAKE2b-256 | 4a001da58ec541284d60a3fac3f2f9f365526deea10229c35870aff2bc262a5a |
Close
Hashes for uharfbuzz-0.7.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 302152142aaf0e5348362b6eeb1f8d8e0175543f6082f04bf6ef0a831b82aa59 |
|
MD5 | 313e664f3a8c4e63fcd61d9ecadde745 |
|
BLAKE2b-256 | 0aed084e4d282ebbc19c92c802c100f0da7f154d31af999aac24e64bbce3afdc |
Close
Hashes for uharfbuzz-0.7.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b507a796d84c60fe789a096e60d6ed401ea0da6ce5abc98fa131ff70c72cffcd |
|
MD5 | 667c50f6e5ea3d4f78cdc132d3d176e5 |
|
BLAKE2b-256 | 122c2b5ec7c1e0c7e326f4f9a2a9688e5cb5a9d6cd8fd8c28d246cd83f1404c8 |
Close
Hashes for uharfbuzz-0.7.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a63d7a4e7da195c8e10b5a46495b8d5ec8aeb703205c539569813928eedc2bc3 |
|
MD5 | fb9412131f297e37470a93660bd0316f |
|
BLAKE2b-256 | 79037f3f480e35547da1b824ca6e56b63c9e403d2c1835c23984428ee80d888d |
Close
Hashes for uharfbuzz-0.7.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff6d832033e435602b8fac99fd343a9c98eb33fd925766e0a07734d1da1aa8c5 |
|
MD5 | bc45da685b0fd3448fc8b8c585de8ec2 |
|
BLAKE2b-256 | 16c019617f3c1bc9ee13335f9744a0bc1eb2de290a43458905ecaca43f9cc05a |
Close
Hashes for uharfbuzz-0.7.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c31da3a6e6c5c477cbdd42815907058414b58b0dddd245e2d50fafd92209aa4a |
|
MD5 | 5b7b9ccf173d388a1d313c5ade9b1137 |
|
BLAKE2b-256 | c23468452a256dacf8441a4ba63ad31482a687ad3801877e1d855151ad860d9f |
Close
Hashes for uharfbuzz-0.7.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bb7ab5851f43e891cfabf6b526ae34681a74091ed0d34a649b20315653e213e |
|
MD5 | 768143ca0d89e08648261d0d34e18f21 |
|
BLAKE2b-256 | 040b9aa4e62a0dac420b9bef37179d0f2daaa81b6038203391578a83c0129f6e |
Close
Hashes for uharfbuzz-0.7.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c264bc7f11126655daa9d9eaf0c1568a0217d6f63f193c0525e59012f06c08a9 |
|
MD5 | 9a85c395adeb956994338ebdeb138ee8 |
|
BLAKE2b-256 | c63157183e30917c7f803f6ca8a8bffb9b2636fac3f48c13e27f7d6a545104c9 |
Close
Hashes for uharfbuzz-0.7.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fba6dfd2588b5447953019e5539c52635e727b35cefd60d4edbda61d64d8c374 |
|
MD5 | d5d306de5377cc73dbe3efd3b1803e8f |
|
BLAKE2b-256 | 9172f6ac9a829eb9e77f66c54311c102a97af391cab04d3d9455242890003a46 |
Close
Hashes for uharfbuzz-0.7.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e718f279536bc241e994da2b0827f71faa36e57daaad306eb830ac52d8d1063f |
|
MD5 | 24a96dabf3659c39979d94bca7370480 |
|
BLAKE2b-256 | 39dc6d01157022dbd5769416466abceed0c1ad8c5e8e325e38c00787d46dfac4 |
Close
Hashes for uharfbuzz-0.7.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f55de4c50620da8f25c9b6dd90c07646db4d0db96ef0e6b7144da1040b8c93d9 |
|
MD5 | 9867b0750144282136c2f440302da905 |
|
BLAKE2b-256 | b82b0545a0afde92d9868ed9faa281a1e1a996e1912138f0b89526ea06639622 |
Close
Hashes for uharfbuzz-0.7.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4d7e248a31cd575921bb39fe842156fc290ba43fd87533a1661e79fe9529e54 |
|
MD5 | d1dd1cb86f2a1be3d0a889d6b0d3ad7b |
|
BLAKE2b-256 | b0854e14b19cec28ede47f48fe46c35b3392176868ab2050a2fbba35c241cde7 |
Close
Hashes for uharfbuzz-0.7.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 857043f3d9dc4861c41f46014297c3703ae4c569d8fe141f3be5c9db8e6a435d |
|
MD5 | 60fee10032883549f736f16aedcf8e2f |
|
BLAKE2b-256 | 5b10424ac38e6ebe8e62e3e13d4de6d8d4aebd703d4da042f2cdc70c5fb150a1 |
Close
Hashes for uharfbuzz-0.7.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b175371ff0eec1fc919861d75f4dccfeb0c942334afd4e5a36fe0389a4c2e28 |
|
MD5 | dc1d17602691d87240501f1065d8dc3c |
|
BLAKE2b-256 | 386b1f6a6e1b07c90eccc3a928215decd126e7b7fd19f411f912b44ac141bbfd |
Close
Hashes for uharfbuzz-0.7.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6af62321ab1b7c74dddfa42c18a6481f3421657cf3e37c4ee2c17e097fb6f377 |
|
MD5 | 2bd48c0b455b80d74489273c427d8058 |
|
BLAKE2b-256 | d08a546f0d1d1ef4197a2a9df4efa0e00c8960d853df0a74230284b9383c40fe |