1 | .TH AFM 7 "19 August 1992" "Adobe Systems" |
---|
2 | \" Copyright (c) 1985,1987,1992 Adobe Systems Incorporated. All Rights Reserved. |
---|
3 | \" ATTN GOVERNMENT END USERS: See notice of rights in file XPSLIBDIRX/Notice |
---|
4 | \" RCSID: $Header: /afs/dev.mit.edu/source/repository/third/transcript/man/afm.7p,v 1.2 1996-10-14 05:09:39 ghudson Exp $ |
---|
5 | .ds PS P\s-2OST\s+2S\s-2CRIPT\s+2 |
---|
6 | .ds TS T\s-2RAN\s+2S\s-2CRIPT\s+2 |
---|
7 | .SH NAME |
---|
8 | AFM \- Adobe font metrics file format |
---|
9 | .SH DESCRIPTION |
---|
10 | AFM files are a standard interchange format for communicating |
---|
11 | Type 1 font metric information to people and programs. |
---|
12 | The format is ASCII encoded (for both human and machine |
---|
13 | readability), machine independent, extensible, simple to |
---|
14 | parse, and simple to generate. |
---|
15 | AFM files are available for all of Adobe Systems' |
---|
16 | \*(PS font programs. |
---|
17 | .PP |
---|
18 | While somewhat verbose, the format is intended to be easily |
---|
19 | parsed, with the ability for applications to quickly |
---|
20 | skip over items that are not of interest. It should be |
---|
21 | possible to create simple line-oriented |
---|
22 | parsing programs, or tools based on |
---|
23 | awk(1) |
---|
24 | or |
---|
25 | sed(1). |
---|
26 | .PP |
---|
27 | Each AFM file contains the information for only one font |
---|
28 | face. The file begins with global information about the |
---|
29 | font, followed by sections with character metrics. The file |
---|
30 | format is line-oriented, each line beginning with a property |
---|
31 | (key) name, followed by the values for that property. The |
---|
32 | general idea is to give key-value tuples. |
---|
33 | .PP |
---|
34 | The format is: |
---|
35 | .RS |
---|
36 | Key [value value ...] |
---|
37 | .RE |
---|
38 | Key names are case-sensitive. All keys beginning with a |
---|
39 | capital letter are reserved by Adobe Systems. |
---|
40 | The standard keys are detailed below, but other keys should |
---|
41 | be allowed and safely ignored by programs not recognizing |
---|
42 | them. All standard keys begin with a capital letter. |
---|
43 | User-defined nonstandard entries should begin with a lowercase letter. |
---|
44 | .PP |
---|
45 | The file begins with the line: |
---|
46 | .RS |
---|
47 | StartFontMetrics |
---|
48 | .I version |
---|
49 | .RE |
---|
50 | The version described here is 1.0. |
---|
51 | The last line of the file is: |
---|
52 | .RS |
---|
53 | EndFontMetrics |
---|
54 | .RE |
---|
55 | .PP |
---|
56 | The following global font keys are defined. |
---|
57 | Many of them are defined as in the top level or |
---|
58 | FontInfo subdictionary of a \*(PS font dictionary. |
---|
59 | All numeric values are in the |
---|
60 | (1000 unit per em) character coordinate system. |
---|
61 | .TP 1.5i |
---|
62 | .BI FontName " string" |
---|
63 | the name of the font as presented to the |
---|
64 | findfont |
---|
65 | operator. |
---|
66 | .TP |
---|
67 | .BI FullName " string" |
---|
68 | the "print name" of the font. |
---|
69 | .TP |
---|
70 | .BI FamilyName " string" |
---|
71 | the font family name. |
---|
72 | .TP |
---|
73 | .BI Weight " string" |
---|
74 | the weight of the font. |
---|
75 | .TP |
---|
76 | .BI ItalicAngle " real" |
---|
77 | the angle (in degrees counter-clockwise |
---|
78 | from the vertical) of the dominant staffs of the font. |
---|
79 | .TP |
---|
80 | .BI IsFixedPitch " boolean" |
---|
81 | indicates monospaced (typewriter) fonts. |
---|
82 | .TP |
---|
83 | .BI FontBBox " llx lly urx ury" |
---|
84 | four integers giving the lower left |
---|
85 | corner and the upper right corner of the font bounding box. |
---|
86 | .B Note: |
---|
87 | the bounding box given here is that of the flattened |
---|
88 | paths, not of the Bezier curve descriptions. |
---|
89 | .TP |
---|
90 | .BI UnderlinePosition " number" |
---|
91 | the position (from the baseline) to place |
---|
92 | an underline. |
---|
93 | .TP |
---|
94 | .BI UnderlineThickness " number" |
---|
95 | thickness of an underline stroke. |
---|
96 | .TP |
---|
97 | .BI Version " string" |
---|
98 | font version identifier. |
---|
99 | .TP |
---|
100 | .BI Notice " string" |
---|
101 | font name trademark or copyright notice. |
---|
102 | .TP |
---|
103 | .BI Comment " string" |
---|
104 | comment strings may be ignored. |
---|
105 | .TP |
---|
106 | .BI EncodingScheme " string" |
---|
107 | a string indicating the default encoding |
---|
108 | vector for this font. The most common one is |
---|
109 | AdobeStandardEncoding. |
---|
110 | Special fonts may simply state |
---|
111 | "FontSpecific". In the future, other schemes may be |
---|
112 | employed. |
---|
113 | .TP |
---|
114 | .BI CapHeight " number" |
---|
115 | top of capital H. |
---|
116 | .TP |
---|
117 | .BI XHeight " number" |
---|
118 | top of lower case x. |
---|
119 | .TP |
---|
120 | .BI Ascender " number" |
---|
121 | top of lower case d. |
---|
122 | .TP |
---|
123 | .BI Descender " number" |
---|
124 | bottom of lower case p. |
---|
125 | .PP |
---|
126 | The individual character metrics are surrounded with the lines |
---|
127 | StartCharMetrics and EndCharMetrics and consist of a list of |
---|
128 | keys and values separated by semicolons. The characters are |
---|
129 | sorted (numeric ascending) by character code. Unencoded characters |
---|
130 | follow all the encoded ones and are distinguished by |
---|
131 | having character code \-1. Each character gets one line |
---|
132 | of description. Standard keys are: |
---|
133 | .TP 1.5i |
---|
134 | .BI C " number" |
---|
135 | decimal value of default |
---|
136 | character code (\-1 if unencoded). |
---|
137 | .TP |
---|
138 | .BI WX " width-x" |
---|
139 | character width in \fIx\fP (y is 0). |
---|
140 | .TP |
---|
141 | .BI W " width-x width-y" |
---|
142 | character width vector. |
---|
143 | .TP |
---|
144 | .BI N " name" |
---|
145 | character name. |
---|
146 | .TP |
---|
147 | .BI B " llx lly urx ury" |
---|
148 | the character bounding box. |
---|
149 | .TP |
---|
150 | .BI L " successor ligature" |
---|
151 | a ligature sequence; The current |
---|
152 | character may join with the character named \fIsuccessor\fP to |
---|
153 | form the character named \fIligature\fP. Note that characters |
---|
154 | may have more than one such entry. |
---|
155 | .PP |
---|
156 | Most western language fonts have WX rather than W entries. |
---|
157 | Note that keys are one letter for brevity. Here, too, |
---|
158 | the set is extensible, with unknown entries ignored. (This leaves room for |
---|
159 | the addition of new information, for example.) |
---|
160 | A future revision of this format will have a specification for |
---|
161 | kerning information. |
---|
162 | .SH FILES |
---|
163 | .TP 1.5i |
---|
164 | XPSLIBDIRX/*.afm |
---|
165 | AFM files in the \*(TS distribution |
---|
166 | .SH "SEE ALSO" |
---|
167 | transcript(1), psfonts(1), awk(1), sed(1) |
---|
168 | .SH AUTHOR |
---|
169 | Adobe Systems Incorporated |
---|
170 | .SH NOTES |
---|
171 | \*(PS is a registered trademark of Adobe Systems Incorporated. |
---|
172 | .br |
---|
173 | \*(TS is a trademark of Adobe Systems Incorporated. |
---|