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.9.1.zip
(28.9 kB
view hashes)
Built Distributions
uharfbuzz-0.9.1-cp38-cp38-win32.whl
(266.8 kB
view hashes)
uharfbuzz-0.9.1-cp37-cp37m-win32.whl
(266.0 kB
view hashes)
uharfbuzz-0.9.1-cp36-cp36m-win32.whl
(266.1 kB
view hashes)
Close
Hashes for uharfbuzz-0.9.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1734922f6259559c804b46799d97bad85c6be483d4edb2aad2075ec85e4fae2b |
|
MD5 | 51d2459f4aa4383c5632d5e8baf4d5c5 |
|
BLAKE2b-256 | 9a74c46c7b811e9dc3ffb475a959032a445ce68a63d47ad3cd3455a9b0183602 |
Close
Hashes for uharfbuzz-0.9.1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3090fc5101618195db9f85c8fcb981357c436859200eb440c821dd80593ed406 |
|
MD5 | a82cdb362be860803c25bd68f295baae |
|
BLAKE2b-256 | 91a75640e8f1b80a1e32d2f68137f4fa6c26e8e058ed08dce302dc35ada302b9 |
Close
Hashes for uharfbuzz-0.9.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aa5715e0527554fb133997563598d47f947e6fa3c882e2cbcac93ad1329894c |
|
MD5 | 8a55277b17f6d4697ee84448a2527c3b |
|
BLAKE2b-256 | e46efbe026383443f0b90d6d007af8bc4d83e8ee78f4e48c7609a827bdbd7e74 |
Close
Hashes for uharfbuzz-0.9.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b62eefb8429833bda45ea42cdcb1538b6dd7ef5324b3e1f0c49b5b3ca29f857 |
|
MD5 | 83648028b3f758f9fdc7463efea67f7f |
|
BLAKE2b-256 | 772983306f98ca68c4085101933f502628d2f0fc034adcd7d3f2481793380910 |
Close
Hashes for uharfbuzz-0.9.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f33a82f32456cfc45f4e4dd4b3d6bd2d4f214cf59a635f70e2ab707cf115ca7c |
|
MD5 | 276e5d44be401305c7be34c2aede655c |
|
BLAKE2b-256 | 0197b1e00bbb6e05ef0dd2f4091f9fea86f817d131dd614c0bf2c764ebbe9600 |
Close
Hashes for uharfbuzz-0.9.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dd0183bed097edef096e1fa8eee8db10a1f80edceea5a8da0592b861281a496 |
|
MD5 | fc390aff31195a1054918526e518ac5a |
|
BLAKE2b-256 | 98132e3b20a83c6e6e258f5a568c3c0a66ebee51874fe6fa24713bb730b9e0fb |
Close
Hashes for uharfbuzz-0.9.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad852be16c96e499fd03aede7fb0b96c59c325adf490d49ea7687ee8a392dbc5 |
|
MD5 | 8fd8451cc8c8f7007561d0277a9156ef |
|
BLAKE2b-256 | ac1b78b66214d002078f2f2b2c645086995850c5916e12f4ce469e9e513a2886 |
Close
Hashes for uharfbuzz-0.9.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91c6e53d32daa321843ab1de354a046c45190f6612a08a96f0ac3954104e46c3 |
|
MD5 | 4ef56233108077cca0672ee7b2066da2 |
|
BLAKE2b-256 | e0af55c3208323e49e1864f18d6a629d71f50d93389d47f8dac8683ec2c383df |
Close
Hashes for uharfbuzz-0.9.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8636ce2638b1dc32fd90fca20c9f86a39085c69f4cb2218df3c8c2c0b334ed94 |
|
MD5 | c7dfdf5a2dbf5b68e44f6ae21e759645 |
|
BLAKE2b-256 | 0dbd89e88da7ce3cbc9829ffc6c486480a214441cabefeac87b44b16c2043945 |
Close
Hashes for uharfbuzz-0.9.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 428e741ec0292924f16cb51cc34b56af7a839efaa86234e11c4095315a2aa004 |
|
MD5 | ea8425e65999793808f53c6dd86e0d6b |
|
BLAKE2b-256 | ae5a18a7808e4435c888295d97a75b908effcf5ce3cda60727c04728574a8509 |
Close
Hashes for uharfbuzz-0.9.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff182f7e87e8f0e9c5f3259b2506e03cd457ddf974ecfc9133ce35a67ba4e11e |
|
MD5 | dc1a9acd3006b5a5588598388fb7de11 |
|
BLAKE2b-256 | 168f6e17520a2f0df1e936d9cda4b3f4fe8cdc4d60f545de4aa1c4d77daef36b |
Close
Hashes for uharfbuzz-0.9.1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67e7f25e503198b6a51b207799ca610129ea057995bf36c983cee64b5fa302ac |
|
MD5 | 46e99e3afa39c6d02a24274b014b1157 |
|
BLAKE2b-256 | 4862d844629816ad767555af1965292a635dc3eba2bd4afff694e0a4374b05a9 |
Close
Hashes for uharfbuzz-0.9.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5e736142b9a6efed052e37f42bc93360e8fb12f36cd64905156fe26ac44d592 |
|
MD5 | 4b3ef49dcd6e680a56064a51edab024e |
|
BLAKE2b-256 | 52e81a35667cc5193fd4e0a3d207ca9a4458b064b4ee11e218231c5e366d0237 |
Close
Hashes for uharfbuzz-0.9.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 362f7d4e9e2c69871b141a9f062c3641ef638583bda0ae6b6cbcc1d49c2630c2 |
|
MD5 | 0f6c3cad12439005be50112f5d29094c |
|
BLAKE2b-256 | 5df84da46f70c3a7aa9232a1836a7db73bb33f8fd13fd28eca7b80f09082d335 |
Close
Hashes for uharfbuzz-0.9.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2838892cf54d546176527cb435def71353003e2c8be96e8f9d1900332c20bdd3 |
|
MD5 | 081a7c29d919e3cda6803a0bc42b427e |
|
BLAKE2b-256 | be60c848428c98859ed59c775923fd41d8ac2a5a131abb68318658543941449f |