texlive[53612] Build/source/texk/kpathsea/win32: mktextfm for

commits+kakuto at tug.org commits+kakuto at tug.org
Fri Jan 31 02:20:05 CET 2020


Revision: 53612
          http://tug.org/svn/texlive?view=revision&revision=53612
Author:   kakuto
Date:     2020-01-31 02:20:04 +0100 (Fri, 31 Jan 2020)
Log Message:
-----------
mktextfm for Windows: if envvar MF_MODE_EXTRA_INFO is set, include the codingscheme etc. in the .tfm

Modified Paths:
--------------
    trunk/Build/source/texk/kpathsea/win32/ChangeLog
    trunk/Build/source/texk/kpathsea/win32/mktextfm.c

Modified: trunk/Build/source/texk/kpathsea/win32/ChangeLog
===================================================================
--- trunk/Build/source/texk/kpathsea/win32/ChangeLog	2020-01-31 00:55:28 UTC (rev 53611)
+++ trunk/Build/source/texk/kpathsea/win32/ChangeLog	2020-01-31 01:20:04 UTC (rev 53612)
@@ -1,3 +1,9 @@
+2020-01-31  Akira Kakuto  <kakuto at w32tex.org>
+
+	* mktextfm.c: if envvar MF_MODE_EXTRA_INFO is set, include the
+	codingscheme and other Xerox-world info in the .tfm; works
+	with modes.mf 4.0 and later.
+
 2019-02-20  Akira Kakuto  <kakuto at w32tex.org>
 
 	* mktexpk.c: Remove unused definitions.

Modified: trunk/Build/source/texk/kpathsea/win32/mktextfm.c
===================================================================
--- trunk/Build/source/texk/kpathsea/win32/mktextfm.c	2020-01-31 00:55:28 UTC (rev 53611)
+++ trunk/Build/source/texk/kpathsea/win32/mktextfm.c	2020-01-31 01:20:04 UTC (rev 53612)
@@ -1,6 +1,6 @@
 /* mktextfm.c
 
-   Copyright 2000, 2019 Akira Kakuto.
+   Copyright 2000, 2020 Akira Kakuto.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -39,7 +39,7 @@
 static void
 version (void)
 {
-  fprintf (stderr, "%s, (C version 1.5 --ak 2009-2012)\n", progname);
+  fprintf (stderr, "%s, (C version 1.6 --ak 2009-2020)\n", progname);
   fprintf (stderr, KPSEVERSION WEB2CVERSION "\n");
   return;
 }
@@ -91,6 +91,7 @@
 
   char texbindir[TBUF];
   char fullbin[TBUF];
+  char *extra_info;
 
   kpse_set_program_name (av[0], NULL);
   progname = kpse_program_name;
@@ -167,7 +168,7 @@
       return (100);
     }
     issetdest = 1;
-    if (strlen(av[2]) > TBUF - 1 || strlen(av[3]) > TBUF - 1) {
+    if (strlen(av[2]) > TBUF - 1 || strlen(av[3]) > TBUF - 150) {
       fprintf (stderr, "Too long a string.\n");
       return (100);
     }
@@ -180,7 +181,7 @@
         *p = '/';
     }
   } else {
-    if (strlen(av[1]) > TBUF - 1) {
+    if (strlen(av[1]) > TBUF - 150) {
       fprintf (stderr, "Too long a string.\n");
       return (100);
     }
@@ -302,8 +303,21 @@
   _dup2 (fileno (fnul), fileno (stdin));
 
 /* METAFONT command line */
+/*
+The idea here is to provide a programmatic way to get the
+codingscheme and other so-called Xerox-world information into the
+tfm: if the envvar MF_MODE_EXTRA_INFO is set, then modes.mf (as of
+the 3.9 release in January 2020) will arrange for that.  We do not
+do this by default because Knuth objected.
+*/
+  extra_info = getenv("MF_MODE_EXTRA_INFO");
   strcpy (cmd, "--progname=mf --base=mf ");
-  strcat (cmd, "\\mode:=ljfour; \\mag:=1; nonstopmode; input ");
+  strcat (cmd, "\\mode:=ljfour; mag:=1; ");
+  if (extra_info) {
+    strcat(cmd, "if known mode_include_extra_info_available: ");
+    strcat(cmd, "mode_include_extra_info fi; ");
+  }
+  strcat (cmd, "nonstopmode; input ");
   strcat (cmd, fontname);
   strcat (cmd, ";");
 



More information about the tex-live-commits mailing list.