Linux command
afm2tfm 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Convert an AFM file to TFM
afm2tfm [font.afm] [font.tfm]
Convert with encoding
afm2tfm [font.afm] -e [encoding.enc] -o [font.tfm]
Convert and generate virtual font
afm2tfm [font.afm] -v [font.vpl] [font.tfm]
Convert with slant transformation
afm2tfm [font.afm] -s [0.167] [font.tfm]
Convert with extended width
afm2tfm [font.afm] -e [1.2] [font.tfm]
说明
afm2tfm converts Adobe Font Metrics (AFM) files to TeX Font Metrics (TFM) format, enabling PostScript Type 1 fonts to be used with TeX and LaTeX typesetting systems. The TFM file contains character dimensions and kerning information that TeX needs for proper text layout. The tool can apply transformations during conversion, including slanting for fake italics and extending for artificially widened fonts. When generating virtual fonts with -v, it creates a VPL (Virtual Property List) file that maps TeX character codes to PostScript glyph names, enabling encoding conversions. This utility is part of the standard TeX distribution and is essential for integrating custom fonts into TeX workflows. The output may require additional processing with vptovf for virtual fonts.
参数
- -e _ratio_
- Extend (widen) the font by the given ratio.
- -s _slant_
- Apply an artificial slant to simulate italics.
- -v _vplfile_
- Generate a virtual property list file.
- -V _vplfile_
- Like -v but include original font encoding.
- -T _encfile_
- Use encoding file for both input and output.
- -p _encfile_
- Use encoding for the PostScript font (input).
- -t _encfile_
- Use encoding for the TeX font (output).
- -u
- Use only specified encoding, ignore AFM encoding.
FAQ
What is the afm2tfm command used for?
afm2tfm converts Adobe Font Metrics (AFM) files to TeX Font Metrics (TFM) format, enabling PostScript Type 1 fonts to be used with TeX and LaTeX typesetting systems. The TFM file contains character dimensions and kerning information that TeX needs for proper text layout. The tool can apply transformations during conversion, including slanting for fake italics and extending for artificially widened fonts. When generating virtual fonts with -v, it creates a VPL (Virtual Property List) file that maps TeX character codes to PostScript glyph names, enabling encoding conversions. This utility is part of the standard TeX distribution and is essential for integrating custom fonts into TeX workflows. The output may require additional processing with vptovf for virtual fonts.
How do I run a basic afm2tfm example?
Run `afm2tfm [font.afm] [font.tfm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -e _ratio_ do in afm2tfm?
Extend (widen) the font by the given ratio.