texlive[60005] trunk: fontools (21jul21)

commits+karl at tug.org commits+karl at tug.org
Wed Jul 21 22:46:11 CEST 2021


Revision: 60005
          http://tug.org/svn/texlive?view=revision&revision=60005
Author:   karl
Date:     2021-07-21 22:46:10 +0200 (Wed, 21 Jul 2021)
Log Message:
-----------
fontools (21jul21)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/fontools/afm2afm
    trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst
    trunk/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx
    trunk/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl
    trunk/Master/texmf-dist/doc/man/man1/afm2afm.1
    trunk/Master/texmf-dist/doc/man/man1/afm2afm.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/autoinst.1
    trunk/Master/texmf-dist/doc/man/man1/autoinst.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/ot2kpx.1
    trunk/Master/texmf-dist/doc/man/man1/ot2kpx.man1.pdf
    trunk/Master/texmf-dist/doc/support/fontools/splitttc
    trunk/Master/texmf-dist/scripts/fontools/afm2afm
    trunk/Master/texmf-dist/scripts/fontools/autoinst
    trunk/Master/texmf-dist/scripts/fontools/ot2kpx

Modified: trunk/Build/source/texk/texlive/linked_scripts/fontools/afm2afm
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/fontools/afm2afm	2021-07-20 23:48:46 UTC (rev 60004)
+++ trunk/Build/source/texk/texlive/linked_scripts/fontools/afm2afm	2021-07-21 20:46:10 UTC (rev 60005)
@@ -37,7 +37,7 @@
 use Getopt::Long;
 use Pod::Usage;
 
-my $VERSION = "20210401";
+my $VERSION = "20210721";
 
 parse_commandline();
 
@@ -421,7 +421,7 @@
 
 =head1 VERSION
 
-This document describes B<afm2afm> version 20210401.
+This document describes B<afm2afm> version 20210721.
 
 
 =head1 RECENT CHANGES

Modified: trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst	2021-07-20 23:48:46 UTC (rev 60004)
+++ trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst	2021-07-21 20:46:10 UTC (rev 60005)
@@ -41,7 +41,7 @@
 use Pod::Usage ();
 use POSIX ();
 
-my $VERSION = '20210401';
+my $VERSION = '20210721';
 
 my ($d, $m, $y) = (localtime time)[3 .. 5];
 my $TODAY = sprintf "%04d/%02d/%02d", $y + 1900, $m + 1, $d;
@@ -265,7 +265,7 @@
     el  =>  [ qw( extralight 200 ) ],
     l   =>  [ qw( light 300 ) ],
     sl  =>  [ qw( semilight blond ) ],
-    ''  =>  [ qw( regular normal text book 400 normallight normaldark ) ],
+    ''  =>  [ qw( regular normal text book 400 normallight normaldark plain ) ],
     sb  =>  [ qw( semibold demibold 600 medium 500 ) ],
     b   =>  [ qw( bold 700 ) ],
     eb  =>  [ qw( extrabold 800 ) ],
@@ -606,7 +606,7 @@
 
     my $cmd = qq(otfinfo --info "$filename");
     open my $otfinfo, '-|', $cmd
-        or die "[ERROR]     Could not fork(): $!";
+        or die "[ERROR]     Could not run '$cmd': $!";
     my %data = map { my ($k,$v) = m/\A\s* ([^:]+?) \s*:\s* ([^\r\n]+)/xms;
                      $k =~ s/\s+//xmsg;
                      (lc $k => $v);
@@ -613,7 +613,7 @@
                    }
                    grep { m/\A\s* [^:]+? \s*:\s* [^\r\n]+/xms } <$otfinfo>;
     close $otfinfo
-        or die "[ERROR]     '$cmd' failed.";
+        or die "[ERROR]     '$cmd' failed";
 
     return \%data;
 }
@@ -709,6 +709,20 @@
     $self->{weight} = Attr::unabbreviate($self->{weight});
     $self->{shape}  = Attr::unabbreviate($self->{shape});
 
+    # Handle the (semi)condensed widths of the Thesis family.
+    # Doing this in the WIDTH table is tricky (i.e., TheSansCd might be
+    # parsed as the SCd width of the TheSan family), so we treat it as
+    # a special case instead.
+    if ($self->{family} =~ m/\A (The (?: Sans | Serif | Mix)) (S? Cd) \z/xms
+            and $self->{width} eq 'regular') {
+        $self->{family} = $1;
+        $self->{width}
+            = $2 eq 'Cd'  ? 'condensed'
+            : $2 eq 'SCd' ? 'semicondensed'
+            :               die '[ERROR]     Internal error, please report!'
+            ;
+    }
+
     # Some font families put small caps into separate families;
     # we merge these into the 'main' family.
     # We have to test both 'family', 'subfamily' and 'name' for hints
@@ -813,17 +827,17 @@
 
     my $cmd = qq(otfinfo --features "$self->{filename}");
     open my $otfinfo, '-|', $cmd
-        or die "[ERROR]     Could not fork(): $!";
+        or die "[ERROR]     Could not run '$cmd': $!";
     my @data = map { substr $_, 0, 4 } <$otfinfo>;
     close $otfinfo
-        or die "[ERROR]     '$cmd' failed.";
+        or die "[ERROR]     '$cmd' failed";
 
     $cmd = qq(otfinfo --tables "$self->{filename}");
     open $otfinfo, '-|', $cmd
-        or die "[ERROR]     Could not fork(): $!";
+        or die "[ERROR]     Could not run '$cmd': $!";
     my $data = do { local $/; <$otfinfo> };
     close $otfinfo
-        or die "[ERROR]     '$cmd' failed.";
+        or die "[ERROR]     '$cmd' failed";
 
     if ($data =~ m/\d+ \s+ kern/xms) {
         push @data, 'kern';
@@ -843,14 +857,14 @@
 
     my $cmd = qq(otfinfo --optical-size "$self->{filename}");
     open my $otfinfo, '-|', $cmd
-        or die "[ERROR]     Could not fork(): $!";
+        or die "[ERROR]     Could not run '$cmd': $!";
     my $data = do { local $/; <$otfinfo> };
     close $otfinfo
-        or die "[ERROR]     '$cmd' failed.";
+        or die "[ERROR]     '$cmd' failed";
 
     my ($minsize, $maxsize)
-        = $data =~ m/[(] ([\d.]+) \s* pt, \s*
-                         ([\d.]+) \s* pt  \s* [])]/xms;
+        = $data =~ m/[([] ([\d.]+) (?:\s* pt)?, \s*
+                          ([\d.]+) (?:\s* pt)?  \s* [])]/xms;
 
     $minsize //= 0;
     $maxsize //= 0;
@@ -1258,7 +1272,9 @@
     if ($seen{Numr}) {
         print {$STY} <<'END_STY_FONTAXES_NUMR';
     \fa at naming@exception{figures}{{numerators}{proportional}}{Numr}
+    \fa at naming@exception{figures}{{numerator}{proportional}}{Numr}
     \fa at naming@exception{figures}{{numerators}{tabular}}{Numr}
+    \fa at naming@exception{figures}{{numerator}{tabular}}{Numr}
 
 END_STY_FONTAXES_NUMR
     }
@@ -1266,7 +1282,9 @@
     if ($seen{Dnom}) {
         print {$STY} <<'END_STY_FONTAXES_DNOM';
     \fa at naming@exception{figures}{{denominators}{proportional}}{Dnom}
+    \fa at naming@exception{figures}{{denominator}{proportional}}{Dnom}
     \fa at naming@exception{figures}{{denominators}{tabular}}{Dnom}
+    \fa at naming@exception{figures}{{denominator}{tabular}}{Dnom}
 
 END_STY_FONTAXES_DNOM
     }
@@ -2272,7 +2290,7 @@
 
     return join q( ), 'otftotfm',
                       '--automatic',
-                      "--encoding='$workitem->{enc_file}'",
+                      "--encoding=$workitem->{enc_file}",
                       $targetdirs,
                       '--no-updmap',
                       '--force',
@@ -2302,11 +2320,22 @@
 sub run_commands {
     my ($commandlist, $family, $log) = @_;
 
+    my $n_cmds = scalar @{$commandlist};
+    my ($log_ncmds, $ceil) = (1, 10);
+    while ($n_cmds >= $ceil) {
+        $log_ncmds++;
+        $ceil *= 10;
+    }
+    my $template = sprintf "%%%dd of %%%dd", $log_ncmds, $log_ncmds;
+    my $l_template = 4 + 2 * $log_ncmds;
+    $| = 1; # autoflush
+    print "[INFO]      Generating fonts for $family: ", " " x $l_template;
+
+    my $i_cmd  = 1;
     my $oops = 0;
-    $| = 1;     # turn on autoflush, to make a poor man's progress bar
-    print "[INFO]      Generating fonts for $family ";
     for my $command (@{$commandlist}) {
-        print '.';
+        print "\b" x $l_template;
+        printf $template, $i_cmd++, $n_cmds;
         open my $otftotfm, '-|', "$command 2>&1"
             or die "could not fork(): $!";
         my $msgs = do { local $/; <$otftotfm> };
@@ -3049,13 +3078,13 @@
 
     # Figure out whether the encoding option refers to a custom encoding file
     # in the current directory, or to the name of one of our standard
-    # encodings.  In the latter case, we add the 'fontools_' prefix.
-    my $try = $workitem->{encoding};
-    $try .= '.enc' if $try !~ m/[.]enc\z/xmsi;
-    if (-e $try) {
-        $workitem->{enc_file} = $try;
+    # encodings. In the former case, we quote the filename, to account
+    # for possible spaces or other metacharacters; in the latter case,
+    # we add the 'fontools_' prefix.
+    if (-e $workitem->{encoding}) {
+        $workitem->{enc_file} = qq{"$workitem->{encoding}"};
         $workitem->{encoding}
-            = File::Basename::basename($try, '.enc', '.ENC');
+            = File::Basename::basename($workitem->{encoding}, '.enc', '.ENC');
     }
     else {
         ($workitem->{enc_file} = $workitem->{encoding})
@@ -3173,7 +3202,7 @@
 
             my $cmd = qq(t1disasm "$oldfn");
             open my $t1disasm, '-|:raw', $cmd
-                or die "[ERROR]     Could not fork(): $!";
+                or die "[ERROR]     Could not run '$cmd': $!";
             my @pfbdata = readline $t1disasm;
             close $t1disasm
                 or die "[ERROR]     '$cmd' failed";
@@ -3193,7 +3222,7 @@
 
             $cmd = qq(t1asm --pfb >"$newfn");
             open my $t1asm, '|-:raw', $cmd
-                or die "[ERROR]     Could not fork(): $!";
+                or die "[ERROR]     Could not run '$cmd': $!";
             print {$t1asm} @pfbdata;
             close $t1asm
                 or die "[ERROR]     '$cmd' failed";
@@ -4000,7 +4029,7 @@
 
 =head1 VERSION
 
-This document describes B<autoinst> version 20210401.
+This document describes B<autoinst> version 20210721.
 
 
 =head1 RECENT CHANGES
@@ -4009,6 +4038,26 @@
 
 =over 12
 
+=item I<2021-07-21>
+
+Bugfixes:
+
+=over 3
+
+=item -
+
+Yet another problem with argument quoting on Windows.
+
+=item -
+
+Selecting numerator/denominator fonts didn't work as documented.
+
+=item -
+
+Font info parsing failed for Microsoft Sitka and LucasFonts Thesis.
+
+=back
+
 =item I<2021-04-01>
 
 The I<-encoding> option now also accepts filenames of encoding files

Modified: trunk/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx	2021-07-20 23:48:46 UTC (rev 60004)
+++ trunk/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx	2021-07-21 20:46:10 UTC (rev 60005)
@@ -38,7 +38,7 @@
 use List::Util @List::Util::EXPORT_OK;
 use Pod::Usage;
 
-my $VERSION = "20210401";
+my $VERSION = "20210721";
 
 our ($NUM_GLYPHS, $UNITS_PER_EM, %kern);
 
@@ -858,7 +858,7 @@
 
 =head1 VERSION
 
-This document describes B<ot2kpx> version 20210401.
+This document describes B<ot2kpx> version 20210721.
 
 
 =head1 RECENT CHANGES

Modified: trunk/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl	2021-07-20 23:48:46 UTC (rev 60004)
+++ trunk/Build/source/texk/texlive/linked_scripts/texlive/fmtutil.pl	2021-07-21 20:46:10 UTC (rev 60005)
@@ -1,5 +1,5 @@
 #!/usr/bin/env perl
-# $Id: fmtutil.pl 59207 2021-05-15 13:58:40Z preining $
+# $Id: fmtutil.pl 59983 2021-07-18 22:18:08Z karl $
 # fmtutil - utility to maintain format files.
 # (Maintained in TeX Live:Master/texmf-dist/scripts/texlive.)
 # 
@@ -24,11 +24,11 @@
   TeX::Update->import();
 }
 
-my $svnid = '$Id: fmtutil.pl 59207 2021-05-15 13:58:40Z preining $';
-my $lastchdate = '$Date: 2021-05-15 15:58:40 +0200 (Sat, 15 May 2021) $';
+my $svnid = '$Id: fmtutil.pl 59983 2021-07-18 22:18:08Z karl $';
+my $lastchdate = '$Date: 2021-07-19 00:18:08 +0200 (Mon, 19 Jul 2021) $';
 $lastchdate =~ s/^\$Date:\s*//;
 $lastchdate =~ s/ \(.*$//;
-my $svnrev = '$Revision: 59207 $';
+my $svnrev = '$Revision: 59983 $';
 $svnrev =~ s/^\$Revision:\s*//;
 $svnrev =~ s/\s*\$$//;
 my $version = "r$svnrev ($lastchdate)";
@@ -36,7 +36,6 @@
 use strict;
 use Getopt::Long qw(:config no_autoabbrev ignore_case_always);
 use File::Basename;
-use File::Copy;
 use File::Spec;
 use Cwd;
 
@@ -736,7 +735,7 @@
     if ($poolfile && -f $poolfile) {
       print_verbose("attempting to create localized format "
                     . "using pool=$pool and tcx=$tcx.\n");
-      File::Copy::copy($poolfile, "$eng.pool");
+      TeXLive::TLUtils::copy("-f", $poolfile, "$eng.pool");
       $tcxflag = "-translate-file=$tcx" if ($tcx);
       $localpool = 1;
     }
@@ -798,7 +797,7 @@
     # to make sure that in SElinux enabled cases the rules of
     # the destination directory are applied.
     # See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900580
-    if (File::Copy::copy($logfile, "$destdir/$logfile")) {
+    if (TeXLive::TLUtils::copy("-f", $logfile, "$destdir/$logfile")) {
       print_info("log file copied to: $destdir/$logfile\n");
     } else {
       print_deferred_error("cannot copy log $logfile to: $destdir\n")
@@ -846,7 +845,7 @@
     # package dependencies for each format.  Unfortunately omega-based
     # engines gratuitiously changed the extension from .fls to .ofl.
     my $recfile = $fmt . ($fmt =~ m/^(aleph|lamed)$/ ? ".ofl" : ".fls");
-    if (!File::Copy::copy($recfile, "$destdir/$recfile")) {
+    if (! TeXLive::TLUtils::copy("-f", $recfile, "$destdir/$recfile")) {
       print_deferred_error("cannot copy recorder $recfile to: $destdir\n");
     }
   }
@@ -856,39 +855,38 @@
   # we check whether the next command **would** create a new file,
   # and if it succeeded, we set the actual flag.
   my $possibly_warn = ($opts{'user'} && ! -r $destfile);
-  if (File::Copy::copy($fmtfile, $destfile )) {
+  if (TeXLive::TLUtils::copy("-f", $fmtfile, $destfile)) {
     print_info("$destfile installed.\n");
     $first_time_creation_in_usermode = $possibly_warn;
     #
     # original fmtutil.sh did some magic trick for mplib-luatex.mem
-    #
     # nowadays no mplib mem is created and all files loaded
     # so we comment and do not convert this
     #
-    # As a special special case, we create mplib-luatex.mem for use by
-    # the mplib embedded in luatex if it doesn't already exist.  (We
-    # never update it if it does exist.)
-    #
-    # This is used by the luamplib package.  This way, an expert user
-    # who wants to try a new version of luatex (hence with a new
-    # version of mplib) can manually update mplib-luatex.mem without
-    # having to tamper with mpost itself.
-    #
-    #  if test "x$format" = xmpost && test "x$engine" = xmpost; then
-    #    mplib_mem_name=mplib-luatex.mem
-    #    mplib_mem_file=$fulldestdir/$mplib_mem_name
-    #    if test \! -f $mplib_mem_file; then
-    #      verboseMsg "$progname: copying $destfile to $mplib_mem_file"
-    #      if cp "$destfile" "$mplib_mem_file" </dev/null; then
-    #        mktexupd "$fulldestdir" "$mplib_mem_name"
-    #      else
-    #        # failure to copy merits failure handling: e.g., full file system.
-    #        log_failure "cp $destfile $mplib_mem_file failed."
-    #      fi
-    #    else
-    #      verboseMsg "$progname: $mplib_mem_file already exists, not updating."
-    #    fi
-    #  fi
+    ## As a special special case, we create mplib-luatex.mem for use by
+    ## the mplib embedded in luatex if it doesn't already exist.  (We
+    ## never update it if it does exist.)
+    ##
+    ## This is used by the luamplib package.  This way, an expert user
+    ## who wants to try a new version of luatex (hence with a new
+    ## version of mplib) can manually update mplib-luatex.mem without
+    ## having to tamper with mpost itself.
+    ##
+    ##  if test "x$format" = xmpost && test "x$engine" = xmpost; then
+    ##    mplib_mem_name=mplib-luatex.mem
+    ##    mplib_mem_file=$fulldestdir/$mplib_mem_name
+    ##    if test \! -f $mplib_mem_file; then
+    ##      verboseMsg "$progname: copying $destfile to $mplib_mem_file"
+    ##      if cp "$destfile" "$mplib_mem_file" </dev/null; then
+    ##        mktexupd "$fulldestdir" "$mplib_mem_name"
+    ##      else
+    ##        ## failure to copy merits failure handling: e.g., full file system.
+    ##        log_failure "cp $destfile $mplib_mem_file failed."
+    ##      fi
+    ##    else
+    ##      verboseMsg "$progname: $mplib_mem_file already exists, not updating."
+    ##    fi
+    ##  fi
 
     if ($mktexfmtMode && $mktexfmtFirst) {
       print "$destfile\n";

Modified: trunk/Master/texmf-dist/doc/man/man1/afm2afm.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/afm2afm.1	2021-07-20 23:48:46 UTC (rev 60004)
+++ trunk/Master/texmf-dist/doc/man/man1/afm2afm.1	2021-07-21 20:46:10 UTC (rev 60005)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40)
+.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "AFM2AFM 1"
-.TH AFM2AFM 1 "2021-04-01" "fontools" "Marc Penninga"
+.TH AFM2AFM 1 "2021-07-21" "fontools" "Marc Penninga"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -223,7 +223,7 @@
 See the \s-1GNU\s0 General Public License for more details.
 .SH "VERSION"
 .IX Header "VERSION"
-This document describes \fBafm2afm\fR version 20210401.
+This document describes \fBafm2afm\fR version 20210721.
 .SH "RECENT CHANGES"
 .IX Header "RECENT CHANGES"
 (See the source code for the rest of the story.)

Modified: trunk/Master/texmf-dist/doc/man/man1/afm2afm.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/autoinst.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/autoinst.1	2021-07-20 23:48:46 UTC (rev 60004)
+++ trunk/Master/texmf-dist/doc/man/man1/autoinst.1	2021-07-21 20:46:10 UTC (rev 60005)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40)
+.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "AUTOINST 1"
-.TH AUTOINST 1 "2021-04-01" "fontools" "Marc Penninga"
+.TH AUTOINST 1 "2021-07-21" "fontools" "Marc Penninga"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -787,10 +787,23 @@
 \&\s-1GNU\s0 General Public License for more details.
 .SH "VERSION"
 .IX Header "VERSION"
-This document describes \fBautoinst\fR version 20210401.
+This document describes \fBautoinst\fR version 20210721.
 .SH "RECENT CHANGES"
 .IX Header "RECENT CHANGES"
 (See the source for the full story, all the way back to 2005.)
+.IP "\fI2021\-07\-21\fR" 12
+.IX Item "2021-07-21"
+Bugfixes:
+.RS 12
+.IP "\-" 3
+Yet another problem with argument quoting on Windows.
+.IP "\-" 3
+Selecting numerator/denominator fonts didn't work as documented.
+.IP "\-" 3
+Font info parsing failed for Microsoft Sitka and LucasFonts Thesis.
+.RE
+.RS 12
+.RE
 .IP "\fI2021\-04\-01\fR" 12
 .IX Item "2021-04-01"
 The \fI\-encoding\fR option now also accepts filenames of encoding files

Modified: trunk/Master/texmf-dist/doc/man/man1/autoinst.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/ot2kpx.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/ot2kpx.1	2021-07-20 23:48:46 UTC (rev 60004)
+++ trunk/Master/texmf-dist/doc/man/man1/ot2kpx.1	2021-07-21 20:46:10 UTC (rev 60005)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40)
+.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "OT2KPX 1"
-.TH OT2KPX 1 "2021-04-01" "fontools" "Marc Penninga"
+.TH OT2KPX 1 "2021-07-21" "fontools" "Marc Penninga"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -228,7 +228,7 @@
 See the \s-1GNU\s0 General Public License for more details.
 .SH "VERSION"
 .IX Header "VERSION"
-This document describes \fBot2kpx\fR version 20210401.
+This document describes \fBot2kpx\fR version 20210721.
 .SH "RECENT CHANGES"
 .IX Header "RECENT CHANGES"
 (See the source code for the rest of the story.)

Modified: trunk/Master/texmf-dist/doc/man/man1/ot2kpx.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/support/fontools/splitttc
===================================================================
--- trunk/Master/texmf-dist/doc/support/fontools/splitttc	2021-07-20 23:48:46 UTC (rev 60004)
+++ trunk/Master/texmf-dist/doc/support/fontools/splitttc	2021-07-21 20:46:10 UTC (rev 60005)
@@ -38,7 +38,7 @@
 use Getopt::Long;
 use Pod::Usage;
 
-my $VERSION = "20210401";
+my $VERSION = "20210721";
 
 parse_commandline();
 
@@ -303,7 +303,7 @@
 
 =head1 VERSION
 
-This document describes B<splitttc> version 20210401.
+This document describes B<splitttc> version 20210721.
 
 
 =head1 RECENT CHANGES

Modified: trunk/Master/texmf-dist/scripts/fontools/afm2afm
===================================================================
--- trunk/Master/texmf-dist/scripts/fontools/afm2afm	2021-07-20 23:48:46 UTC (rev 60004)
+++ trunk/Master/texmf-dist/scripts/fontools/afm2afm	2021-07-21 20:46:10 UTC (rev 60005)
@@ -37,7 +37,7 @@
 use Getopt::Long;
 use Pod::Usage;
 
-my $VERSION = "20210401";
+my $VERSION = "20210721";
 
 parse_commandline();
 
@@ -421,7 +421,7 @@
 
 =head1 VERSION
 
-This document describes B<afm2afm> version 20210401.
+This document describes B<afm2afm> version 20210721.
 
 
 =head1 RECENT CHANGES

Modified: trunk/Master/texmf-dist/scripts/fontools/autoinst
===================================================================
--- trunk/Master/texmf-dist/scripts/fontools/autoinst	2021-07-20 23:48:46 UTC (rev 60004)
+++ trunk/Master/texmf-dist/scripts/fontools/autoinst	2021-07-21 20:46:10 UTC (rev 60005)
@@ -41,7 +41,7 @@
 use Pod::Usage ();
 use POSIX ();
 
-my $VERSION = '20210401';
+my $VERSION = '20210721';
 
 my ($d, $m, $y) = (localtime time)[3 .. 5];
 my $TODAY = sprintf "%04d/%02d/%02d", $y + 1900, $m + 1, $d;
@@ -265,7 +265,7 @@
     el  =>  [ qw( extralight 200 ) ],
     l   =>  [ qw( light 300 ) ],
     sl  =>  [ qw( semilight blond ) ],
-    ''  =>  [ qw( regular normal text book 400 normallight normaldark ) ],
+    ''  =>  [ qw( regular normal text book 400 normallight normaldark plain ) ],
     sb  =>  [ qw( semibold demibold 600 medium 500 ) ],
     b   =>  [ qw( bold 700 ) ],
     eb  =>  [ qw( extrabold 800 ) ],
@@ -606,7 +606,7 @@
 
     my $cmd = qq(otfinfo --info "$filename");
     open my $otfinfo, '-|', $cmd
-        or die "[ERROR]     Could not fork(): $!";
+        or die "[ERROR]     Could not run '$cmd': $!";
     my %data = map { my ($k,$v) = m/\A\s* ([^:]+?) \s*:\s* ([^\r\n]+)/xms;
                      $k =~ s/\s+//xmsg;
                      (lc $k => $v);
@@ -613,7 +613,7 @@
                    }
                    grep { m/\A\s* [^:]+? \s*:\s* [^\r\n]+/xms } <$otfinfo>;
     close $otfinfo
-        or die "[ERROR]     '$cmd' failed.";
+        or die "[ERROR]     '$cmd' failed";
 
     return \%data;
 }
@@ -709,6 +709,20 @@
     $self->{weight} = Attr::unabbreviate($self->{weight});
     $self->{shape}  = Attr::unabbreviate($self->{shape});
 
+    # Handle the (semi)condensed widths of the Thesis family.
+    # Doing this in the WIDTH table is tricky (i.e., TheSansCd might be
+    # parsed as the SCd width of the TheSan family), so we treat it as
+    # a special case instead.
+    if ($self->{family} =~ m/\A (The (?: Sans | Serif | Mix)) (S? Cd) \z/xms
+            and $self->{width} eq 'regular') {
+        $self->{family} = $1;
+        $self->{width}
+            = $2 eq 'Cd'  ? 'condensed'
+            : $2 eq 'SCd' ? 'semicondensed'
+            :               die '[ERROR]     Internal error, please report!'
+            ;
+    }
+
     # Some font families put small caps into separate families;
     # we merge these into the 'main' family.
     # We have to test both 'family', 'subfamily' and 'name' for hints
@@ -813,17 +827,17 @@
 
     my $cmd = qq(otfinfo --features "$self->{filename}");
     open my $otfinfo, '-|', $cmd
-        or die "[ERROR]     Could not fork(): $!";
+        or die "[ERROR]     Could not run '$cmd': $!";
     my @data = map { substr $_, 0, 4 } <$otfinfo>;
     close $otfinfo
-        or die "[ERROR]     '$cmd' failed.";
+        or die "[ERROR]     '$cmd' failed";
 
     $cmd = qq(otfinfo --tables "$self->{filename}");
     open $otfinfo, '-|', $cmd
-        or die "[ERROR]     Could not fork(): $!";
+        or die "[ERROR]     Could not run '$cmd': $!";
     my $data = do { local $/; <$otfinfo> };
     close $otfinfo
-        or die "[ERROR]     '$cmd' failed.";
+        or die "[ERROR]     '$cmd' failed";
 
     if ($data =~ m/\d+ \s+ kern/xms) {
         push @data, 'kern';
@@ -843,14 +857,14 @@
 
     my $cmd = qq(otfinfo --optical-size "$self->{filename}");
     open my $otfinfo, '-|', $cmd
-        or die "[ERROR]     Could not fork(): $!";
+        or die "[ERROR]     Could not run '$cmd': $!";
     my $data = do { local $/; <$otfinfo> };
     close $otfinfo
-        or die "[ERROR]     '$cmd' failed.";
+        or die "[ERROR]     '$cmd' failed";
 
     my ($minsize, $maxsize)
-        = $data =~ m/[(] ([\d.]+) \s* pt, \s*
-                         ([\d.]+) \s* pt  \s* [])]/xms;
+        = $data =~ m/[([] ([\d.]+) (?:\s* pt)?, \s*
+                          ([\d.]+) (?:\s* pt)?  \s* [])]/xms;
 
     $minsize //= 0;
     $maxsize //= 0;
@@ -1258,7 +1272,9 @@
     if ($seen{Numr}) {
         print {$STY} <<'END_STY_FONTAXES_NUMR';
     \fa at naming@exception{figures}{{numerators}{proportional}}{Numr}
+    \fa at naming@exception{figures}{{numerator}{proportional}}{Numr}
     \fa at naming@exception{figures}{{numerators}{tabular}}{Numr}
+    \fa at naming@exception{figures}{{numerator}{tabular}}{Numr}
 
 END_STY_FONTAXES_NUMR
     }
@@ -1266,7 +1282,9 @@
     if ($seen{Dnom}) {
         print {$STY} <<'END_STY_FONTAXES_DNOM';
     \fa at naming@exception{figures}{{denominators}{proportional}}{Dnom}
+    \fa at naming@exception{figures}{{denominator}{proportional}}{Dnom}
     \fa at naming@exception{figures}{{denominators}{tabular}}{Dnom}
+    \fa at naming@exception{figures}{{denominator}{tabular}}{Dnom}
 
 END_STY_FONTAXES_DNOM
     }
@@ -2272,7 +2290,7 @@
 
     return join q( ), 'otftotfm',
                       '--automatic',
-                      "--encoding='$workitem->{enc_file}'",
+                      "--encoding=$workitem->{enc_file}",
                       $targetdirs,
                       '--no-updmap',
                       '--force',
@@ -2302,11 +2320,22 @@
 sub run_commands {
     my ($commandlist, $family, $log) = @_;
 
+    my $n_cmds = scalar @{$commandlist};
+    my ($log_ncmds, $ceil) = (1, 10);
+    while ($n_cmds >= $ceil) {
+        $log_ncmds++;
+        $ceil *= 10;
+    }
+    my $template = sprintf "%%%dd of %%%dd", $log_ncmds, $log_ncmds;
+    my $l_template = 4 + 2 * $log_ncmds;
+    $| = 1; # autoflush
+    print "[INFO]      Generating fonts for $family: ", " " x $l_template;
+
+    my $i_cmd  = 1;
     my $oops = 0;
-    $| = 1;     # turn on autoflush, to make a poor man's progress bar
-    print "[INFO]      Generating fonts for $family ";
     for my $command (@{$commandlist}) {
-        print '.';
+        print "\b" x $l_template;
+        printf $template, $i_cmd++, $n_cmds;
         open my $otftotfm, '-|', "$command 2>&1"
             or die "could not fork(): $!";
         my $msgs = do { local $/; <$otftotfm> };
@@ -3049,13 +3078,13 @@
 
     # Figure out whether the encoding option refers to a custom encoding file
     # in the current directory, or to the name of one of our standard
-    # encodings.  In the latter case, we add the 'fontools_' prefix.
-    my $try = $workitem->{encoding};
-    $try .= '.enc' if $try !~ m/[.]enc\z/xmsi;
-    if (-e $try) {
-        $workitem->{enc_file} = $try;
+    # encodings. In the former case, we quote the filename, to account
+    # for possible spaces or other metacharacters; in the latter case,
+    # we add the 'fontools_' prefix.
+    if (-e $workitem->{encoding}) {
+        $workitem->{enc_file} = qq{"$workitem->{encoding}"};
         $workitem->{encoding}
-            = File::Basename::basename($try, '.enc', '.ENC');
+            = File::Basename::basename($workitem->{encoding}, '.enc', '.ENC');
     }
     else {
         ($workitem->{enc_file} = $workitem->{encoding})
@@ -3173,7 +3202,7 @@
 
             my $cmd = qq(t1disasm "$oldfn");
             open my $t1disasm, '-|:raw', $cmd
-                or die "[ERROR]     Could not fork(): $!";
+                or die "[ERROR]     Could not run '$cmd': $!";
             my @pfbdata = readline $t1disasm;
             close $t1disasm
                 or die "[ERROR]     '$cmd' failed";
@@ -3193,7 +3222,7 @@
 
             $cmd = qq(t1asm --pfb >"$newfn");
             open my $t1asm, '|-:raw', $cmd
-                or die "[ERROR]     Could not fork(): $!";
+                or die "[ERROR]     Could not run '$cmd': $!";
             print {$t1asm} @pfbdata;
             close $t1asm
                 or die "[ERROR]     '$cmd' failed";
@@ -4000,7 +4029,7 @@
 
 =head1 VERSION
 
-This document describes B<autoinst> version 20210401.
+This document describes B<autoinst> version 20210721.
 
 
 =head1 RECENT CHANGES
@@ -4009,6 +4038,26 @@
 
 =over 12
 
+=item I<2021-07-21>
+
+Bugfixes:
+
+=over 3
+
+=item -
+
+Yet another problem with argument quoting on Windows.
+
+=item -
+
+Selecting numerator/denominator fonts didn't work as documented.
+
+=item -
+
+Font info parsing failed for Microsoft Sitka and LucasFonts Thesis.
+
+=back
+
 =item I<2021-04-01>
 
 The I<-encoding> option now also accepts filenames of encoding files

Modified: trunk/Master/texmf-dist/scripts/fontools/ot2kpx
===================================================================
--- trunk/Master/texmf-dist/scripts/fontools/ot2kpx	2021-07-20 23:48:46 UTC (rev 60004)
+++ trunk/Master/texmf-dist/scripts/fontools/ot2kpx	2021-07-21 20:46:10 UTC (rev 60005)
@@ -38,7 +38,7 @@
 use List::Util @List::Util::EXPORT_OK;
 use Pod::Usage;
 
-my $VERSION = "20210401";
+my $VERSION = "20210721";
 
 our ($NUM_GLYPHS, $UNITS_PER_EM, %kern);
 
@@ -858,7 +858,7 @@
 
 =head1 VERSION
 
-This document describes B<ot2kpx> version 20210401.
+This document describes B<ot2kpx> version 20210721.
 
 
 =head1 RECENT CHANGES



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