texlive[53593] trunk: fontools (29jan20)

commits+karl at tug.org commits+karl at tug.org
Wed Jan 29 23:38:26 CET 2020


Revision: 53593
          http://tug.org/svn/texlive?view=revision&revision=53593
Author:   karl
Date:     2020-01-29 23:38:26 +0100 (Wed, 29 Jan 2020)
Log Message:
-----------
fontools (29jan20)

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/tlmgr.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/README
    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	2020-01-29 22:37:53 UTC (rev 53592)
+++ trunk/Build/source/texk/texlive/linked_scripts/fontools/afm2afm	2020-01-29 22:38:26 UTC (rev 53593)
@@ -4,7 +4,7 @@
 
 ----------------------------------------------------------------------------
 
-    Copyright (C) 2005-2019 Marc Penninga.
+    Copyright (C) 2005-2020 Marc Penninga.
 
     This program is free software; you can redistribute it and/or
     modify it under the terms of the GNU General Public License
@@ -37,7 +37,7 @@
 use Getopt::Long;
 use Pod::Usage;
 
-my $VERSION = "20191126";
+my $VERSION = "20200129";
 
 parse_commandline();
 
@@ -398,7 +398,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2005-2019 Marc Penninga.
+Copyright (C) 2005-2020 Marc Penninga.
 
 
 =head1 LICENSE
@@ -421,7 +421,7 @@
 
 =head1 VERSION
 
-This document describes B<afm2afm> version 20191126.
+This document describes B<afm2afm> version 20200129.
 
 
 =head1 RECENT CHANGES

Modified: trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst	2020-01-29 22:37:53 UTC (rev 53592)
+++ trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst	2020-01-29 22:38:26 UTC (rev 53593)
@@ -4,7 +4,7 @@
 
 ----------------------------------------------------------------------------
 
-    Copyright (C) 2005-2019 Marc Penninga.
+    Copyright (C) 2005-2020 Marc Penninga.
 
     This program is free software; you can redistribute it and/or
     modify it under the terms of the GNU General Public License
@@ -40,7 +40,7 @@
 use Pod::Usage ();
 use POSIX ();
 
-my $VERSION = '20191126';
+my $VERSION = '20200129';
 
 my ($d, $m, $y) = (localtime time)[3 .. 5];
 my $TODAY = sprintf "%04d/%02d/%02d", $y + 1900, $m + 1, $d;
@@ -89,7 +89,7 @@
     - width:  uc, ec, c, sc, m, sx, x, ex, ux
 
     These codes are not always a perfect match with the weights and widths
-    present in a font family; some families (especially sanserif ones)
+    present in a font family; some families (especially many sans serif ones)
     contain more or different weights and widths, and the naming of those
     weights and widths isn't always consistent between font families.
     To handle this situation, we use a two-tiered approach:
@@ -199,15 +199,6 @@
 
     The NFSS_SHAPE table maps various shape names to NFSS codes.
 
-    Note that this table works the other way around compared to
-    the two previous tables; it directly maps shape names to NFSS codes.
-    The reason the other tables are a bit contorted is that there,
-    we might have multiple weighs or widths mapping to the same code,
-    and we need a way to prioritise some weights/widths over others.
-
-    For shapes, that's not the case; font families don't have both Slanted
-    and Oblique shapes, since these are different names for the same thing.
-
     Like in the other NFSS_* tables, entries may be added to teach autoinst
     about new shapes.
 
@@ -219,8 +210,6 @@
     roman       =>  'n',
     upright     =>  'n',
     italic      =>  'it',
-    cursive     =>  'it',
-    kursiv      =>  'it',
     inclined    =>  'sl',
     oblique     =>  'sl',
     slanted     =>  'sl',
@@ -304,7 +293,7 @@
 
 =begin Comment
 
-    The next table is used to generate extra ssub rules in the .fd files
+    The SSUB_SHAPE table is used to generate extra ssub rules in .fd files
     to map missing Slanted shapes to Italic and vice versa.
 
 =end Comment
@@ -463,15 +452,18 @@
 
 
 sub main {
+    print "autoinst, version $VERSION\n";
+
     ARGV::parse_options();
 
     my @fonts = map { Fontinfo::parse_fontinfo($_) } @ARGV;
 
+    $ARGV{logfile} ||= sprintf "%s.log", lc $fonts[0]->{family};
     create_logfile(@fonts);
     Fontinfo::assert_unique(@fonts);
 
     # We can only handle the '-inferiors=auto' option now,
-    # since this requires knowing which inferior figures this font supports;
+    # since we need to know which inferior figures this font supports;
     # so we have to do the font info parsing first.
     if ($ARGV{inferiors} eq 'auto') {
         Fontinfo::handle_auto_inferiors(@fonts);
@@ -517,6 +509,7 @@
     }
 
     close $ARGV{logfile};
+    print "\n";
 
     return;
 }
@@ -751,6 +744,7 @@
     }
     open my $LOG, '>>', $ARGV{logfile}
         or die "$0: cannot create $ARGV{logfile}: $!";
+    $ARGV{logfile} = $LOG;
 
     print {$LOG} <<"END_ARGUMENTS";
 
@@ -787,10 +781,9 @@
     fractions:          @{[ $ARGV{fractions}    ? 'yes' : 'no' ]}
     ligatures:          @{[ $ARGV{ligatures}    ? 'yes' : 'no' ]}
 
-    dry run/real:       @{[ $ARGV{dryrun}       ? 'dry run' : 'real' ]}
     auto/manual:        @{[ $ARGV{manual}       ? 'manual'  : 'auto' ]}
     target:             $ARGV{target}
-    extra:              @{[ $ARGV{extra} || '<empty>' ]}
+    extra:              $ARGV{extra}
 
     figurekern:         @{[ $ARGV{figurekern}   ? 'keep' : 'remove' ]}
     mergewidths:        @{[ $ARGV{mergewidths}  ? 'yes' : 'no' ]}
@@ -797,35 +790,13 @@
     mergeweights:       @{[ $ARGV{mergeweights} ? 'yes' : 'no' ]}
     mergeshapes:        @{[ $ARGV{mergeshapes}  ? 'yes' : 'no' ]}
 
-    nfssweight:         @{[ join q{, }, @{$ARGV{nfssweight}} or '-' ]}
-    nfsswidth:          @{[ join q{, }, @{$ARGV{nfsswidth}}  or '-' ]}
+    nfssweight:         @{[ join q{, }, @{$ARGV{nfssweight}} ]}
+    nfsswidth:          @{[ join q{, }, @{$ARGV{nfsswidth}}  ]}
 
+    @{[ $ARGV{dryrun} ? 'DRY RUN' : '' ]}
+
 END_ARGUMENTS
 
-    my %fontfamilies = map { ( $_->{family} => 1 ) } @fonts;
-    my @fontfamilies = keys %fontfamilies;
-    if (scalar @fontfamilies > 1) {
-        warn <<"END_WARNING_MULTIPLE_FAMILIES";
-[WARNING]   Your fonts seem to belong to multiple families:
-
-            @{[ join( "\n" . q{ } x 12, sort @fontfamilies ) ]}
-
-            "autoinst" performs best when installing one family at a time.
-            If you think your fonts should all be in the same family,
-            you might have found a bug in autoinst's font info parsing.
-
-            Please see the log file $ARGV{logfile} for details on how
-            the fonts' families, weights, widths and shapes were parsed.
-END_WARNING_MULTIPLE_FAMILIES
-
-        # increase verbosity if necessary, to log all relevant info
-        if ($ARGV{verbose} < 1) {
-            $ARGV{verbose} = 1;
-        }
-    }
-
-    $ARGV{logfile} = $LOG;
-
     return if $ARGV{verbose} < 1;
 
     print {$LOG} '-' x 76 . "\n\nResults of font info parsing:\n";
@@ -836,10 +807,11 @@
     $font->{filename}
         Name:       $font->{name}
         Family:     $font->{family}
+        Subfamily:  $font->{subfamily}
         Weight:     $font->{weight} ($font->{weight_class})
         Width:      $font->{width} ($font->{width_class})
         Shape:      $font->{shape} @{[ $font->{is_smallcaps}
-                                            ? '(smallcaps)' : '' ]}
+                                            ? 'smallcaps' : '' ]}
         Size:       $font->{minsize}-$font->{maxsize}
         Features:   @{[ join ', ', sort keys %{$font->{feature}} ]}
 END_PARSE_FONT
@@ -905,6 +877,7 @@
     }
 
     return if $ARGV{verbose} < 2;
+    print {$LOG} "\n\n";
     print {$LOG} join "\n\n", @cmds;
     print {$LOG} "\n";
 }
@@ -981,7 +954,7 @@
     return join ' ', 'otftotfm',
                      ($ARGV{manual} ? '--pl' : '--automatic'),
                      "--encoding=$item->{encoding}[0]",
-                     set_targetdirs($item->{font}{family}),
+                     set_targetdirs($item->{font}),
                      '--no-updmap',
                      ($item->{font}{filename} =~ m/[.]ttf\z/xmsi
                         ? '--no-type1'
@@ -1008,23 +981,34 @@
 #-----------------------------------------------------------------------
 # Return a string with all "directory" options for otftotfm set
 #-----------------------------------------------------------------------
-my @FILETYPES = qw(tfm vf type1 truetype);
-
 sub set_targetdirs {
-    my $family = shift;
+    my $font = shift;
 
-    my %dir = map { ($_ => File::Spec->catdir(
-                        $ARGV{target},
-                        'fonts',
-                        $_,
-                        $ARGV{vendor},
-                        $ARGV{typeface} || $family))
+    my $family = $font->{family};
+    my ($fonttype) = map { lc $_ } $font->{filename} =~ m/[.]([ot]tf)\z/xmsi;
+
+    my @FILETYPES = qw(tfm vf);
+    push @FILETYPES, $fonttype eq 'otf' ? qw(type1)
+                   : $fonttype eq 'ttf' ? qw(truetype)
+                   :                      qw(type1 truetype)
+                   ;
+
+    my %dir = map { (
+                        $_ => File::Spec->catdir(
+                            $ARGV{target},
+                            'fonts',
+                            $_,
+                            $ARGV{vendor},
+                            $ARGV{typeface} || $family
+                        )
+                    )
                   }
                   @FILETYPES;
 
-    $dir{$_} = File::Spec->catdir(
-            $ARGV{target}, 'fonts', $_, 'dvips', $ARGV{typeface} || $family)
-        for qw(enc map);
+    $dir{$_}
+        = File::Spec->catdir(
+            $ARGV{target}, 'fonts', $_, 'dvips', $ARGV{typeface} || $family
+        ) for qw(enc map);
 
     File::Path::make_path(values %dir) unless $ARGV{dryrun};
 
@@ -1085,7 +1069,7 @@
     -manual                 Manual mode (see documentation)
 
     -(no)figurekern         Keep or remove kerns between tabular figures
-    -(no)mergewidths        Merge Condended/Extended subfamilies with main
+    -(no)mergewidths        Merge condended/extended subfamilies with main
     -(no)mergeweights       Merge separate weights with main family
     -(no)mergeshapes        Merge separate shapes with main family
 
@@ -1461,7 +1445,6 @@
 
     # In many font families, each font is in a subfamily of its own;
     # so we remove width, weight and shape from the 'subfamily' value.
-    my $subst;
     $data{subfamily} =~ s/$info->{width}//xmsi;
     $data{subfamily} =~ s/$info->{weight}//xmsi;
     $data{subfamily} =~ s/$info->{shape}//xmsi;
@@ -1520,8 +1503,13 @@
 
     # Some font families put extreme weights into separate families;
     # we provide an option to merge these with the 'main' font family.
+    # Note that if the font's family name includes the word "Text"
+    # (as in Libre Caslon Text) this should not be mistaken for a weight.
     if ($ARGV{mergeweights}) {
         my $weights = join '|', mqrs(@WEIGHTS), qw(medium regular);
+        if ( $info->{family} =~ m/text \z/xmsi ) {
+            $weights =~ s/text[|]?//xms;
+        }
         if ( $info->{family} =~ m/(.+?) (${weights}) \z/xmsi
                 and ( $info->{weight} eq 'regular'
                    or $info->{weight} eq ( $UNABBREVIATE{ lc($2) } // lc($2) )
@@ -1532,14 +1520,11 @@
         }
     }
 
-    # Fix confusion about "Text": weight vs part of familyname.
-    # In the latter case, we strip it off anyway.
+    # Strip off the "Text" from family names that contain this string.
+    # This was a crude way to fix a bug in the previous paragraph;
+    # it's unnecessary now, but we don't want to break the old behaviour.
     $info->{family} =~ s/text \z//xmsi;
 
-    if ( !$ARGV{logfile} ) {
-        $ARGV{logfile} = sprintf "%s.log", lc $info->{family}
-    }
-
     $info->{basicshape} = $NFSS_SHAPE{$info->{shape}};
 
     # We define 'series' as 'weight + width'. This matches NFSS,
@@ -1708,6 +1693,28 @@
         die $err_details, $ERR_PARSE;
     }
 
+    my %fontfamilies = map { ( $_->{family} => 1 ) } @fonts;
+    my @fontfamilies = keys %fontfamilies;
+    if (scalar @fontfamilies > 1) {
+        warn <<"END_WARNING_MULTIPLE_FAMILIES";
+[WARNING]   Your fonts seem to belong to multiple families:
+
+                @{[ join( "\n" . q{ } x 16, sort @fontfamilies ) ]}
+
+            "autoinst" performs best when installing one family at a time.
+            If you think your fonts should all be in the same family,
+            you may have found a bug in autoinst's font info parsing.
+
+            Please see the log file for details on how the fonts' families,
+            weights, widths and shapes were parsed.
+END_WARNING_MULTIPLE_FAMILIES
+
+        # increase verbosity if necessary, to log all relevant info
+        if ($ARGV{verbose} < 1) {
+            $ARGV{verbose} = 1;
+        }
+    }
+
     return 1;
 }
 
@@ -2461,7 +2468,7 @@
     SHAPE                               CODE
     --------------------------------    ----
     Roman, Upright                      n
-    Italic, Cursive, Kursive            it
+    Italic                              it
     Oblique, Slant(ed), Incline(d)      sl
 
 (I<Exception:> Adobe Silentium Pro contains two Roman shapes;
@@ -2810,7 +2817,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2005-2019 Marc Penninga.
+Copyright (C) 2005-2020 Marc Penninga.
 
 
 =head1 LICENSE
@@ -2833,7 +2840,7 @@
 
 =head1 VERSION
 
-This document describes B<autoinst> version 20191126.
+This document describes B<autoinst> version 20200129.
 
 
 =head1 RECENT CHANGES
@@ -2842,6 +2849,10 @@
 
 =over 12
 
+=item I<2020-01-29>
+
+Don't create empty subdirectories in the target TEXMF tree.
+
 =item I<2019-11-18>
 
 Fine-tuned calling of F<kpsewhich> on Windows (patch by Akira Kakuto).

Modified: trunk/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx	2020-01-29 22:37:53 UTC (rev 53592)
+++ trunk/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx	2020-01-29 22:38:26 UTC (rev 53593)
@@ -4,7 +4,7 @@
 
 ----------------------------------------------------------------------------
 
-    Copyright (C) 2005-2019 Marc Penninga.
+    Copyright (C) 2005-2020 Marc Penninga.
 
     This program is free software; you can redistribute it and/or
     modify it under the terms of the GNU General Public License
@@ -38,7 +38,7 @@
 use List::Util @List::Util::EXPORT_OK;
 use Pod::Usage;
 
-my $VERSION = "20191126";
+my $VERSION = "20200129";
 
 our ($NUM_GLYPHS, $UNITS_PER_EM, %kern);
 
@@ -835,7 +835,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2005-2019 Marc Penninga.
+Copyright (C) 2005-2020 Marc Penninga.
 
 
 =head1 LICENSE
@@ -858,7 +858,7 @@
 
 =head1 VERSION
 
-This document describes B<ot2kpx> version 20191126.
+This document describes B<ot2kpx> version 20200129.
 
 
 =head1 RECENT CHANGES

Modified: trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl	2020-01-29 22:37:53 UTC (rev 53592)
+++ trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl	2020-01-29 22:38:26 UTC (rev 53593)
@@ -1,12 +1,12 @@
 #!/usr/bin/env perl
-# $Id: tlmgr.pl 53428 2020-01-16 23:29:27Z karl $
+# $Id: tlmgr.pl 53582 2020-01-28 14:16:34Z siepo $
 #
 # Copyright 2008-2020 Norbert Preining
 # This file is licensed under the GNU General Public License version 2
 # or any later version.
 
-my $svnrev = '$Revision: 53428 $';
-my $datrev = '$Date: 2020-01-17 00:29:27 +0100 (Fri, 17 Jan 2020) $';
+my $svnrev = '$Revision: 53582 $';
+my $datrev = '$Date: 2020-01-28 15:16:34 +0100 (Tue, 28 Jan 2020) $';
 my $tlmgrrevision;
 my $tlmgrversion;
 my $prg;
@@ -2359,11 +2359,12 @@
   >con echo DO NOT CLOSE THIS WINDOW!
   >con echo TeX Live infrastructure update in progress ...
   >con echo Detailed command logging to $upd_log
-  chdir /d "%~dp0.."
+  pushd "%~dp0.."
   if not errorlevel 1 goto :update
   >con echo Could not change working directory to "%~dp0.."
   >con echo Aborting infrastructure update, no changes have been made.
   >con $gui_pause 
+  popd
   exit /b 1
     
 :update
@@ -2379,6 +2380,7 @@
   >con echo Infrastructure update finished successfully.
   >con echo $post_update_msg
   >con $gui_pause 
+  popd
   exit /b 0
 
 :rollback
@@ -2395,6 +2397,7 @@
   >con echo self restore: @rst_info
   >con echo Infrastructure update failed. Previous version has been restored.
   >con $gui_pause 
+  popd
   exit /b 1
 
 :panic
@@ -2405,6 +2408,7 @@
   >con echo To repair your TeX Live installation download and run:
   >con echo $TeXLive::TLConfig::TeXLiveURL/update-tlmgr-latest.exe
   >con $gui_pause 
+  popd
   exit /b 666
 EOF
 
@@ -3529,14 +3533,14 @@
 
   # only when we are not dry-running we restart the program
   if (!win32() && $restart_tlmgr && !$opts{"dry-run"} && !$opts{"list"}) {
-    info ("Restarting tlmgr to complete update ...\n");
+    info("$prg: Restarting to complete update ...\n");
     debug("restarting tlmgr @::SAVEDARGV\n");
     # cleanup temp files before re-exec-ing tlmgr
     File::Temp::cleanup();
     exec("tlmgr", @::SAVEDARGV);
     # we need warn here, otherwise perl gives warnings!
-    warn ("$prg: cannot restart tlmgr, please retry update\n");
-    return ($F_ERROR);
+    warn("$prg: cannot restart tlmgr, please retry update\n");
+    return($F_ERROR);
   }
 
   # for --dry-run we cannot restart tlmgr (no way to fake successful 
@@ -3547,7 +3551,7 @@
     $opts{"dry-run"} = -1;
     $localtlpdb = undef;
     $remotetlpdb = undef;
-    info ("Restarting tlmgr to complete update ...\n");
+    info ("$prg --dry-run: would restart tlmgr to complete update ...\n");
     $ret |= action_update();
     return ($ret);
   }
@@ -6152,7 +6156,7 @@
           info("$k = " . $cf->value($k) . "\n");
         }
       } else {
-        info("$arg config file $fn not present\n");
+        info("$prg: $arg config file $fn not present\n");
         return($F_WARNING);
       }
     } else {
@@ -6242,7 +6246,7 @@
       } elsif (!defined($val)) {
         if (defined($opts{'delete'})) {
           if (defined($cf->value($key))) {
-            info("removing setting $arg $key value: " . $cf->value($key)
+            info("$prg: removing setting $arg $key value: " . $cf->value($key)
                  . "from $fn\n"); 
             $cf->delete_key($key);
           } else {
@@ -7471,9 +7475,9 @@
       # only echo out if explicitly asked for verbose which is done
       # in the backup --clean action
       if ($verb) {
-        info ("Removing backup $backupdir/$e->[1]\n");
+        info("$prg: Removing backup $backupdir/$e->[1]\n");
       } else {
-        debug ("Removing backup $backupdir/$e->[1]\n");
+        debug("Removing backup $backupdir/$e->[1]\n");
       }
       unlink("$backupdir/$e->[1]") unless $dryrun;
     }
@@ -10008,7 +10012,7 @@
 distribution (L<https://tug.org/texlive>) and both are licensed under the
 GNU General Public License Version 2 or later.
 
-$Id: tlmgr.pl 53428 2020-01-16 23:29:27Z karl $
+$Id: tlmgr.pl 53582 2020-01-28 14:16:34Z siepo $
 =cut
 
 # test HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html

Modified: trunk/Master/texmf-dist/doc/man/man1/afm2afm.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/afm2afm.1	2020-01-29 22:37:53 UTC (rev 53592)
+++ trunk/Master/texmf-dist/doc/man/man1/afm2afm.1	2020-01-29 22:38:26 UTC (rev 53593)
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "AFM2AFM 1"
-.TH AFM2AFM 1 "2019-11-26" "fontools" "Marc Penninga"
+.TH AFM2AFM 1 "2020-01-29" "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
@@ -206,7 +206,7 @@
 Marc Penninga <marcpenninga at gmail.com>
 .SH "COPYRIGHT"
 .IX Header "COPYRIGHT"
-Copyright (C) 2005\-2019 Marc Penninga.
+Copyright (C) 2005\-2020 Marc Penninga.
 .SH "LICENSE"
 .IX Header "LICENSE"
 This program is free software; you can redistribute it and/or modify
@@ -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 20191126.
+This document describes \fBafm2afm\fR version 20200129.
 .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	2020-01-29 22:37:53 UTC (rev 53592)
+++ trunk/Master/texmf-dist/doc/man/man1/autoinst.1	2020-01-29 22:38:26 UTC (rev 53593)
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "AUTOINST 1"
-.TH AUTOINST 1 "2019-11-26" "fontools" "Marc Penninga"
+.TH AUTOINST 1 "2020-01-29" "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
@@ -411,7 +411,7 @@
 \&    SHAPE                               CODE
 \&    \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-    \-\-\-\-
 \&    Roman, Upright                      n
-\&    Italic, Cursive, Kursive            it
+\&    Italic                              it
 \&    Oblique, Slant(ed), Incline(d)      sl
 .Ve
 .PP
@@ -724,7 +724,7 @@
 don't paraphase.
 .SH "COPYRIGHT"
 .IX Header "COPYRIGHT"
-Copyright (C) 2005\-2019 Marc Penninga.
+Copyright (C) 2005\-2020 Marc Penninga.
 .SH "LICENSE"
 .IX Header "LICENSE"
 This program is free software; you can redistribute it and/or modify
@@ -741,10 +741,13 @@
 \&\s-1GNU\s0 General Public License for more details.
 .SH "VERSION"
 .IX Header "VERSION"
-This document describes \fBautoinst\fR version 20191126.
+This document describes \fBautoinst\fR version 20200129.
 .SH "RECENT CHANGES"
 .IX Header "RECENT CHANGES"
 (See the source for the full story, all the way back to 2005.)
+.IP "\fI2020\-01\-29\fR" 12
+.IX Item "2020-01-29"
+Don't create empty subdirectories in the target \s-1TEXMF\s0 tree.
 .IP "\fI2019\-11\-18\fR" 12
 .IX Item "2019-11-18"
 Fine-tuned calling of \fIkpsewhich\fR on Windows (patch by Akira Kakuto).

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	2020-01-29 22:37:53 UTC (rev 53592)
+++ trunk/Master/texmf-dist/doc/man/man1/ot2kpx.1	2020-01-29 22:38:26 UTC (rev 53593)
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "OT2KPX 1"
-.TH OT2KPX 1 "2019-11-26" "fontools" "Marc Penninga"
+.TH OT2KPX 1 "2020-01-29" "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
@@ -211,7 +211,7 @@
 Marc Penninga <marcpenninga at gmail.com>
 .SH "COPYRIGHT"
 .IX Header "COPYRIGHT"
-Copyright (C) 2005\-2019 Marc Penninga.
+Copyright (C) 2005\-2020 Marc Penninga.
 .SH "LICENSE"
 .IX Header "LICENSE"
 This program is free software; you can redistribute it and/or modify
@@ -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 20191126.
+This document describes \fBot2kpx\fR version 20200129.
 .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/README
===================================================================
--- trunk/Master/texmf-dist/doc/support/fontools/README	2020-01-29 22:37:53 UTC (rev 53592)
+++ trunk/Master/texmf-dist/doc/support/fontools/README	2020-01-29 22:38:26 UTC (rev 53593)
@@ -78,6 +78,6 @@
 LICENSE & COPYRIGHT
 ===================
 
-This software is copyright (C) 2005-2019 Marc Penninga.
+This software is copyright (C) 2005-2020 Marc Penninga.
 It is released under the terms of the GNU General Public Licence;
 see the file GPLv2.txt for the license conditions.

Modified: trunk/Master/texmf-dist/doc/support/fontools/splitttc
===================================================================
--- trunk/Master/texmf-dist/doc/support/fontools/splitttc	2020-01-29 22:37:53 UTC (rev 53592)
+++ trunk/Master/texmf-dist/doc/support/fontools/splitttc	2020-01-29 22:38:26 UTC (rev 53593)
@@ -4,7 +4,7 @@
 
 ----------------------------------------------------------------------------
 
-    Copyright (C) 2019 Marc Penninga.
+    Copyright (C) 2020 Marc Penninga.
 
     This program is free software; you can redistribute it and/or
     modify it under the terms of the GNU General Public License
@@ -37,7 +37,7 @@
 use Getopt::Long;
 use Pod::Usage;
 
-my $VERSION = "20191126";
+my $VERSION = "20200129";
 
 parse_commandline();
 
@@ -222,7 +222,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2019 Marc Penninga.
+Copyright (C) 2020 Marc Penninga.
 
 
 =head1 LICENSE
@@ -245,7 +245,7 @@
 
 =head1 VERSION
 
-This document describes B<splitttc> version 20191126.
+This document describes B<splitttc> version 20200129.
 
 
 =head1 RECENT CHANGES

Modified: trunk/Master/texmf-dist/scripts/fontools/afm2afm
===================================================================
--- trunk/Master/texmf-dist/scripts/fontools/afm2afm	2020-01-29 22:37:53 UTC (rev 53592)
+++ trunk/Master/texmf-dist/scripts/fontools/afm2afm	2020-01-29 22:38:26 UTC (rev 53593)
@@ -4,7 +4,7 @@
 
 ----------------------------------------------------------------------------
 
-    Copyright (C) 2005-2019 Marc Penninga.
+    Copyright (C) 2005-2020 Marc Penninga.
 
     This program is free software; you can redistribute it and/or
     modify it under the terms of the GNU General Public License
@@ -37,7 +37,7 @@
 use Getopt::Long;
 use Pod::Usage;
 
-my $VERSION = "20191126";
+my $VERSION = "20200129";
 
 parse_commandline();
 
@@ -398,7 +398,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2005-2019 Marc Penninga.
+Copyright (C) 2005-2020 Marc Penninga.
 
 
 =head1 LICENSE
@@ -421,7 +421,7 @@
 
 =head1 VERSION
 
-This document describes B<afm2afm> version 20191126.
+This document describes B<afm2afm> version 20200129.
 
 
 =head1 RECENT CHANGES

Modified: trunk/Master/texmf-dist/scripts/fontools/autoinst
===================================================================
--- trunk/Master/texmf-dist/scripts/fontools/autoinst	2020-01-29 22:37:53 UTC (rev 53592)
+++ trunk/Master/texmf-dist/scripts/fontools/autoinst	2020-01-29 22:38:26 UTC (rev 53593)
@@ -4,7 +4,7 @@
 
 ----------------------------------------------------------------------------
 
-    Copyright (C) 2005-2019 Marc Penninga.
+    Copyright (C) 2005-2020 Marc Penninga.
 
     This program is free software; you can redistribute it and/or
     modify it under the terms of the GNU General Public License
@@ -40,7 +40,7 @@
 use Pod::Usage ();
 use POSIX ();
 
-my $VERSION = '20191126';
+my $VERSION = '20200129';
 
 my ($d, $m, $y) = (localtime time)[3 .. 5];
 my $TODAY = sprintf "%04d/%02d/%02d", $y + 1900, $m + 1, $d;
@@ -89,7 +89,7 @@
     - width:  uc, ec, c, sc, m, sx, x, ex, ux
 
     These codes are not always a perfect match with the weights and widths
-    present in a font family; some families (especially sanserif ones)
+    present in a font family; some families (especially many sans serif ones)
     contain more or different weights and widths, and the naming of those
     weights and widths isn't always consistent between font families.
     To handle this situation, we use a two-tiered approach:
@@ -199,15 +199,6 @@
 
     The NFSS_SHAPE table maps various shape names to NFSS codes.
 
-    Note that this table works the other way around compared to
-    the two previous tables; it directly maps shape names to NFSS codes.
-    The reason the other tables are a bit contorted is that there,
-    we might have multiple weighs or widths mapping to the same code,
-    and we need a way to prioritise some weights/widths over others.
-
-    For shapes, that's not the case; font families don't have both Slanted
-    and Oblique shapes, since these are different names for the same thing.
-
     Like in the other NFSS_* tables, entries may be added to teach autoinst
     about new shapes.
 
@@ -219,8 +210,6 @@
     roman       =>  'n',
     upright     =>  'n',
     italic      =>  'it',
-    cursive     =>  'it',
-    kursiv      =>  'it',
     inclined    =>  'sl',
     oblique     =>  'sl',
     slanted     =>  'sl',
@@ -304,7 +293,7 @@
 
 =begin Comment
 
-    The next table is used to generate extra ssub rules in the .fd files
+    The SSUB_SHAPE table is used to generate extra ssub rules in .fd files
     to map missing Slanted shapes to Italic and vice versa.
 
 =end Comment
@@ -463,15 +452,18 @@
 
 
 sub main {
+    print "autoinst, version $VERSION\n";
+
     ARGV::parse_options();
 
     my @fonts = map { Fontinfo::parse_fontinfo($_) } @ARGV;
 
+    $ARGV{logfile} ||= sprintf "%s.log", lc $fonts[0]->{family};
     create_logfile(@fonts);
     Fontinfo::assert_unique(@fonts);
 
     # We can only handle the '-inferiors=auto' option now,
-    # since this requires knowing which inferior figures this font supports;
+    # since we need to know which inferior figures this font supports;
     # so we have to do the font info parsing first.
     if ($ARGV{inferiors} eq 'auto') {
         Fontinfo::handle_auto_inferiors(@fonts);
@@ -517,6 +509,7 @@
     }
 
     close $ARGV{logfile};
+    print "\n";
 
     return;
 }
@@ -751,6 +744,7 @@
     }
     open my $LOG, '>>', $ARGV{logfile}
         or die "$0: cannot create $ARGV{logfile}: $!";
+    $ARGV{logfile} = $LOG;
 
     print {$LOG} <<"END_ARGUMENTS";
 
@@ -787,10 +781,9 @@
     fractions:          @{[ $ARGV{fractions}    ? 'yes' : 'no' ]}
     ligatures:          @{[ $ARGV{ligatures}    ? 'yes' : 'no' ]}
 
-    dry run/real:       @{[ $ARGV{dryrun}       ? 'dry run' : 'real' ]}
     auto/manual:        @{[ $ARGV{manual}       ? 'manual'  : 'auto' ]}
     target:             $ARGV{target}
-    extra:              @{[ $ARGV{extra} || '<empty>' ]}
+    extra:              $ARGV{extra}
 
     figurekern:         @{[ $ARGV{figurekern}   ? 'keep' : 'remove' ]}
     mergewidths:        @{[ $ARGV{mergewidths}  ? 'yes' : 'no' ]}
@@ -797,35 +790,13 @@
     mergeweights:       @{[ $ARGV{mergeweights} ? 'yes' : 'no' ]}
     mergeshapes:        @{[ $ARGV{mergeshapes}  ? 'yes' : 'no' ]}
 
-    nfssweight:         @{[ join q{, }, @{$ARGV{nfssweight}} or '-' ]}
-    nfsswidth:          @{[ join q{, }, @{$ARGV{nfsswidth}}  or '-' ]}
+    nfssweight:         @{[ join q{, }, @{$ARGV{nfssweight}} ]}
+    nfsswidth:          @{[ join q{, }, @{$ARGV{nfsswidth}}  ]}
 
+    @{[ $ARGV{dryrun} ? 'DRY RUN' : '' ]}
+
 END_ARGUMENTS
 
-    my %fontfamilies = map { ( $_->{family} => 1 ) } @fonts;
-    my @fontfamilies = keys %fontfamilies;
-    if (scalar @fontfamilies > 1) {
-        warn <<"END_WARNING_MULTIPLE_FAMILIES";
-[WARNING]   Your fonts seem to belong to multiple families:
-
-            @{[ join( "\n" . q{ } x 12, sort @fontfamilies ) ]}
-
-            "autoinst" performs best when installing one family at a time.
-            If you think your fonts should all be in the same family,
-            you might have found a bug in autoinst's font info parsing.
-
-            Please see the log file $ARGV{logfile} for details on how
-            the fonts' families, weights, widths and shapes were parsed.
-END_WARNING_MULTIPLE_FAMILIES
-
-        # increase verbosity if necessary, to log all relevant info
-        if ($ARGV{verbose} < 1) {
-            $ARGV{verbose} = 1;
-        }
-    }
-
-    $ARGV{logfile} = $LOG;
-
     return if $ARGV{verbose} < 1;
 
     print {$LOG} '-' x 76 . "\n\nResults of font info parsing:\n";
@@ -836,10 +807,11 @@
     $font->{filename}
         Name:       $font->{name}
         Family:     $font->{family}
+        Subfamily:  $font->{subfamily}
         Weight:     $font->{weight} ($font->{weight_class})
         Width:      $font->{width} ($font->{width_class})
         Shape:      $font->{shape} @{[ $font->{is_smallcaps}
-                                            ? '(smallcaps)' : '' ]}
+                                            ? 'smallcaps' : '' ]}
         Size:       $font->{minsize}-$font->{maxsize}
         Features:   @{[ join ', ', sort keys %{$font->{feature}} ]}
 END_PARSE_FONT
@@ -905,6 +877,7 @@
     }
 
     return if $ARGV{verbose} < 2;
+    print {$LOG} "\n\n";
     print {$LOG} join "\n\n", @cmds;
     print {$LOG} "\n";
 }
@@ -981,7 +954,7 @@
     return join ' ', 'otftotfm',
                      ($ARGV{manual} ? '--pl' : '--automatic'),
                      "--encoding=$item->{encoding}[0]",
-                     set_targetdirs($item->{font}{family}),
+                     set_targetdirs($item->{font}),
                      '--no-updmap',
                      ($item->{font}{filename} =~ m/[.]ttf\z/xmsi
                         ? '--no-type1'
@@ -1008,23 +981,34 @@
 #-----------------------------------------------------------------------
 # Return a string with all "directory" options for otftotfm set
 #-----------------------------------------------------------------------
-my @FILETYPES = qw(tfm vf type1 truetype);
-
 sub set_targetdirs {
-    my $family = shift;
+    my $font = shift;
 
-    my %dir = map { ($_ => File::Spec->catdir(
-                        $ARGV{target},
-                        'fonts',
-                        $_,
-                        $ARGV{vendor},
-                        $ARGV{typeface} || $family))
+    my $family = $font->{family};
+    my ($fonttype) = map { lc $_ } $font->{filename} =~ m/[.]([ot]tf)\z/xmsi;
+
+    my @FILETYPES = qw(tfm vf);
+    push @FILETYPES, $fonttype eq 'otf' ? qw(type1)
+                   : $fonttype eq 'ttf' ? qw(truetype)
+                   :                      qw(type1 truetype)
+                   ;
+
+    my %dir = map { (
+                        $_ => File::Spec->catdir(
+                            $ARGV{target},
+                            'fonts',
+                            $_,
+                            $ARGV{vendor},
+                            $ARGV{typeface} || $family
+                        )
+                    )
                   }
                   @FILETYPES;
 
-    $dir{$_} = File::Spec->catdir(
-            $ARGV{target}, 'fonts', $_, 'dvips', $ARGV{typeface} || $family)
-        for qw(enc map);
+    $dir{$_}
+        = File::Spec->catdir(
+            $ARGV{target}, 'fonts', $_, 'dvips', $ARGV{typeface} || $family
+        ) for qw(enc map);
 
     File::Path::make_path(values %dir) unless $ARGV{dryrun};
 
@@ -1085,7 +1069,7 @@
     -manual                 Manual mode (see documentation)
 
     -(no)figurekern         Keep or remove kerns between tabular figures
-    -(no)mergewidths        Merge Condended/Extended subfamilies with main
+    -(no)mergewidths        Merge condended/extended subfamilies with main
     -(no)mergeweights       Merge separate weights with main family
     -(no)mergeshapes        Merge separate shapes with main family
 
@@ -1461,7 +1445,6 @@
 
     # In many font families, each font is in a subfamily of its own;
     # so we remove width, weight and shape from the 'subfamily' value.
-    my $subst;
     $data{subfamily} =~ s/$info->{width}//xmsi;
     $data{subfamily} =~ s/$info->{weight}//xmsi;
     $data{subfamily} =~ s/$info->{shape}//xmsi;
@@ -1520,8 +1503,13 @@
 
     # Some font families put extreme weights into separate families;
     # we provide an option to merge these with the 'main' font family.
+    # Note that if the font's family name includes the word "Text"
+    # (as in Libre Caslon Text) this should not be mistaken for a weight.
     if ($ARGV{mergeweights}) {
         my $weights = join '|', mqrs(@WEIGHTS), qw(medium regular);
+        if ( $info->{family} =~ m/text \z/xmsi ) {
+            $weights =~ s/text[|]?//xms;
+        }
         if ( $info->{family} =~ m/(.+?) (${weights}) \z/xmsi
                 and ( $info->{weight} eq 'regular'
                    or $info->{weight} eq ( $UNABBREVIATE{ lc($2) } // lc($2) )
@@ -1532,14 +1520,11 @@
         }
     }
 
-    # Fix confusion about "Text": weight vs part of familyname.
-    # In the latter case, we strip it off anyway.
+    # Strip off the "Text" from family names that contain this string.
+    # This was a crude way to fix a bug in the previous paragraph;
+    # it's unnecessary now, but we don't want to break the old behaviour.
     $info->{family} =~ s/text \z//xmsi;
 
-    if ( !$ARGV{logfile} ) {
-        $ARGV{logfile} = sprintf "%s.log", lc $info->{family}
-    }
-
     $info->{basicshape} = $NFSS_SHAPE{$info->{shape}};
 
     # We define 'series' as 'weight + width'. This matches NFSS,
@@ -1708,6 +1693,28 @@
         die $err_details, $ERR_PARSE;
     }
 
+    my %fontfamilies = map { ( $_->{family} => 1 ) } @fonts;
+    my @fontfamilies = keys %fontfamilies;
+    if (scalar @fontfamilies > 1) {
+        warn <<"END_WARNING_MULTIPLE_FAMILIES";
+[WARNING]   Your fonts seem to belong to multiple families:
+
+                @{[ join( "\n" . q{ } x 16, sort @fontfamilies ) ]}
+
+            "autoinst" performs best when installing one family at a time.
+            If you think your fonts should all be in the same family,
+            you may have found a bug in autoinst's font info parsing.
+
+            Please see the log file for details on how the fonts' families,
+            weights, widths and shapes were parsed.
+END_WARNING_MULTIPLE_FAMILIES
+
+        # increase verbosity if necessary, to log all relevant info
+        if ($ARGV{verbose} < 1) {
+            $ARGV{verbose} = 1;
+        }
+    }
+
     return 1;
 }
 
@@ -2461,7 +2468,7 @@
     SHAPE                               CODE
     --------------------------------    ----
     Roman, Upright                      n
-    Italic, Cursive, Kursive            it
+    Italic                              it
     Oblique, Slant(ed), Incline(d)      sl
 
 (I<Exception:> Adobe Silentium Pro contains two Roman shapes;
@@ -2810,7 +2817,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2005-2019 Marc Penninga.
+Copyright (C) 2005-2020 Marc Penninga.
 
 
 =head1 LICENSE
@@ -2833,7 +2840,7 @@
 
 =head1 VERSION
 
-This document describes B<autoinst> version 20191126.
+This document describes B<autoinst> version 20200129.
 
 
 =head1 RECENT CHANGES
@@ -2842,6 +2849,10 @@
 
 =over 12
 
+=item I<2020-01-29>
+
+Don't create empty subdirectories in the target TEXMF tree.
+
 =item I<2019-11-18>
 
 Fine-tuned calling of F<kpsewhich> on Windows (patch by Akira Kakuto).

Modified: trunk/Master/texmf-dist/scripts/fontools/ot2kpx
===================================================================
--- trunk/Master/texmf-dist/scripts/fontools/ot2kpx	2020-01-29 22:37:53 UTC (rev 53592)
+++ trunk/Master/texmf-dist/scripts/fontools/ot2kpx	2020-01-29 22:38:26 UTC (rev 53593)
@@ -4,7 +4,7 @@
 
 ----------------------------------------------------------------------------
 
-    Copyright (C) 2005-2019 Marc Penninga.
+    Copyright (C) 2005-2020 Marc Penninga.
 
     This program is free software; you can redistribute it and/or
     modify it under the terms of the GNU General Public License
@@ -38,7 +38,7 @@
 use List::Util @List::Util::EXPORT_OK;
 use Pod::Usage;
 
-my $VERSION = "20191126";
+my $VERSION = "20200129";
 
 our ($NUM_GLYPHS, $UNITS_PER_EM, %kern);
 
@@ -835,7 +835,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2005-2019 Marc Penninga.
+Copyright (C) 2005-2020 Marc Penninga.
 
 
 =head1 LICENSE
@@ -858,7 +858,7 @@
 
 =head1 VERSION
 
-This document describes B<ot2kpx> version 20191126.
+This document describes B<ot2kpx> version 20200129.
 
 
 =head1 RECENT CHANGES



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