AFM2AFM(1)

✨ NAME ✨

afm2afm is giving "reencode an afm file" πŸ’… That's the whole vibe, bestie.


πŸŽ€ SYNOPSIS πŸŽ€

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

🌸 DESCRIPTION 🌸

okay so afm2afm re-encodes an afm file, aka it gives your font file a total glow-up πŸ¦‹

Metrics (including kerning data) for characters that aren't in the chosen encoding get dropped from the output, so the results can be (potentially much) smaller files ✨

You can also add extra kerning pairs to the output file 🫢 If you don't pick an encoding file, the afm file doesn't get re-encoded, BUT all the unused (unencoded) data still gets pruned 🧹

The program also makes an entry for a dvips-style map file πŸ—ΊοΈ Only if the afm file got re-encoded and the output was written to a file (aka both -encoding and -output were specified) though. No shortcuts here πŸ’€


πŸ‘‘ OPTIONS AND ARGUMENTS πŸ‘‘

  • -help β€” prints a quick description of the syntax πŸ“–
  • -version β€” prints the version number and exits πŸ”’
  • -encoding=<encodingfile> β€” re-encodes to the encoding in <encodingfile> πŸ’–
  • -kpx=<kpxfile> β€” reads extra kerning pairs from <kpxfile> and adds them to the output 🌈
  • -output=<outputfile> β€” writes the result to <outputfile> instead of "stdout" πŸ“
  • <afmfile> β€” the afm file to be re-encoded 🧚
⚠️ -kpx can't be used to override values from the input afm file. afm2afm writes both the old AND the new values to the output, so it's not the move for changing existing numbers πŸ™ˆ

About <kpxfile>: it should hold kerning data in standard afm format. Each kerning pair needs a line that looks like this:

KPX <left_glyph> <right_glyph> <amount>

Any other lines in the <kpxfile> are ignored, so don't stress about them 🫧

Also, you can use either one or two dashes before options, and option names can be shortened to any unique prefix. Lowkey so convenient πŸ¦‹


πŸ’œ AUTHOR πŸ’œ

Marc Penninga <marcpenninga@gmail.com> πŸ‘‘


Copyright (C) 2005-2025 Marc Penninga. ✨


πŸ“œ LICENSE πŸ“œ

This program is free software, so you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. That's 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 too. Look for the file GPLv2.txt πŸ“„


πŸ™ˆ DISCLAIMER πŸ™ˆ

This program is shared in the hope that it'll be useful, but it comes with WITHOUT ANY WARRANTY. That means no implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, not even a little πŸ’€ See the GNU General Public License for more details 🫢


πŸ”’ VERSION πŸ”’

This document describes afm2afm version 20250107 🌈


πŸ•°οΈ RECENT CHANGES πŸ•°οΈ

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

  • 2019-05-20 β€” added the -version option πŸ’…

That's a wrap, bestie! πŸ’– This page came from fontools, last updated 2025-01-07 🧚 Stay iconic and keep those kerning pairs clean πŸ¦‹βœ¨