How to use Linux addftinfo command?
addftinfo is a command line tool which is included in the
groff package (GNU replacement for the `troff` and `nroff` typesetting utilities). It reads a troff font file and adds some additional font-metric information that is used by the groff system and writes to the standard output.
Using some parametric information about the typeface and presumptions for the conventional troff names for characters, the information is added. The heights and depths of characters are the key new information. The font argument is the name of the file specifying the font; if the font ends in I, the font is presumed to be italic. The res and unitwidth arguments should match the equivalent values in the DESC file.
All other choices alter a factor that is used to calculate heights and depths. Each number is in inches/res for a typeface whose point size is unit width, just like the other amounts already present in the font file.
Syntax of addftinfo command
addftinfo [-asc-height n] [-body-depth n] [-body-height n] [-cap-height n] [-comma-depth n] [-desc-depth n] [-fig-height n] [-x-height n] res unitwidth font
How to install addftinfo command?
addftinfo command is included in the groff package. Here is how you can install groff package in different Linux distribution.
apt-get install groff
apk add groff
Arch Linux -
pacman -S groff
yum install groff
dnf install groff
OS X -
brew install groff
apt-get install groff
addftinfo command options
|The height of lowercase letters without ascenders such as x.
|The height of figures (digits).
|The height of characters with ascenders, such as b, d or l.
|The height of characters such as parentheses.
|The height of uppercase letters such as A.
|The depth of a comma.
|The depth of characters with descenders, such as p, q, or y.
|The depth of characters such as parentheses.
--help (or any undefined tag)
|Output version information.
addftinfo makes no attempt to use the specified parameters to guess the unspecified parameters. If a parameter is not specified the default will be used. The defaults are chosen to have the reasonable values for a Times font.
1. Execute addftinfo without any parameter.
addftinfo doesn't exit with an error to infer the unknown parameters from the supplied parameters. A parameter's default value will be used if it is not given. The defaults were selected to have values that are appropriate for a Times typeface. When we try to run a raw addftinfo command without any other arguments or options. It displays the default help message.
usage: addftinfo [-v] [-param value] ... resolution unitwidth font
2. add information to troff font files
addftinfo is used with all parameter options or all other choices to alter a factor that is used to calculate heights and depths. Each number is in inches/res for a typeface whose point size is unitwidth, just like the other amounts already present in the font file.
The following syntax must be used:
addftinfo [-paramOption value] resolution unitwidth font
In this article, we learnt about
addftinfo command which comes with the
groff package, how to install and use it.