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.10.0.zip
(29.4 kB
view hashes)
Built Distributions
uharfbuzz-0.10.0-cp38-cp38-win32.whl
(270.3 kB
view hashes)
uharfbuzz-0.10.0-cp37-cp37m-win32.whl
(269.5 kB
view hashes)
uharfbuzz-0.10.0-cp36-cp36m-win32.whl
(269.6 kB
view hashes)
Close
Hashes for uharfbuzz-0.10.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f78a802ece7554870464d71bb8cba58e067fa2677b3c92ecc2d86d3891da024 |
|
MD5 | c3d17e64f6014a7deff5536d4b17deab |
|
BLAKE2b-256 | 108685fa27890f5a20890e5708476ebf985367cfdadd917bb35c2b445f61b52b |
Close
Hashes for uharfbuzz-0.10.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2e28c4117e4516b93c40c2e177d1a925820f2a779ab6a831f1b0594311d7ef9 |
|
MD5 | e57323d674e08af49ca85a44bf53a4a1 |
|
BLAKE2b-256 | 46a9c4b49279e2a67198d69c947f5f6cc5a2d7ad0c0ac7e4b837aab05d808572 |
Close
Hashes for uharfbuzz-0.10.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98cc73b3c877c9b2fe8adcb96acc7cb6928fd1b69b983507311b428d67682cda |
|
MD5 | a6d30075751c5e8a0c4c95ce0da46e23 |
|
BLAKE2b-256 | 4dafbbfdfd738f7697a8f2dea05635e3d80a781b80aff9c0a1d9786836132951 |
Close
Hashes for uharfbuzz-0.10.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c79a9326195881628cbfe730d6409f7a234325e3e57bc45235a51e4b7d9be8e |
|
MD5 | 0ea61d0c6ddefb35585c335b29357fa5 |
|
BLAKE2b-256 | 2c00aa216e043fa26fb7c8be258653a7ff0aa3b932de67c35e507156a4e2559b |
Close
Hashes for uharfbuzz-0.10.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90cfd5de5dd564960a5fb5c446315052b883fefed24833e0cd1145cc8086d29f |
|
MD5 | fb6acb055a6e885f27a347b3ad7e7e5f |
|
BLAKE2b-256 | 525da421d5371e774fb5a5f1aabf801535780f11eb027f3a8aa32ea741e52123 |
Close
Hashes for uharfbuzz-0.10.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a73b17559feb07a731346686f4d4f8b69f679a31f96094165a94b5c9f46958af |
|
MD5 | 8b796da5458aba6e88ef5da0bc641381 |
|
BLAKE2b-256 | 07fc840c8b60d77cbf7d18dce5be99e55e0c6028cecd28ec28e41d76cd88c7c4 |
Close
Hashes for uharfbuzz-0.10.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77a9f5b4d41c496c6f978ab462813d94b61eae52777d18543caf8c0593a84c99 |
|
MD5 | fc8ad431ed383d0a55cae74beead66e5 |
|
BLAKE2b-256 | b1392001314c8389306d38692fc81abdd2db84606e4c312c2773c4d76f41877d |
Close
Hashes for uharfbuzz-0.10.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 706810b601f509f2f4a754ae34b6d7d03db8ca80aa610a12eb1a37e9f566e910 |
|
MD5 | ca711c5b95da9f21bfa4eb3b88206681 |
|
BLAKE2b-256 | 52288bd860193771cbaae6dd7c2e737828edf758e94973a900336be8f9712403 |
Close
Hashes for uharfbuzz-0.10.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4c2444858d5109b339ca2b5375fca6a0785084e772fe7a7c61211d4aa2dd757 |
|
MD5 | 60e0d91045309a921fe06ba3106136fe |
|
BLAKE2b-256 | ee8ca66b80235ffcee3b2f8e67ef86b3a66a58e4b1ec34f9fd53d87bf1ad3e35 |
Close
Hashes for uharfbuzz-0.10.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 744e74cffc1fdad977146ddf380ff73870809a06887a001d7627e62bb452bbc9 |
|
MD5 | c781a9092c1c36bf9962e71c2b15b063 |
|
BLAKE2b-256 | e3ca07b62365ce56c33c72cfc7c7c50ee5baf29befb0bd805e44301fefe763d7 |
Close
Hashes for uharfbuzz-0.10.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6077ce22014210d98189c2edd5529a49a35c81d2fd343648c7f923aadafc00e1 |
|
MD5 | 5ae7db2915e3e178cc8f61e042db2d41 |
|
BLAKE2b-256 | 0573a6dc2c2fc76fefc173810a002ae11aff38075d5e1c9edfe8c301eb076c82 |
Close
Hashes for uharfbuzz-0.10.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f03e1656f8ad8f1e4f4c7553839698b3f77514470dad919f0d9b792f97d18776 |
|
MD5 | 75f75035caaf5b10d6bed19d583697f7 |
|
BLAKE2b-256 | e0ccd71d2c923d40b28aa80b5473068fa11c7ae83855ef4ac7eb03f022b6965f |
Close
Hashes for uharfbuzz-0.10.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5b5b1fa554f81acd79e7b290c2fedc8001757c680d68a2db72ea3964717111a |
|
MD5 | cfe375d6b727525b5428aead2372f368 |
|
BLAKE2b-256 | 951f11e4d36ff0c2fb7a30cb6d57717917d807d157b27cc1fc4a836a691c45e2 |
Close
Hashes for uharfbuzz-0.10.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24635fe3680948b436d9f0a6d862cc24f4c3fd82fb24a32bd44248e96a030e16 |
|
MD5 | 3ff8faae2d94543e7d868d088a0407d5 |
|
BLAKE2b-256 | 6908b04fb4b01fcd9d2a280a6e4e569ab189c1c0398178ce0f12cf5727331385 |
Close
Hashes for uharfbuzz-0.10.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7df5c47e3ed191c2112be8e770b84c775fff2b91a6d5fdc4ef833de59e2019e2 |
|
MD5 | 1fc2c052b4b485ae1b98bb8cf15d0c02 |
|
BLAKE2b-256 | 015e6f2b5352b99bd78a79bd3aed14579a5a5327bac31f0758adaabae4601a40 |