mirror of
https://github.com/nicoverbruggen/kobo-font-fix.git
synced 2026-03-29 13:30:08 +02:00
Update documentation
This commit is contained in:
24
kobofix.py
24
kobofix.py
@@ -2,18 +2,24 @@
|
|||||||
"""
|
"""
|
||||||
Font processing utility for Kobo e-readers.
|
Font processing utility for Kobo e-readers.
|
||||||
|
|
||||||
This script processes TrueType fonts to improve compatibility with
|
Processes TrueType fonts to improve compatibility with Kobo e-readers:
|
||||||
Kobo e-readers by:
|
- Renaming fonts with a configurable prefix and updating internal metadata
|
||||||
- Adding a custom prefix to font names
|
(name table, CFF, post table, PS name)
|
||||||
- Updating the font name if necessary, including PS name
|
- Validating and correcting PANOSE metadata based on font style
|
||||||
- Extracting GPOS kerning data and creating legacy 'kern' tables
|
- Updating font weight metadata (OS/2 usWeightClass)
|
||||||
- Validating and correcting PANOSE metadata
|
- Adjusting line spacing via font-line
|
||||||
- Adjusting font metrics for better line spacing
|
- Kerning: extracting GPOS pairs (Format 1, Format 2, and Extension lookups)
|
||||||
- Updating font weight metadata (OS/2 usWeightClass and PostScript weight string)
|
into a legacy kern table, prioritized by Unicode range to fit within
|
||||||
|
format 0 size constraints
|
||||||
|
- Hinting: optionally stripping hints or applying ttfautohint
|
||||||
|
|
||||||
|
Includes NV and KF presets for common workflows, or can be fully
|
||||||
|
configured via individual flags. Run with -h for usage details.
|
||||||
|
|
||||||
Requirements:
|
Requirements:
|
||||||
- fontTools (pip install fonttools)
|
- fontTools (pip install fonttools)
|
||||||
- font-line utility (https://github.com/source-foundry/font-line)
|
- font-line (pip install font-line)
|
||||||
|
- ttfautohint (optional, for --hint additive/overwrite)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
Reference in New Issue
Block a user