summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-01-31 01:20:04 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-01-31 01:20:04 +0000
commite6bfc6c59201e29e38007c4583aba8ebdc464944 (patch)
treebd392db48f9af97ab8fa3418fac7d573a67e8abd /Build
parentaba93c8e680a0b80dc55c198deb85a642576089e (diff)
mktextfm for Windows: if envvar MF_MODE_EXTRA_INFO is set, include the codingscheme etc. in the .tfm
git-svn-id: svn://tug.org/texlive/trunk@53612 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/kpathsea/win32/ChangeLog6
-rw-r--r--Build/source/texk/kpathsea/win32/mktextfm.c24
2 files changed, 25 insertions, 5 deletions
diff --git a/Build/source/texk/kpathsea/win32/ChangeLog b/Build/source/texk/kpathsea/win32/ChangeLog
index 64e6311fc86..5a30293bb9b 100644
--- a/Build/source/texk/kpathsea/win32/ChangeLog
+++ b/Build/source/texk/kpathsea/win32/ChangeLog
@@ -1,3 +1,9 @@
+2020-01-31 Akira Kakuto <kakuto@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@w32tex.org>
* mktexpk.c: Remove unused definitions.
diff --git a/Build/source/texk/kpathsea/win32/mktextfm.c b/Build/source/texk/kpathsea/win32/mktextfm.c
index be53c7f8fa1..b743a7b7be2 100644
--- a/Build/source/texk/kpathsea/win32/mktextfm.c
+++ b/Build/source/texk/kpathsea/win32/mktextfm.c
@@ -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 @@ usage (void)
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 @@ main (int ac, char **av)
char texbindir[TBUF];
char fullbin[TBUF];
+ char *extra_info;
kpse_set_program_name (av[0], NULL);
progname = kpse_program_name;
@@ -167,7 +168,7 @@ issetdest = 2 : current directory
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 @@ issetdest = 2 : current directory
*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 @@ issetdest = 2 : current directory
_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, ";");