Skip to main content

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)

Source distribution for tsfontconverter 0.35
File Size Uploaded
tsfontconverter-0.35.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tsfontconverter 0.35
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.35 This release

2 release files

0.34

2 release files

0.33

2 release files

0.32

2 release files

0.31

2 release files

0.30

2 release files

0.29

2 release files

0.28

2 release files

0.27

2 release files

0.26

2 release files

0.25

2 release files

0.24

2 release files

0.23

2 release files

0.22

2 release files

0.21

2 release files

0.20

2 release files

0.19

2 release files

0.18

2 release files

0.16

2 release files

0.15

2 release files

0.14

2 release files

0.12

2 release files

0.11

2 release files

0.10

2 release files

0.9

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page