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.13.1.zip
(134.5 kB
view hashes)
Built Distributions
uharfbuzz-0.13.1-cp38-cp38-win32.whl
(336.5 kB
view hashes)
uharfbuzz-0.13.1-cp37-cp37m-win32.whl
(334.6 kB
view hashes)
uharfbuzz-0.13.1-cp36-cp36m-win32.whl
(334.8 kB
view hashes)
Close
Hashes for uharfbuzz-0.13.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c168dffdd50db2a5fba5f4a13694369625c4e46ba00dd63b875847297f6d19b |
|
MD5 | a2c91c323f00fee169dca855ae700960 |
|
BLAKE2b-256 | 61290f464231016840134e1c3701b8a965b2b0d3e01b6be35d0f238a1999f2f4 |
Close
Hashes for uharfbuzz-0.13.1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a7719a45de801fca154eb896137da1b05f3ad902fd0084e59ab9f1a48b0977c |
|
MD5 | bd9e8bd6bd772177abfea937f126f20a |
|
BLAKE2b-256 | 0e8823ed4bc4ee49713a1291b3125f12f6cfa0033e06d7302ffbb4c7d7589fbe |
Close
Hashes for uharfbuzz-0.13.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da9064bc625b97afbe677dd9350bc20775f73a2c21d37b4d99a946c8f05c033f |
|
MD5 | c15671baec871ae6d52fa75cff606342 |
|
BLAKE2b-256 | de4986585812563548accc0a9f95abce07da4f6a678d9b63bf2b069d023ee9b7 |
Close
Hashes for uharfbuzz-0.13.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b826e43878a95a1742bfef29310489bc5d7ba32b330349d2c9951e0b0a954731 |
|
MD5 | fabb672118b6eb4595a92ff69bab9b58 |
|
BLAKE2b-256 | 5f1930a5063a3e5e95fc5167ce175a143a8fc1db3c897cffe632b7ed36d24c77 |
Close
Hashes for uharfbuzz-0.13.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d0f93f0db72518b23a08139f8dec4fc2d74f156324f467f4c1dadcfdc7a05ee |
|
MD5 | 67ff174f2e758ad20a61d3721bb9ed08 |
|
BLAKE2b-256 | 1b1d2705bd73b603d79f2751990edc7ee794a2aeff09a8df2548a39ce31c7c95 |
Close
Hashes for uharfbuzz-0.13.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad55f85f5638c65a174da20dfddf1efca00b49081c7ab314d5516dc1efa9b5e9 |
|
MD5 | abdc6fa2c87a92b569a39f5b0e00a176 |
|
BLAKE2b-256 | 165524279d9b1f9d472288513fac00d8f7f8f7c1b65dfe3554be6eb0109975ac |
Close
Hashes for uharfbuzz-0.13.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fb48de2a3899169d8bd8831bcd76079b3e035b44b59ba57213a91fa84802e71 |
|
MD5 | 54b435cf1b91c26a39d45022685f3731 |
|
BLAKE2b-256 | 78f48e8dd1c7a4d8be5d74fde4e32de4e05fae9747a8d84b5fb5d2d83c4e5cd5 |
Close
Hashes for uharfbuzz-0.13.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de018f99e4c4bd90c0c545636b5a58a92001336d3861d0f65b2ee15e2ced09fc |
|
MD5 | 920bc6fa2fe455d3df198bf3d0a0e45f |
|
BLAKE2b-256 | da6f71a2971aa5ae03fb1f743aa061d198a002d38744d1db4e0a9f97b48aface |
Close
Hashes for uharfbuzz-0.13.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0583c4110e5106060c1419148cdbe1938e2c0d59420ba78488c80583588617e9 |
|
MD5 | 0f197cd8b3f56ea9796baf018f8a68f8 |
|
BLAKE2b-256 | 09117ef10d4f83e42039ce184116c791fa91f3b3e470d073f35abb784b919c47 |
Close
Hashes for uharfbuzz-0.13.1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6335b9b0bbe30b65897175b7b719e2bbf5f6150824e1807f6cdebb420ea888e |
|
MD5 | 8eb7f2eb9d35ad806e87bffb1336d5d5 |
|
BLAKE2b-256 | 0aacdc903211dc165635eb409a3ad4ba73a6501fb1249817238593ba2db27f64 |
Close
Hashes for uharfbuzz-0.13.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d1cf9ebb80f4f562644882a9011fa9e7e331edd115ca555d800956e1c52c91c |
|
MD5 | 2182dbad0cf6718934a1d6a73860cc38 |
|
BLAKE2b-256 | 8d240030fb0b5e04e4b4a6c11d826113368206ad4bdbe8d399be08344b8fd077 |
Close
Hashes for uharfbuzz-0.13.1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 119e6f172c2ba2c5339dd7e1148c1421f49bdf7050775f5bf8a3d98186cc3570 |
|
MD5 | 4916fa7df92ec514ef4daffa1532d70f |
|
BLAKE2b-256 | 8fee86d3dfb8022bef71d41a900cbcca4ab5659ee495617edab421d82bf86fb0 |
Close
Hashes for uharfbuzz-0.13.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6d513ad05d9cd17275956c541419a65a6dd7fdb50535efc1237ff62d0afaa77 |
|
MD5 | 427674b34fe6bd697973c96e14876a0b |
|
BLAKE2b-256 | a80c1d227318d1cccdf0b1fa632f1a345ceaf6516cc3b442b77c7c59e7dfa9a1 |
Close
Hashes for uharfbuzz-0.13.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5f78e7e1f7220cf8df2c68f92500831f668c7565a98ad75585a4d7ad14a9d86 |
|
MD5 | 0821f23b8518c2b7dbec9f5eb09722ca |
|
BLAKE2b-256 | 684721729859547f6e97fb57b6464d0b7311493818b0776e6f0acb8c6e0ca137 |
Close
Hashes for uharfbuzz-0.13.1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 453579df196ae949098bae72b73000c83cb6916934babf569b44d9c465809f5c |
|
MD5 | 22b4b98baf00222b6a591641d90964a7 |
|
BLAKE2b-256 | 1bc4c78c4f4622b7675b14d1dc975335d925e2e6f18fd3952b46238a635793aa |