fonttools

4.62.1 · active · verified Sat Mar 28

fonttools is a Python library for manipulating font files, currently at version 4.62.1, with a release cadence of approximately every few months.

Warnings

Install

Imports

Quickstart

This script demonstrates loading a TrueType font, accessing its tables, and saving changes.

from fontTools.ttLib import TTFont

# Load a TrueType font file
font = TTFont('path_to_font.ttf')

# Access font tables
print(font.keys())

# Save changes to the font
font.save('path_to_new_font.ttf')

view raw JSON →