COMPREFFOR(1)
π COMPREFFOR π
okay so bestie, welcome to compreffor β it's a CFF table subroutinizer for FontTools, and no I will not be saying "subroutinizer" casually like it's normal because it is a LOT of syllables. but it's iconic, we love it, let's go π¦
β¨ SYNOPSIS β¨
compreffor [-h] [-v] [-c] [-d] [-n NROUNDS] [-m MAX_SUBRS]
[--generate-cff] [--py] [--chunk-ratio CHUNK_RATIO] [-p PROCESSES] INPUT
[OUTPUT]
like. look at her. a whole little command. the way that she takes an INPUT and maybe an OUTPUT and just does the thing π
πΈ DESCRIPTION πΈ
okay so real talk: 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.
that's it. that's the whole vibe. your font was out here repeating itself like a group chat saying "omg" forty times and compreffor is like bestie. let me consolidate. β¨ and the result is a smaller font. slay.
π OPTIONS π
π POSITIONAL ARGUMENTS π
INPUTβ the path to your input font file. the one you love. the one you're about to glow-up.OUTPUTβ the path to the compressed file (default:*.compressed.otf). if you don't tell her where to put it, she'll name it herself, which honestly? main character energy.
π OPTIONAL ARGUMENTS π
-h,--helpβ shows a help message and then dips. exit stage left. π«Ά-v,--verboseβ prints MORE messages to stdout. and the way that you can use it multiple times to increase the level of verbosity? not me spamming-vvvvfor the drama π-c,--checkβ verifies that the outputted font is valid and functionally equivalent to the input. like a bestie checking your outfit before you leave the house. we stan quality control.-d,--decompressβ decompresses the source before compressing. necessary if there are subroutines in the source, so like, if you skip this when you need it, it's giving chaos. don't do that. π-n NROUNDS,--nrounds NROUNDSβ the number of iterations to run the algorithm (default:4). four rounds. like a boxing match but the boxer is a font.-m MAX_SUBRS,--max_subrs MAX_SUBRSβ limits the number of subroutines per INDEX (default:65533). that number is real, do not come for her.--generate-cffβ also saves binary CFF table data asINPUT.cff. bonus content. director's cut. π--pyβ uses the pure Python method instead of the C++ extension. slower probably, but she's doing her best and honestly? valid.
π§ OPTIONS FOR PURE PYTHON METHOD π§
these only matter when you're on that --py lifestyle, iykyk
--chunk-ratio CHUNK_RATIOβ specifies the percentage size of the job chunks used for parallel processing (0 < float <= 1; default:0.1). note the strict inequality on the left and the<=on the right. she is PRECISE.-p PROCESSES,--processes PROCESSESβ specifies the number of concurrent processes to run. use the value1to perform the operation serially (default:12). twelve processes by default, because she is not here to wait around π
lowkey reminder bestie: if your source font already has subroutines in it, you genuinely need -d, --decompress first. that's not a suggestion, that's the rules. π
β and that's the whole page, bestie! this was compreffor, from August 2021, page COMPREFFOR(1) β go compress something and think of me. bye bestie, ily, go make tiny fonts πβ¨π
π¦ where this page comes from
- fedora 43: python3-compreffor 0.5.6-7.fc43 Β· Apache-2.0
- fedora 43: python3-compreffor 0.6.0-1.fc43 Β· Apache-2.0
- fedora 44: python3-compreffor 0.6.0-2.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms