LinuxCommandLibrary

afmtodit

Convert audio files to text data

SYNOPSIS

afmtodit [ -adgmn ] [ -D directory ] [ -k kerns ] [ -p path ] [ -t font ] [ file ... ]

PARAMETERS

-a
    Add ligature commands for all ligatures found in the .afm file.

-d
    Output character widths in device units (default is thousands of units).

-g
    Do not add kern commands for kerning pairs found in the .afm file.

-m
    Add charwd commands for all characters present in the .afm file.

-n
    Do not include comment commands in the output font description file.

-D directory
    Specify the directory where the groff font description file should be placed (e.g., devps).

-k kerns
    Specify the maximum number of kerns to be output (default is 2000).

-p path
    Specify the PostScript font name to be included in the output (default is the base name of the .afm file).

-t font
    Specify the groff font name for the output description file (default is the base name of the .afm file).

file ...
    One or more input .afm files to be converted.

DESCRIPTION

afmtodit is a specialized utility program designed to convert Adobe Font Metrics (.afm) files into a format that can be understood and utilized by ditroff (device independent troff), specifically within the groff typesetting system.

Adobe Font Metrics files contain crucial information about Type 1 fonts, including character widths, kerning pairs, ligatures, and other typographic details. groff requires this metric data to accurately render text and ensure correct character spacing and positioning when using these fonts. By processing an .afm file, afmtodit generates a groff font description file, which is typically stored in a groff font directory (e.g., /usr/share/groff/font/devps).

This conversion is essential because groff's internal font handling mechanism operates with a specific metric format, distinct from the raw .afm data. afmtodit enables users to integrate new PostScript Type 1 fonts into their groff documents, ensuring precise typesetting and high-quality output for various devices, most commonly PostScript.

CAVEATS

afmtodit primarily supports PostScript Type 1 fonts through their associated .afm files. It does not directly handle TrueType (TTF) or OpenType (OTF) fonts unless they also come with a corresponding .afm file.

The generated font description files must be correctly placed within groff's font search paths for groff to locate and use them. Incorrect placement will prevent groff from finding the font, leading to errors or fallback to a default font.

HISTORY

afmtodit is an integral part of the groff (GNU troff) package, which is the GNU project's modern and extended re-implementation of the classic AT&T troff document formatting system. Developed to provide enhanced functionality and portability, groff needed a robust way to incorporate external fonts, particularly the widely used PostScript Type 1 fonts.

The development of afmtodit was crucial to enable groff to utilize these fonts by translating their standard Adobe Font Metrics (.afm) into groff's internal font description format. This facilitated the integration of a vast array of commercially available and open-source Type 1 fonts into the groff typesetting workflow, significantly improving the quality and flexibility of document production, especially for PostScript output devices.

SEE ALSO

groff(1), afm(5), troff(1), grops(1), font(5)

Copied to clipboard