A standalone CFF (Compact Font Format) subroutinizer based on the AFDKO tx tool. It converts CFF fonts to their subroutinized form, reducing file size. Version 0.4.0 requires Python >=3.10. Releases are irregular; maintained by Adobe Type Tools.
pip install cffsubrVerified import paths — ran on the pinned version, not inferred.
Load a CFF font, subroutinize it, and save.
Use fontTools to load the font first: TTFont('path.otf').Ensure the input font has CFF outlines (check with TTFont.sfVersion == 'OTTO').
After calling, the original font object is modified. Save a copy first if needed.
Use `from cffsubr import subroutinize` and ensure cffsubr >= 0.2.0.
Pass a loaded TTFont instance: `subroutinize(font)`.
Verify the font is a CFF-based .otf file.