What is the AFM file format?
The .afm file belongs to the font file category. The content of .afm files are font metrics created by Adobe. .afm files contain all the parameters defining the character widths, kerning pairs, and bounding boxes of individual glyphs, expressed in a plain-text format based on the PostScript typesetting system. The content of an .afm file includes a header section and a character metrics data section. This last section stores all measurements for every glyph in the font - width, bounding box, and optional ligature information - enabling layout applications to calculate glyph widths, kerning, and line spacing without needing to render the font itself.
.afm files accompany Type 1 PostScript fonts (.pfa / .pfb) and are identified by the keyword StartFontMetrics on their very first line, followed by the specification version number (for example StartFontMetrics 4.1). Adobe published the final AFM 4.1 specification in October 1998. On Windows, the binary equivalent is the .pfm (Printer Font Metrics) file.
With dedicated applications you can convert fonts from .afm files to other popular formats, as well as generate new .afm files based on various font standards. Many converters work online, so the user does not have to install any software - only upload the selected .afm file to a conversion website. Because .afm is plain ASCII text, it can also be opened and inspected in any text editor. OpenType fonts carry equivalent metrics internally, making standalone .afm files rare outside PostScript and legacy prepress workflows.
Security & safety
RISK: LOWPlain ASCII text with no executable code. Zero known security risk.
Format details
in a nutshell- ACFM - Adobe Composite Font Metrics - A variant of AFM for composite (multi-byte) fonts; uses same file structure but different section keywords.
Programs that open AFM files
Technical details
deep spec| File encoding | Plain ASCII text; ISO Latin-1 permitted for comments |
| MIME type | application/x-font-afm |
| Magic identifier | First line always `StartFontMetrics <version>` (e.g. `StartFontMetrics 4.1`) |
| Final specification version | AFM 4.1, published by Adobe on October 7, 1998 |
| Typical file size | 5 KB - 200 KB (larger for fonts with many kerning pairs) |
| Structure sections | GlobalFontInfo header; CharMetrics (per-glyph width, bounding box, ligatures); KernPairs; TrackKern; Composites |
| Width unit | 1/1000 of the em (point size); e.g. `WX 722` means the glyph occupies 72.2% of the point size |
| Character metrics syntax | `C <code> ; WX <width> ; N <name> ; B <llx lly urx ury> ;` |
| File terminator | Last line must be `EndFontMetrics` |
| Companion formats | `.pfb` / `.pfa` (Type 1 outlines); `.pfm` (Windows binary metrics equivalent) |
| Key-value convention | Adobe-reserved keys begin with a capital letter; lowercase keys are user-defined |
| TeX utility | `afmtopl` (TeX Live) converts `.afm` to TeX property-list `.pl` format |
| Superseded by | OpenType (`.otf`) embeds equivalent metrics internally; standalone `.afm` files are now rare outside legacy PostScript workflows |
| Released | 1985 (with PostScript Type 1 fonts) |
| Latest version | AFM Specification Version 4.1 (October 7, 1998) |
| Open standard | Yes · royalty-free |
| Specification | adobe-type-tools.github.io |
AFM conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about AFM files.