[tex-k] buglet in gsftopk(k) 1.19
Stefan Ulrich
stefan.ulrich@elexir.de
Thu, 22 Nov 2001 00:50:28 -0500
[ I had some problems with our mail relay and it seemed that
this email didn't reach the list, so I'm resending it -
hopefully nobody will get it twice ... ]
There's a small bug in gsftopk causing `gsftopk --debug=x' to
always display the `Usage' string; e.g.:
$ gsftopk --debug 8 --test cmr10
Usage: gsftopk [OPTION] FONT DPI
Translate the PostScript Type 1 font FONT to PK bitmap format at DPI dpi.
-t, --test check for presence of font in .map file.
--mapline=LINE use LINE as the line from the .map file.
--mapfile=FILE use FILE as a .map file; default psfonts.map.
-i GS, --interpreter=GS use GS as Ghostscript interpreter.
--dosnames short pk filename (cmr10.pk instead of cmr10.600pk).
-q, --quiet don't print progress information to standard output.
--debug=NUM set debugging flags.
-h, --help print this message and exit.
-v, --version print version number and exit.
The reason is a missing `break' statement in gsftopk.c:
--- gsftopk.c Sun Nov 18 17:36:35 2001
+++ gsftopk-new.c Sun Nov 18 17:35:57 2001
@@ -2146,6 +2146,7 @@
#ifdef KPATHSEA
case OPT_DBG:
kpathsea_debug |= atoi(arg);
+ break;
#endif
case 'h':
#ifndef KPATHSEA
(version is gsftopk(k) 1.19 from the current teTeX-beta-20011103).
Another observation: By default, gsftopk uses kpathsearch to
search for the map-file; however, when the `--mapfile' option is
used, kpathsearch is *not* used:
$ gsftopk ptmr8r 600
[ normal output of PK generation ]
$ gsftopk --mapfile=psfonts.map ptmr8r 600
psfonts.map: No such file or directory
$ kpsewhich psfonts.map
/usr/share/texmf/dvips/base/psfonts.map
$ gsftopk --mapfile=/usr/share/texmf/dvips/base/psfonts.map ptmr8r 600
[ normal output of PK generation ]
This is documented in gsftopk.1, but wouldn't it be more consistent
to use kpathsearch in both cases? E.g.:
@@ -2296,7 +2297,14 @@
Boolean font_found;
if (mapfile != NULL) {
- config_file = fopen(mapfile, FOPEN_R_MODE);
+#ifndef KPATHSEA
+ config_file = search(CONFIGPATH, "TEXCONFIG",
+ mapfile);
+#else
+ config_file = kpse_open_file(mapfile,
+ kpse_dvips_config_format);
+#endif
+
if (config_file == NULL) {
perror(mapfile);
exit(1);
Best regards,
Stefan