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.14.0.zip
(1.1 MB
view hashes)
Built Distributions
uharfbuzz-0.14.0-cp38-cp38-win32.whl
(337.9 kB
view hashes)
uharfbuzz-0.14.0-cp37-cp37m-win32.whl
(336.0 kB
view hashes)
uharfbuzz-0.14.0-cp36-cp36m-win32.whl
(336.2 kB
view hashes)
Close
Hashes for uharfbuzz-0.14.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ed530cc60a2689f9dba642be2e5dc5e1e7efce7cfb3da85178abd37d25a51fe |
|
MD5 | 1ea22ad3bccdff29c4dd2717f0a4971a |
|
BLAKE2b-256 | 3a2d572cb8d36f7c33a42cb0282d0bcaa7369bdb6a7eff9fd6a0c52ad6b71f5f |
Close
Hashes for uharfbuzz-0.14.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 610d3b1cf4266a09c840864630fb81863caf7d28f2947b753011966ea64917d4 |
|
MD5 | 0c8c2e7c9c91a03e86fe2bca51799e57 |
|
BLAKE2b-256 | 8603cb0a3672b957e9900ab49ecd20955dcdff54b4371c53c4e2995dabcfc28e |
Close
Hashes for uharfbuzz-0.14.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ca88dd044d82f91b320e16c634f642fac7ffdf3916b3663bc5b8f66fd8ffef4 |
|
MD5 | be8a455125d34a117e9b6b2f02b685d6 |
|
BLAKE2b-256 | 51d1d687ecffc413486b7ed2682a045a0f291832259e2966549a6910499f9684 |
Close
Hashes for uharfbuzz-0.14.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13adcd98898adbfc59808b4affc3593b38a7098d52da77c4daf3bcac50173df1 |
|
MD5 | e2de41b349ae8ebac6dde6cbeca77440 |
|
BLAKE2b-256 | 48a7af34b069ea8e882a7c1f38a8fa9114ebcc3fd7b6bbffe5df442ec76a62c3 |
Close
Hashes for uharfbuzz-0.14.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f152923c952e6520bef0c2f91c8d3cd57a01c12b88a47c838d6093cbf7a425a9 |
|
MD5 | 6f78ed3baa7b4ef3ea0ffe215cafe1d1 |
|
BLAKE2b-256 | 18bd5d82e26c561cbf6f35f12ff678e1e46bca4f2e731abf6ea8d48eea073252 |
Close
Hashes for uharfbuzz-0.14.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c9fdddaec55c01b4357c9bb4b777ba8e0d48e49decdbbd2e6b8a00688ac2de8 |
|
MD5 | c23182bc93b37ac59c7315e3cd82557e |
|
BLAKE2b-256 | c213fd86f91b102d85371d723dccb5cda47dfb8e1ca514f952adbc713be70306 |
Close
Hashes for uharfbuzz-0.14.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd138723129c8ecdfd5fe735e1467360f85b38242c899dc7770799b42eb69b34 |
|
MD5 | ba12e976fdbdd6bd1c262f440b39a810 |
|
BLAKE2b-256 | 7e0162acdb2a733fc59b1c164bd508f027bc2c9ef52ceda322ba67b9efea4cad |
Close
Hashes for uharfbuzz-0.14.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4455a3e8b8fcc509a00858e71511e2d93e8cc0bd6ec6d1c4778f4a7ab762ee40 |
|
MD5 | 7ca1834181147934a538d84e2a63d84d |
|
BLAKE2b-256 | c01618310042cb850097ca7059f65c16c8cc4b09baf71b0f75acfe0a5925e859 |
Close
Hashes for uharfbuzz-0.14.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4739674b94a7dc9140e0c5d5d5e375d3281f176548eacd2f32b120a89566556 |
|
MD5 | bcf8e52cb6434da89e97d5c0865b0921 |
|
BLAKE2b-256 | b031090ce496d3cb1f8e4fc154eb7eafa46f843b62fe3c80a4a4bba1d52c60a1 |
Close
Hashes for uharfbuzz-0.14.0-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cf96b2cbe517481f16906dbc0462d72dc3b009b7eea858e322b1e9578e3fa14 |
|
MD5 | 5484c373fd17a1570b3251f74e75df72 |
|
BLAKE2b-256 | 2238024ca1f25f19b02ab784c56ba9b84faa10ebfea520dcb3b4df2f0d2d8c23 |
Close
Hashes for uharfbuzz-0.14.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b079d984a3cae2be5557db645408b3c35b1d03fe0ee8ef6fb50e76539d34657 |
|
MD5 | 699c2958849af76fb6a96e878ca13bf0 |
|
BLAKE2b-256 | aa952211b5b22611a332a8b77e5517b5feb0e439476cac36ff8e804c994158a7 |
Close
Hashes for uharfbuzz-0.14.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06016a146b586fb3f858d1af217897905ba57bf6047fda5a1610a875714378e6 |
|
MD5 | 3bc47cfa53fecf135f8ce588e80abb04 |
|
BLAKE2b-256 | 156d93eb4dff33f785b6f96b7c00fa6ec2fda8e78dfc58a8c6e4e0b91004e9b7 |
Close
Hashes for uharfbuzz-0.14.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 290ae80e3a7dc95e47d6541010f2fc9e3c8f80e5e99a682482b643798e344349 |
|
MD5 | 27a00606aeb16f149c9efbde30f012b7 |
|
BLAKE2b-256 | f3134beca6b5c7548a898962f8b012d3ab7f3f2679335869a4ca5029e5b247d0 |
Close
Hashes for uharfbuzz-0.14.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e76a05508cfc998208770a62e3c16c0899ed61646563dd4e5ffbe95cec996761 |
|
MD5 | be7e21b67be6a251ebdb2ad6de6ba8ac |
|
BLAKE2b-256 | 5aff68e62f13fc5d7de41524f03afc97183fbebb60bb0182fcd5598825f1cbba |
Close
Hashes for uharfbuzz-0.14.0-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16447dc00a677da00dc7197cf4b36cfd65c2ad7a67c2d42b18b27f71574c7785 |
|
MD5 | b6f8513e2f6cea8dfb8931f41546bf4c |
|
BLAKE2b-256 | fb79787ec3d6db7b076e5b2628e862791123dce0a31f5e37134900f6141c5902 |