texlive[61217] trunk: mf2pt1 (4dec21)

commits+karl at tug.org commits+karl at tug.org
Sat Dec 4 22:41:24 CET 2021


Revision: 61217
          http://tug.org/svn/texlive?view=revision&revision=61217
Author:   karl
Date:     2021-12-04 22:41:23 +0100 (Sat, 04 Dec 2021)
Log Message:
-----------
mf2pt1 (4dec21)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/mf2pt1/mf2pt1.pl
    trunk/Master/texmf-dist/doc/info/mf2pt1.info
    trunk/Master/texmf-dist/doc/support/mf2pt1/ChangeLog
    trunk/Master/texmf-dist/doc/support/mf2pt1/README
    trunk/Master/texmf-dist/doc/support/mf2pt1/mf2pt1.pdf
    trunk/Master/texmf-dist/doc/support/mf2pt1/mf2pt1.texi
    trunk/Master/texmf-dist/scripts/mf2pt1/mf2pt1.pl

Modified: trunk/Build/source/texk/texlive/linked_scripts/mf2pt1/mf2pt1.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/mf2pt1/mf2pt1.pl	2021-12-04 21:38:27 UTC (rev 61216)
+++ trunk/Build/source/texk/texlive/linked_scripts/mf2pt1/mf2pt1.pl	2021-12-04 21:41:23 UTC (rev 61217)
@@ -7,7 +7,7 @@
 
 ########################################################################
 # mf2pt1                                                               #
-# Copyright (C) 2005-2020 Scott Pakin                                  #
+# Copyright (C) 2005-2021 Scott Pakin                                  #
 #                                                                      #
 # This program may be distributed and/or modified under the conditions #
 # of the LaTeX Project Public License, either version 1.3c of this     #
@@ -21,9 +21,10 @@
 # version 2006/05/20 or later.                                         #
 ########################################################################
 
-our $VERSION = "2.6";     # mf2pt1 version number
+our $VERSION = "2.7";     # mf2pt1 version number
 require 5.6.1;            # I haven't tested mf2pt1 with older Perl versions
 
+use Cwd;
 use File::Basename;
 use File::Spec;
 use Getopt::Long;
@@ -160,7 +161,7 @@
 my $filenoext;
 my $versionmsg = "mf2pt1 version $VERSION
 
-Copyright (C) 2005-2020 Scott Pakin
+Copyright (C) 2005-2021 Scott Pakin
 
 This program may be distributed and/or modified under the conditions
 of the LaTeX Project Public License, either version 1.3c of this
@@ -347,8 +348,83 @@
 }
 
 
+# This function is taken unchanged from the Parse::CommandLine package
+# on CPAN.  It gets included here to avoid a dependency on a module
+# that is rarely contained in distributions.
+
+sub parse_command_line {
+    my $str = shift;
+
+    $str =~ s/\A\s+//ms;
+    $str =~ s/\s+\z//ms;
+
+    my @argv;
+    my $buf;
+    my $escaped;
+    my $double_quoted;
+    my $single_quoted;
+
+    for my $char (split //, $str) {
+        if ($escaped) {
+            $buf .= $char;
+            $escaped = undef;
+            next;
+        }
+
+        if ($char eq '\\') {
+            if ($single_quoted) {
+                $buf .= $char;
+            }
+            else {
+                $escaped = 1;
+            }
+            next;
+        }
+
+        if ($char =~ /\s/) {
+            if ($single_quoted || $double_quoted) {
+                $buf .= $char;
+            }
+            else {
+                push @argv, $buf if defined $buf;
+                undef $buf;
+            }
+            next;
+        }
+
+        if ($char eq '"') {
+            if ($single_quoted) {
+                $buf .= $char;
+                next;
+            }
+            $double_quoted = !$double_quoted;
+            next;
+        }
+
+        if ($char eq "'") {
+            if ($double_quoted) {
+                $buf .= $char;
+                next;
+            }
+            $single_quoted = !$single_quoted;
+            next;
+        }
+
+        $buf .= $char;
+    }
+    push @argv, $buf if defined $buf;
+
+    if ($escaped || $single_quoted || $double_quoted) {
+        die 'invalid command line string';
+    }
+
+    @argv;
+}
+
+
 # Print and execute a shell command.  An environment variable with the
-# same name as the command overrides the command name.  Return 1 on
+# same name as the command overrides the command name; it can also be
+# used to insert additional command-line parameters.  Return 1 on
 # success, 0 on failure.  Optionally abort if the command fails, based
 # on the first argument to execute_command.
 sub execute_command ($@)
@@ -355,7 +431,11 @@
 {
     my $abort_on_failure = shift;
     my @command = @_;
-    $command[0] = $ENV{uc $command[0]} || $command[0];
+    my $env = $ENV{uc $command[0]};
+    if ($env) {
+      my @argv = parse_command_line ($env);
+      splice @command, 0, 1, @argv;
+    }
     my $prettyargs = join (" ", map {/[\\ ]/ ? "'$_'" : $_} @command);
     print "Invoking \"$prettyargs\"...\n";
     my $result = system @command;
@@ -364,6 +444,17 @@
 }
 
 
+# Prepend a directory to a TeX variable.
+sub prepend_directory($$$)
+{
+    my ($dir, $varname, $ftype) = @_;
+    my $old_value = `kpsewhich --show-path=$ftype`;
+    die "${progname}: failed to run kpathsea ($!)" if $?;
+    chomp $old_value;
+    $ENV{$varname} = "$dir:$old_value";
+}
+
+
 # Output the font header.
 sub output_header ()
 {
@@ -761,6 +852,8 @@
             "rounding=f",
             "bpppix=f",
             "ffscript=s",
+            "save-temps!",
+            "output-dir=s",
             "h|help",
             "V|version") || pod2usage(2);
 if (defined $opthash{"h"}) {
@@ -774,7 +867,7 @@
 pod2usage(2) if $#ARGV != 0;
 
 # Extract the filename from the command line.
-$mffile = $ARGV[0];
+$mffile = File::Spec->rel2abs($ARGV[0]);
 my @fileparts = fileparse $mffile, ".mf";
 $filebase = $fileparts[0];
 $filedir = $fileparts[1];
@@ -782,9 +875,18 @@
 $pt1file = $filebase . ".pt1";
 $pfbfile = $filebase . ".pfb";
 
-assign_default $bpppix, $opthash{bpppix}, 0.02;
+# If --output-dir was specified, switch to that directory, but point
+# Metapost to the current directory.
+my $outdir = $opthash{"output-dir"};
+if ($outdir) {
+    my $here = getcwd();
+    prepend_directory $here, "MPINPUTS", "mp";
+    prepend_directory $here, "MFINPUTS", "mf";
+    chdir $outdir or die "${progname}: failed to switch to $outdir ($!)\n";
+}
 
 # Make our first pass through the input, to set values for various options.
+assign_default $bpppix, $opthash{bpppix}, 0.02;
 $mag = 100;           # Get a more precise bounding box.
 get_bboxes(1);        # This might set $designsize.
 
@@ -879,7 +981,7 @@
 output_font_programs();
 output_trailer();
 close OUTFILE;
-unlink @charfiles;
+unlink @charfiles unless $opthash{'save-temps'};
 print "\n";
 
 # Convert from the disassembled font format to Type 1 binary format.
@@ -888,7 +990,7 @@
     exit 1;
 }
 print "\n";
-unlink $pt1file;
+unlink $pt1file unless $opthash{'save-temps'};
 
 # Use FontForge to autohint the result.
 my $user_script = 0;   # 1=script file was provided by the user; 0=created here
@@ -919,7 +1021,7 @@
 if (!execute_command 0, ("fontforge", "-script", $ffscript, $pfbfile)) {
     warn "${progname}: You'll need to install FontForge if you want $pfbfile autohinted (not required, but strongly recommended)\n";
 }
-unlink $ffscript if !$user_script;
+unlink $ffscript if !$user_script && !$opthash{'save-temps'};
 print "\n";
 
 # Finish up.
@@ -956,6 +1058,8 @@
 [B<--rounding>=I<number>]
 [B<--bpppix>=I<number>]
 [B<--ffscript>=I<file.pe>]
+[B<--save-temps>]
+[B<--output-dir>=I<directory>]
 I<infile>.mf
 
 
@@ -1067,9 +1171,27 @@
 
 Name a script to pass to FontForge.
 
+=item B<--save-temps>
+
+Do not delete intermediate files (can be useful for debugging).
+
+=item B<--output-dir>=I<directory>
+
+Write all intermediate and output files to directory I<directory>
+[default: the current directory].  The directory must already exist.
+
 =back
 
 
+=head1 ENVIRONMENT
+
+Environment variables with the same name as a program that B<mf2pt1>
+launches but in uppercase specify an alternative program, possibly
+with arguments, to run instead.  For example, setting C<MPOST='mpost
+-recorder'> causes B<mf2pt1> to include the B<-recorder> option when
+running B<mpost>.
+
+
 =head1 FILES
 
 F<mf2pt1.mem> (which is generated from F<mf2pt1.mp> and F<mfplain.mp>)

Modified: trunk/Master/texmf-dist/doc/info/mf2pt1.info
===================================================================
--- trunk/Master/texmf-dist/doc/info/mf2pt1.info	2021-12-04 21:38:27 UTC (rev 61216)
+++ trunk/Master/texmf-dist/doc/info/mf2pt1.info	2021-12-04 21:41:23 UTC (rev 61217)
@@ -1,6 +1,6 @@
-This is mf2pt1.info, produced by makeinfo version 6.7 from mf2pt1.texi.
+This is mf2pt1.info, produced by makeinfo version 6.8 from mf2pt1.texi.
 
-Copyright (C) 2005-2020 Scott Pakin
+Copyright (C) 2005-2021 Scott Pakin
 
 
 
@@ -163,8 +163,8 @@
 page is embedded within the 'mf2pt1' Perl script and can be extracted
 with 'pod2man':
 
-     pod2man --center="User Commands" --date="27 November 2020" \
-       --release="v2.6" mf2pt1 > mf2pt1.1
+     pod2man --center="User Commands" --date="4 December 2021" \
+       --release="v2.7" mf2pt1 > mf2pt1.1
 
 You can then move 'mf2pt1.1' into '/usr/man/man1' or any other man page
 directory.  Note that the 'mf2pt1' man page is fairly rudimentary.  It
@@ -206,7 +206,9 @@
 'FONTFORGE' environment variable to 'pfaedit' before invoking 'mf2pt1'.
 As a corollary, you can inhibit an 'mf2pt1' external program from
 running by setting the corresponding environment variable to the name of
-a nonexistent program.
+a nonexistent program.  Arguments can be included in the environment
+variable's value.  Hence, defining 'MPOST' to 'mpost -recorder', for
+instance, instructs 'mf2pt1' to run 'mpost' with the '-recorder' option.
 
 * Menu:
 
@@ -480,7 +482,7 @@
 
 if known ps_output:
      font_coding_scheme         "ot1";
-     font_comment               "Copyright (C) 2020 Scott Pakin.";
+     font_comment               "Copyright (C) 2021 Scott Pakin.";
      font_family                "Kerplotz";
      font_fixed_pitch           false;
      font_identifier            "Kerplotz Light Oblique";
@@ -504,7 +506,7 @@
    The same parameters can also be specified on the command line as
 follows:
 
-     mf2pt1 --encoding=ot1 --comment="Copyright (C) 2020 Scott Pakin."
+     mf2pt1 --encoding=ot1 --comment="Copyright (C) 2021 Scott Pakin."
        --family=Kerplotz --nofixedpitch --fullname="Kerplotz Light Oblique"
        --name=Kerplotz-LightOblique --designsize=10 --italicangle=-9.5
        --underpos=-100 --underthick=50 --uniqueid=4112233 --version=002.005
@@ -733,18 +735,18 @@
 Node: Introduction1166
 Node: Requirements2998
 Node: Installation4731
-Node: Usage6546
-Node: Restrictions8262
-Node: Font information10640
-Node: Parameters11998
-Node: Command-line equivalents15473
-Node: Default values16954
-Node: Parameter example19174
-Node: Additional command-line options21183
-Node: Custom font encodings23523
-Node: Restoring mfplain defaults26973
-Node: Future Work27832
-Node: Acknowledgments29696
+Node: Usage6545
+Node: Restrictions8449
+Node: Font information10827
+Node: Parameters12185
+Node: Command-line equivalents15660
+Node: Default values17141
+Node: Parameter example19361
+Node: Additional command-line options21370
+Node: Custom font encodings23710
+Node: Restoring mfplain defaults27160
+Node: Future Work28019
+Node: Acknowledgments29883
 
 End Tag Table
 

Modified: trunk/Master/texmf-dist/doc/support/mf2pt1/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/support/mf2pt1/ChangeLog	2021-12-04 21:38:27 UTC (rev 61216)
+++ trunk/Master/texmf-dist/doc/support/mf2pt1/ChangeLog	2021-12-04 21:41:23 UTC (rev 61217)
@@ -1,3 +1,44 @@
+2021-12-04  Scott Pakin  <pakin at pakin.org>
+
+	* README, mf2pt1.texi: Updated the copyright year to 2021.
+
+	* mf2pt1.pl:
+	Documented that the directory specified by --output-dir must
+	already exist.  Updated the copyright year to 2021.  Updated the
+	version to 2.7.
+
+2021-11-28  Scott Pakin  <pakin at pakin.org>
+
+	* Makefile, mf2pt1.pl, mf2pt1.texi:
+	Documented that environment variables for programs can now include
+	parameters.
+
+	* mf2pt1.pl:
+	Incorporated a patch from Werner Lemberg <wl at gnu.org> to allow shell
+	commands to be overridden by environment variables that can also
+	include program parameters.
+
+2021-11-27  Scott Pakin  <pakin at pakin.org>
+
+	* mf2pt1.pl:
+	Introduced a --save-temps option to suppress deletion of intermediate
+	files.
+
+2020-11-27  Scott Pakin  <pakin at pakin.org>
+
+	* ChangeLog, README, mf2pt1.mp, mf2pt1.pl, mf2pt1.texi:
+	mf2pt1 no longer generates a UniqueID automatically, only when
+	instructed to by the user.  This change assists with reproducible
+	builds and is consistent with Adobe's declaration that unique font IDs
+	are no longer required or even recommended.
+
+	The documentation has been modified to reflect updated URLs for a
+	number of external links and to reference the latest copyright year
+	(2020) and mf2pt1 version number (2.6).
+
+	Thanks to Werner Lemberg for bringing Lilypond's issues with
+	reproducible builds to my attention.
+
 2020-11-27  Scott Pakin	 <scott+mf at pakin.org>
 
 	* mf2pt1.pl

Modified: trunk/Master/texmf-dist/doc/support/mf2pt1/README
===================================================================
--- trunk/Master/texmf-dist/doc/support/mf2pt1/README	2021-12-04 21:38:27 UTC (rev 61216)
+++ trunk/Master/texmf-dist/doc/support/mf2pt1/README	2021-12-04 21:41:23 UTC (rev 61217)
@@ -27,7 +27,7 @@
 Copyright and license
 ---------------------
 
-Copyright (C) 2005-2020 Scott Pakin, scott+mf at pakin.org
+Copyright (C) 2005-2021 Scott Pakin, scott+mf at pakin.org
 
 This package may be distributed and/or modified under the conditions
 of the LaTeX Project Public License, either version 1.3c of this

Modified: trunk/Master/texmf-dist/doc/support/mf2pt1/mf2pt1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/support/mf2pt1/mf2pt1.texi
===================================================================
--- trunk/Master/texmf-dist/doc/support/mf2pt1/mf2pt1.texi	2021-12-04 21:38:27 UTC (rev 61216)
+++ trunk/Master/texmf-dist/doc/support/mf2pt1/mf2pt1.texi	2021-12-04 21:41:23 UTC (rev 61217)
@@ -11,7 +11,7 @@
 @c %**end of header
 
 @copying
-Copyright @copyright{} 2005--2020 Scott Pakin
+Copyright @copyright{} 2005--2021 Scott Pakin
 
 @sp 2
 
@@ -30,8 +30,8 @@
 
 @end copying
 
- at set VERSION 2.6
- at set DATE 27 November 2020
+ at set VERSION 2.7
+ at set DATE 4 December 2021
 
 @c Define some fonts we intend to use.
 @iftex
@@ -319,7 +319,10 @@
 to @samp{pfaedit} before invoking @command{mf2pt1}.  As a corollary,
 you can inhibit an @command{mf2pt1} external program from running by
 setting the corresponding environment variable to the name of a
-nonexistent program.
+nonexistent program.  Arguments can be included in the environment
+variable's value.  Hence, defining @samp{MPOST} to @samp{mpost
+-recorder}, for instance, instructs @command{mf2pt1} to run
+ at command{mpost} with the @samp{-recorder} option.
 
 @menu
 * Restrictions::                Restrictions imposed on the font source code
@@ -676,9 +679,9 @@
 
 @noindent
 @b{if} known @i{ps_output}:
- at multitable {@b{if}} {@b{font_underline_thickness}} {@t{"Copyright (C) 2020 Scott Pakin.";}}
+ at multitable {@b{if}} {@b{font_underline_thickness}} {@t{"Copyright (C) 2021 Scott Pakin.";}}
 @item @tab @b{font_coding_scheme}       @tab @t{"ot1"};
- at item @tab @b{font_comment}             @tab @t{"Copyright (C) 2020 Scott Pakin."};
+ at item @tab @b{font_comment}             @tab @t{"Copyright (C) 2021 Scott Pakin."};
 @item @tab @b{font_family}              @tab @t{"Kerplotz"};
 @item @tab @b{font_fixed_pitch}         @tab @b{false};
 @item @tab @b{font_identifier}          @tab @t{"Kerplotz Light Oblique"};
@@ -705,7 +708,7 @@
 follows:
 
 @example
-mf2pt1 --encoding=ot1 --comment="Copyright (C) 2020 Scott Pakin."
+mf2pt1 --encoding=ot1 --comment="Copyright (C) 2021 Scott Pakin."
   --family=Kerplotz --nofixedpitch --fullname="Kerplotz Light Oblique"
   --name=Kerplotz-LightOblique --designsize=10 --italicangle=-9.5
   --underpos=-100 --underthick=50 --uniqueid=4112233 --version=002.005

Modified: trunk/Master/texmf-dist/scripts/mf2pt1/mf2pt1.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/mf2pt1/mf2pt1.pl	2021-12-04 21:38:27 UTC (rev 61216)
+++ trunk/Master/texmf-dist/scripts/mf2pt1/mf2pt1.pl	2021-12-04 21:41:23 UTC (rev 61217)
@@ -7,7 +7,7 @@
 
 ########################################################################
 # mf2pt1                                                               #
-# Copyright (C) 2005-2020 Scott Pakin                                  #
+# Copyright (C) 2005-2021 Scott Pakin                                  #
 #                                                                      #
 # This program may be distributed and/or modified under the conditions #
 # of the LaTeX Project Public License, either version 1.3c of this     #
@@ -21,9 +21,10 @@
 # version 2006/05/20 or later.                                         #
 ########################################################################
 
-our $VERSION = "2.6";     # mf2pt1 version number
+our $VERSION = "2.7";     # mf2pt1 version number
 require 5.6.1;            # I haven't tested mf2pt1 with older Perl versions
 
+use Cwd;
 use File::Basename;
 use File::Spec;
 use Getopt::Long;
@@ -160,7 +161,7 @@
 my $filenoext;
 my $versionmsg = "mf2pt1 version $VERSION
 
-Copyright (C) 2005-2020 Scott Pakin
+Copyright (C) 2005-2021 Scott Pakin
 
 This program may be distributed and/or modified under the conditions
 of the LaTeX Project Public License, either version 1.3c of this
@@ -347,8 +348,83 @@
 }
 
 
+# This function is taken unchanged from the Parse::CommandLine package
+# on CPAN.  It gets included here to avoid a dependency on a module
+# that is rarely contained in distributions.
+
+sub parse_command_line {
+    my $str = shift;
+
+    $str =~ s/\A\s+//ms;
+    $str =~ s/\s+\z//ms;
+
+    my @argv;
+    my $buf;
+    my $escaped;
+    my $double_quoted;
+    my $single_quoted;
+
+    for my $char (split //, $str) {
+        if ($escaped) {
+            $buf .= $char;
+            $escaped = undef;
+            next;
+        }
+
+        if ($char eq '\\') {
+            if ($single_quoted) {
+                $buf .= $char;
+            }
+            else {
+                $escaped = 1;
+            }
+            next;
+        }
+
+        if ($char =~ /\s/) {
+            if ($single_quoted || $double_quoted) {
+                $buf .= $char;
+            }
+            else {
+                push @argv, $buf if defined $buf;
+                undef $buf;
+            }
+            next;
+        }
+
+        if ($char eq '"') {
+            if ($single_quoted) {
+                $buf .= $char;
+                next;
+            }
+            $double_quoted = !$double_quoted;
+            next;
+        }
+
+        if ($char eq "'") {
+            if ($double_quoted) {
+                $buf .= $char;
+                next;
+            }
+            $single_quoted = !$single_quoted;
+            next;
+        }
+
+        $buf .= $char;
+    }
+    push @argv, $buf if defined $buf;
+
+    if ($escaped || $single_quoted || $double_quoted) {
+        die 'invalid command line string';
+    }
+
+    @argv;
+}
+
+
 # Print and execute a shell command.  An environment variable with the
-# same name as the command overrides the command name.  Return 1 on
+# same name as the command overrides the command name; it can also be
+# used to insert additional command-line parameters.  Return 1 on
 # success, 0 on failure.  Optionally abort if the command fails, based
 # on the first argument to execute_command.
 sub execute_command ($@)
@@ -355,7 +431,11 @@
 {
     my $abort_on_failure = shift;
     my @command = @_;
-    $command[0] = $ENV{uc $command[0]} || $command[0];
+    my $env = $ENV{uc $command[0]};
+    if ($env) {
+      my @argv = parse_command_line ($env);
+      splice @command, 0, 1, @argv;
+    }
     my $prettyargs = join (" ", map {/[\\ ]/ ? "'$_'" : $_} @command);
     print "Invoking \"$prettyargs\"...\n";
     my $result = system @command;
@@ -364,6 +444,17 @@
 }
 
 
+# Prepend a directory to a TeX variable.
+sub prepend_directory($$$)
+{
+    my ($dir, $varname, $ftype) = @_;
+    my $old_value = `kpsewhich --show-path=$ftype`;
+    die "${progname}: failed to run kpathsea ($!)" if $?;
+    chomp $old_value;
+    $ENV{$varname} = "$dir:$old_value";
+}
+
+
 # Output the font header.
 sub output_header ()
 {
@@ -761,6 +852,8 @@
             "rounding=f",
             "bpppix=f",
             "ffscript=s",
+            "save-temps!",
+            "output-dir=s",
             "h|help",
             "V|version") || pod2usage(2);
 if (defined $opthash{"h"}) {
@@ -774,7 +867,7 @@
 pod2usage(2) if $#ARGV != 0;
 
 # Extract the filename from the command line.
-$mffile = $ARGV[0];
+$mffile = File::Spec->rel2abs($ARGV[0]);
 my @fileparts = fileparse $mffile, ".mf";
 $filebase = $fileparts[0];
 $filedir = $fileparts[1];
@@ -782,9 +875,18 @@
 $pt1file = $filebase . ".pt1";
 $pfbfile = $filebase . ".pfb";
 
-assign_default $bpppix, $opthash{bpppix}, 0.02;
+# If --output-dir was specified, switch to that directory, but point
+# Metapost to the current directory.
+my $outdir = $opthash{"output-dir"};
+if ($outdir) {
+    my $here = getcwd();
+    prepend_directory $here, "MPINPUTS", "mp";
+    prepend_directory $here, "MFINPUTS", "mf";
+    chdir $outdir or die "${progname}: failed to switch to $outdir ($!)\n";
+}
 
 # Make our first pass through the input, to set values for various options.
+assign_default $bpppix, $opthash{bpppix}, 0.02;
 $mag = 100;           # Get a more precise bounding box.
 get_bboxes(1);        # This might set $designsize.
 
@@ -879,7 +981,7 @@
 output_font_programs();
 output_trailer();
 close OUTFILE;
-unlink @charfiles;
+unlink @charfiles unless $opthash{'save-temps'};
 print "\n";
 
 # Convert from the disassembled font format to Type 1 binary format.
@@ -888,7 +990,7 @@
     exit 1;
 }
 print "\n";
-unlink $pt1file;
+unlink $pt1file unless $opthash{'save-temps'};
 
 # Use FontForge to autohint the result.
 my $user_script = 0;   # 1=script file was provided by the user; 0=created here
@@ -919,7 +1021,7 @@
 if (!execute_command 0, ("fontforge", "-script", $ffscript, $pfbfile)) {
     warn "${progname}: You'll need to install FontForge if you want $pfbfile autohinted (not required, but strongly recommended)\n";
 }
-unlink $ffscript if !$user_script;
+unlink $ffscript if !$user_script && !$opthash{'save-temps'};
 print "\n";
 
 # Finish up.
@@ -956,6 +1058,8 @@
 [B<--rounding>=I<number>]
 [B<--bpppix>=I<number>]
 [B<--ffscript>=I<file.pe>]
+[B<--save-temps>]
+[B<--output-dir>=I<directory>]
 I<infile>.mf
 
 
@@ -1067,9 +1171,27 @@
 
 Name a script to pass to FontForge.
 
+=item B<--save-temps>
+
+Do not delete intermediate files (can be useful for debugging).
+
+=item B<--output-dir>=I<directory>
+
+Write all intermediate and output files to directory I<directory>
+[default: the current directory].  The directory must already exist.
+
 =back
 
 
+=head1 ENVIRONMENT
+
+Environment variables with the same name as a program that B<mf2pt1>
+launches but in uppercase specify an alternative program, possibly
+with arguments, to run instead.  For example, setting C<MPOST='mpost
+-recorder'> causes B<mf2pt1> to include the B<-recorder> option when
+running B<mpost>.
+
+
 =head1 FILES
 
 F<mf2pt1.mem> (which is generated from F<mf2pt1.mp> and F<mfplain.mp>)



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