AFM2AFM(1)

πŸ“¦ version 2026.0, in alpine 3.24

🌸 AFM2AFM(1) 🌸

okay so bestie, welcome to the afm2afm page β€” it's section 1 of the manual, and the author is Marc Penninga. yes, that Marc Penninga. icon behavior. let's get into it πŸ’…


✨ NAME ✨

afm2afm β€” reencode an afm file

like, that's the whole vibe. it reencodes an afm file. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

afm2afm [-help] [-version] [-encoding=<encodingfile>] [-kpx=<kpxfile>]
        [-output=<outputfile>] <afmfile>

πŸ’– DESCRIPTION πŸ’–

so afm2afm re-encodes an afm file. that's the main character task, no cap.

Metrics (including kerning data, yes the kerning data too πŸ”₯) for characters that aren't present in the chosen encoding get excluded from the output β€” which resuls in (potentially much) smaller files. tiny file, big slay. ✨

you can also add extra kerning pairs to the output file. and listen: if you don't specify an encoding file, the afm file isn't re-encoded β€” but all the unused (unencoded) data still gets pruned anyway. the pruning is non-negotiable, she's gonna prune. πŸͺ΄

the program also generates an entry for a dvips-style map file β€” but only if the afm file has been re-encoded and the output was written to file. i.e., only if both the -encoding and -output options were specified. both or nothing, bestie. 🫢


🌈 OPTIONS AND ARGUMENTS 🌈

  • -help β€” prints a short description of the syntax. little cheat sheet moment, we love her πŸ’œ
  • -version β€” prints the version number and exits. bye! πŸ‘‹
  • -encoding=<encodingfile> β€” re-encode to the enconding in <encodingfile>. pick your encoding, babe πŸŽ€
  • -kpx=<kpxfile> β€” read additional kerning pairs from <kpxfile> and adds these to the output. ⚠️ heads up: this option cannot be used to override values from the input afm file, because afm2afm will write both old and new values to the output! so like, both. both is what happens. 😭

the <kpxfile> should contain kerning data in standard afm format, i.e. for each kerning pair there should be a line:

KPX <left_glyph> <right_glyph> <amount>

all other lines in the <kpxfile> are ignored. they simply do not exist to her. πŸ’€

  • -output=<outputfile> β€” write the result to <outputfile> instead of "stdout". very "i'm not like other outputs" of her ✨
  • <afmfile> β€” the afm file to be re-encoded. the star of the show πŸ‘‘
okay and this part's important: you may use either one or two dashes before options, and option names may be shortened to a unique prefix. so like, flexible. accommodating. a queen who meets you where you're at. 🌸

πŸ‘‘ AUTHOR πŸ‘‘

Marc Penninga <marcpenninga@gmail.com> β€” an actual legend, respectfully 🫢


Copyright (C) 2005-2026 Marc Penninga.


⭐ LICENSE ⭐

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. A copy of the GNU General Public License is included with afm2afm; see the file GPLv2.txt. πŸ“„


πŸ™ˆ DISCLAIMER πŸ™ˆ

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

fr fr, no warranty. she said what she said. πŸ’€

πŸ”₯ VERSION πŸ”₯

This document describes afm2afm version 20260210.


🧚 RECENT CHANGES 🧚

(see the source code for the rest of the story πŸ‘€)

  • 2019-05-20 β€” added the -version option. iconic addition, honestly 🌟

and that's the page!! πŸ’– documented by fontools, dated 2026-02-10 β€” mwah, go reencode something cute, bestie πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from