afm2afm - Man Page

reencode an afm file

Synopsis

afm2afm

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

Description

afm2afm re-encodes an afm file.

Metrics (including kerning data) for characters not present in the chosen encoding are excluded from the output, which resuls in (potentially much) smaller files.

Additional kerning pairs can be added to the output file. If you don't specify an encoding file, the afm file isn't re-encoded; however, all unused (unencoded) data is still pruned.

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., if both the -encoding and -output options were specified).

Options and Arguments

-help

Print a short description of the syntax

-version

Print version number and exit

-encoding=<encodingfile>

Re-encode to the enconding in <encodingfile>

-kpx=<kpxfile>

Read additional kerning pairs from <kpxfile> and add these to the output. This option cannot be used to override values from the input afm file, since afm2afm will write both old and new values to the output!

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.

-output=<outputfile>

Write the result to <outputfile> instead of stdout.

<afmfile>

The afm file to be re-encoded.

You may use either one or two dashes before options, and option names may be shortened to a unique prefix.

Author

Marc Penninga <marcpenninga@gmail.com>

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.

Version

This document describes afm2afm version 20230201.

Recent Changes

(See the source code for the rest of the story.)

2019-05-20

Added the -version option.

Info

2023-02-01 fontools Marc Penninga