| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" |
| 56 |
.\" Required to disable full justification in groff 1.23.0. |
| 57 |
.if n .ds AD l |
| 58 |
.\" ======================================================================== |
| 59 |
.\" |
| 60 |
.IX Title "AFM2AFM 1" |
| 61 |
.TH AFM2AFM 1 2026-04-22 fontools "Marc Penninga" |
| 62 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 63 |
.\" way too many mistakes in technical documents. |
| 64 |
.if n .ad l |
| 65 |
.nh |
| 66 |
.SH NAME |
| 67 |
afm2afm \- reencode an afm file |
| 68 |
.SH SYNOPSIS |
| 69 |
.IX Header "SYNOPSIS" |
| 70 |
.IP \fBafm2afm\fR 8 |
| 71 |
.IX Item "afm2afm" |
| 72 |
[\fB\-help\fR] |
| 73 |
[\fB\-version\fR] |
| 74 |
[\fB\-encoding\fR=\fI<encodingfile>\fR] |
| 75 |
[\fB\-kpx\fR=\fI<kpxfile>\fR] |
| 76 |
[\fB\-output\fR=\fI<outputfile>\fR] |
| 77 |
\&\fB<afmfile>\fR |
| 78 |
.SH DESCRIPTION |
| 79 |
.IX Header "DESCRIPTION" |
| 80 |
\&\fBafm2afm\fR re\-encodes an \fIafm\fR file. |
| 81 |
.PP |
| 82 |
Metrics (including kerning data) for characters not present in the |
| 83 |
chosen encoding are excluded from the output, which resuls in |
| 84 |
(potentially much) smaller files. |
| 85 |
.PP |
| 86 |
Additional kerning pairs can be added to the output file. |
| 87 |
If you don\*(Aqt specify an encoding file, |
| 88 |
the \fIafm\fR file isn\*(Aqt re\-encoded; |
| 89 |
however, all unused (unencoded) data is still pruned. |
| 90 |
.PP |
| 91 |
The program also generates an entry for a \fIdvips\fR\-style map file, |
| 92 |
but only if the \fIafm\fR file has been re\-encoded and |
| 93 |
the output was written to file |
| 94 |
(i.e., if both the \fI\-encoding\fR and \fI\-output\fR options were specified). |
| 95 |
.SH "OPTIONS AND ARGUMENTS" |
| 96 |
.IX Header "OPTIONS AND ARGUMENTS" |
| 97 |
.IP \fB\-help\fR 4 |
| 98 |
.IX Item "-help" |
| 99 |
Print a short description of the syntax |
| 100 |
.IP \fB\-version\fR 4 |
| 101 |
.IX Item "-version" |
| 102 |
Print version number and exit |
| 103 |
.IP \fB\-encoding\fR=\fI<encodingfile>\fR 4 |
| 104 |
.IX Item "-encoding=<encodingfile>" |
| 105 |
Re\-encode to the enconding in \fI<encodingfile>\fR |
| 106 |
.IP \fB\-kpx\fR=\fI<kpxfile>\fR 4 |
| 107 |
.IX Item "-kpx=<kpxfile>" |
| 108 |
Read additional kerning pairs from \fI<kpxfile>\fR and add these to the output. |
| 109 |
This option cannot be used to override values from the input \fIafm\fR file, |
| 110 |
since \fBafm2afm\fR will write both old and new values to the output! |
| 111 |
.Sp |
| 112 |
The \fI<kpxfile>\fR should contain kerning data in standard \fIafm\fR format, |
| 113 |
i.e. for each kerning pair there should be a line |
| 114 |
.Sp |
| 115 |
.Vb 1 |
| 116 |
\& KPX <left_glyph> <right_glyph> <amount> |
| 117 |
.Ve |
| 118 |
.Sp |
| 119 |
All other lines in the \fI<kpxfile>\fR are ignored. |
| 120 |
.IP \fB\-output\fR=\fI<outputfile>\fR 4 |
| 121 |
.IX Item "-output=<outputfile>" |
| 122 |
Write the result to \fI<outputfile>\fR instead of \f(CW\*(C`stdout\*(C'\fR. |
| 123 |
.IP \fB<afmfile>\fR 4 |
| 124 |
.IX Item "<afmfile>" |
| 125 |
The \fIafm\fR file to be re\-encoded. |
| 126 |
.PP |
| 127 |
You may use either one or two dashes before options, |
| 128 |
and option names may be shortened to a unique prefix. |
| 129 |
.SH AUTHOR |
| 130 |
.IX Header "AUTHOR" |
| 131 |
Marc Penninga <[email protected]> |
| 132 |
.SH COPYRIGHT |
| 133 |
.IX Header "COPYRIGHT" |
| 134 |
Copyright (C) 2005\-2026 Marc Penninga. |
| 135 |
.SH LICENSE |
| 136 |
.IX Header "LICENSE" |
| 137 |
This program is free software; you can redistribute it and/or modify |
| 138 |
it under the terms of the GNU General Public License as published |
| 139 |
by the Free Software Foundation, either version 2 of the License, |
| 140 |
or (at your option) any later version. |
| 141 |
A copy of the GNU General Public License is included with \fBafm2afm\fR; |
| 142 |
see the file \fIGPLv2.txt\fR. |
| 143 |
.SH DISCLAIMER |
| 144 |
.IX Header "DISCLAIMER" |
| 145 |
This program is distributed in the hope that it will be useful, |
| 146 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 147 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 148 |
See the GNU General Public License for more details. |
| 149 |
.SH VERSION |
| 150 |
.IX Header "VERSION" |
| 151 |
This document describes \fBafm2afm\fR version 20260422. |
| 152 |
.SH "RECENT CHANGES" |
| 153 |
.IX Header "RECENT CHANGES" |
| 154 |
(See the source code for the rest of the story.) |
| 155 |
.IP \fI2019\-05\-20\fR 12 |
| 156 |
.IX Item "2019-05-20" |
| 157 |
Added the \fI\-version\fR option. |