Tensorfont is a library to help those performing numerical analysis of font data, particular with reference to letterfitting and spacing.
Here is an example session:
>>> from tensorfont import Font
>>> f = Font("../atospace/kern-dump/normal/MrsEavesOT-Bold.otf")
>>> f.m_width
828.0
>>> f.baseline_ratio
0.28835063437139563
>>> f.pair_distance("A","V")
-149
>>> f.pair_kerning("A","V")
-73
>>> f.glyph("G").lsb
71
>>> m = f.glyph("G").as_matrix()
.with_sidebearings()
.crop_descender()
.scale_to_height(50)
>>> m.left_contour()
array([25, 22, 20, 18, 16, 15, 14, 13, 12, 11, 10, 10, 9, 9, 8, 8, 7,
7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7,
7, 7, 8, 8, 9, 10, 10, 11, 12, 13, 13, 15, 16, 17, 19, 21])
>>> plt.imgshow(m) ; plt.show()
# The letter "G" is shown
Full documentation is available at https://simoncozens.github.io/tensorfont/index.html
Metadata
Release files for tensorfont 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tensorfont-0.2.0.tar.gz | 12.4 kB | Without provenance | Details for tensorfont-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tensorfont-0.2.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for tensorfont-0.2.0-py2.py3-none-any.whl |
Total release size: 24.3 kB
Release files / tensorfont-0.2.0.tar.gz
| Download URL | tensorfont-0.2.0.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3e94cf9b1cbfa046d11e3e3fd5f70fd52a95f0b12775ea7369ef64aff70b95c
|
|
BLAKE2b-256 checksum How to use checksums |
ecb64a68d596bde5575ef2d73557d1f593dc4d649ea9e9b569a7370ef2a2abba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / tensorfont-0.2.0-py2.py3-none-any.whl
| Download URL | tensorfont-0.2.0-py2.py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
910ab0a873f0be1215bb4a43a098cc6b5df81e8541b75ef1f6765424b93c6094
|
|
BLAKE2b-256 checksum How to use checksums |
f2106a63424b70b24738eef45fb2e2c2925d92437dcdc8dbc45467abf034cb01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for tensorfont 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.