Your company here — click to reach over 10,000 unique daily visitors

compreffor - Man Page

CFF table subroutinizer for FontTools


compreffor [-h] [-v] [-c] [-d] [-n NROUNDS] [-m MAX_SUBRS] [--generate-cff] [--py] [--chunk-ratio CHUNK_RATIO] [-p PROCESSES] INPUT [OUTPUT]


FontTools Compreffor will take a CFF-flavored OpenType font and automatically detect repeated routines and generate subroutines to minimize the disk space needed to represent a font.


Positional Arguments


Path to the input font file


Path to the compressed file (default: *.compressed.otf)

Optional Arguments


Show a help message and exit


Print more messages to stdout; use it multiple times to increase the level of verbosity


Verify that the outputted font is valid and functionally equivalent to the input


Decompress source before compressing (necessary if there are subroutines in the source)


The number of iterations to run the algorithm (default: 4)

-m MAX_SUBRS--max_subrs MAX_SUBRS

Limit to the number of subroutines per INDEX (default: 65533)


Also save binary CFF table data as INPUT.cff


Use pure Python method, instead of C++ extension

Options for Pure Python Method

--chunk-ratio CHUNK_RATIO

Specify the percentage size of the job chunks used for parallel processing (0 < float <= 1; default: 0.1)


Specify number of concurrent processes to run. Use value 1 to perform operation serially (default: 12)


August 2021