TypeScript Font Converter
Converts fonts to TypeScript objects
This library:
- Imports OpenType and TrueType fonts
- Extracts metadata from the naming table
- Extracts a list of glyphs and their unicode character ID
- Encodes the font file as a base64-encoded DataURI
- Saves all this in Python objects
- Serializes the Python Objects in a JSON file
- Exports TypeScript definitions of the objects
But Why?
This library exists to embed fonts into web pages using SSR-frameworks such as Next.js and to more easily gain information about the font.
It was initially part of the ThorType website where I use the TypeScript definition and the corresponding JSON-data to showcase my fonts and save all of that data as part of a static website.
It's released as a Python lib so that the tooling for the ThorType-website is separated and generalised to be reused in any TypeScript or JavaScript web framework.
Metadata
Release files for tsfontconverter 0.35
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tsfontconverter-0.35.tar.gz | 12.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tsfontconverter-0.35-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.9 kB
Release files / tsfontconverter-0.35.tar.gz
| Download URL | tsfontconverter-0.35.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c22a5d3b5052bc9a83d57e7ce3ffd1bc79da6447d2fd821daee66be88a28803c
|
|
BLAKE2b-256 checksum How to use checksums |
e6e60dc83c1918a8b46e82133caf0add82e7002cf3cb48635fbe59aeef6f1db8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.18
|
Release files / tsfontconverter-0.35-py3-none-any.whl
| Download URL | tsfontconverter-0.35-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2033325945b820a68e8c869c841e241fd8d2fa4eceedeb23a9ee55e5405bbed
|
|
BLAKE2b-256 checksum How to use checksums |
0302e61fabb0dd9014461fbb38b3b17227d1dc0718ce2ebacbdfffb0da60825f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.18
|