kobofix.py is a Python script designed to process TTF and OTF fonts for Kobo e-readers.
It generates a renamed font, fixes PANOSE information based on the filename, adjusts the baseline with the font-line utility, and adds a legacy kern table which allows the kepub engine for improved rendering of kerned pairs.
Requirements
Python 3.8+
FontTools
pip3 install fonttools
font-line utility
pip3 install font-line
Usage
Open a terminal and navigate to the directory containing your font files.
Run the script with a glob pattern to include all TTF/OTF files:
python3 kobofix.py *.ttf
The script will:
Validate filenames.
Process each font.
Apply kerning, rename, PANOSE adjustments, and baseline shift.