#976159 xfonts-utils: bdftopcf(1) documentation of some flags is misleading

Package:
xfonts-utils
Source:
xfonts-utils
Description:
X Window System font utility programs
Submitter:
Reuben Thomas
Date:
2020-11-30 18:45:04 UTC
Severity:
normal
#976159#5
Date:
2020-11-30 18:41:52 UTC
From:
To:
The -t and -i flags for bdftopcf are documented thus:

       -t      When this option is specified, bdftopcf will convert fonts into "terminal" fonts when possible.  A terminal
               font has each glyph image padded to the same size; the X server can usually render these types of fonts
               more quickly.

       -i      This option inhibits the normal computation of ink metrics.  When a font has glyph images which do not fill
               the bitmap image (i.e., the "on" pixels don't extend to the edges of the metrics) bdftopcf computes the
               actual ink metrics and places them in the .pcf file; the -t option inhibits this behaviour.

However, looking at the source code bdftopcf.c, they are both parsed, but
ignored. I suggest changing the man page to read:

       -t, -i  Ignored.

Further, it may be worth patching the code, as currently it reads:

            case 't':          /* attempt to make terminal fonts if possible */
                if (argv[0][2] != '\0')
                    goto usage;
                break;

            case 'i':          /* inhibit ink metric computation */
                if (argv[0][2] != '\0')
                    goto usage;
                break;

It might make sense to add a “TODO:” at the start of each comment.

Further investigation might reveal that the flags used to do something, but
the above changes would at least help reduce confusion without prejudice to
(unlikely?) future improvements.