texlive[55997] trunk: fontools (30jul20)
commits+karl at tug.org
commits+karl at tug.org
Thu Jul 30 23:16:19 CEST 2020
Revision: 55997
http://tug.org/svn/texlive?view=revision&revision=55997
Author: karl
Date: 2020-07-30 23:16:18 +0200 (Thu, 30 Jul 2020)
Log Message:
-----------
fontools (30jul20)
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/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-07-30 21:15:51 UTC (rev 55996)
+++ trunk/Build/source/texk/texlive/linked_scripts/fontools/afm2afm 2020-07-30 21:16:18 UTC (rev 55997)
@@ -37,7 +37,7 @@
use Getopt::Long;
use Pod::Usage;
-my $VERSION = "20200619";
+my $VERSION = "20200729";
parse_commandline();
@@ -421,7 +421,7 @@
=head1 VERSION
-This document describes B<afm2afm> version 20200619.
+This document describes B<afm2afm> version 20200729.
=head1 RECENT CHANGES
Modified: trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst 2020-07-30 21:15:51 UTC (rev 55996)
+++ trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst 2020-07-30 21:16:18 UTC (rev 55997)
@@ -40,7 +40,7 @@
use Pod::Usage ();
use POSIX ();
-my $VERSION = '20200619';
+my $VERSION = '20200729';
my ($d, $m, $y) = (localtime time)[3 .. 5];
my $TODAY = sprintf "%04d/%02d/%02d", $y + 1900, $m + 1, $d;
@@ -129,8 +129,19 @@
$log->log_commands(\@commands) if $ARGV{verbose} >= 1;
if (!$ARGV{dryrun}) {
+ $nfss_mapping = NFSS::invert_mapping($nfss_mapping);
LaTeX::create_support_files(\@workitems, $family, $nfss_mapping);
Otftotfm::run_commands(\@commands, $family, $log);
+
+ if ($ARGV{t1suffix}) {
+ Work::modify_fontnames($family, $fontlist);
+ }
+
+ print <<"END_MESSAGE_UPDMAP";
+[INFO] Done generating fonts!
+ Please update TeX's databases (by calling 'texhash' and 'updmap'
+ or their equivalents on your system) before using these fonts.
+END_MESSAGE_UPDMAP
}
$log->close();
@@ -275,6 +286,12 @@
sub process_basicinfo {
my ($self, $data) = @_;
+ $self->{originalfamily} = $data->{family};
+
+ for my $key (keys %{$data}) {
+ $data->{$key} =~ s/\s+//xmsg;
+ }
+
$data->{family} = $data->{preferredfamily} || $data->{family};
$data->{subfamily} = $data->{preferredsubfamily} || $data->{subfamily};
$data->{fullname} =~ s/\A$data->{family}//xms;
@@ -282,9 +299,7 @@
# clean up family name (it's used in LaTeX command names)
my @DIGITS = qw(Zero One Two Three Four Five Six Seven Eight Nine);
- $data->{family} =~ s/\A(?: Adobe | DTL | FF | ITC | LT | MT)//xms;
$data->{family} =~ s/(?: LT | MT)(?: Std | Pro )\z//xms;
- $data->{family} =~ s/ Std \z//xms;
$data->{family} =~ s/(\d)/$DIGITS[$1]/xmsge;
$data->{family} =~ s/[^A-Za-z]+//xmsg;
@@ -403,11 +418,6 @@
$self->{weight} = NFSS::unabbreviate(lc($2));
}
- # 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.
- $self->{family} =~ s/text \z//xmsi;
-
$self->{basicshape} = NFSS::get_nfss_shape($self->{shape});
# We define 'series' as 'weight + width'. This matches NFSS,
@@ -510,7 +520,6 @@
or die "[ERROR] Could not fork(): $!";
my %data = map { my ($k,$v) = m/\A\s* ([^:]+?) \s*:\s* ([^\r\n]+)/xms;
$k =~ s/\s+//xmsg;
- $v =~ s/\s+//xmsg;
(lc $k => $v);
}
grep { m/\A\s* [^:]+? \s*:\s* [^\r\n]+/xms } <$otfinfo>;
@@ -738,27 +747,21 @@
: die "[ERROR] Internal bug, please report!"
;
- my $default_bold;
for my $series (qw(heavy black extrabold demibold semibold bold)) {
if ( $seen{$series} ) {
print {$STY}
"\\DeclareOptionX{$series}{\\edef\\bfseries\@$ARGV{nfss}",
"{$series}}\n";
- $default_bold = $series;
}
}
- $defaults .= ",$default_bold" if $default_bold;
- my $default_regular;
- for my $series (qw(medium book text regular)) {
+ for my $series (qw(medium book text normal regular)) {
if ( $seen{$series} ) {
print {$STY}
"\\DeclareOptionX{$series}{\\edef\\mdseries\@$ARGV{nfss}",
"{$series}}\n";
- $default_regular = $series;
}
}
- $defaults .= ",$default_regular" if $default_regular;
if ($ARGV{math}) {
print {$STY} <<"END_STY_MATHOPTION";
@@ -908,8 +911,9 @@
my $testfont = eval {
my $testenc = $ARGV{encoding}[0];
my $testfig = ( grep { exists $data->{$testenc}{$_} }
- qw(OsF LF TOsF TLF) )[0] or die;
- my $testweight = $nfss_mapping->{weight}{""}[0] or die;
+ qw(OsF LF TOsF TLF) )[0] or die;
+ my $testweight = ( grep { $nfss_mapping->{$_} eq "m" }
+ keys %{$nfss_mapping} )[0] or die;
my $testshape
= ( grep { exists $data->{$testenc}{$testfig}{$testweight}{$_} }
qw(n sc it sl)
@@ -1334,12 +1338,21 @@
END_FD_HEADER
while (my ($series, $fdseries) = each %$data) {
- print {$FD} "\n% ---- $series ----\n\n";
+ my $nfssseries = $nfss_mapping->{$series};
+
+ my $alias = $series;
+ if (defined $nfssseries) {
+ print {$FD} "\n% ---- $nfssseries = $series ----\n\n";
+ $series = $nfssseries;
+ }
+ else {
+ print {$FD} "\n% ---- $series ----\n\n";
+ }
while (my ($shape, $fdshape) = each %$fdseries) {
print {$FD}
"\\DeclareFontShape{$enc}{$fam-$sty}{$series}{$shape}{\n";
my @sizes = sort { $a->[0] <=> $b->[0] }
- @{$fdshape};
+ @{$fdshape};
$sizes[0][0] = $sizes[-1][1] = '';
$sizes[$_][0] = $sizes[$_ - 1][1] for (1 .. $#sizes);
for my $size (@sizes) {
@@ -1347,6 +1360,15 @@
"\\$fam\@\@scale $size->[2]\n";
}
print {$FD} "}{}\n\n";
+
+ if (defined $nfssseries) {
+ print {$FD} <<"END_ALIAS_SERIES";
+\\DeclareFontShape{$enc}{$fam-$sty}{$alias}{$shape}{
+ <-> alias * $fam-$sty/$nfssseries/$shape
+}{}
+
+END_ALIAS_SERIES
+ }
}
# ssub italic for missing slanted, or vice versa
@@ -1354,51 +1376,33 @@
if (!exists $fdseries->{$shape} && exists $fdseries->{$replace}) {
print {$FD} <<"END_SSUB_SHAPE";
\\DeclareFontShape{$enc}{$fam-$sty}{$series}{$shape}{
- <-> ssub * $fam-$sty/$series/$replace
+ <-> ssub * $fam-$sty/$series/$replace
}{}
END_SSUB_SHAPE
+ if (defined $nfssseries) {
+ print {$FD} <<"END_SSUB_ALIAS";
+\\DeclareFontShape{$enc}{$fam-$sty}{$alias}{$shape}{
+ <-> ssub * $fam-$sty/$alias/$replace
+}{}
+
+END_SSUB_ALIAS
+ }
$fdseries->{$shape} = 1;
}
}
}
- print {$FD} <<"END_COMMENT";
-%
-% Extra 'alias' rules to map the standard NFSS codes to our fancy names
-%
-END_COMMENT
my %seen;
- NFSSWEIGHT:
- for my $nfssweight (NFSS::get_all_nfss_weights()) {
- NFSSWIDTH:
- for my $nfsswidth (NFSS::get_all_nfss_widths()) {
- my $nfssseries = ($nfssweight . $nfsswidth) || 'm';
-
- for my $weight (@{$nfss_mapping->{weight}{$nfssweight}}) {
- $weight = '' if $weight eq 'regular';
- for my $width (@{$nfss_mapping->{width}{$nfsswidth}}) {
- $width = '' if $width eq 'regular';
- my $series = ($weight . $width) || 'regular';
- if ( exists $data->{$series} ) {
- print {$FD} "\n% $nfssseries --> $series\n\n";
- for my $shape (keys %{$data->{$series}}) {
- print {$FD} <<"END_SSUB_SERIES";
-\\DeclareFontShape{$enc}{$fam-$sty}{$nfssseries}{$shape}{
- <-> alias * $fam-$sty/$series/$shape
-}{}
-
-END_SSUB_SERIES
- $seen{$nfssseries}{$shape} = 1;
- }
- next NFSSWIDTH;
- }
- }
+ while (my ($series, $nfssseries) = each %{$nfss_mapping}) {
+ if (exists $data->{$series}) {
+ for my $shape (keys %{$data->{$series}}) {
+ $seen{$nfssseries}{$shape} = 1;
}
}
}
- # Add ssub rules to map bx to b
+ print {$FD} "\n% ---- Extra 'ssub' rules to map 'bx' to 'b' ----\n\n";
for my $shape (keys %{$seen{b}}) {
if (!exists $seen{bx}{$shape}) {
print {$FD} <<"END_SSUB_BX";
@@ -1506,18 +1510,19 @@
fractions: @{[ $ARGV{fractions} ? 'yes' : 'no' ]}
ligatures: @{[ $ARGV{ligatures} ? 'yes' : 'no' ]}
- auto/manual: @{[ $ARGV{manual} ? 'manual' : 'auto' ]}
target: $ARGV{target}
extra: $ARGV{extra}
- figurekern: @{[ $ARGV{figurekern} ? 'keep' : 'remove' ]}
+ figurekern: @{[ $ARGV{figurekern} ? 'keep' : 'remove' ]}
nfssweight: @{[ join q{, }, @{$ARGV{nfssweight}} ]}
nfsswidth: @{[ join q{, }, @{$ARGV{nfsswidth}} ]}
- math: @{[ $ARGV{math} ? 'yes' : 'no' ]}
+ math: @{[ $ARGV{math} ? 'yes' : 'no' ]}
mathspacing: $ARGV{mathspacing}
+ fontname suffix: @{[ $ARGV{t1suffix} || '(none)' ]}
+
END_ARGUMENTS
if ($ARGV{fig_height} or $ARGV{fig_width}) {
@@ -1741,7 +1746,7 @@
=cut
my @WEIGHT = (
- ul => [ qw( ultralight thin 100 hairline eight four two ) ],
+ ul => [ qw( ultralight thin 100 hairline ) ],
el => [ qw( extralight 200 ) ],
l => [ qw( light 300 ) ],
sl => [ qw( semilight blond ) ],
@@ -1959,7 +1964,6 @@
return @allshapes;
}
-#
# --------------------------------------------------------------------------
# Returns a mapping of NFSS codes to weight and width names.
# --------------------------------------------------------------------------
@@ -2046,7 +2050,35 @@
return $mapping;
}
+# --------------------------------------------------------------------------
+# Returns a mapping of weight and width names to NFSS codes.
+# --------------------------------------------------------------------------
+sub invert_mapping {
+ my $nfss_mapping = shift;
+ my %to_nfss;
+ NFSSWEIGHT:
+ for my $nfssweight (NFSS::get_all_nfss_weights()) {
+ next unless @{$nfss_mapping->{weight}{$nfssweight}};
+ my $weight = $nfss_mapping->{weight}{$nfssweight}[0];
+ $weight = "" if $weight eq 'regular';
+
+ NFSSWIDTH:
+ for my $nfsswidth (NFSS::get_all_nfss_widths()) {
+ my $nfssseries = ($nfssweight . $nfsswidth) || 'm';
+
+ next unless @{$nfss_mapping->{width}{$nfsswidth}};
+ my $width = $nfss_mapping->{width}{$nfsswidth}[0];
+ $width = "" if $width eq 'regular';
+ my $series = ($weight . $width) || 'regular';
+ $to_nfss{$series} = $nfssseries;
+ }
+ }
+
+ return \%to_nfss;
+}
+
+
############################################################################
@@ -2091,8 +2123,6 @@
-target="DIRECTORY" Install files into specified TEXMF tree
-vendor="VENDOR" Only used for naming directories
-typeface="TYPEFACE" Only used for naming directories
- -(no)updmap Toggle running of updmap
- -manual Manual mode (see documentation)
-(no)figurekern Keep or remove kerns between tabular figures
@@ -2109,6 +2139,8 @@
-math Generate basic math fonts
-mathspacing=AMOUNT Letterspace the math fonts by AMOUNT/1000 em
+ -t1suffix=SUFFIX Add SUFFIX to name of generated pfb fonts
+
font[s] The fonts (.otf or .ttf format) to install.
Please report any bugs or suggestions to <marcpenninga at gmail.com>.
@@ -2137,8 +2169,6 @@
target => '',
vendor => 'lcdftools',
typeface => '',
- updmap => '1', # 0 = no, 1 = yes
- manual => '0', # 0 = no, 1 = yes
dryrun => '0', # 0 = no, 1 = yes
logfile => '',
figurekern => '1', # 0 = no, 1 = yes
@@ -2147,6 +2177,7 @@
nfssweight => [],
math => 0,
mathspacing => 0,
+ t1suffix => 'none',
);
@@ -2186,9 +2217,7 @@
'target=s' => \$ARGV{target},
'vendor=s' => \$ARGV{vendor},
'typeface=s' => \$ARGV{typeface},
- 'updmap!' => \$ARGV{updmap},
'dryrun' => \$ARGV{dryrun},
- 'manual' => \$ARGV{manual},
'figurekern!' => \$ARGV{figurekern},
'logfile=s' => \$ARGV{logfile},
'verbose+' => \$ARGV{verbose},
@@ -2214,6 +2243,7 @@
},
'math!' => \$ARGV{math},
'mathspacing=i' => \$ARGV{mathspacing},
+ 't1suffix:s' => \$ARGV{t1suffix},
)
or die "$USAGE";
@@ -2299,13 +2329,11 @@
|| Util::any( map { $_ eq 'liga' } @{$workitem->{features}} );
return join q( ), 'otftotfm',
- ($ARGV{manual} ? '--pl' : '--automatic'),
+ '--automatic',
"--encoding=$workitem->{enc_file}",
$targetdirs,
'--no-updmap',
- ($workitem->{font}{filename} =~ m/[.]ttf\z/xmsi
- ? '--no-type1'
- : q()),
+ '--force',
($SCHEME{$workitem->{encoding}}
? qq(--coding-scheme="$SCHEME{$workitem->{encoding}}")
: q()),
@@ -2327,44 +2355,33 @@
# --------------------------------------------------------------------------
-# Executes (or saves to file, when $ARGV{manual} is true) all commands.
+# Executes all commands.
# --------------------------------------------------------------------------
sub run_commands {
my ($commandlist, $family, $log) = @_;
- # Make sure the last command *does* call updmap.
- $commandlist->[-1] =~ s/--no-updmap//xms if $ARGV{updmap};
-
- if ($ARGV{manual}) {
- open my $BAT, '>', 'autoinst.bat'
- or die "[ERROR] Can't create 'autoinst.bat': $!";
- print {$BAT} "$_\n" for @{$commandlist};
- close $BAT;
+ 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 '.';
+ open my $otftotfm, '-|', "$command 2>&1"
+ or die "could not fork(): $!";
+ my $msgs = do { local $/; <$otftotfm> };
+ close $otftotfm
+ or do {
+ warn "\n$command\n\n$msgs\n";
+ $log->log("\n$command\n\n$msgs\n");
+ $oops = 1;
+ };
}
- else {
- 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 '.';
- open my $otftotfm, '-|', "$command 2>&1"
- or die "could not fork(): $!";
- my $msgs = do { local $/; <$otftotfm> };
- close $otftotfm
- or do {
- warn "\n$command\n\n$msgs\n";
- $log->log("\n$command\n\n$msgs\n");
- $oops = 1;
- };
- }
- print "\n";
- $| = 0;
- if ($oops) {
- warn <<"END_OTFTOTFM_WARNING";
+ print "\n";
+ $| = 0;
+ if ($oops) {
+ warn <<"END_OTFTOTFM_WARNING";
[ERROR] One or more calls to 'otftotfm' returned a non-zero status code;
please check the messages above and in the log file.
END_OTFTOTFM_WARNING
- }
}
return;
@@ -2631,6 +2648,7 @@
process_styles_options();
process_encoding_options();
process_target_options();
+ process_output_options();
return;
}
@@ -2767,21 +2785,7 @@
sub process_target_options{
my $localtarget = File::Spec->catdir( Cwd::getcwd(), 'autoinst_output' );
- if ($ARGV{manual}) {
- warn "[WARNING] Option '-target' overridden by '-manual'!\n"
- if $ARGV{target};
- $ARGV{target} = $localtarget;
- $ARGV{updmap} = 0;
- }
- elsif ($ARGV{target}) {
- $ARGV{updmap} = 0;
- warn <<"END_WARNING_TARGET_UPDMAP";
-[WARNING] The '-target' option may interfere with kpathsea and updmap;
- automatic calling of updmap has been disabled.
- Please call updmap manually.
-END_WARNING_TARGET_UPDMAP
- }
- elsif (!$ARGV{target}) {
+ if (!$ARGV{target}) {
my $is_windows_os = ( $^O =~ /^MSWin/i );
my $kpsepath = $is_windows_os
? eval { qx( kpsewhich -expand-var=\$TEXMFLOCAL;\$TEXMFHOME ) }
@@ -2809,7 +2813,6 @@
if (!$ARGV{target}) {
$ARGV{target} = $localtarget;
- $ARGV{updmap} = 0;
warn <<"END_WARNING_DUMPING_FILES";
[WARNING] No user-writable TEXMF-tree found!
@@ -2835,6 +2838,30 @@
# --------------------------------------------------------------------------
+# Processes the output related options.
+# --------------------------------------------------------------------------
+sub process_output_options{
+ # If the user gave -t1suffix *without* value as the last option,
+ # Getopt::Long may mistake the next argument (a font filename)
+ # for the value of -t1suffix; we take care of this case
+ # by testing whether the value refers to an existing file
+ # and repairing things if necessary.
+ if (-e $ARGV{t1suffix}) {
+ unshift @ARGV, $ARGV{t1suffix};
+ $ARGV{t1suffix} = '';
+ }
+
+ $ARGV{t1suffix} ||= 'PS';
+
+ if ($ARGV{t1suffix} eq 'none') {
+ $ARGV{t1suffix} = '';
+ }
+
+ return;
+}
+
+
+# --------------------------------------------------------------------------
# Processes command line options with font family-specific defaults.
# --------------------------------------------------------------------------
sub process_family_dependent_options {
@@ -3127,6 +3154,120 @@
}
+# --------------------------------------------------------------------------
+# Modify the font and file names of all generated .pfb files.
+# --------------------------------------------------------------------------
+sub modify_fontnames {
+ my ($family, $fontlist) = @_;
+
+ my %has_fonttype = map { ($_->{fonttype} => 1) } @{$fontlist};
+ return unless $has_fonttype{opentype};
+
+ my $pfb_dir = File::Spec->catdir(
+ $ARGV{target},
+ 'fonts',
+ 'type1',
+ $ARGV{vendor},
+ $ARGV{typeface} || $family);
+
+ # The otftotfm-generated map file refers to the original otf files;
+ # we need to change this to use our name-modifyd Type1 fonts instead.
+ my $mapfile = File::Spec->catfile(
+ $ARGV{target},
+ 'fonts',
+ 'map',
+ 'dvips',
+ $ARGV{typeface} || $family,
+ $family . '.map');
+ open my $map, '<', $mapfile
+ or die "[ERROR] Cannot open '$mapfile' for reading";
+ my $mapdata = do { local $/; <$map> };
+ close $map;
+
+ my $NOTICE = 'Converted to Type1 by autoinst/cfftot1; '
+ . 'for use with pdfTeX only! ';
+
+ my $newfam = $family . $ARGV{t1suffix};
+
+ for my $font (@{$fontlist}) {
+ next unless $font->{fonttype} eq 'opentype';
+
+ my $full_family = $font->{originalfamily};
+ if (index($full_family, $family) > -1) {
+ $full_family = $family;
+ }
+ else {
+ while ($full_family =~ m/[ ]/xms) {
+ (my $no_space = $full_family) =~ s/[ ]+//xmsg;
+ last if $no_space eq $family;
+ $full_family =~ s/[ ]\S*\z//xms;
+ }
+ $full_family ||= $family;
+ }
+ my $newfullfam = $full_family . q( ) . $ARGV{t1suffix};
+
+ my $newname = $font->{name};
+ if ($newname =~ m/$family/xms) {
+ $newname =~ s/$family/$newfam/xms;
+ }
+ else {
+ $newname =~ s/(.+?)(-|\z)/$1$ARGV{t1suffix$2}/xms;
+ }
+
+ for my $suffix (q(), q(LCDFJ)) {
+ my $oldfn = File::Spec->catfile(
+ $pfb_dir, $font->{name} . $suffix . '.pfb');
+ my $newfn = File::Spec->catfile(
+ $pfb_dir, $newname . $suffix . '.pfb');
+
+ next unless -e $oldfn;
+ if ($suffix eq 'LCDFJ' and -z $oldfn) {
+ unlink $oldfn;
+ next;
+ }
+
+ my $cmd = qq(t1disasm "$oldfn");
+ open my $t1disasm, '-|:raw', $cmd
+ or die "[ERROR] Could not fork(): $!";
+ my @pfbdata = readline $t1disasm;
+ close $t1disasm
+ or die "[ERROR] '$cmd' failed";
+
+ for (@pfbdata) {
+ if (m/%!PS-AdobeFont-1.0:[ ] | \/FontName[ ]/xms) {
+ s/$font->{name}/$newname/;
+ }
+ if (m/\/Notice[ ]/xms) {
+ s/[(]/($NOTICE/xms;
+ }
+ if (m/\/FullName[ ] | \/FamilyName[ ]/xms) {
+ s/$full_family/$newfullfam/
+ or s/(.+?)(-|\z)/$1$ARGV{t1suffix}$2/;
+ }
+ }
+
+ $cmd = qq(t1asm --pfb >"$newfn");
+ open my $t1asm, '|-:raw', $cmd
+ or die "[ERROR] Could not fork(): $!";
+ print {$t1asm} @pfbdata;
+ close $t1asm
+ or die "[ERROR] '$cmd' failed";
+
+ unlink $oldfn unless $oldfn eq $newfn;
+
+ $mapdata =~ s/$font->{name}$suffix.pfb/$newname$suffix.pfb/g;
+ }
+ }
+
+ open $map, '>', $mapfile
+ or die "[ERROR] Cannot open '$mapfile' for writing";
+ print {$map} $mapdata;
+ close $map;
+
+ return;
+}
+
+
############################################################################
@@ -3291,14 +3432,10 @@
ornaments
-=item I<Numr>
+=item I<Numr>, I<Dnom>
-numerators
+numerators and denominators
-=item I<Dnom>
-
-denominators
-
=back
The individual fonts are named I<< <FontName>-<suffix>-<shape>-<enc> >>,
@@ -3345,20 +3482,20 @@
font package before this one).
The name C<scaled> may be used as a synonym for C<scale>.
-=item C<medium>, C<book>, C<text>, C<regular>
+=item C<medium>, C<book>, C<text>, C<normal>, C<regular>
-Select the weight that LaTeX will use as the `regular' weight;
-the default is C<regular>.
+Select the weight that LaTeX will use as the `regular' weight.
=item C<heavy>, C<black>, C<extrabold>, C<demibold>, C<semibold>, C<bold>
-Select the weight that LaTeX will use as the `bold' weight;
-the default is C<bold>.
+Select the weight that LaTeX will use as the `bold' weight.
=back
The last two groups of options will only work if
you have the F<mweights> package installed.
+The default here is not to change LaTeX's default,
+i.e. use the `m' and `b' weights.
The style file will also try to load the F<fontaxes> package
(on CTAN), which gives easy access to various font shapes and styles.
@@ -3459,7 +3596,7 @@
Once again: test the results before using them!
If the characters themselves are fine but spaced too tightly,
you may try increasing the side bearings in math fonts with
-the I<-mathspacing> option (see below), e.g. C<-mathspacing=100>.
+the I<-mathspacing> option (see below), e.g. C<-mathspacing=50>.
=head2 NFSS codes
@@ -3492,17 +3629,10 @@
we map the first of these to `n', for the second one we (ab)use the `it' code
as this family doesn't contain an Italic shape.)
-The mapping of weights and widths to NFSS codes is a more complex,
-two-step proces.
-In the first step, all fonts are assigned a `series' name that is simply
-the concatenation of its weight and width
-(after expanding any abbreviations and converting to lowercase).
-A font with `Cond' width and `Ultra' weight will then be known
-as `ultrablackcondensed'.
-
-In the second step, B<autoinst> tries to map all combinations of NFSS codes
+For weights and widths, B<autoinst> tries to the standard NFSS codes
(ul, el, l, sl, m, sb, b, eb and ub for weights;
-uc, ec, c, sc, m, sx, x, ex and ux for widths) to actual fonts.
+uc, ec, c, sc, m, sx, x, ex and ux for widths)
+as much as possible.
Of course, not all 81 combinations of these NFSS weights and widths will map
to existing fonts;
and conversely it may not be possible to assign every existing font
@@ -3510,12 +3640,14 @@
offer more choices or finer granularity than NFSS's codes can handle;
e.g., Fira Sans contains fifteen(!) different weights,
including an additional `Medium' weight between Regular and Semibold).
+Therefore every font is also assigned a `series' name that is simply
+the concatenation of its weight and width
+(after expanding any abbreviations and converting to lowercase).
+A font with `Cond' width and `Ultra' weight will then be known
+as `ultrablackcondensed'.
-B<autoinst> tries hard to ensure that the most common NFSS codes
-(and high-level commands such as C<\bfseries>,
-which are built on top of those codes) will `just work'.
-
-To see exactly which NFSS codes map to which fonts, see the log file
+The exact mapping between fonts and NFSS codes can be found
+in the generated F<fd> files and in the log file
(pro tip: run B<autoinst> with the I<-dryrun> option
to check the chosen mapping beforehand).
The I<-nfssweight> and I<-nfsswidth> command-line options can be used
@@ -3548,6 +3680,55 @@
are not compatible with files generated by newer versions.
+=head1 WARNINGS AND CAVEATS
+
+=head2 OpenType fonts and licensing issues
+
+Since F<pdfTeX> cannot subset otf-flavoured OpenType fonts,
+I<otftotfm> will convert such fonts to Type1 (pfb) format.
+However, many fonts (at least those licensed under the SIL Open Font License)
+do not allow distributing such converted versions under their original name.
+
+To meet these licensing requirements, B<autoinst> provides
+a C<-t1suffix> command-line option that appends
+a (user-defined) suffix to the names (both filename and internal font name)
+of all generated Type1 fonts; see L</COMMAND-LINE OPTIONS> below.
+
+
+=head2 A note for MiKTeX users
+
+Automatically installing the fonts into a suitable TEXMF tree
+(as B<autoinst> tries to do by default) only works for TeX-installations
+that use the F<kpathsea> library; with TeX distributions that implement
+their own directory searching (such as MiKTeX), B<autoinst> will complain
+that it cannot find the F<kpsewhich> program and move all generated files
+into a subdirectory C<./autoinst_output/> of the current directory.
+If you use such a TeX distribution, you should either move these files
+to their correct destinations by hand, or use the I<-target> option
+(see L</COMMAND-LINE OPTIONS> below) to manually specify a TEXMF tree.
+
+Also, some OpenType fonts contain so many kerning pairs that the resulting
+F<pl> and F<vpl> files are too big for MiKTeX's F<pltotf> and F<vptovf>;
+the versions that come with W32TeX (F<http://www.w32tex.org>)
+and TeXLive (F<http://tug.org/texlive>) don't seem to have this problem.
+
+
+=head2 A note for MacTeX users
+
+By default, B<autoinst> will try to install all generated files into
+the $TEXMFLOCAL tree; when this directory isn't user-writable,
+it will use the $TEXMFHOME tree instead. Unfortunately, MacTeX's version
+of C<updmap-sys> doesn't search in $TEXMFHOME,
+and hence MacTeX will not find the new fonts.
+
+To remedy this, either run B<autoinst> as root (so that it can install
+everything into $TEXMFLOCAL) or manually run C<updmap -user> to tell
+TeX about the files in $TEXMFHOME.
+The latter option does, however, have some caveats;
+see F<https://tug.org/texlive/scripts-sys-user.html>.
+
+
+
=head1 COMMAND-LINE OPTIONS
B<autoinst> tries hard to do The Right Thing (TM) by default,
@@ -3560,12 +3741,10 @@
but B<-e> is ambiguous (it may mean either B<-encoding> or B<-extra>)).
+=head2 General options
+
=over 4
-=item B<-version>
-
-Print B<autoinst>'s version number and exit.
-
=item B<-help>
Print a (relatively) short help text and exit.
@@ -3575,16 +3754,21 @@
Don't generate output; just parse input fonts and write
a log file saying what B<autoinst> would have done.
-=item B<-logfile>=I<filename>
-
-Write log data to F<filename> instead of the default F<< <fontfamily>.log >>.
-If the file already exists, B<autoinst> appends to it;
-it doesn't overwrite an existing file.
-
=item B<-verbose>
Add more details to the log file.
+=item B<-version>
+
+Print B<autoinst>'s version number and exit.
+
+=back
+
+
+=head2 Font creation options
+
+=over 4
+
=item B<-encoding>=I<encoding[,encoding]>
Generate the specified encoding(s) for the text fonts.
@@ -3605,27 +3789,6 @@
if the text encodings (see I<-encoding> above) include T1,
B<-nots1> otherwise.
-=item B<-serif>/B<-sanserif>/B<-typewriter>
-
-Install the font as a serif, sanserif or typewriter font, respectively.
-This changes how you access the font in LaTeX:
-with C<\rmfamily>/C<\textrm>, C<\sffamily>/C<\textsf>
-or C<\ttfamily>/C<\texttt>.
-
-Installing the font as a typewriter font will cause two further changes:
-it will - by default - turn off the use of f-ligatures
-(though this can be overridden with the I<-ligatures> option),
-and it will disable hyphenation for this font.
-This latter effect cannot be re-enabled in B<autoinst>;
-if you want typewriter text to be hyphenated, use the F<hyphenat> package.
-
-If none of these options is specified, B<autoinst> tries to guess:
-if the font's filename contains the string `mono'
-or if the field C<isFixedPitch> in the font's I<post> table is True,
-it will select B<-typewriter>;
-else if the filename contains `sans' it will select B<-sanserif>;
-otherwise it will opt for B<-serif>.
-
=item B<-lining>/B<-nolining>
Control the creation of fonts with lining figures. The default is
@@ -3666,7 +3829,7 @@
=item B<-noinferiors>
-=item B<-inferiors> [= B<none> | B<auto> | B<subs> | B<sinf> | B<dnom> ]
+=item B<-inferiors> [ = B<none> | B<auto> | B<subs> | B<sinf> | B<dnom> ]
The OpenType standard defines several kinds of digits that might be used
as inferiors or subscripts: `Subscripts' (OpenType feature `subs'),
@@ -3687,10 +3850,6 @@
Control the creation of fonts with numerators and denominators.
The default is B<-nofractions>.
-=item B<-ornaments>/B<-noornaments>
-
-Control the creation of ornament fonts. The default is B<-ornaments>.
-
=item B<-ligatures>/B<-noligatures>
Some fonts create glyphs for the standard f-ligatures (ff, fi, fl, ffi, ffl),
@@ -3697,12 +3856,36 @@
but don't provide a `liga' feature to access these.
This option tells B<autoinst> to add extra C<LIGKERN> rules to
the generated fonts to enable the use of these ligatures.
-The default is B<-ligatures>,
-unless the user specified the I<-typewriter> option.
+The default is B<-ligatures>, except for typewriter fonts.
-Specify B<-noligatures> to disable the generation of ligatures even for fonts
+Specify B<-noligatures> to disable generation of ligatures even for fonts
that do contain a `liga' feature.
+=item B<-ornaments>/B<-noornaments>
+
+Control the creation of ornament fonts. The default is B<-ornaments>.
+
+=item B<-serif>/B<-sanserif>/B<-typewriter>
+
+Install the font as a serif, sanserif or typewriter font, respectively.
+This changes how you access the font in LaTeX:
+with C<\rmfamily>/C<\textrm>, C<\sffamily>/C<\textsf>
+or C<\ttfamily>/C<\texttt>.
+
+Installing the font as a typewriter font will cause two further changes:
+it will - by default - turn off the use of f-ligatures
+(though this can be overridden with the I<-ligatures> option),
+and it will disable hyphenation for this font.
+This latter effect cannot be re-enabled in B<autoinst>;
+if you want typewriter text to be hyphenated, use the F<hyphenat> package.
+
+If none of these options is specified, B<autoinst> tries to guess:
+if the font's filename contains the string `mono'
+or if the field C<isFixedPitch> in the font's I<post> table is True,
+it will select B<-typewriter>;
+else if the filename contains `sans' it will select B<-sanserif>;
+otherwise it will opt for B<-serif>.
+
=item B<-math>
Tells B<autoinst> to create basic math fonts (see above).
@@ -3714,78 +3897,24 @@
In my opinion, many text fonts benefit from letterspacing by 50 to 100 units
when used in maths; some fonts need even more. Use your own judgement!
-=item B<-defaultlining>/B<-defaultoldstyle>
+=back
-=item B<-defaulttabular>/B<-defaultproportional>
-Tell B<autoinst> which figure style is the current font family's default
-(i.e., which figures you get when you don't specify any OpenType features).
+=head2 Output options
-I<Don't use these options unless you are certain you need them!>
-They are only needed for fonts that don't provide OpenType features
-for their default figure style; and even in that case,
-B<autoinst>'s default values (B<-defaultlining> and B<-defaulttabular>)
-are usually correct.
+=over 4
-=item B<-nofigurekern>
+=item B<-t1suffix> [ = I<SUFFIX> ]
-Some fonts provide kerning pairs for tabular figures.
-This is very probably not what you want
-(e.g., numbers in tables won't line up exactly).
-This option adds extra I< --ligkern> options
-to the commands for I<otftotfm> to suppress such kerns.
-Note that this option leads to very long commands (it adds
-one hundred I< --ligkern> options), which may cause problems on some systems.
+Tell B<autoinst> to modify the font names of all generated Type1-fonts,
+by adding I<SUFFIX> to the family name.
+If you use this option without specifying a I<SUFFIX> value,
+B<autoinst> will use the value ``PS''.
+The default behaviour when this option is not given
+is to not modify font names at all.
-=item B<-nfssweight>=I<code>=I<weight>
+See also L</OpenType fonts and licensing issues> above.
-=item B<-nfsswidth>=I<code>=I<width>
-
-Map the NFSS code I<code> to the given weight or width,
-overriding the built-in tables.
-Each of these options may be given multiple times,
-to override more than one NFSS code.
-Example: to map the `ul' code to the `Thin' weight,
-use C<-nfssweight=ul=thin>.
-To inhibit the use of the `ul' code completely,
-use C<-nfssweight=ul=>.
-
-=item B<-extra>=I<extra>
-
-Append I<extra> as extra options to the command lines for I<otftotfm>.
-To prevent I<extra> from accidentily being interpreted as options
-to B<autoinst>, it should be properly quoted.
-
-=item B<-manual>
-
-Manual mode; for users who want to post-process the generated files
-and commands. By default, B<autoinst> immediately executes all
-F<otftotfm> commands it generates;
-in manual mode, these are instead written to a file F<autoinst.bat>.
-Furthermore it tells F<otftotfm> to generate human readable (and editable)
-F<pl/vpl> files instead of the default F<tfm/vf> ones,
-and to place all generated files in a subdirectory C<./autoinst_output/>
-of the current directory, rather than install them into your TeX installation.
-
-When using this option, you need to execute the following manual steps after
-B<autoinst> has finished:
-
-=over 2
-
-=item - run F<pltotf> and F<vptovf> on the generated F<pl> and F<vf> files,
-to convert them to F<tfm/vf> format;
-
-=item - move all generated files to a proper TEXMF tree,
-and, if necessary, update the filename database;
-
-=item - tell TeX about the new F<map> file
-(usually by running C<updmap> or similar).
-
-=back
-
-Note that some options (I<-target>, I<-vendor> and I<-typeface>,
-I<-[no]updmap>) are meaningless, and hence ignored, in manual mode.
-
=item B<-target>=I<DIRECTORY>
Install all generated files into the TEXMF tree at I<DIRECTORY>.
@@ -3800,13 +3929,6 @@
and update all relevant databases
(usually by calling F<texhash> and F<updmap>).
-I<WARNING:> using this option may interfere with F<kpathsea> and F<updmap>
-(especially when the chosen directory is outside the standard TEXMF trees),
-so using I<-target> will disable the automatic call to F<updmap>
-(as if I<-noupdmap> had been given).
-It is up to the user to manually update all databases (i.e., by calling
-F<texhash> and F<updmap> or similar).
-
=item B<-vendor>=I<VENDOR>
=item B<-typeface>=I<TYPEFACE>
@@ -3815,54 +3937,70 @@
options: they change the `vendor' and `typeface' parts of the names of the
subdirectories in the TEXMF tree where generated files will be stored.
The default values are `lcdftools' and the font's FontFamily name.
-
-Note that these options change I<only> directory names,
+These options change I<only> directory names,
not the names of any generated files.
-=item B<-updmap>/B<-noupdmap>
+=item B<-logfile>=I<filename>
-Control whether or not F<updmap> is called after the last call to F<otftotfm>.
-The default is B<-updmap>.
+Write log data to F<filename> instead of the default F<< <fontfamily>.log >>.
+If the file already exists, B<autoinst> appends to it;
+it doesn't overwrite an existing file.
=back
-=head2 A note for MiKTeX users
+=head2 Specialist options
-Automatically installing the fonts into a suitable TEXMF tree
-(as B<autoinst> tries to do by default) only works for TeX-installations
-that use the F<kpathsea> library; with TeX distributions that implement
-their own directory searching (such as MiKTeX), B<autoinst> will complain
-that it cannot find the F<kpsewhich> program and move all generated files
-into a subdirectory C<./autoinst_output/> of the current directory.
-If you use such a TeX distribution, you should either move these files
-to their correct destinations by hand, or use the I<-target> option
-(see L</COMMAND-LINE OPTIONS> below) to manually specify a TEXMF tree.
+=over 4
-Also, some OpenType fonts contain so many kerning pairs that the resulting
-F<pl> and F<vpl> files are too big for MiKTeX's F<pltotf> and F<vptovf>;
-the versions that come with W32TeX (F<http://www.w32tex.org>)
-and TeXLive (F<http://tug.org/texlive>) don't seem to have this problem.
+=item B<-defaultlining>/B<-defaultoldstyle>
+=item B<-defaulttabular>/B<-defaultproportional>
-=head2 A note for MacTeX users
+Tell B<autoinst> which figure style is the current font family's default
+(i.e., which figures you get when you don't specify any OpenType features).
-By default, B<autoinst> will try to install all generated files into
-the $TEXMFLOCAL tree; when this directory isn't user-writable,
-it will use the $TEXMFHOME tree instead. Unfortunately, MacTeX's version
-of C<updmap-sys> (which is called behind the scenes) doesn't search
-in $TEXMFHOME, and hence MacTeX will not find the new fonts.
+I<Don't use these options unless you are certain you need them!>
+They are only needed for fonts that don't provide OpenType features
+for their default figure style; and even in that case,
+B<autoinst>'s default values (B<-defaultlining> and B<-defaulttabular>)
+are usually correct.
-To remedy this, either run B<autoinst> as root (so that it can install
-everything into $TEXMFLOCAL) or manually run C<updmap -user> to tell
-TeX about the files in $TEXMFHOME.
-The latter option does, however, have some caveats;
-see F<https://tug.org/texlive/scripts-sys-user.html>.
+=item B<-nfssweight>=I<code>=I<weight>
+=item B<-nfsswidth>=I<code>=I<width>
+Map the NFSS code I<code> to the given weight or width,
+overriding the built-in tables.
+Each of these options may be given multiple times,
+to override more than one NFSS code.
+Example: to map the `ul' code to the `Thin' weight,
+use C<-nfssweight=ul=thin>.
+To inhibit the use of the `ul' code completely,
+use C<-nfssweight=ul=>.
+
+=item B<-extra>=I<extra>
+
+Append I<extra> as extra options to the command lines for I<otftotfm>.
+To prevent I<extra> from accidentily being interpreted as options
+to B<autoinst>, it should be properly quoted.
+
+=item B<-nofigurekern>
+
+Some fonts provide kerning pairs for tabular figures.
+This is very probably not what you want
+(e.g., numbers in tables won't line up exactly).
+This option adds extra I< --ligkern> options
+to the commands for I<otftotfm> to suppress such kerns.
+Note that this option leads to very long commands (it adds
+one hundred I< --ligkern> options), which may cause problems on some systems.
+
+=back
+
+
=head1 SEE ALSO
-Eddie Kohler's B<TypeTools> (F<http://www.lcdf.org/type>).
+Eddie Kohler's B<TypeTools> and B<T1Utils> (F<http://www.lcdf.org/type>).
B<Perl> can be obtained from F<http://www.perl.org>;
it is included in most Linux distributions.
@@ -3869,8 +4007,8 @@
For Windows, try ActivePerl (F<http://www.activestate.com>)
or Strawberry Perl (F<http://strawberryperl.com>).
-B<XeTeX> (F<http://www.tug.org/xetex>) and
-B<LuaTeX> (F<http://www.luatex.org>)
+B<LuaTeX> (F<http://www.luatex.org>) and
+B<XeTeX> (F<http://www.tug.org/xetex>)
are Unicode-aware TeX engines that can use OpenType fonts directly,
without any (La)TeX-specific support files.
@@ -3915,7 +4053,7 @@
=head1 VERSION
-This document describes B<autoinst> version 20200619.
+This document describes B<autoinst> version 20200729.
=head1 RECENT CHANGES
@@ -3924,6 +4062,15 @@
=over 12
+=item I<2020-07-29>
+
+Some changes in the generated F<sty> and F<fd> files,
+to improve compatibility with the F<microtype> package.
+Made sure that F<pfb> fonts are always generated whenever
+the input fonts are in F<otf> format.
+Added the C<-t1suffix> command-line option,
+to modify the font and file names of those generated Type1 fonts.
+
=item I<2020-06-19>
Added the C<nomathgreek> option to generated style files.
@@ -3958,6 +4105,13 @@
Don't create empty subdirectories in the target TEXMF tree.
+=back
+
+
+=begin Really_old_history
+
+=over 12
+
=item I<2019-11-18>
Fine-tuned calling of F<kpsewhich> on Windows (patch by Akira Kakuto).
@@ -4080,7 +4234,7 @@
in particular, create $TEXMFHOME if it doesn't already exist
and $TEXMFLOCAL isn't user-writable.
-In manual mode, or when we can't find a user-writable TEXMF tree,
+When we can't find a user-writable TEXMF tree,
put all generated files into a subdirectory C<./autoinst_output/>
instead of all over the current working directory.
@@ -4098,13 +4252,6 @@
to our fancy names (see the section B<NFSS codes>;
based on discussions with Frank Mittelbach and Bob Tennent).
-=back
-
-
-=begin Really_old_history
-
-=over 12
-
=item I<2018-08-10>
Added encoding files for LGR and T2A/B/C to I<fontools>.
Modified: trunk/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx 2020-07-30 21:15:51 UTC (rev 55996)
+++ trunk/Build/source/texk/texlive/linked_scripts/fontools/ot2kpx 2020-07-30 21:16:18 UTC (rev 55997)
@@ -38,7 +38,7 @@
use List::Util @List::Util::EXPORT_OK;
use Pod::Usage;
-my $VERSION = "20200619";
+my $VERSION = "20200729";
our ($NUM_GLYPHS, $UNITS_PER_EM, %kern);
@@ -858,7 +858,7 @@
=head1 VERSION
-This document describes B<ot2kpx> version 20200619.
+This document describes B<ot2kpx> version 20200729.
=head1 RECENT CHANGES
Modified: trunk/Master/texmf-dist/doc/man/man1/afm2afm.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/afm2afm.1 2020-07-30 21:15:51 UTC (rev 55996)
+++ trunk/Master/texmf-dist/doc/man/man1/afm2afm.1 2020-07-30 21:16:18 UTC (rev 55997)
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "AFM2AFM 1"
-.TH AFM2AFM 1 "2020-06-19" "fontools" "Marc Penninga"
+.TH AFM2AFM 1 "2020-07-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
@@ -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 20200619.
+This document describes \fBafm2afm\fR version 20200729.
.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-07-30 21:15:51 UTC (rev 55996)
+++ trunk/Master/texmf-dist/doc/man/man1/autoinst.1 2020-07-30 21:16:18 UTC (rev 55997)
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "AUTOINST 1"
-.TH AUTOINST 1 "2020-06-19" "fontools" "Marc Penninga"
+.TH AUTOINST 1 "2020-07-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
@@ -242,12 +242,9 @@
.IP "\fIOrn\fR" 8
.IX Item "Orn"
ornaments
-.IP "\fINumr\fR" 8
-.IX Item "Numr"
-numerators
-.IP "\fIDnom\fR" 8
-.IX Item "Dnom"
-denominators
+.IP "\fINumr\fR, \fIDnom\fR" 8
+.IX Item "Numr, Dnom"
+numerators and denominators
.PP
The individual fonts are named \fI<FontName>\-<suffix>\-<shape>\-<enc>\fR,
where \fI<suffix>\fR is the same as above (but in lowercase),
@@ -288,19 +285,19 @@
(which is usually Computer Modern, unless you have loaded another
font package before this one).
The name \f(CW\*(C`scaled\*(C'\fR may be used as a synonym for \f(CW\*(C`scale\*(C'\fR.
-.ie n .IP """medium"", ""book"", ""text"", ""regular""" 4
-.el .IP "\f(CWmedium\fR, \f(CWbook\fR, \f(CWtext\fR, \f(CWregular\fR" 4
-.IX Item "medium, book, text, regular"
-Select the weight that LaTeX will use as the `regular' weight;
-the default is \f(CW\*(C`regular\*(C'\fR.
+.ie n .IP """medium"", ""book"", ""text"", ""normal"", ""regular""" 4
+.el .IP "\f(CWmedium\fR, \f(CWbook\fR, \f(CWtext\fR, \f(CWnormal\fR, \f(CWregular\fR" 4
+.IX Item "medium, book, text, normal, regular"
+Select the weight that LaTeX will use as the `regular' weight.
.ie n .IP """heavy"", ""black"", ""extrabold"", ""demibold"", ""semibold"", ""bold""" 4
.el .IP "\f(CWheavy\fR, \f(CWblack\fR, \f(CWextrabold\fR, \f(CWdemibold\fR, \f(CWsemibold\fR, \f(CWbold\fR" 4
.IX Item "heavy, black, extrabold, demibold, semibold, bold"
-Select the weight that LaTeX will use as the `bold' weight;
-the default is \f(CW\*(C`bold\*(C'\fR.
+Select the weight that LaTeX will use as the `bold' weight.
.PP
The last two groups of options will only work if
you have the \fImweights\fR package installed.
+The default here is not to change LaTeX's default,
+i.e. use the `m' and `b' weights.
.PP
The style file will also try to load the \fIfontaxes\fR package
(on \s-1CTAN\s0), which gives easy access to various font shapes and styles.
@@ -395,7 +392,7 @@
Once again: test the results before using them!
If the characters themselves are fine but spaced too tightly,
you may try increasing the side bearings in math fonts with
-the \fI\-mathspacing\fR option (see below), e.g. \f(CW\*(C`\-mathspacing=100\*(C'\fR.
+the \fI\-mathspacing\fR option (see below), e.g. \f(CW\*(C`\-mathspacing=50\*(C'\fR.
.SS "\s-1NFSS\s0 codes"
.IX Subsection "NFSS codes"
LaTeX's New Font Selection System (\s-1NFSS\s0)
@@ -428,17 +425,10 @@
we map the first of these to `n', for the second one we (ab)use the `it' code
as this family doesn't contain an Italic shape.)
.PP
-The mapping of weights and widths to \s-1NFSS\s0 codes is a more complex,
-two-step proces.
-In the first step, all fonts are assigned a `series' name that is simply
-the concatenation of its weight and width
-(after expanding any abbreviations and converting to lowercase).
-A font with `Cond' width and `Ultra' weight will then be known
-as `ultrablackcondensed'.
-.PP
-In the second step, \fBautoinst\fR tries to map all combinations of \s-1NFSS\s0 codes
+For weights and widths, \fBautoinst\fR tries to the standard \s-1NFSS\s0 codes
(ul, el, l, sl, m, sb, b, eb and ub for weights;
-uc, ec, c, sc, m, sx, x, ex and ux for widths) to actual fonts.
+uc, ec, c, sc, m, sx, x, ex and ux for widths)
+as much as possible.
Of course, not all 81 combinations of these \s-1NFSS\s0 weights and widths will map
to existing fonts;
and conversely it may not be possible to assign every existing font
@@ -446,12 +436,14 @@
offer more choices or finer granularity than \s-1NFSS\s0's codes can handle;
e.g., Fira Sans contains fifteen(!) different weights,
including an additional `Medium' weight between Regular and Semibold).
+Therefore every font is also assigned a `series' name that is simply
+the concatenation of its weight and width
+(after expanding any abbreviations and converting to lowercase).
+A font with `Cond' width and `Ultra' weight will then be known
+as `ultrablackcondensed'.
.PP
-\&\fBautoinst\fR tries hard to ensure that the most common \s-1NFSS\s0 codes
-(and high-level commands such as \f(CW\*(C`\ebfseries\*(C'\fR,
-which are built on top of those codes) will `just work'.
-.PP
-To see exactly which \s-1NFSS\s0 codes map to which fonts, see the log file
+The exact mapping between fonts and \s-1NFSS\s0 codes can be found
+in the generated \fIfd\fR files and in the log file
(pro tip: run \fBautoinst\fR with the \fI\-dryrun\fR option
to check the chosen mapping beforehand).
The \fI\-nfssweight\fR and \fI\-nfsswidth\fR command-line options can be used
@@ -480,6 +472,48 @@
Note that versions of \fBautoinst\fR up to 20200428 handled ornaments
differently, and fonts and style files generated by those versions
are not compatible with files generated by newer versions.
+.SH "WARNINGS AND CAVEATS"
+.IX Header "WARNINGS AND CAVEATS"
+.SS "OpenType fonts and licensing issues"
+.IX Subsection "OpenType fonts and licensing issues"
+Since \fIpdfTeX\fR cannot subset otf-flavoured OpenType fonts,
+\&\fIotftotfm\fR will convert such fonts to Type1 (pfb) format.
+However, many fonts (at least those licensed under the \s-1SIL\s0 Open Font License)
+do not allow distributing such converted versions under their original name.
+.PP
+To meet these licensing requirements, \fBautoinst\fR provides
+a \f(CW\*(C`\-t1suffix\*(C'\fR command-line option that appends
+a (user-defined) suffix to the names (both filename and internal font name)
+of all generated Type1 fonts; see \*(L"COMMAND-LINE \s-1OPTIONS\*(R"\s0 below.
+.SS "A note for MiKTeX users"
+.IX Subsection "A note for MiKTeX users"
+Automatically installing the fonts into a suitable \s-1TEXMF\s0 tree
+(as \fBautoinst\fR tries to do by default) only works for TeX-installations
+that use the \fIkpathsea\fR library; with TeX distributions that implement
+their own directory searching (such as MiKTeX), \fBautoinst\fR will complain
+that it cannot find the \fIkpsewhich\fR program and move all generated files
+into a subdirectory \f(CW\*(C`./autoinst_output/\*(C'\fR of the current directory.
+If you use such a TeX distribution, you should either move these files
+to their correct destinations by hand, or use the \fI\-target\fR option
+(see \*(L"COMMAND-LINE \s-1OPTIONS\*(R"\s0 below) to manually specify a \s-1TEXMF\s0 tree.
+.PP
+Also, some OpenType fonts contain so many kerning pairs that the resulting
+\&\fIpl\fR and \fIvpl\fR files are too big for MiKTeX's \fIpltotf\fR and \fIvptovf\fR;
+the versions that come with W32TeX (\fIhttp://www.w32tex.org\fR)
+and TeXLive (\fIhttp://tug.org/texlive\fR) don't seem to have this problem.
+.SS "A note for MacTeX users"
+.IX Subsection "A note for MacTeX users"
+By default, \fBautoinst\fR will try to install all generated files into
+the \f(CW$TEXMFLOCAL\fR tree; when this directory isn't user-writable,
+it will use the \f(CW$TEXMFHOME\fR tree instead. Unfortunately, MacTeX's version
+of \f(CW\*(C`updmap\-sys\*(C'\fR doesn't search in \f(CW$TEXMFHOME\fR,
+and hence MacTeX will not find the new fonts.
+.PP
+To remedy this, either run \fBautoinst\fR as root (so that it can install
+everything into \f(CW$TEXMFLOCAL\fR) or manually run \f(CW\*(C`updmap \-user\*(C'\fR to tell
+TeX about the files in \f(CW$TEXMFHOME\fR.
+The latter option does, however, have some caveats;
+see \fIhttps://tug.org/texlive/scripts\-sys\-user.html\fR.
.SH "COMMAND-LINE OPTIONS"
.IX Header "COMMAND-LINE OPTIONS"
\&\fBautoinst\fR tries hard to do The Right Thing (\s-1TM\s0) by default,
@@ -490,9 +524,8 @@
and option names may be shortened to a unique prefix
(e.g., \fB\-encoding\fR may be abbreviated to \fB\-enc\fR or even \fB\-en\fR,
but \fB\-e\fR is ambiguous (it may mean either \fB\-encoding\fR or \fB\-extra\fR)).
-.IP "\fB\-version\fR" 4
-.IX Item "-version"
-Print \fBautoinst\fR's version number and exit.
+.SS "General options"
+.IX Subsection "General options"
.IP "\fB\-help\fR" 4
.IX Item "-help"
Print a (relatively) short help text and exit.
@@ -500,14 +533,14 @@
.IX Item "-dryrun"
Don't generate output; just parse input fonts and write
a log file saying what \fBautoinst\fR would have done.
-.IP "\fB\-logfile\fR=\fIfilename\fR" 4
-.IX Item "-logfile=filename"
-Write log data to \fIfilename\fR instead of the default \fI<fontfamily>.log\fR.
-If the file already exists, \fBautoinst\fR appends to it;
-it doesn't overwrite an existing file.
.IP "\fB\-verbose\fR" 4
.IX Item "-verbose"
Add more details to the log file.
+.IP "\fB\-version\fR" 4
+.IX Item "-version"
+Print \fBautoinst\fR's version number and exit.
+.SS "Font creation options"
+.IX Subsection "Font creation options"
.IP "\fB\-encoding\fR=\fIencoding[,encoding]\fR" 4
.IX Item "-encoding=encoding[,encoding]"
Generate the specified encoding(s) for the text fonts.
@@ -526,26 +559,6 @@
Control the creation of TS1\-encoded fonts. The default is \fB\-ts1\fR
if the text encodings (see \fI\-encoding\fR above) include T1,
\&\fB\-nots1\fR otherwise.
-.IP "\fB\-serif\fR/\fB\-sanserif\fR/\fB\-typewriter\fR" 4
-.IX Item "-serif/-sanserif/-typewriter"
-Install the font as a serif, sanserif or typewriter font, respectively.
-This changes how you access the font in LaTeX:
-with \f(CW\*(C`\ermfamily\*(C'\fR/\f(CW\*(C`\etextrm\*(C'\fR, \f(CW\*(C`\esffamily\*(C'\fR/\f(CW\*(C`\etextsf\*(C'\fR
-or \f(CW\*(C`\ettfamily\*(C'\fR/\f(CW\*(C`\etexttt\*(C'\fR.
-.Sp
-Installing the font as a typewriter font will cause two further changes:
-it will \- by default \- turn off the use of f\-ligatures
-(though this can be overridden with the \fI\-ligatures\fR option),
-and it will disable hyphenation for this font.
-This latter effect cannot be re-enabled in \fBautoinst\fR;
-if you want typewriter text to be hyphenated, use the \fIhyphenat\fR package.
-.Sp
-If none of these options is specified, \fBautoinst\fR tries to guess:
-if the font's filename contains the string `mono'
-or if the field \f(CW\*(C`isFixedPitch\*(C'\fR in the font's \fIpost\fR table is True,
-it will select \fB\-typewriter\fR;
-else if the filename contains `sans' it will select \fB\-sanserif\fR;
-otherwise it will opt for \fB\-serif\fR.
.IP "\fB\-lining\fR/\fB\-nolining\fR" 4
.IX Item "-lining/-nolining"
Control the creation of fonts with lining figures. The default is
@@ -579,8 +592,8 @@
.IP "\fB\-noinferiors\fR" 4
.IX Item "-noinferiors"
.PD 0
-.IP "\fB\-inferiors\fR [= \fBnone\fR | \fBauto\fR | \fBsubs\fR | \fBsinf\fR | \fBdnom\fR ]" 4
-.IX Item "-inferiors [= none | auto | subs | sinf | dnom ]"
+.IP "\fB\-inferiors\fR [ = \fBnone\fR | \fBauto\fR | \fBsubs\fR | \fBsinf\fR | \fBdnom\fR ]" 4
+.IX Item "-inferiors [ = none | auto | subs | sinf | dnom ]"
.PD
The OpenType standard defines several kinds of digits that might be used
as inferiors or subscripts: `Subscripts' (OpenType feature `subs'),
@@ -599,9 +612,6 @@
.IX Item "-fractions/-nofractions"
Control the creation of fonts with numerators and denominators.
The default is \fB\-nofractions\fR.
-.IP "\fB\-ornaments\fR/\fB\-noornaments\fR" 4
-.IX Item "-ornaments/-noornaments"
-Control the creation of ornament fonts. The default is \fB\-ornaments\fR.
.IP "\fB\-ligatures\fR/\fB\-noligatures\fR" 4
.IX Item "-ligatures/-noligatures"
Some fonts create glyphs for the standard f\-ligatures (ff, fi, fl, ffi, ffl),
@@ -608,11 +618,33 @@
but don't provide a `liga' feature to access these.
This option tells \fBautoinst\fR to add extra \f(CW\*(C`LIGKERN\*(C'\fR rules to
the generated fonts to enable the use of these ligatures.
-The default is \fB\-ligatures\fR,
-unless the user specified the \fI\-typewriter\fR option.
+The default is \fB\-ligatures\fR, except for typewriter fonts.
.Sp
-Specify \fB\-noligatures\fR to disable the generation of ligatures even for fonts
+Specify \fB\-noligatures\fR to disable generation of ligatures even for fonts
that do contain a `liga' feature.
+.IP "\fB\-ornaments\fR/\fB\-noornaments\fR" 4
+.IX Item "-ornaments/-noornaments"
+Control the creation of ornament fonts. The default is \fB\-ornaments\fR.
+.IP "\fB\-serif\fR/\fB\-sanserif\fR/\fB\-typewriter\fR" 4
+.IX Item "-serif/-sanserif/-typewriter"
+Install the font as a serif, sanserif or typewriter font, respectively.
+This changes how you access the font in LaTeX:
+with \f(CW\*(C`\ermfamily\*(C'\fR/\f(CW\*(C`\etextrm\*(C'\fR, \f(CW\*(C`\esffamily\*(C'\fR/\f(CW\*(C`\etextsf\*(C'\fR
+or \f(CW\*(C`\ettfamily\*(C'\fR/\f(CW\*(C`\etexttt\*(C'\fR.
+.Sp
+Installing the font as a typewriter font will cause two further changes:
+it will \- by default \- turn off the use of f\-ligatures
+(though this can be overridden with the \fI\-ligatures\fR option),
+and it will disable hyphenation for this font.
+This latter effect cannot be re-enabled in \fBautoinst\fR;
+if you want typewriter text to be hyphenated, use the \fIhyphenat\fR package.
+.Sp
+If none of these options is specified, \fBautoinst\fR tries to guess:
+if the font's filename contains the string `mono'
+or if the field \f(CW\*(C`isFixedPitch\*(C'\fR in the font's \fIpost\fR table is True,
+it will select \fB\-typewriter\fR;
+else if the filename contains `sans' it will select \fB\-sanserif\fR;
+otherwise it will opt for \fB\-serif\fR.
.IP "\fB\-math\fR" 4
.IX Item "-math"
Tells \fBautoinst\fR to create basic math fonts (see above).
@@ -622,6 +654,50 @@
where 1000 units equal one em.
In my opinion, many text fonts benefit from letterspacing by 50 to 100 units
when used in maths; some fonts need even more. Use your own judgement!
+.SS "Output options"
+.IX Subsection "Output options"
+.IP "\fB\-t1suffix\fR [ = \fI\s-1SUFFIX\s0\fR ]" 4
+.IX Item "-t1suffix [ = SUFFIX ]"
+Tell \fBautoinst\fR to modify the font names of all generated Type1\-fonts,
+by adding \fI\s-1SUFFIX\s0\fR to the family name.
+If you use this option without specifying a \fI\s-1SUFFIX\s0\fR value,
+\&\fBautoinst\fR will use the value ``\s-1PS\s0''.
+The default behaviour when this option is not given
+is to not modify font names at all.
+.Sp
+See also \*(L"OpenType fonts and licensing issues\*(R" above.
+.IP "\fB\-target\fR=\fI\s-1DIRECTORY\s0\fR" 4
+.IX Item "-target=DIRECTORY"
+Install all generated files into the \s-1TEXMF\s0 tree at \fI\s-1DIRECTORY\s0\fR.
+.Sp
+By default, \fBautoinst\fR searches the \f(CW$TEXMFLOCAL\fR and \f(CW$TEXMFHOME\fR trees
+and installs all files into the first user-writable \s-1TEXMF\s0 tree it finds.
+If \fBautoinst\fR cannot find such a user-writable directory
+(which shouldn't happen, since \f(CW$TEXMFHOME\fR is supposed to be user-writable)
+it will print a warning message and put all files into the subdirectory
+\&\f(CW\*(C`./autoinst_output/\*(C'\fR of the current directory.
+It's then up to the user to move the generated files to a better location
+and update all relevant databases
+(usually by calling \fItexhash\fR and \fIupdmap\fR).
+.IP "\fB\-vendor\fR=\fI\s-1VENDOR\s0\fR" 4
+.IX Item "-vendor=VENDOR"
+.PD 0
+.IP "\fB\-typeface\fR=\fI\s-1TYPEFACE\s0\fR" 4
+.IX Item "-typeface=TYPEFACE"
+.PD
+These options are equivalent to \fIotftotfm\fR's \fI \-\-vendor\fR and \fI \-\-typeface\fR
+options: they change the `vendor' and `typeface' parts of the names of the
+subdirectories in the \s-1TEXMF\s0 tree where generated files will be stored.
+The default values are `lcdftools' and the font's FontFamily name.
+These options change \fIonly\fR directory names,
+not the names of any generated files.
+.IP "\fB\-logfile\fR=\fIfilename\fR" 4
+.IX Item "-logfile=filename"
+Write log data to \fIfilename\fR instead of the default \fI<fontfamily>.log\fR.
+If the file already exists, \fBautoinst\fR appends to it;
+it doesn't overwrite an existing file.
+.SS "Specialist options"
+.IX Subsection "Specialist options"
.IP "\fB\-defaultlining\fR/\fB\-defaultoldstyle\fR" 4
.IX Item "-defaultlining/-defaultoldstyle"
.PD 0
@@ -636,15 +712,6 @@
for their default figure style; and even in that case,
\&\fBautoinst\fR's default values (\fB\-defaultlining\fR and \fB\-defaulttabular\fR)
are usually correct.
-.IP "\fB\-nofigurekern\fR" 4
-.IX Item "-nofigurekern"
-Some fonts provide kerning pairs for tabular figures.
-This is very probably not what you want
-(e.g., numbers in tables won't line up exactly).
-This option adds extra \fI \-\-ligkern\fR options
-to the commands for \fIotftotfm\fR to suppress such kerns.
-Note that this option leads to very long commands (it adds
-one hundred \fI \-\-ligkern\fR options), which may cause problems on some systems.
.IP "\fB\-nfssweight\fR=\fIcode\fR=\fIweight\fR" 4
.IX Item "-nfssweight=code=weight"
.PD 0
@@ -664,104 +731,18 @@
Append \fIextra\fR as extra options to the command lines for \fIotftotfm\fR.
To prevent \fIextra\fR from accidentily being interpreted as options
to \fBautoinst\fR, it should be properly quoted.
-.IP "\fB\-manual\fR" 4
-.IX Item "-manual"
-Manual mode; for users who want to post-process the generated files
-and commands. By default, \fBautoinst\fR immediately executes all
-\&\fIotftotfm\fR commands it generates;
-in manual mode, these are instead written to a file \fIautoinst.bat\fR.
-Furthermore it tells \fIotftotfm\fR to generate human readable (and editable)
-\&\fIpl/vpl\fR files instead of the default \fItfm/vf\fR ones,
-and to place all generated files in a subdirectory \f(CW\*(C`./autoinst_output/\*(C'\fR
-of the current directory, rather than install them into your TeX installation.
-.Sp
-When using this option, you need to execute the following manual steps after
-\&\fBautoinst\fR has finished:
-.RS 4
-.IP "\- run \fIpltotf\fR and \fIvptovf\fR on the generated \fIpl\fR and \fIvf\fR files, to convert them to \fItfm/vf\fR format;" 2
-.IX Item "- run pltotf and vptovf on the generated pl and vf files, to convert them to tfm/vf format;"
-.PD 0
-.IP "\- move all generated files to a proper \s-1TEXMF\s0 tree, and, if necessary, update the filename database;" 2
-.IX Item "- move all generated files to a proper TEXMF tree, and, if necessary, update the filename database;"
-.ie n .IP "\- tell TeX about the new \fImap\fR file (usually by running ""updmap"" or similar)." 2
-.el .IP "\- tell TeX about the new \fImap\fR file (usually by running \f(CWupdmap\fR or similar)." 2
-.IX Item "- tell TeX about the new map file (usually by running updmap or similar)."
-.RE
-.RS 4
-.PD
-.Sp
-Note that some options (\fI\-target\fR, \fI\-vendor\fR and \fI\-typeface\fR,
-\&\fI\-[no]updmap\fR) are meaningless, and hence ignored, in manual mode.
-.RE
-.IP "\fB\-target\fR=\fI\s-1DIRECTORY\s0\fR" 4
-.IX Item "-target=DIRECTORY"
-Install all generated files into the \s-1TEXMF\s0 tree at \fI\s-1DIRECTORY\s0\fR.
-.Sp
-By default, \fBautoinst\fR searches the \f(CW$TEXMFLOCAL\fR and \f(CW$TEXMFHOME\fR trees
-and installs all files into the first user-writable \s-1TEXMF\s0 tree it finds.
-If \fBautoinst\fR cannot find such a user-writable directory
-(which shouldn't happen, since \f(CW$TEXMFHOME\fR is supposed to be user-writable)
-it will print a warning message and put all files into the subdirectory
-\&\f(CW\*(C`./autoinst_output/\*(C'\fR of the current directory.
-It's then up to the user to move the generated files to a better location
-and update all relevant databases
-(usually by calling \fItexhash\fR and \fIupdmap\fR).
-.Sp
-\&\fI\s-1WARNING:\s0\fR using this option may interfere with \fIkpathsea\fR and \fIupdmap\fR
-(especially when the chosen directory is outside the standard \s-1TEXMF\s0 trees),
-so using \fI\-target\fR will disable the automatic call to \fIupdmap\fR
-(as if \fI\-noupdmap\fR had been given).
-It is up to the user to manually update all databases (i.e., by calling
-\&\fItexhash\fR and \fIupdmap\fR or similar).
-.IP "\fB\-vendor\fR=\fI\s-1VENDOR\s0\fR" 4
-.IX Item "-vendor=VENDOR"
-.PD 0
-.IP "\fB\-typeface\fR=\fI\s-1TYPEFACE\s0\fR" 4
-.IX Item "-typeface=TYPEFACE"
-.PD
-These options are equivalent to \fIotftotfm\fR's \fI \-\-vendor\fR and \fI \-\-typeface\fR
-options: they change the `vendor' and `typeface' parts of the names of the
-subdirectories in the \s-1TEXMF\s0 tree where generated files will be stored.
-The default values are `lcdftools' and the font's FontFamily name.
-.Sp
-Note that these options change \fIonly\fR directory names,
-not the names of any generated files.
-.IP "\fB\-updmap\fR/\fB\-noupdmap\fR" 4
-.IX Item "-updmap/-noupdmap"
-Control whether or not \fIupdmap\fR is called after the last call to \fIotftotfm\fR.
-The default is \fB\-updmap\fR.
-.SS "A note for MiKTeX users"
-.IX Subsection "A note for MiKTeX users"
-Automatically installing the fonts into a suitable \s-1TEXMF\s0 tree
-(as \fBautoinst\fR tries to do by default) only works for TeX-installations
-that use the \fIkpathsea\fR library; with TeX distributions that implement
-their own directory searching (such as MiKTeX), \fBautoinst\fR will complain
-that it cannot find the \fIkpsewhich\fR program and move all generated files
-into a subdirectory \f(CW\*(C`./autoinst_output/\*(C'\fR of the current directory.
-If you use such a TeX distribution, you should either move these files
-to their correct destinations by hand, or use the \fI\-target\fR option
-(see \*(L"COMMAND-LINE \s-1OPTIONS\*(R"\s0 below) to manually specify a \s-1TEXMF\s0 tree.
-.PP
-Also, some OpenType fonts contain so many kerning pairs that the resulting
-\&\fIpl\fR and \fIvpl\fR files are too big for MiKTeX's \fIpltotf\fR and \fIvptovf\fR;
-the versions that come with W32TeX (\fIhttp://www.w32tex.org\fR)
-and TeXLive (\fIhttp://tug.org/texlive\fR) don't seem to have this problem.
-.SS "A note for MacTeX users"
-.IX Subsection "A note for MacTeX users"
-By default, \fBautoinst\fR will try to install all generated files into
-the \f(CW$TEXMFLOCAL\fR tree; when this directory isn't user-writable,
-it will use the \f(CW$TEXMFHOME\fR tree instead. Unfortunately, MacTeX's version
-of \f(CW\*(C`updmap\-sys\*(C'\fR (which is called behind the scenes) doesn't search
-in \f(CW$TEXMFHOME\fR, and hence MacTeX will not find the new fonts.
-.PP
-To remedy this, either run \fBautoinst\fR as root (so that it can install
-everything into \f(CW$TEXMFLOCAL\fR) or manually run \f(CW\*(C`updmap \-user\*(C'\fR to tell
-TeX about the files in \f(CW$TEXMFHOME\fR.
-The latter option does, however, have some caveats;
-see \fIhttps://tug.org/texlive/scripts\-sys\-user.html\fR.
+.IP "\fB\-nofigurekern\fR" 4
+.IX Item "-nofigurekern"
+Some fonts provide kerning pairs for tabular figures.
+This is very probably not what you want
+(e.g., numbers in tables won't line up exactly).
+This option adds extra \fI \-\-ligkern\fR options
+to the commands for \fIotftotfm\fR to suppress such kerns.
+Note that this option leads to very long commands (it adds
+one hundred \fI \-\-ligkern\fR options), which may cause problems on some systems.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
-Eddie Kohler's \fBTypeTools\fR (\fIhttp://www.lcdf.org/type\fR).
+Eddie Kohler's \fBTypeTools\fR and \fBT1Utils\fR (\fIhttp://www.lcdf.org/type\fR).
.PP
\&\fBPerl\fR can be obtained from \fIhttp://www.perl.org\fR;
it is included in most Linux distributions.
@@ -768,8 +749,8 @@
For Windows, try ActivePerl (\fIhttp://www.activestate.com\fR)
or Strawberry Perl (\fIhttp://strawberryperl.com\fR).
.PP
-\&\fBXeTeX\fR (\fIhttp://www.tug.org/xetex\fR) and
-\&\fBLuaTeX\fR (\fIhttp://www.luatex.org\fR)
+\&\fBLuaTeX\fR (\fIhttp://www.luatex.org\fR) and
+\&\fBXeTeX\fR (\fIhttp://www.tug.org/xetex\fR)
are Unicode-aware TeX engines that can use OpenType fonts directly,
without any (La)TeX\-specific support files.
.PP
@@ -804,10 +785,18 @@
\&\s-1GNU\s0 General Public License for more details.
.SH "VERSION"
.IX Header "VERSION"
-This document describes \fBautoinst\fR version 20200619.
+This document describes \fBautoinst\fR version 20200729.
.SH "RECENT CHANGES"
.IX Header "RECENT CHANGES"
(See the source for the full story, all the way back to 2005.)
+.IP "\fI2020\-07\-29\fR" 12
+.IX Item "2020-07-29"
+Some changes in the generated \fIsty\fR and \fIfd\fR files,
+to improve compatibility with the \fImicrotype\fR package.
+Made sure that \fIpfb\fR fonts are always generated whenever
+the input fonts are in \fIotf\fR format.
+Added the \f(CW\*(C`\-t1suffix\*(C'\fR command-line option,
+to modify the font and file names of those generated Type1 fonts.
.IP "\fI2020\-06\-19\fR" 12
.IX Item "2020-06-19"
Added the \f(CW\*(C`nomathgreek\*(C'\fR option to generated style files.
@@ -837,115 +826,3 @@
.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).
-The font info parsing now also recognises numerical weights, e.g. in Museo.
-.IP "\fI2019\-10\-29\fR" 12
-.IX Item "2019-10-29"
-The generated style files now use T1 as the default text encoding.
-.IP "\fI2019\-10\-27\fR" 12
-.IX Item "2019-10-27"
-The mapping in \fIfd\fR files between font series and standard \s-1NFSS\s0 attributes
-now uses the new \fIalias\fR function instead of \fIssub\fR (based on code by
-Frank Mittelbach).
-The way \fIotftotfm\fR is called was changed to work around a Perl/Windows bug;
-the old way might cause the process to hang.
-Using the \fI\-target\fR option now implies \fI\-noupdmap\fR, since choosing
-a non-standard target directory interferes with kpathsea/texhash and updmap.
-.IP "\fI2019\-10\-01\fR" 12
-.IX Item "2019-10-01"
-Handle \fI\-target\fR directories with spaces in their path names.
-Tweaked messages and logs to make them more useful to the user.
-.IP "\fI2019\-07\-12\fR" 12
-.IX Item "2019-07-12"
-Replaced single quotes in calls to \fIotfinfo\fR with double quotes,
-as they caused problems on Windows 10.
-.IP "\fI2019\-06\-25\fR" 12
-.IX Item "2019-06-25"
-.RS 12
-.PD 0
-.IP "\-" 3
-.PD
-Added the \fI\-mergeweights\fR and \fI\-mergeshapes\fR options,
-and improved \fI\-mergewidths\fR.
-.IP "\-" 3
-Improved the parsing of fonts' widths and weights.
-.IP "\-" 3
-Improved the mapping of widths and weights to \s-1NFSS\s0 codes.
-.IP "\-" 3
-Changed logging code so that that results of font info parsing
-are always logged, even (especially!) when parsing fails.
-.IP "\-" 3
-Added a warning when installing fonts from multiple families.
-.IP "\-" 3
-Added simple recognition for sanserif and typewriter fonts.
-.IP "\-" 3
-Fixed error checking after calls to \fIotfinfo\fR
-(\fBautoinst\fR previously only checked whether \f(CW\*(C`fork()\*(C'\fR was successful,
-not whether the actual call to \fIotfinfo\fR worked).
-.IP "\-" 3
-Fixed a bug in the \fI\-inferiors\fR option;
-when used without a (supposedly optional) value,
-it would silently gobble the next option instead.
-.RE
-.RS 12
-.RE
-.IP "\fI2019\-05\-22\fR" 12
-.IX Item "2019-05-22"
-Added the \fImainfont\fR option to the generated \fIsty\fR files.
-Prevented hyphenation for typewriter fonts
-(added \f(CW\*(C`\ehyphenchar\efont=\-1\*(C'\fR to the \f(CW\*(C`\eDeclareFontFamily\*(C'\fR declarations).
-Added the \fI\-version\fR option.
-.IP "\fI2019\-05\-17\fR" 12
-.IX Item "2019-05-17"
-Changed the way the \fI\-ligatures\fR option works:
-\&\fI\-ligatures\fR enables f\-ligatures (even without a `liga' feature),
-\&\fI\-noligatures\fR now disables f\-ligatures (overriding a `liga' feature).
-.IP "\fI2019\-05\-11\fR" 12
-.IX Item "2019-05-11"
-Separate small caps families are now also recognised when the family name
-ends with `\s-1SC\s0' (previously \fBautoinst\fR only looked for `SmallCaps').
-.IP "\fI2019\-04\-22\fR" 12
-.IX Item "2019-04-22"
-Fixed a bug in the generation of swash shapes.
-.IP "\fI2019\-04\-19\fR" 12
-.IX Item "2019-04-19"
-Fixed a bug that affected \-mergesmallcaps with multiple encodings.
-.IP "\fI2019\-04\-16\fR" 12
-.IX Item "2019-04-16"
-Added the <\-mergesmallcaps> option, to handle cases where
-the small caps fonts are in separate font families.
-Titling shape is now treated as a separate family instead of a distinct shape;
-it is generated only for fonts with the `titl' feature.
-Only add f\-ligatures to fonts when explicitly asked to (\fI\-ligatures\fR).
-.IP "\fI2019\-04\-11\fR" 12
-.IX Item "2019-04-11"
-Tried to make the log file more relevant.
-Added the \fI\-nfssweight\fR and \fI\-nfsswidth\fR options,
-and finetuned the automatic mapping between fonts and \s-1NFSS\s0 codes.
-Changed the name of the generated log file to \fI<fontfamily>.log\fR,
-and revived the \fI\-logfile\fR option to allow overriding this choice.
-Made \fI\-mergewidths\fR the default (instead of \fI\-nomergewidths\fR).
-.IP "\fI2019\-04\-01\fR" 12
-.IX Item "2019-04-01"
-Fine-tuned the decision where to put generated files;
-in particular, create \f(CW$TEXMFHOME\fR if it doesn't already exist
-and \f(CW$TEXMFLOCAL\fR isn't user-writable.
-.Sp
-In manual mode, or when we can't find a user-writable \s-1TEXMF\s0 tree,
-put all generated files into a subdirectory \f(CW\*(C`./autoinst_output/\*(C'\fR
-instead of all over the current working directory.
-.Sp
-Added `auto' value to the \fIinferiors\fR option,
-to tell \fBautoinst\fR to use whatever inferior characters are available.
-.IP "\fI2019\-03\-14\fR" 12
-.IX Item "2019-03-14"
-Overhauled the mapping of fonts (more specifically of weights and widths;
-the mapping of shapes didn't change) to \s-1NFSS\s0 codes.
-Instead of inventing our own codes to deal with every possible weight
-and width out there, we now create `long' codes based on the names
-in the font metadata.
-Then we add `ssub' rules to the \fIfd\fR files to map the standard \s-1NFSS\s0 codes
-to our fancy names (see the section \fB\s-1NFSS\s0 codes\fR;
-based on discussions with Frank Mittelbach and Bob Tennent).
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-07-30 21:15:51 UTC (rev 55996)
+++ trunk/Master/texmf-dist/doc/man/man1/ot2kpx.1 2020-07-30 21:16:18 UTC (rev 55997)
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "OT2KPX 1"
-.TH OT2KPX 1 "2020-06-19" "fontools" "Marc Penninga"
+.TH OT2KPX 1 "2020-07-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
@@ -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 20200619.
+This document describes \fBot2kpx\fR version 20200729.
.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-07-30 21:15:51 UTC (rev 55996)
+++ trunk/Master/texmf-dist/doc/support/fontools/README 2020-07-30 21:16:18 UTC (rev 55997)
@@ -32,9 +32,10 @@
for Windows, try ActivePerl (http://www.activestate.com)
or Strawberry Perl (http://strawberryperl.com).
-LCDF TypeTools
- Of course, Autoinst needs the LCDF TypeTools;
- they should be installed in a directory on your PATH.
+LCDF TypeTools and T1Utils
+ Of course, Autoinst needs the LCDF TypeTools and T1Utils
+ (available from www.lcdf.org/type, and also on CTAN and in TeXLive);
+ these should be installed in a directory on your PATH.
Kpathsea
Automatically installing the fonts into a suitable TEXMF tree
Modified: trunk/Master/texmf-dist/doc/support/fontools/splitttc
===================================================================
--- trunk/Master/texmf-dist/doc/support/fontools/splitttc 2020-07-30 21:15:51 UTC (rev 55996)
+++ trunk/Master/texmf-dist/doc/support/fontools/splitttc 2020-07-30 21:16:18 UTC (rev 55997)
@@ -38,7 +38,7 @@
use Getopt::Long;
use Pod::Usage;
-my $VERSION = "20200619";
+my $VERSION = "20200729";
parse_commandline();
@@ -303,7 +303,7 @@
=head1 VERSION
-This document describes B<splitttc> version 20200619.
+This document describes B<splitttc> version 20200729.
=head1 RECENT CHANGES
Modified: trunk/Master/texmf-dist/scripts/fontools/afm2afm
===================================================================
--- trunk/Master/texmf-dist/scripts/fontools/afm2afm 2020-07-30 21:15:51 UTC (rev 55996)
+++ trunk/Master/texmf-dist/scripts/fontools/afm2afm 2020-07-30 21:16:18 UTC (rev 55997)
@@ -37,7 +37,7 @@
use Getopt::Long;
use Pod::Usage;
-my $VERSION = "20200619";
+my $VERSION = "20200729";
parse_commandline();
@@ -421,7 +421,7 @@
=head1 VERSION
-This document describes B<afm2afm> version 20200619.
+This document describes B<afm2afm> version 20200729.
=head1 RECENT CHANGES
Modified: trunk/Master/texmf-dist/scripts/fontools/autoinst
===================================================================
--- trunk/Master/texmf-dist/scripts/fontools/autoinst 2020-07-30 21:15:51 UTC (rev 55996)
+++ trunk/Master/texmf-dist/scripts/fontools/autoinst 2020-07-30 21:16:18 UTC (rev 55997)
@@ -40,7 +40,7 @@
use Pod::Usage ();
use POSIX ();
-my $VERSION = '20200619';
+my $VERSION = '20200729';
my ($d, $m, $y) = (localtime time)[3 .. 5];
my $TODAY = sprintf "%04d/%02d/%02d", $y + 1900, $m + 1, $d;
@@ -129,8 +129,19 @@
$log->log_commands(\@commands) if $ARGV{verbose} >= 1;
if (!$ARGV{dryrun}) {
+ $nfss_mapping = NFSS::invert_mapping($nfss_mapping);
LaTeX::create_support_files(\@workitems, $family, $nfss_mapping);
Otftotfm::run_commands(\@commands, $family, $log);
+
+ if ($ARGV{t1suffix}) {
+ Work::modify_fontnames($family, $fontlist);
+ }
+
+ print <<"END_MESSAGE_UPDMAP";
+[INFO] Done generating fonts!
+ Please update TeX's databases (by calling 'texhash' and 'updmap'
+ or their equivalents on your system) before using these fonts.
+END_MESSAGE_UPDMAP
}
$log->close();
@@ -275,6 +286,12 @@
sub process_basicinfo {
my ($self, $data) = @_;
+ $self->{originalfamily} = $data->{family};
+
+ for my $key (keys %{$data}) {
+ $data->{$key} =~ s/\s+//xmsg;
+ }
+
$data->{family} = $data->{preferredfamily} || $data->{family};
$data->{subfamily} = $data->{preferredsubfamily} || $data->{subfamily};
$data->{fullname} =~ s/\A$data->{family}//xms;
@@ -282,9 +299,7 @@
# clean up family name (it's used in LaTeX command names)
my @DIGITS = qw(Zero One Two Three Four Five Six Seven Eight Nine);
- $data->{family} =~ s/\A(?: Adobe | DTL | FF | ITC | LT | MT)//xms;
$data->{family} =~ s/(?: LT | MT)(?: Std | Pro )\z//xms;
- $data->{family} =~ s/ Std \z//xms;
$data->{family} =~ s/(\d)/$DIGITS[$1]/xmsge;
$data->{family} =~ s/[^A-Za-z]+//xmsg;
@@ -403,11 +418,6 @@
$self->{weight} = NFSS::unabbreviate(lc($2));
}
- # 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.
- $self->{family} =~ s/text \z//xmsi;
-
$self->{basicshape} = NFSS::get_nfss_shape($self->{shape});
# We define 'series' as 'weight + width'. This matches NFSS,
@@ -510,7 +520,6 @@
or die "[ERROR] Could not fork(): $!";
my %data = map { my ($k,$v) = m/\A\s* ([^:]+?) \s*:\s* ([^\r\n]+)/xms;
$k =~ s/\s+//xmsg;
- $v =~ s/\s+//xmsg;
(lc $k => $v);
}
grep { m/\A\s* [^:]+? \s*:\s* [^\r\n]+/xms } <$otfinfo>;
@@ -738,27 +747,21 @@
: die "[ERROR] Internal bug, please report!"
;
- my $default_bold;
for my $series (qw(heavy black extrabold demibold semibold bold)) {
if ( $seen{$series} ) {
print {$STY}
"\\DeclareOptionX{$series}{\\edef\\bfseries\@$ARGV{nfss}",
"{$series}}\n";
- $default_bold = $series;
}
}
- $defaults .= ",$default_bold" if $default_bold;
- my $default_regular;
- for my $series (qw(medium book text regular)) {
+ for my $series (qw(medium book text normal regular)) {
if ( $seen{$series} ) {
print {$STY}
"\\DeclareOptionX{$series}{\\edef\\mdseries\@$ARGV{nfss}",
"{$series}}\n";
- $default_regular = $series;
}
}
- $defaults .= ",$default_regular" if $default_regular;
if ($ARGV{math}) {
print {$STY} <<"END_STY_MATHOPTION";
@@ -908,8 +911,9 @@
my $testfont = eval {
my $testenc = $ARGV{encoding}[0];
my $testfig = ( grep { exists $data->{$testenc}{$_} }
- qw(OsF LF TOsF TLF) )[0] or die;
- my $testweight = $nfss_mapping->{weight}{""}[0] or die;
+ qw(OsF LF TOsF TLF) )[0] or die;
+ my $testweight = ( grep { $nfss_mapping->{$_} eq "m" }
+ keys %{$nfss_mapping} )[0] or die;
my $testshape
= ( grep { exists $data->{$testenc}{$testfig}{$testweight}{$_} }
qw(n sc it sl)
@@ -1334,12 +1338,21 @@
END_FD_HEADER
while (my ($series, $fdseries) = each %$data) {
- print {$FD} "\n% ---- $series ----\n\n";
+ my $nfssseries = $nfss_mapping->{$series};
+
+ my $alias = $series;
+ if (defined $nfssseries) {
+ print {$FD} "\n% ---- $nfssseries = $series ----\n\n";
+ $series = $nfssseries;
+ }
+ else {
+ print {$FD} "\n% ---- $series ----\n\n";
+ }
while (my ($shape, $fdshape) = each %$fdseries) {
print {$FD}
"\\DeclareFontShape{$enc}{$fam-$sty}{$series}{$shape}{\n";
my @sizes = sort { $a->[0] <=> $b->[0] }
- @{$fdshape};
+ @{$fdshape};
$sizes[0][0] = $sizes[-1][1] = '';
$sizes[$_][0] = $sizes[$_ - 1][1] for (1 .. $#sizes);
for my $size (@sizes) {
@@ -1347,6 +1360,15 @@
"\\$fam\@\@scale $size->[2]\n";
}
print {$FD} "}{}\n\n";
+
+ if (defined $nfssseries) {
+ print {$FD} <<"END_ALIAS_SERIES";
+\\DeclareFontShape{$enc}{$fam-$sty}{$alias}{$shape}{
+ <-> alias * $fam-$sty/$nfssseries/$shape
+}{}
+
+END_ALIAS_SERIES
+ }
}
# ssub italic for missing slanted, or vice versa
@@ -1354,51 +1376,33 @@
if (!exists $fdseries->{$shape} && exists $fdseries->{$replace}) {
print {$FD} <<"END_SSUB_SHAPE";
\\DeclareFontShape{$enc}{$fam-$sty}{$series}{$shape}{
- <-> ssub * $fam-$sty/$series/$replace
+ <-> ssub * $fam-$sty/$series/$replace
}{}
END_SSUB_SHAPE
+ if (defined $nfssseries) {
+ print {$FD} <<"END_SSUB_ALIAS";
+\\DeclareFontShape{$enc}{$fam-$sty}{$alias}{$shape}{
+ <-> ssub * $fam-$sty/$alias/$replace
+}{}
+
+END_SSUB_ALIAS
+ }
$fdseries->{$shape} = 1;
}
}
}
- print {$FD} <<"END_COMMENT";
-%
-% Extra 'alias' rules to map the standard NFSS codes to our fancy names
-%
-END_COMMENT
my %seen;
- NFSSWEIGHT:
- for my $nfssweight (NFSS::get_all_nfss_weights()) {
- NFSSWIDTH:
- for my $nfsswidth (NFSS::get_all_nfss_widths()) {
- my $nfssseries = ($nfssweight . $nfsswidth) || 'm';
-
- for my $weight (@{$nfss_mapping->{weight}{$nfssweight}}) {
- $weight = '' if $weight eq 'regular';
- for my $width (@{$nfss_mapping->{width}{$nfsswidth}}) {
- $width = '' if $width eq 'regular';
- my $series = ($weight . $width) || 'regular';
- if ( exists $data->{$series} ) {
- print {$FD} "\n% $nfssseries --> $series\n\n";
- for my $shape (keys %{$data->{$series}}) {
- print {$FD} <<"END_SSUB_SERIES";
-\\DeclareFontShape{$enc}{$fam-$sty}{$nfssseries}{$shape}{
- <-> alias * $fam-$sty/$series/$shape
-}{}
-
-END_SSUB_SERIES
- $seen{$nfssseries}{$shape} = 1;
- }
- next NFSSWIDTH;
- }
- }
+ while (my ($series, $nfssseries) = each %{$nfss_mapping}) {
+ if (exists $data->{$series}) {
+ for my $shape (keys %{$data->{$series}}) {
+ $seen{$nfssseries}{$shape} = 1;
}
}
}
- # Add ssub rules to map bx to b
+ print {$FD} "\n% ---- Extra 'ssub' rules to map 'bx' to 'b' ----\n\n";
for my $shape (keys %{$seen{b}}) {
if (!exists $seen{bx}{$shape}) {
print {$FD} <<"END_SSUB_BX";
@@ -1506,18 +1510,19 @@
fractions: @{[ $ARGV{fractions} ? 'yes' : 'no' ]}
ligatures: @{[ $ARGV{ligatures} ? 'yes' : 'no' ]}
- auto/manual: @{[ $ARGV{manual} ? 'manual' : 'auto' ]}
target: $ARGV{target}
extra: $ARGV{extra}
- figurekern: @{[ $ARGV{figurekern} ? 'keep' : 'remove' ]}
+ figurekern: @{[ $ARGV{figurekern} ? 'keep' : 'remove' ]}
nfssweight: @{[ join q{, }, @{$ARGV{nfssweight}} ]}
nfsswidth: @{[ join q{, }, @{$ARGV{nfsswidth}} ]}
- math: @{[ $ARGV{math} ? 'yes' : 'no' ]}
+ math: @{[ $ARGV{math} ? 'yes' : 'no' ]}
mathspacing: $ARGV{mathspacing}
+ fontname suffix: @{[ $ARGV{t1suffix} || '(none)' ]}
+
END_ARGUMENTS
if ($ARGV{fig_height} or $ARGV{fig_width}) {
@@ -1741,7 +1746,7 @@
=cut
my @WEIGHT = (
- ul => [ qw( ultralight thin 100 hairline eight four two ) ],
+ ul => [ qw( ultralight thin 100 hairline ) ],
el => [ qw( extralight 200 ) ],
l => [ qw( light 300 ) ],
sl => [ qw( semilight blond ) ],
@@ -1959,7 +1964,6 @@
return @allshapes;
}
-#
# --------------------------------------------------------------------------
# Returns a mapping of NFSS codes to weight and width names.
# --------------------------------------------------------------------------
@@ -2046,7 +2050,35 @@
return $mapping;
}
+# --------------------------------------------------------------------------
+# Returns a mapping of weight and width names to NFSS codes.
+# --------------------------------------------------------------------------
+sub invert_mapping {
+ my $nfss_mapping = shift;
+ my %to_nfss;
+ NFSSWEIGHT:
+ for my $nfssweight (NFSS::get_all_nfss_weights()) {
+ next unless @{$nfss_mapping->{weight}{$nfssweight}};
+ my $weight = $nfss_mapping->{weight}{$nfssweight}[0];
+ $weight = "" if $weight eq 'regular';
+
+ NFSSWIDTH:
+ for my $nfsswidth (NFSS::get_all_nfss_widths()) {
+ my $nfssseries = ($nfssweight . $nfsswidth) || 'm';
+
+ next unless @{$nfss_mapping->{width}{$nfsswidth}};
+ my $width = $nfss_mapping->{width}{$nfsswidth}[0];
+ $width = "" if $width eq 'regular';
+ my $series = ($weight . $width) || 'regular';
+ $to_nfss{$series} = $nfssseries;
+ }
+ }
+
+ return \%to_nfss;
+}
+
+
############################################################################
@@ -2091,8 +2123,6 @@
-target="DIRECTORY" Install files into specified TEXMF tree
-vendor="VENDOR" Only used for naming directories
-typeface="TYPEFACE" Only used for naming directories
- -(no)updmap Toggle running of updmap
- -manual Manual mode (see documentation)
-(no)figurekern Keep or remove kerns between tabular figures
@@ -2109,6 +2139,8 @@
-math Generate basic math fonts
-mathspacing=AMOUNT Letterspace the math fonts by AMOUNT/1000 em
+ -t1suffix=SUFFIX Add SUFFIX to name of generated pfb fonts
+
font[s] The fonts (.otf or .ttf format) to install.
Please report any bugs or suggestions to <marcpenninga at gmail.com>.
@@ -2137,8 +2169,6 @@
target => '',
vendor => 'lcdftools',
typeface => '',
- updmap => '1', # 0 = no, 1 = yes
- manual => '0', # 0 = no, 1 = yes
dryrun => '0', # 0 = no, 1 = yes
logfile => '',
figurekern => '1', # 0 = no, 1 = yes
@@ -2147,6 +2177,7 @@
nfssweight => [],
math => 0,
mathspacing => 0,
+ t1suffix => 'none',
);
@@ -2186,9 +2217,7 @@
'target=s' => \$ARGV{target},
'vendor=s' => \$ARGV{vendor},
'typeface=s' => \$ARGV{typeface},
- 'updmap!' => \$ARGV{updmap},
'dryrun' => \$ARGV{dryrun},
- 'manual' => \$ARGV{manual},
'figurekern!' => \$ARGV{figurekern},
'logfile=s' => \$ARGV{logfile},
'verbose+' => \$ARGV{verbose},
@@ -2214,6 +2243,7 @@
},
'math!' => \$ARGV{math},
'mathspacing=i' => \$ARGV{mathspacing},
+ 't1suffix:s' => \$ARGV{t1suffix},
)
or die "$USAGE";
@@ -2299,13 +2329,11 @@
|| Util::any( map { $_ eq 'liga' } @{$workitem->{features}} );
return join q( ), 'otftotfm',
- ($ARGV{manual} ? '--pl' : '--automatic'),
+ '--automatic',
"--encoding=$workitem->{enc_file}",
$targetdirs,
'--no-updmap',
- ($workitem->{font}{filename} =~ m/[.]ttf\z/xmsi
- ? '--no-type1'
- : q()),
+ '--force',
($SCHEME{$workitem->{encoding}}
? qq(--coding-scheme="$SCHEME{$workitem->{encoding}}")
: q()),
@@ -2327,44 +2355,33 @@
# --------------------------------------------------------------------------
-# Executes (or saves to file, when $ARGV{manual} is true) all commands.
+# Executes all commands.
# --------------------------------------------------------------------------
sub run_commands {
my ($commandlist, $family, $log) = @_;
- # Make sure the last command *does* call updmap.
- $commandlist->[-1] =~ s/--no-updmap//xms if $ARGV{updmap};
-
- if ($ARGV{manual}) {
- open my $BAT, '>', 'autoinst.bat'
- or die "[ERROR] Can't create 'autoinst.bat': $!";
- print {$BAT} "$_\n" for @{$commandlist};
- close $BAT;
+ 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 '.';
+ open my $otftotfm, '-|', "$command 2>&1"
+ or die "could not fork(): $!";
+ my $msgs = do { local $/; <$otftotfm> };
+ close $otftotfm
+ or do {
+ warn "\n$command\n\n$msgs\n";
+ $log->log("\n$command\n\n$msgs\n");
+ $oops = 1;
+ };
}
- else {
- 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 '.';
- open my $otftotfm, '-|', "$command 2>&1"
- or die "could not fork(): $!";
- my $msgs = do { local $/; <$otftotfm> };
- close $otftotfm
- or do {
- warn "\n$command\n\n$msgs\n";
- $log->log("\n$command\n\n$msgs\n");
- $oops = 1;
- };
- }
- print "\n";
- $| = 0;
- if ($oops) {
- warn <<"END_OTFTOTFM_WARNING";
+ print "\n";
+ $| = 0;
+ if ($oops) {
+ warn <<"END_OTFTOTFM_WARNING";
[ERROR] One or more calls to 'otftotfm' returned a non-zero status code;
please check the messages above and in the log file.
END_OTFTOTFM_WARNING
- }
}
return;
@@ -2631,6 +2648,7 @@
process_styles_options();
process_encoding_options();
process_target_options();
+ process_output_options();
return;
}
@@ -2767,21 +2785,7 @@
sub process_target_options{
my $localtarget = File::Spec->catdir( Cwd::getcwd(), 'autoinst_output' );
- if ($ARGV{manual}) {
- warn "[WARNING] Option '-target' overridden by '-manual'!\n"
- if $ARGV{target};
- $ARGV{target} = $localtarget;
- $ARGV{updmap} = 0;
- }
- elsif ($ARGV{target}) {
- $ARGV{updmap} = 0;
- warn <<"END_WARNING_TARGET_UPDMAP";
-[WARNING] The '-target' option may interfere with kpathsea and updmap;
- automatic calling of updmap has been disabled.
- Please call updmap manually.
-END_WARNING_TARGET_UPDMAP
- }
- elsif (!$ARGV{target}) {
+ if (!$ARGV{target}) {
my $is_windows_os = ( $^O =~ /^MSWin/i );
my $kpsepath = $is_windows_os
? eval { qx( kpsewhich -expand-var=\$TEXMFLOCAL;\$TEXMFHOME ) }
@@ -2809,7 +2813,6 @@
if (!$ARGV{target}) {
$ARGV{target} = $localtarget;
- $ARGV{updmap} = 0;
warn <<"END_WARNING_DUMPING_FILES";
[WARNING] No user-writable TEXMF-tree found!
@@ -2835,6 +2838,30 @@
# --------------------------------------------------------------------------
+# Processes the output related options.
+# --------------------------------------------------------------------------
+sub process_output_options{
+ # If the user gave -t1suffix *without* value as the last option,
+ # Getopt::Long may mistake the next argument (a font filename)
+ # for the value of -t1suffix; we take care of this case
+ # by testing whether the value refers to an existing file
+ # and repairing things if necessary.
+ if (-e $ARGV{t1suffix}) {
+ unshift @ARGV, $ARGV{t1suffix};
+ $ARGV{t1suffix} = '';
+ }
+
+ $ARGV{t1suffix} ||= 'PS';
+
+ if ($ARGV{t1suffix} eq 'none') {
+ $ARGV{t1suffix} = '';
+ }
+
+ return;
+}
+
+
+# --------------------------------------------------------------------------
# Processes command line options with font family-specific defaults.
# --------------------------------------------------------------------------
sub process_family_dependent_options {
@@ -3127,6 +3154,120 @@
}
+# --------------------------------------------------------------------------
+# Modify the font and file names of all generated .pfb files.
+# --------------------------------------------------------------------------
+sub modify_fontnames {
+ my ($family, $fontlist) = @_;
+
+ my %has_fonttype = map { ($_->{fonttype} => 1) } @{$fontlist};
+ return unless $has_fonttype{opentype};
+
+ my $pfb_dir = File::Spec->catdir(
+ $ARGV{target},
+ 'fonts',
+ 'type1',
+ $ARGV{vendor},
+ $ARGV{typeface} || $family);
+
+ # The otftotfm-generated map file refers to the original otf files;
+ # we need to change this to use our name-modifyd Type1 fonts instead.
+ my $mapfile = File::Spec->catfile(
+ $ARGV{target},
+ 'fonts',
+ 'map',
+ 'dvips',
+ $ARGV{typeface} || $family,
+ $family . '.map');
+ open my $map, '<', $mapfile
+ or die "[ERROR] Cannot open '$mapfile' for reading";
+ my $mapdata = do { local $/; <$map> };
+ close $map;
+
+ my $NOTICE = 'Converted to Type1 by autoinst/cfftot1; '
+ . 'for use with pdfTeX only! ';
+
+ my $newfam = $family . $ARGV{t1suffix};
+
+ for my $font (@{$fontlist}) {
+ next unless $font->{fonttype} eq 'opentype';
+
+ my $full_family = $font->{originalfamily};
+ if (index($full_family, $family) > -1) {
+ $full_family = $family;
+ }
+ else {
+ while ($full_family =~ m/[ ]/xms) {
+ (my $no_space = $full_family) =~ s/[ ]+//xmsg;
+ last if $no_space eq $family;
+ $full_family =~ s/[ ]\S*\z//xms;
+ }
+ $full_family ||= $family;
+ }
+ my $newfullfam = $full_family . q( ) . $ARGV{t1suffix};
+
+ my $newname = $font->{name};
+ if ($newname =~ m/$family/xms) {
+ $newname =~ s/$family/$newfam/xms;
+ }
+ else {
+ $newname =~ s/(.+?)(-|\z)/$1$ARGV{t1suffix$2}/xms;
+ }
+
+ for my $suffix (q(), q(LCDFJ)) {
+ my $oldfn = File::Spec->catfile(
+ $pfb_dir, $font->{name} . $suffix . '.pfb');
+ my $newfn = File::Spec->catfile(
+ $pfb_dir, $newname . $suffix . '.pfb');
+
+ next unless -e $oldfn;
+ if ($suffix eq 'LCDFJ' and -z $oldfn) {
+ unlink $oldfn;
+ next;
+ }
+
+ my $cmd = qq(t1disasm "$oldfn");
+ open my $t1disasm, '-|:raw', $cmd
+ or die "[ERROR] Could not fork(): $!";
+ my @pfbdata = readline $t1disasm;
+ close $t1disasm
+ or die "[ERROR] '$cmd' failed";
+
+ for (@pfbdata) {
+ if (m/%!PS-AdobeFont-1.0:[ ] | \/FontName[ ]/xms) {
+ s/$font->{name}/$newname/;
+ }
+ if (m/\/Notice[ ]/xms) {
+ s/[(]/($NOTICE/xms;
+ }
+ if (m/\/FullName[ ] | \/FamilyName[ ]/xms) {
+ s/$full_family/$newfullfam/
+ or s/(.+?)(-|\z)/$1$ARGV{t1suffix}$2/;
+ }
+ }
+
+ $cmd = qq(t1asm --pfb >"$newfn");
+ open my $t1asm, '|-:raw', $cmd
+ or die "[ERROR] Could not fork(): $!";
+ print {$t1asm} @pfbdata;
+ close $t1asm
+ or die "[ERROR] '$cmd' failed";
+
+ unlink $oldfn unless $oldfn eq $newfn;
+
+ $mapdata =~ s/$font->{name}$suffix.pfb/$newname$suffix.pfb/g;
+ }
+ }
+
+ open $map, '>', $mapfile
+ or die "[ERROR] Cannot open '$mapfile' for writing";
+ print {$map} $mapdata;
+ close $map;
+
+ return;
+}
+
+
############################################################################
@@ -3291,14 +3432,10 @@
ornaments
-=item I<Numr>
+=item I<Numr>, I<Dnom>
-numerators
+numerators and denominators
-=item I<Dnom>
-
-denominators
-
=back
The individual fonts are named I<< <FontName>-<suffix>-<shape>-<enc> >>,
@@ -3345,20 +3482,20 @@
font package before this one).
The name C<scaled> may be used as a synonym for C<scale>.
-=item C<medium>, C<book>, C<text>, C<regular>
+=item C<medium>, C<book>, C<text>, C<normal>, C<regular>
-Select the weight that LaTeX will use as the `regular' weight;
-the default is C<regular>.
+Select the weight that LaTeX will use as the `regular' weight.
=item C<heavy>, C<black>, C<extrabold>, C<demibold>, C<semibold>, C<bold>
-Select the weight that LaTeX will use as the `bold' weight;
-the default is C<bold>.
+Select the weight that LaTeX will use as the `bold' weight.
=back
The last two groups of options will only work if
you have the F<mweights> package installed.
+The default here is not to change LaTeX's default,
+i.e. use the `m' and `b' weights.
The style file will also try to load the F<fontaxes> package
(on CTAN), which gives easy access to various font shapes and styles.
@@ -3459,7 +3596,7 @@
Once again: test the results before using them!
If the characters themselves are fine but spaced too tightly,
you may try increasing the side bearings in math fonts with
-the I<-mathspacing> option (see below), e.g. C<-mathspacing=100>.
+the I<-mathspacing> option (see below), e.g. C<-mathspacing=50>.
=head2 NFSS codes
@@ -3492,17 +3629,10 @@
we map the first of these to `n', for the second one we (ab)use the `it' code
as this family doesn't contain an Italic shape.)
-The mapping of weights and widths to NFSS codes is a more complex,
-two-step proces.
-In the first step, all fonts are assigned a `series' name that is simply
-the concatenation of its weight and width
-(after expanding any abbreviations and converting to lowercase).
-A font with `Cond' width and `Ultra' weight will then be known
-as `ultrablackcondensed'.
-
-In the second step, B<autoinst> tries to map all combinations of NFSS codes
+For weights and widths, B<autoinst> tries to the standard NFSS codes
(ul, el, l, sl, m, sb, b, eb and ub for weights;
-uc, ec, c, sc, m, sx, x, ex and ux for widths) to actual fonts.
+uc, ec, c, sc, m, sx, x, ex and ux for widths)
+as much as possible.
Of course, not all 81 combinations of these NFSS weights and widths will map
to existing fonts;
and conversely it may not be possible to assign every existing font
@@ -3510,12 +3640,14 @@
offer more choices or finer granularity than NFSS's codes can handle;
e.g., Fira Sans contains fifteen(!) different weights,
including an additional `Medium' weight between Regular and Semibold).
+Therefore every font is also assigned a `series' name that is simply
+the concatenation of its weight and width
+(after expanding any abbreviations and converting to lowercase).
+A font with `Cond' width and `Ultra' weight will then be known
+as `ultrablackcondensed'.
-B<autoinst> tries hard to ensure that the most common NFSS codes
-(and high-level commands such as C<\bfseries>,
-which are built on top of those codes) will `just work'.
-
-To see exactly which NFSS codes map to which fonts, see the log file
+The exact mapping between fonts and NFSS codes can be found
+in the generated F<fd> files and in the log file
(pro tip: run B<autoinst> with the I<-dryrun> option
to check the chosen mapping beforehand).
The I<-nfssweight> and I<-nfsswidth> command-line options can be used
@@ -3548,6 +3680,55 @@
are not compatible with files generated by newer versions.
+=head1 WARNINGS AND CAVEATS
+
+=head2 OpenType fonts and licensing issues
+
+Since F<pdfTeX> cannot subset otf-flavoured OpenType fonts,
+I<otftotfm> will convert such fonts to Type1 (pfb) format.
+However, many fonts (at least those licensed under the SIL Open Font License)
+do not allow distributing such converted versions under their original name.
+
+To meet these licensing requirements, B<autoinst> provides
+a C<-t1suffix> command-line option that appends
+a (user-defined) suffix to the names (both filename and internal font name)
+of all generated Type1 fonts; see L</COMMAND-LINE OPTIONS> below.
+
+
+=head2 A note for MiKTeX users
+
+Automatically installing the fonts into a suitable TEXMF tree
+(as B<autoinst> tries to do by default) only works for TeX-installations
+that use the F<kpathsea> library; with TeX distributions that implement
+their own directory searching (such as MiKTeX), B<autoinst> will complain
+that it cannot find the F<kpsewhich> program and move all generated files
+into a subdirectory C<./autoinst_output/> of the current directory.
+If you use such a TeX distribution, you should either move these files
+to their correct destinations by hand, or use the I<-target> option
+(see L</COMMAND-LINE OPTIONS> below) to manually specify a TEXMF tree.
+
+Also, some OpenType fonts contain so many kerning pairs that the resulting
+F<pl> and F<vpl> files are too big for MiKTeX's F<pltotf> and F<vptovf>;
+the versions that come with W32TeX (F<http://www.w32tex.org>)
+and TeXLive (F<http://tug.org/texlive>) don't seem to have this problem.
+
+
+=head2 A note for MacTeX users
+
+By default, B<autoinst> will try to install all generated files into
+the $TEXMFLOCAL tree; when this directory isn't user-writable,
+it will use the $TEXMFHOME tree instead. Unfortunately, MacTeX's version
+of C<updmap-sys> doesn't search in $TEXMFHOME,
+and hence MacTeX will not find the new fonts.
+
+To remedy this, either run B<autoinst> as root (so that it can install
+everything into $TEXMFLOCAL) or manually run C<updmap -user> to tell
+TeX about the files in $TEXMFHOME.
+The latter option does, however, have some caveats;
+see F<https://tug.org/texlive/scripts-sys-user.html>.
+
+
+
=head1 COMMAND-LINE OPTIONS
B<autoinst> tries hard to do The Right Thing (TM) by default,
@@ -3560,12 +3741,10 @@
but B<-e> is ambiguous (it may mean either B<-encoding> or B<-extra>)).
+=head2 General options
+
=over 4
-=item B<-version>
-
-Print B<autoinst>'s version number and exit.
-
=item B<-help>
Print a (relatively) short help text and exit.
@@ -3575,16 +3754,21 @@
Don't generate output; just parse input fonts and write
a log file saying what B<autoinst> would have done.
-=item B<-logfile>=I<filename>
-
-Write log data to F<filename> instead of the default F<< <fontfamily>.log >>.
-If the file already exists, B<autoinst> appends to it;
-it doesn't overwrite an existing file.
-
=item B<-verbose>
Add more details to the log file.
+=item B<-version>
+
+Print B<autoinst>'s version number and exit.
+
+=back
+
+
+=head2 Font creation options
+
+=over 4
+
=item B<-encoding>=I<encoding[,encoding]>
Generate the specified encoding(s) for the text fonts.
@@ -3605,27 +3789,6 @@
if the text encodings (see I<-encoding> above) include T1,
B<-nots1> otherwise.
-=item B<-serif>/B<-sanserif>/B<-typewriter>
-
-Install the font as a serif, sanserif or typewriter font, respectively.
-This changes how you access the font in LaTeX:
-with C<\rmfamily>/C<\textrm>, C<\sffamily>/C<\textsf>
-or C<\ttfamily>/C<\texttt>.
-
-Installing the font as a typewriter font will cause two further changes:
-it will - by default - turn off the use of f-ligatures
-(though this can be overridden with the I<-ligatures> option),
-and it will disable hyphenation for this font.
-This latter effect cannot be re-enabled in B<autoinst>;
-if you want typewriter text to be hyphenated, use the F<hyphenat> package.
-
-If none of these options is specified, B<autoinst> tries to guess:
-if the font's filename contains the string `mono'
-or if the field C<isFixedPitch> in the font's I<post> table is True,
-it will select B<-typewriter>;
-else if the filename contains `sans' it will select B<-sanserif>;
-otherwise it will opt for B<-serif>.
-
=item B<-lining>/B<-nolining>
Control the creation of fonts with lining figures. The default is
@@ -3666,7 +3829,7 @@
=item B<-noinferiors>
-=item B<-inferiors> [= B<none> | B<auto> | B<subs> | B<sinf> | B<dnom> ]
+=item B<-inferiors> [ = B<none> | B<auto> | B<subs> | B<sinf> | B<dnom> ]
The OpenType standard defines several kinds of digits that might be used
as inferiors or subscripts: `Subscripts' (OpenType feature `subs'),
@@ -3687,10 +3850,6 @@
Control the creation of fonts with numerators and denominators.
The default is B<-nofractions>.
-=item B<-ornaments>/B<-noornaments>
-
-Control the creation of ornament fonts. The default is B<-ornaments>.
-
=item B<-ligatures>/B<-noligatures>
Some fonts create glyphs for the standard f-ligatures (ff, fi, fl, ffi, ffl),
@@ -3697,12 +3856,36 @@
but don't provide a `liga' feature to access these.
This option tells B<autoinst> to add extra C<LIGKERN> rules to
the generated fonts to enable the use of these ligatures.
-The default is B<-ligatures>,
-unless the user specified the I<-typewriter> option.
+The default is B<-ligatures>, except for typewriter fonts.
-Specify B<-noligatures> to disable the generation of ligatures even for fonts
+Specify B<-noligatures> to disable generation of ligatures even for fonts
that do contain a `liga' feature.
+=item B<-ornaments>/B<-noornaments>
+
+Control the creation of ornament fonts. The default is B<-ornaments>.
+
+=item B<-serif>/B<-sanserif>/B<-typewriter>
+
+Install the font as a serif, sanserif or typewriter font, respectively.
+This changes how you access the font in LaTeX:
+with C<\rmfamily>/C<\textrm>, C<\sffamily>/C<\textsf>
+or C<\ttfamily>/C<\texttt>.
+
+Installing the font as a typewriter font will cause two further changes:
+it will - by default - turn off the use of f-ligatures
+(though this can be overridden with the I<-ligatures> option),
+and it will disable hyphenation for this font.
+This latter effect cannot be re-enabled in B<autoinst>;
+if you want typewriter text to be hyphenated, use the F<hyphenat> package.
+
+If none of these options is specified, B<autoinst> tries to guess:
+if the font's filename contains the string `mono'
+or if the field C<isFixedPitch> in the font's I<post> table is True,
+it will select B<-typewriter>;
+else if the filename contains `sans' it will select B<-sanserif>;
+otherwise it will opt for B<-serif>.
+
=item B<-math>
Tells B<autoinst> to create basic math fonts (see above).
@@ -3714,78 +3897,24 @@
In my opinion, many text fonts benefit from letterspacing by 50 to 100 units
when used in maths; some fonts need even more. Use your own judgement!
-=item B<-defaultlining>/B<-defaultoldstyle>
+=back
-=item B<-defaulttabular>/B<-defaultproportional>
-Tell B<autoinst> which figure style is the current font family's default
-(i.e., which figures you get when you don't specify any OpenType features).
+=head2 Output options
-I<Don't use these options unless you are certain you need them!>
-They are only needed for fonts that don't provide OpenType features
-for their default figure style; and even in that case,
-B<autoinst>'s default values (B<-defaultlining> and B<-defaulttabular>)
-are usually correct.
+=over 4
-=item B<-nofigurekern>
+=item B<-t1suffix> [ = I<SUFFIX> ]
-Some fonts provide kerning pairs for tabular figures.
-This is very probably not what you want
-(e.g., numbers in tables won't line up exactly).
-This option adds extra I< --ligkern> options
-to the commands for I<otftotfm> to suppress such kerns.
-Note that this option leads to very long commands (it adds
-one hundred I< --ligkern> options), which may cause problems on some systems.
+Tell B<autoinst> to modify the font names of all generated Type1-fonts,
+by adding I<SUFFIX> to the family name.
+If you use this option without specifying a I<SUFFIX> value,
+B<autoinst> will use the value ``PS''.
+The default behaviour when this option is not given
+is to not modify font names at all.
-=item B<-nfssweight>=I<code>=I<weight>
+See also L</OpenType fonts and licensing issues> above.
-=item B<-nfsswidth>=I<code>=I<width>
-
-Map the NFSS code I<code> to the given weight or width,
-overriding the built-in tables.
-Each of these options may be given multiple times,
-to override more than one NFSS code.
-Example: to map the `ul' code to the `Thin' weight,
-use C<-nfssweight=ul=thin>.
-To inhibit the use of the `ul' code completely,
-use C<-nfssweight=ul=>.
-
-=item B<-extra>=I<extra>
-
-Append I<extra> as extra options to the command lines for I<otftotfm>.
-To prevent I<extra> from accidentily being interpreted as options
-to B<autoinst>, it should be properly quoted.
-
-=item B<-manual>
-
-Manual mode; for users who want to post-process the generated files
-and commands. By default, B<autoinst> immediately executes all
-F<otftotfm> commands it generates;
-in manual mode, these are instead written to a file F<autoinst.bat>.
-Furthermore it tells F<otftotfm> to generate human readable (and editable)
-F<pl/vpl> files instead of the default F<tfm/vf> ones,
-and to place all generated files in a subdirectory C<./autoinst_output/>
-of the current directory, rather than install them into your TeX installation.
-
-When using this option, you need to execute the following manual steps after
-B<autoinst> has finished:
-
-=over 2
-
-=item - run F<pltotf> and F<vptovf> on the generated F<pl> and F<vf> files,
-to convert them to F<tfm/vf> format;
-
-=item - move all generated files to a proper TEXMF tree,
-and, if necessary, update the filename database;
-
-=item - tell TeX about the new F<map> file
-(usually by running C<updmap> or similar).
-
-=back
-
-Note that some options (I<-target>, I<-vendor> and I<-typeface>,
-I<-[no]updmap>) are meaningless, and hence ignored, in manual mode.
-
=item B<-target>=I<DIRECTORY>
Install all generated files into the TEXMF tree at I<DIRECTORY>.
@@ -3800,13 +3929,6 @@
and update all relevant databases
(usually by calling F<texhash> and F<updmap>).
-I<WARNING:> using this option may interfere with F<kpathsea> and F<updmap>
-(especially when the chosen directory is outside the standard TEXMF trees),
-so using I<-target> will disable the automatic call to F<updmap>
-(as if I<-noupdmap> had been given).
-It is up to the user to manually update all databases (i.e., by calling
-F<texhash> and F<updmap> or similar).
-
=item B<-vendor>=I<VENDOR>
=item B<-typeface>=I<TYPEFACE>
@@ -3815,54 +3937,70 @@
options: they change the `vendor' and `typeface' parts of the names of the
subdirectories in the TEXMF tree where generated files will be stored.
The default values are `lcdftools' and the font's FontFamily name.
-
-Note that these options change I<only> directory names,
+These options change I<only> directory names,
not the names of any generated files.
-=item B<-updmap>/B<-noupdmap>
+=item B<-logfile>=I<filename>
-Control whether or not F<updmap> is called after the last call to F<otftotfm>.
-The default is B<-updmap>.
+Write log data to F<filename> instead of the default F<< <fontfamily>.log >>.
+If the file already exists, B<autoinst> appends to it;
+it doesn't overwrite an existing file.
=back
-=head2 A note for MiKTeX users
+=head2 Specialist options
-Automatically installing the fonts into a suitable TEXMF tree
-(as B<autoinst> tries to do by default) only works for TeX-installations
-that use the F<kpathsea> library; with TeX distributions that implement
-their own directory searching (such as MiKTeX), B<autoinst> will complain
-that it cannot find the F<kpsewhich> program and move all generated files
-into a subdirectory C<./autoinst_output/> of the current directory.
-If you use such a TeX distribution, you should either move these files
-to their correct destinations by hand, or use the I<-target> option
-(see L</COMMAND-LINE OPTIONS> below) to manually specify a TEXMF tree.
+=over 4
-Also, some OpenType fonts contain so many kerning pairs that the resulting
-F<pl> and F<vpl> files are too big for MiKTeX's F<pltotf> and F<vptovf>;
-the versions that come with W32TeX (F<http://www.w32tex.org>)
-and TeXLive (F<http://tug.org/texlive>) don't seem to have this problem.
+=item B<-defaultlining>/B<-defaultoldstyle>
+=item B<-defaulttabular>/B<-defaultproportional>
-=head2 A note for MacTeX users
+Tell B<autoinst> which figure style is the current font family's default
+(i.e., which figures you get when you don't specify any OpenType features).
-By default, B<autoinst> will try to install all generated files into
-the $TEXMFLOCAL tree; when this directory isn't user-writable,
-it will use the $TEXMFHOME tree instead. Unfortunately, MacTeX's version
-of C<updmap-sys> (which is called behind the scenes) doesn't search
-in $TEXMFHOME, and hence MacTeX will not find the new fonts.
+I<Don't use these options unless you are certain you need them!>
+They are only needed for fonts that don't provide OpenType features
+for their default figure style; and even in that case,
+B<autoinst>'s default values (B<-defaultlining> and B<-defaulttabular>)
+are usually correct.
-To remedy this, either run B<autoinst> as root (so that it can install
-everything into $TEXMFLOCAL) or manually run C<updmap -user> to tell
-TeX about the files in $TEXMFHOME.
-The latter option does, however, have some caveats;
-see F<https://tug.org/texlive/scripts-sys-user.html>.
+=item B<-nfssweight>=I<code>=I<weight>
+=item B<-nfsswidth>=I<code>=I<width>
+Map the NFSS code I<code> to the given weight or width,
+overriding the built-in tables.
+Each of these options may be given multiple times,
+to override more than one NFSS code.
+Example: to map the `ul' code to the `Thin' weight,
+use C<-nfssweight=ul=thin>.
+To inhibit the use of the `ul' code completely,
+use C<-nfssweight=ul=>.
+
+=item B<-extra>=I<extra>
+
+Append I<extra> as extra options to the command lines for I<otftotfm>.
+To prevent I<extra> from accidentily being interpreted as options
+to B<autoinst>, it should be properly quoted.
+
+=item B<-nofigurekern>
+
+Some fonts provide kerning pairs for tabular figures.
+This is very probably not what you want
+(e.g., numbers in tables won't line up exactly).
+This option adds extra I< --ligkern> options
+to the commands for I<otftotfm> to suppress such kerns.
+Note that this option leads to very long commands (it adds
+one hundred I< --ligkern> options), which may cause problems on some systems.
+
+=back
+
+
=head1 SEE ALSO
-Eddie Kohler's B<TypeTools> (F<http://www.lcdf.org/type>).
+Eddie Kohler's B<TypeTools> and B<T1Utils> (F<http://www.lcdf.org/type>).
B<Perl> can be obtained from F<http://www.perl.org>;
it is included in most Linux distributions.
@@ -3869,8 +4007,8 @@
For Windows, try ActivePerl (F<http://www.activestate.com>)
or Strawberry Perl (F<http://strawberryperl.com>).
-B<XeTeX> (F<http://www.tug.org/xetex>) and
-B<LuaTeX> (F<http://www.luatex.org>)
+B<LuaTeX> (F<http://www.luatex.org>) and
+B<XeTeX> (F<http://www.tug.org/xetex>)
are Unicode-aware TeX engines that can use OpenType fonts directly,
without any (La)TeX-specific support files.
@@ -3915,7 +4053,7 @@
=head1 VERSION
-This document describes B<autoinst> version 20200619.
+This document describes B<autoinst> version 20200729.
=head1 RECENT CHANGES
@@ -3924,6 +4062,15 @@
=over 12
+=item I<2020-07-29>
+
+Some changes in the generated F<sty> and F<fd> files,
+to improve compatibility with the F<microtype> package.
+Made sure that F<pfb> fonts are always generated whenever
+the input fonts are in F<otf> format.
+Added the C<-t1suffix> command-line option,
+to modify the font and file names of those generated Type1 fonts.
+
=item I<2020-06-19>
Added the C<nomathgreek> option to generated style files.
@@ -3958,6 +4105,13 @@
Don't create empty subdirectories in the target TEXMF tree.
+=back
+
+
+=begin Really_old_history
+
+=over 12
+
=item I<2019-11-18>
Fine-tuned calling of F<kpsewhich> on Windows (patch by Akira Kakuto).
@@ -4080,7 +4234,7 @@
in particular, create $TEXMFHOME if it doesn't already exist
and $TEXMFLOCAL isn't user-writable.
-In manual mode, or when we can't find a user-writable TEXMF tree,
+When we can't find a user-writable TEXMF tree,
put all generated files into a subdirectory C<./autoinst_output/>
instead of all over the current working directory.
@@ -4098,13 +4252,6 @@
to our fancy names (see the section B<NFSS codes>;
based on discussions with Frank Mittelbach and Bob Tennent).
-=back
-
-
-=begin Really_old_history
-
-=over 12
-
=item I<2018-08-10>
Added encoding files for LGR and T2A/B/C to I<fontools>.
Modified: trunk/Master/texmf-dist/scripts/fontools/ot2kpx
===================================================================
--- trunk/Master/texmf-dist/scripts/fontools/ot2kpx 2020-07-30 21:15:51 UTC (rev 55996)
+++ trunk/Master/texmf-dist/scripts/fontools/ot2kpx 2020-07-30 21:16:18 UTC (rev 55997)
@@ -38,7 +38,7 @@
use List::Util @List::Util::EXPORT_OK;
use Pod::Usage;
-my $VERSION = "20200619";
+my $VERSION = "20200729";
our ($NUM_GLYPHS, $UNITS_PER_EM, %kern);
@@ -858,7 +858,7 @@
=head1 VERSION
-This document describes B<ot2kpx> version 20200619.
+This document describes B<ot2kpx> version 20200729.
=head1 RECENT CHANGES
More information about the tex-live-commits
mailing list.