1AFMTODIT(1)                 General Commands Manual                AFMTODIT(1)
2
3
4

NAME

6       afmtodit - create font files for use with groff -Tps and -Tpdf
7

SYNOPSIS

9       afmtodit [-ckmnsx] [-a n] [-d desc-file] [-e enc-file] [-f internal-
10                name] [-i n] [-o output-file] afm-file map-file font
11
12       afmtodit -v
13

DESCRIPTION

15       afmtodit creates a font file for use with  groff,  grops,  and  gropdf.
16       afmtodit  is written in Perl; you must have Perl version 5.004 or newer
17       installed in order to run afmtodit.
18
19       afm-file is the AFM (Adobe Font Metric) file for the font.
20
21       map-file is a file that says which groff character names map onto  each
22       PostScript character name; this file should contain a sequence of lines
23       of the form
24              ps-char groff-char
25       where ps-char is the PostScript name of the character and groff-char is
26       the  groff name of the character (as used in the groff font file).  The
27       same ps-char can occur multiple times in the file; each groff-char must
28       occur  at  most  once.  Lines starting with ‘#’ and blank lines are ig‐
29       nored.  If the file  isn't  found  in  the  current  directory,  it  is
30       searched for in the devps/generate subdirectory of the default font di‐
31       rectory.
32
33       If a PostScript character is not mentioned in map-file, and  a  generic
34       groff  glyph  name  can't  be  deduced using the Adobe Glyph List (AGL,
35       built into afmtodit), then afmtodit puts the PostScript character  into
36       the  groff font file as an unnamed character which can only be accessed
37       by the ‘\N’ escape sequence in a roff document.  In particular, this is
38       true  for  glyph  variants named in the form “foo.bar”; all glyph names
39       containing one or more periods are mapped to unnamed entities.  If  op‐
40       tion  -e  is not specified, the encoding defined in the AFM file (i.e.,
41       entries with non-negative character codes) is used.  Refer  to  section
42       “Using  Symbols”  in  Groff: The GNU Implementation of troff, the groff
43       Texinfo manual, which describes how groff glyph names are constructed.
44
45       Characters not encoded in the AFM file (i.e., entries which  have  ‘-1’
46       as the character code) are still available in groff; they get glyph in‐
47       dex values greater than 255 (or greater than the biggest character code
48       used  in the AFM file in the unlikely case that it is greater than 255)
49       in the groff font file.  Glyph indices of  unencoded  characters  don't
50       have a specific order; it is best to access them with glyph names only.
51
52       The groff font file will be output to a file called font, unless the -o
53       option is used.
54
55       If there is a downloadable font file for the font, it may be listed  in
56       the file /usr/share/groff/1.22.4/font/devps/download; see grops(1).
57
58       If  the  -i  option  is  used,  afmtodit will automatically generate an
59       italic correction, a left italic correction and a subscript  correction
60       for  each  character (the significance of these parameters is explained
61       in groff_font(5)); these parameters may  be  specified  for  individual
62       characters by adding to the afm-file lines of the form:
63              italicCorrection ps-char n
64              leftItalicCorrection ps-char n
65              subscriptCorrection ps-char n
66       where ps-char is the PostScript name of the character, and n is the de‐
67       sired value of the corresponding parameter in  thousandths  of  an  em.
68       These  parameters  are  normally  needed  only  for italic (or oblique)
69       fonts.
70

OPTIONS

72       Whitespace is permitted between a command-line option and its argument.
73
74       -an    Use n as the slant parameter in the font file; this is  used  by
75              groff  in  the positioning of accents.  By default afmtodit uses
76              the negative of the ItalicAngle specified in the AFM file;  with
77              true  italic fonts it is sometimes desirable to use a slant that
78              is less than this.  If you find that characters from  an  italic
79              font  have  accents  placed too far to the right over them, then
80              use the -a option to give the font a smaller slant.
81
82       -c     Include comments in the font file in order to identify the Post‐
83              Script font.
84
85       -ddesc-file
86              The device description file is desc-file rather than the default
87              DESC.  If not found in the current directory, the  devps  subdi‐
88              rectory  of the default font directory is searched (this is true
89              for both the default device description file and  a  file  given
90              with option -d).
91
92       -eenc-file
93              The  PostScript font should be reencoded to use the encoding de‐
94              scribed in enc-file.  The format of  enc-file  is  described  in
95              grops(1).  If not found in the current directory, the devps sub‐
96              directory of the default font directory is searched.
97
98       -fname The internal name of the groff font is set to name.
99
100       -in    Generate an italic correction for each  character  so  that  the
101              character's  width  plus  the  character's  italic correction is
102              equal to n thousandths of an em plus the  amount  by  which  the
103              right  edge  of  the character's bounding box is to the right of
104              the character's origin.  If this  would  result  in  a  negative
105              italic correction, use a zero italic correction instead.
106
107              Also generate a subscript correction equal to the product of the
108              tangent of the slant of the font and four fifths of the x-height
109              of  the  font.   If  this would result in a subscript correction
110              greater than the italic correction, use a  subscript  correction
111              equal to the italic correction instead.
112
113              Also  generate a left italic correction for each character equal
114              to n thousandths of an em plus the amount by which the left edge
115              of  the  character's  bounding box is to the left of the charac‐
116              ter's origin.  The left italic correction may be negative unless
117              option -m is given.
118
119              This  option  is  normally  needed only with italic (or oblique)
120              fonts.  The font files distributed with groff were created using
121              an option of -i50 for italic fonts.
122
123       -ooutput-file
124              The output file is output-file instead of font.
125
126       -k     Omit  any  kerning  data from the groff font; use only for mono‐
127              spaced (constant-width) fonts.
128
129       -m     Prevent negative left  italic  correction  values.   Roman  font
130              files distributed with groff were created with -i0 -m to improve
131              spacing with eqn(1).
132
133       -n     Don't output a ligatures command for this font; use  with  mono‐
134              spaced (constant-width) fonts.
135
136       -s     The  font  is  special.  The effect of this option is to add the
137              special command to the font file.
138
139       -v     Print version and exit.
140
141       -x     Don't use the built-in Adobe Glyph List.
142

FILES

144       /usr/share/groff/1.22.4/font/devps/DESC
145              Device description file.
146
147       /usr/share/groff/1.22.4/font/devps/F
148              Font description file for font F.
149
150       /usr/share/groff/1.22.4/font/devps/download
151              List of downloadable fonts.
152
153       /usr/share/groff/1.22.4/font/devps/text.enc
154              Encoding used for text fonts.
155
156       /usr/share/groff/1.22.4/font/devps/generate/textmap
157              Standard mapping.
158

SEE ALSO

160       Groff: The GNU Implementation of troff, by Trent A. Fisher  and  Werner
161       Lemberg,  is  the primary groff manual.  Section “Using Symbols” may be
162       of particular  note.   You  can  browse  it  interactively  with  “info
163       '(groff)Using Symbols'”.
164
165       groff(1), gropdf(1), grops(1), groff_font(5), perl(1)
166
167
168
169groff 1.22.4                     17 March 2021                     AFMTODIT(1)
Impressum