afmtodit - Linux


afmtodit converts a plain ASCII AFM (Adobe Font Metrics) file to a DIT (Digital Imaging Technology) file. DIT files are used for storing font metric information for use by printers and other devices.


afmtodit [-x] [-r] [-y] [-d destination_dir] [-i input_file]


  • -x: Ignore errors in AFM file.
  • -r: Recursively convert AFM files in subdirectories.
  • -y: Overwrite existing DIT files without prompting.
  • -d destination_dir: Specify the destination directory for the generated DIT files. Default: current directory.
  • -i input_file: Specify the path to the input AFM file.


Simple conversion of an AFM file:

afmtodit input.afm

Recursive conversion of all AFM files in a directory:

afmtodit -r /path/to/directory

Conversion with specified destination directory:

afmtodit -d /output/directory input.afm

Common Issues

  • Missing input file: Ensure the specified input AFM file exists and is accessible.
  • File permissions: Ensure you have write permissions in the destination directory.
  • Invalid AFM file: Check the AFM file for errors or incorrect formatting.


Convert AFM files for use with a printer:

afmtodit -i font.afm | lpr

Convert AFM files for use with a TrueType converter:

afmtodit -i font.afm | ttf2dit

Related Commands

  • afm2dit: Similar tool for converting AFM files to DIT files with additional options.
  • ditview: Tool for viewing and editing DIT files.