summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-01-29 22:38:26 +0000
committerKarl Berry <karl@freefriends.org>2020-01-29 22:38:26 +0000
commit33c0ff07c6b8e223c50750597cb6ff11399be9a8 (patch)
treea584b202cef797a8b763e2a644dad09c5e83bf23
parent015c5f064b14e4a79f151b46a6dd46b150520c81 (diff)
fontools (29jan20)
git-svn-id: svn://tug.org/texlive/trunk@53593 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/fontools/afm2afm8
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/fontools/autoinst151
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/fontools/ot2kpx8
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/tlmgr.pl30
-rw-r--r--Master/texmf-dist/doc/man/man1/afm2afm.16
-rw-r--r--Master/texmf-dist/doc/man/man1/afm2afm.man1.pdfbin27061 -> 26951 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/autoinst.111
-rw-r--r--Master/texmf-dist/doc/man/man1/autoinst.man1.pdfbin71002 -> 71053 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/ot2kpx.16
-rw-r--r--Master/texmf-dist/doc/man/man1/ot2kpx.man1.pdfbin27360 -> 27250 bytes
-rw-r--r--Master/texmf-dist/doc/support/fontools/README2
-rwxr-xr-xMaster/texmf-dist/doc/support/fontools/splitttc8
-rwxr-xr-xMaster/texmf-dist/scripts/fontools/afm2afm8
-rwxr-xr-xMaster/texmf-dist/scripts/fontools/autoinst151
-rwxr-xr-xMaster/texmf-dist/scripts/fontools/ot2kpx8
15 files changed, 213 insertions, 184 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/fontools/afm2afm b/Build/source/texk/texlive/linked_scripts/fontools/afm2afm
index 65d03e3ef3c..90b5c0bd4fa 100755
--- a/Build/source/texk/texlive/linked_scripts/fontools/afm2afm
+++ b/Build/source/texk/texlive/linked_scripts/fontools/afm2afm
@@ -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 File::Basename;
use Getopt::Long;
use Pod::Usage;
-my $VERSION = "20191126";
+my $VERSION = "20200129";
parse_commandline();
@@ -398,7 +398,7 @@ Marc Penninga <marcpenninga@gmail.com>
=head1 COPYRIGHT
-Copyright (C) 2005-2019 Marc Penninga.
+Copyright (C) 2005-2020 Marc Penninga.
=head1 LICENSE
@@ -421,7 +421,7 @@ See the GNU General Public License for more details.
=head1 VERSION
-This document describes B<afm2afm> version 20191126.
+This document describes B<afm2afm> version 20200129.
=head1 RECENT CHANGES
diff --git a/Build/source/texk/texlive/linked_scripts/fontools/autoinst b/Build/source/texk/texlive/linked_scripts/fontools/autoinst
index 038769de762..7ca9cad3787 100755
--- a/Build/source/texk/texlive/linked_scripts/fontools/autoinst
+++ b/Build/source/texk/texlive/linked_scripts/fontools/autoinst
@@ -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 Getopt::Long ();
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 @@ for my $full (keys %ABBREV) {
- 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 @@ my @WIDTHS = grep { $_ ne 'regular' } map { @{$_} } values %NFSS_WIDTH;
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 @@ my @NFSS_SHAPE = (
roman => 'n',
upright => 'n',
italic => 'it',
- cursive => 'it',
- kursiv => 'it',
inclined => 'sl',
oblique => 'sl',
slanted => 'sl',
@@ -304,7 +293,7 @@ my %SHAPE = (
=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 @@ my %STYLE_DEFAULTS = (
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 @@ sub main {
}
close $ARGV{logfile};
+ print "\n";
return;
}
@@ -751,6 +744,7 @@ sub create_logfile {
}
open my $LOG, '>>', $ARGV{logfile}
or die "$0: cannot create $ARGV{logfile}: $!";
+ $ARGV{logfile} = $LOG;
print {$LOG} <<"END_ARGUMENTS";
@@ -787,44 +781,21 @@ I'm using the following options:
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' ]}
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}} ]}
-END_ARGUMENTS
+ @{[ $ARGV{dryrun} ? 'DRY RUN' : '' ]}
- 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;
+END_ARGUMENTS
return if $ARGV{verbose} < 1;
@@ -836,10 +807,11 @@ END_WARNING_MULTIPLE_FAMILIES
$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 @@ END_FONTINFO
}
return if $ARGV{verbose} < 2;
+ print {$LOG} "\n\n";
print {$LOG} join "\n\n", @cmds;
print {$LOG} "\n";
}
@@ -981,7 +954,7 @@ sub make_cmdline {
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 @@ sub make_cmdline {
#-----------------------------------------------------------------------
# Return a string with all "directory" options for otftotfm set
#-----------------------------------------------------------------------
-my @FILETYPES = qw(tfm vf type1 truetype);
-
sub set_targetdirs {
- my $family = shift;
-
- my %dir = map { ($_ => File::Spec->catdir(
- $ARGV{target},
- 'fonts',
- $_,
- $ARGV{vendor},
- $ARGV{typeface} || $family))
+ my $font = shift;
+
+ 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 @@ Possible options:
-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 @@ sub parse_basicinfo {
# 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 @@ sub parse_basicinfo {
# 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 @@ sub parse_basicinfo {
}
}
- # 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 @@ sub assert_unique {
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 @@ The mapping of shapes to NFSS codes is done using the following table:
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 @@ don't paraphase.
=head1 COPYRIGHT
-Copyright (C) 2005-2019 Marc Penninga.
+Copyright (C) 2005-2020 Marc Penninga.
=head1 LICENSE
@@ -2833,7 +2840,7 @@ GNU General Public License for more details.
=head1 VERSION
-This document describes B<autoinst> version 20191126.
+This document describes B<autoinst> version 20200129.
=head1 RECENT CHANGES
@@ -2842,6 +2849,10 @@ This document describes B<autoinst> version 20191126.
=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).
diff --git a/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx b/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx
index 91e34e0fa8f..2fa8d8c456b 100755
--- a/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx
+++ b/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx
@@ -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 Getopt::Long ();
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 @@ Marc Penninga <marcpenninga@gmail.com>
=head1 COPYRIGHT
-Copyright (C) 2005-2019 Marc Penninga.
+Copyright (C) 2005-2020 Marc Penninga.
=head1 LICENSE
@@ -858,7 +858,7 @@ See the GNU General Public License for more details.
=head1 VERSION
-This document describes B<ot2kpx> version 20191126.
+This document describes B<ot2kpx> version 20200129.
=head1 RECENT CHANGES
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
index 2dd7ecb275b..b866336e023 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
@@ -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 @@ sub write_w32_updater {
>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 @@ sub write_w32_updater {
>con echo Infrastructure update finished successfully.
>con echo $post_update_msg
>con $gui_pause
+ popd
exit /b 0
:rollback
@@ -2395,6 +2397,7 @@ sub write_w32_updater {
>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 @@ sub write_w32_updater {
>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 @@ sub action_update {
# 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 @@ sub action_update {
$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 @@ sub action_conf {
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 @@ sub action_conf {
} 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 @@ sub clear_old_backups {
# 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 @@ This script and its documentation were written for the TeX Live
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
diff --git a/Master/texmf-dist/doc/man/man1/afm2afm.1 b/Master/texmf-dist/doc/man/man1/afm2afm.1
index bcbb14583ab..59599e37127 100644
--- a/Master/texmf-dist/doc/man/man1/afm2afm.1
+++ b/Master/texmf-dist/doc/man/man1/afm2afm.1
@@ -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 @@ and option names may be shortened to a unique prefix.
Marc Penninga <marcpenninga@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 @@ but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of
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.)
diff --git a/Master/texmf-dist/doc/man/man1/afm2afm.man1.pdf b/Master/texmf-dist/doc/man/man1/afm2afm.man1.pdf
index 9e2350dd832..d144e2e663e 100644
--- a/Master/texmf-dist/doc/man/man1/afm2afm.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/afm2afm.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/autoinst.1 b/Master/texmf-dist/doc/man/man1/autoinst.1
index b58879f639b..92842bf133a 100644
--- a/Master/texmf-dist/doc/man/man1/autoinst.1
+++ b/Master/texmf-dist/doc/man/man1/autoinst.1
@@ -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 @@ The mapping of shapes to \s-1NFSS\s0 codes is done using the following table:
\& SHAPE CODE
\& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-
\& Roman, Upright n
-\& Italic, Cursive, Kursive it
+\& Italic it
\& Oblique, Slant(ed), Incline(d) sl
.Ve
.PP
@@ -724,7 +724,7 @@ If you see any error messages, please include these \fIverbatim\fR;
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 @@ but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of
\&\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).
diff --git a/Master/texmf-dist/doc/man/man1/autoinst.man1.pdf b/Master/texmf-dist/doc/man/man1/autoinst.man1.pdf
index f5df897fc63..215a7989c7b 100644
--- a/Master/texmf-dist/doc/man/man1/autoinst.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/autoinst.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/ot2kpx.1 b/Master/texmf-dist/doc/man/man1/ot2kpx.1
index c0eebad6b18..cb246c1023a 100644
--- a/Master/texmf-dist/doc/man/man1/ot2kpx.1
+++ b/Master/texmf-dist/doc/man/man1/ot2kpx.1
@@ -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 @@ wouldn't make any difference (apart from further complicating the code).
Marc Penninga <marcpenninga@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 @@ but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of
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.)
diff --git a/Master/texmf-dist/doc/man/man1/ot2kpx.man1.pdf b/Master/texmf-dist/doc/man/man1/ot2kpx.man1.pdf
index 1f8361d4fec..77ce3a11475 100644
--- a/Master/texmf-dist/doc/man/man1/ot2kpx.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/ot2kpx.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/fontools/README b/Master/texmf-dist/doc/support/fontools/README
index 4ceee70eff8..50e0114ac22 100644
--- a/Master/texmf-dist/doc/support/fontools/README
+++ b/Master/texmf-dist/doc/support/fontools/README
@@ -78,6 +78,6 @@ See the GNU General Public License for more details.
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.
diff --git a/Master/texmf-dist/doc/support/fontools/splitttc b/Master/texmf-dist/doc/support/fontools/splitttc
index 44da4eafff2..5f609f30036 100755
--- a/Master/texmf-dist/doc/support/fontools/splitttc
+++ b/Master/texmf-dist/doc/support/fontools/splitttc
@@ -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 File::Basename;
use Getopt::Long;
use Pod::Usage;
-my $VERSION = "20191126";
+my $VERSION = "20200129";
parse_commandline();
@@ -222,7 +222,7 @@ Marc Penninga <marcpenninga@gmail.com>
=head1 COPYRIGHT
-Copyright (C) 2019 Marc Penninga.
+Copyright (C) 2020 Marc Penninga.
=head1 LICENSE
@@ -245,7 +245,7 @@ See the GNU General Public License for more details.
=head1 VERSION
-This document describes B<splitttc> version 20191126.
+This document describes B<splitttc> version 20200129.
=head1 RECENT CHANGES
diff --git a/Master/texmf-dist/scripts/fontools/afm2afm b/Master/texmf-dist/scripts/fontools/afm2afm
index 65d03e3ef3c..90b5c0bd4fa 100755
--- a/Master/texmf-dist/scripts/fontools/afm2afm
+++ b/Master/texmf-dist/scripts/fontools/afm2afm
@@ -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 File::Basename;
use Getopt::Long;
use Pod::Usage;
-my $VERSION = "20191126";
+my $VERSION = "20200129";
parse_commandline();
@@ -398,7 +398,7 @@ Marc Penninga <marcpenninga@gmail.com>
=head1 COPYRIGHT
-Copyright (C) 2005-2019 Marc Penninga.
+Copyright (C) 2005-2020 Marc Penninga.
=head1 LICENSE
@@ -421,7 +421,7 @@ See the GNU General Public License for more details.
=head1 VERSION
-This document describes B<afm2afm> version 20191126.
+This document describes B<afm2afm> version 20200129.
=head1 RECENT CHANGES
diff --git a/Master/texmf-dist/scripts/fontools/autoinst b/Master/texmf-dist/scripts/fontools/autoinst
index 038769de762..7ca9cad3787 100755
--- a/Master/texmf-dist/scripts/fontools/autoinst
+++ b/Master/texmf-dist/scripts/fontools/autoinst
@@ -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 Getopt::Long ();
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 @@ for my $full (keys %ABBREV) {
- 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 @@ my @WIDTHS = grep { $_ ne 'regular' } map { @{$_} } values %NFSS_WIDTH;
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 @@ my @NFSS_SHAPE = (
roman => 'n',
upright => 'n',
italic => 'it',
- cursive => 'it',
- kursiv => 'it',
inclined => 'sl',
oblique => 'sl',
slanted => 'sl',
@@ -304,7 +293,7 @@ my %SHAPE = (
=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 @@ my %STYLE_DEFAULTS = (
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 @@ sub main {
}
close $ARGV{logfile};
+ print "\n";
return;
}
@@ -751,6 +744,7 @@ sub create_logfile {
}
open my $LOG, '>>', $ARGV{logfile}
or die "$0: cannot create $ARGV{logfile}: $!";
+ $ARGV{logfile} = $LOG;
print {$LOG} <<"END_ARGUMENTS";
@@ -787,44 +781,21 @@ I'm using the following options:
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' ]}
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}} ]}
-END_ARGUMENTS
+ @{[ $ARGV{dryrun} ? 'DRY RUN' : '' ]}
- 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;
+END_ARGUMENTS
return if $ARGV{verbose} < 1;
@@ -836,10 +807,11 @@ END_WARNING_MULTIPLE_FAMILIES
$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 @@ END_FONTINFO
}
return if $ARGV{verbose} < 2;
+ print {$LOG} "\n\n";
print {$LOG} join "\n\n", @cmds;
print {$LOG} "\n";
}
@@ -981,7 +954,7 @@ sub make_cmdline {
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 @@ sub make_cmdline {
#-----------------------------------------------------------------------
# Return a string with all "directory" options for otftotfm set
#-----------------------------------------------------------------------
-my @FILETYPES = qw(tfm vf type1 truetype);
-
sub set_targetdirs {
- my $family = shift;
-
- my %dir = map { ($_ => File::Spec->catdir(
- $ARGV{target},
- 'fonts',
- $_,
- $ARGV{vendor},
- $ARGV{typeface} || $family))
+ my $font = shift;
+
+ 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 @@ Possible options:
-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 @@ sub parse_basicinfo {
# 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 @@ sub parse_basicinfo {
# 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 @@ sub parse_basicinfo {
}
}
- # 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 @@ sub assert_unique {
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 @@ The mapping of shapes to NFSS codes is done using the following table:
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 @@ don't paraphase.
=head1 COPYRIGHT
-Copyright (C) 2005-2019 Marc Penninga.
+Copyright (C) 2005-2020 Marc Penninga.
=head1 LICENSE
@@ -2833,7 +2840,7 @@ GNU General Public License for more details.
=head1 VERSION
-This document describes B<autoinst> version 20191126.
+This document describes B<autoinst> version 20200129.
=head1 RECENT CHANGES
@@ -2842,6 +2849,10 @@ This document describes B<autoinst> version 20191126.
=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).
diff --git a/Master/texmf-dist/scripts/fontools/ot2kpx b/Master/texmf-dist/scripts/fontools/ot2kpx
index 91e34e0fa8f..2fa8d8c456b 100755
--- a/Master/texmf-dist/scripts/fontools/ot2kpx
+++ b/Master/texmf-dist/scripts/fontools/ot2kpx
@@ -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 Getopt::Long ();
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 @@ Marc Penninga <marcpenninga@gmail.com>
=head1 COPYRIGHT
-Copyright (C) 2005-2019 Marc Penninga.
+Copyright (C) 2005-2020 Marc Penninga.
=head1 LICENSE
@@ -858,7 +858,7 @@ See the GNU General Public License for more details.
=head1 VERSION
-This document describes B<ot2kpx> version 20191126.
+This document describes B<ot2kpx> version 20200129.
=head1 RECENT CHANGES