COMPREFFOR(1)

πŸ“¦ version 0.6.0, in fedora 43, fedora 44

πŸ’– 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 -vvvv for 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 as INPUT.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 value 1 to 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