summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/texmf-dist/scripts/fontools/autoinst113
-rw-r--r--Master/texmf/doc/man/man1/autoinst.158
2 files changed, 109 insertions, 62 deletions
diff --git a/Master/texmf-dist/scripts/fontools/autoinst b/Master/texmf-dist/scripts/fontools/autoinst
index 7939246d91c..0db4b22e5b7 100755
--- a/Master/texmf-dist/scripts/fontools/autoinst
+++ b/Master/texmf-dist/scripts/fontools/autoinst
@@ -1,12 +1,16 @@
#!/usr/bin/perl
-=begin COPYRIGHT -------------------------------------------------------------
+=begin COPYRIGHT
- Copyright (c) 2005-2009 Marc Penninga.
+----------------------------------------------------------------------------
+
+ Copyright (C) 2005, 2006, 2007, 2009, 2010 Marc Penninga.
This program is free software; you can redistribute it and/or modify
- it under the terms of version 2 of the GNU General Public License
- as published by the Free Software Foundation.
+ it under the terms of the GNU General Public License
+ as published by the Free Software Foundation,
+ either version 2 of the License, or (at your option)
+ any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -21,7 +25,9 @@
Boston, MA 02111-1307,
USA
-=end -------------------------------------------------------------------------
+----------------------------------------------------------------------------
+
+=end COPYRIGHT
=cut
@@ -64,7 +70,7 @@ Please report any bugs or suggestions to <marc@penninga.info>.
END_USAGE
-=begin Comment ---------------------------------------------------------------
+=begin Comment
The next three tables map the names of weights, widths and shapes
to NFSS codes. New entries can be added without problems,
@@ -78,7 +84,7 @@ END_USAGE
families that have both italic and oblique shapes, but I doubt
whether these exist (apart from Computer Modern, of course).
-=end
+=end Comment
=cut
@@ -121,7 +127,7 @@ my %FD_SHAPE = (
romanii => 'it', # Map one of Silentium Pro's two roman shapes to 'it'
);
-=begin Comment ---------------------------------------------------------------
+=begin Comment
The following tables are used for deciding which font families and shapes
to generate. Each hash governs one of these aspects:
@@ -165,7 +171,7 @@ my %FD_SHAPE = (
name A string added to the name of the generated font,
to make it unique.
-=end
+=end Comment
=cut
@@ -324,6 +330,10 @@ END_PARSE_ERROR
else {
$already_seen{$unique} = $filename;
}
+
+ # Pretend all fonts have kerning feature;
+ # otftotfm will use the kern table otherwise
+ $fontinfo{features}{kern} = 1;
FIGURE_STYLE:
for my $figure_style (keys %FIGURE_STYLE) {
@@ -410,6 +420,15 @@ END_PARSE_ERROR
. "\"$CODING_SCHEME{$enc_name}\""
: ''),
(map { "--feature=$_" } @features),
+ # if there's no 'liga' feature,
+ # add ligkern commands for common ligatures
+ ((grep { $_ eq 'liga' } @features)
+ ? ''
+ : '--ligkern="f i =: fi" '
+ . '--ligkern="f l =: fl" '
+ . '--ligkern="f f =: ff" '
+ . '--ligkern="ff i =: ffi" '
+ . '--ligkern="ff l =: ffl" '),
$FIGURE_STYLE{$figure_style}{extra},
$SHAPE{$shape}{extra},
$ARGV{extra},
@@ -489,12 +508,25 @@ END_GENERAL_PARSE_ERROR
my $FD;
for my $fd_line_ref (@fd_data) {
my @fd_line = @{$fd_line_ref};
-
- write_style_file($fd_line[0], @fd_data) if $fd_line[0] ne $fd_prev[0];
+
+ my $safe = $fd_line[0];
+ $safe =~ s/1/One/xmsg;
+ $safe =~ s/2/Two/xmsg;
+ $safe =~ s/3/Three/xmsg;
+ $safe =~ s/4/Four/xmsg;
+ $safe =~ s/5/Five/xmsg;
+ $safe =~ s/6/Six/xmsg;
+ $safe =~ s/7/Seven/xmsg;
+ $safe =~ s/8/Eight/xmsg;
+ $safe =~ s/9/Nine/xmsg;
+ $safe =~ s/0/Zero/xmsg;
+
+ write_style_file($fd_line[0], $safe, @fd_data)
+ if $fd_line[0] ne $fd_prev[0];
if (grep { $fd_line[$_] ne $fd_prev[$_] } 0 .. 2) {
end_fd_file($FD) if $fd_prev[0];
- $FD = start_fd_file(@fd_line[0 .. 2]);
+ $FD = start_fd_file(@fd_line[0 .. 2], $safe);
}
if (grep { $fd_line[$_] ne $fd_prev[$_] } 0 .. 4) {
@@ -509,7 +541,7 @@ END_GENERAL_PARSE_ERROR
# Write fontshape entry
printf {$FD} " %s \\%s\@\@scale %s\n",
sprintf("%5s-%-5s", '<' . $fd_line[5], $fd_line[6] . '>'),
- $fd_line[0],
+ $safe,
$fd_line[7],
;
@@ -780,14 +812,14 @@ END_FONT_INFO
}
-=begin Comment ---------------------------------------------------------------
+=begin Comment
Ornament glyph names vary across fonts, so we generate font-specific
encoding vectors.
This is skipped if a file `<family>_orn.enc' is found in the current
directory, so the user can provide her own vector if she wants to.
-=end
+=end Comment
=cut
@@ -834,8 +866,8 @@ sub make_ornament_encoding {
# ------------------------------------------------------------------------
sub write_style_file {
- my ($family, @fd_data) = @_;
-
+ my ($family, $safe, @fd_data) = @_;
+
my (%seen_enc, %seen_style, %seen_series);
LINE:
@@ -911,9 +943,9 @@ END_STY_FONTAXES
print {$STYLE} <<"END_STY_XKEYVAL";
\\IfFileExists{xkeyval.sty}{
- \\newcommand*{\\$family\@scale}{1}
+ \\newcommand*{\\$safe\@scale}{1}
\\RequirePackage{xkeyval}
- \\DeclareOptionX{scaled}{\\renewcommand*{\\$family\@scale}{##1}}
+ \\DeclareOptionX{scaled}{\\renewcommand*{\\$safe\@scale}{##1}}
}{
\\let\\DeclareOptionX\\DeclareOption
\\let\\ExecuteOptionsX\\ExecuteOptions
@@ -924,19 +956,19 @@ END_STY_XKEYVAL
if ($seen_style{LF} or $seen_style{TLF}) {
print {$STYLE}
- "\\DeclareOptionX{lining}{\\edef\\$family\@figurestyle{LF}}\n";
+ "\\DeclareOptionX{lining}{\\edef\\$safe\@figurestyle{LF}}\n";
}
if ($seen_style{OsF} or $seen_style{TOsF}) {
print {$STYLE}
- "\\DeclareOptionX{oldstyle}{\\edef\\$family\@figurestyle{OsF}}\n";
+ "\\DeclareOptionX{oldstyle}{\\edef\\$safe\@figurestyle{OsF}}\n";
}
if ($seen_style{TLF} or $seen_style{TOsF}) {
print {$STYLE}
- "\\DeclareOptionX{tabular}{\\edef\\$family\@figurealign{T}}\n";
+ "\\DeclareOptionX{tabular}{\\edef\\$safe\@figurealign{T}}\n";
}
if ($seen_style{LF} or $seen_style{OsF}) {
print {$STYLE}
- "\\DeclareOptionX{proportional}{\\edef\\$family\@figurealign{}}\n";
+ "\\DeclareOptionX{proportional}{\\edef\\$safe\@figurealign{}}\n";
}
my $defaults
@@ -977,7 +1009,7 @@ END_STY_XKEYVAL
\\renewcommand*
{\\$ARGV{nfss}default}
- {$family-\\$family\@figurealign\\$family\@figurestyle}
+ {$family-\\$safe\@figurealign\\$safe\@figurestyle}
\\renewcommand*{\\familydefault}{\\$ARGV{nfss}default}
\\endinput
@@ -989,7 +1021,7 @@ END_STYLE_REST
# ------------------------------------------------------------------------
sub start_fd_file {
- my ($fam, $enc, $fig) = @_;
+ my ($fam, $enc, $fig, $safe) = @_;
open my $FD, '>', "$enc$fam-$fig.fd"
or die "ERROR: can't create '$enc$fam-$fig.fd' - $!";
@@ -1000,10 +1032,10 @@ sub start_fd_file {
\\ProvidesFile{$enc$fam-$fig.fd}
[$date (autoinst) Font definitions for $enc/$fam-$fig.]
-\\expandafter\\ifx\\csname $fam\@scale\\endcsname\\relax
- \\let\\$fam\@\@scale\\\@empty
+\\expandafter\\ifx\\csname $safe\@scale\\endcsname\\relax
+ \\let\\$safe\@\@scale\\\@empty
\\else
- \\edef\\$fam\@\@scale{s*[\\csname $fam\@scale\\endcsname]}%
+ \\edef\\$safe\@\@scale{s*[\\csname $safe\@scale\\endcsname]}%
\\fi
\\DeclareFontFamily{$enc}{$fam-$fig}{}
@@ -1517,19 +1549,21 @@ running B<autoinst> with the B< --verbose> option.
Please make sure that this output includes all error messages (if any);
this can be done using the command
- autoinst I<(... all options and files ...)> >autoinst.log 2>&1
+C<< autoinst I<(... all options and files ...)> E<gt>autoinst.log 2>&1 >>
=head1 COPYRIGHT
-Copyright (c) 2005-2009 Marc Penninga.
+Copyright (C) 2005, 2006, 2007, 2009, 2010 Marc Penninga.
=head1 LICENSE
This program is free software; you can redistribute it and/or modify
-it under the terms of version 2 of the GNU General Public License
-as published by the Free Software Foundation.
+it under the terms of the GNU General Public License
+as published by the Free Software Foundation,
+either version 2 of the License, or (at your option)
+any later version.
A copy of the GNU General Public License is included with the I<fontools>
collection; see the file F<GPLv2.txt>.
@@ -1550,14 +1584,25 @@ GNU General Public License for more details.
=over 12
+=item I<2010-04-23>
+
+Always provide the C< --feature=kern> option to F<otftotfm>,
+even if the font doesn't have a I<kern> feature;
+this will make F<otftotfm> use the I<kern> table if present.
+For fonts without a I<liga> feature, add C< --ligkern>
+options for the common f-ligatures to the F<otftotfm> command line,
+so that any ligatures present in the font will still be used.
+Bug fix: the generated F<.sty> files now work for font families
+with names containing digits.
+
=item I<2009-04-09>
Prefixed the filenames of the included encoding files with
-`fontools_', to prevent name clashes with other packages.
+I<fontools_>, to prevent name clashes with other packages.
=item I<2009-04-06>
-A small patch to the make_ornament_encoding subroutine;
+A small patch to the C<make_ornament_encoding> subroutine;
it now also recognises the I<bullet.xxx> ornament glyphs
in Adobe's Kepler Pro.
diff --git a/Master/texmf/doc/man/man1/autoinst.1 b/Master/texmf/doc/man/man1/autoinst.1
index 2861af70cdc..1b26a2dd3f2 100644
--- a/Master/texmf/doc/man/man1/autoinst.1
+++ b/Master/texmf/doc/man/man1/autoinst.1
@@ -1,15 +1,7 @@
-.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
.\"
.\" Standard preamble:
.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
@@ -53,7 +45,7 @@
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
@@ -132,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "AUTOINST 1"
-.TH AUTOINST 1 "2009-04-09" "fontools" "fontools"
+.TH AUTOINST 1 "2010-04-23" "fontools" "fontools"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -145,15 +137,15 @@ for installing OpenType fonts in LaTeX.
autoinst [options] \fIfontfile\fR [\fIfontfile\fR ...]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
-Eddie Kohler's \fITypeTools\fR, mainly \fIotftotfm\fR, are great tools for
+Eddie Kohler's \fITypeTools\fR, especially \fIotftotfm\fR, are great tools for
installing OpenType fonts for use with LaTeX, but their use (even in
-automatic mode) is quite complicated; they need lots of long
-command lines and don't generate the \fIfd\fR and \fIsty\fR files LaTeX needs.
+automatic mode) is quite complicated because it needs lots of long
+command lines and doesn't generate the \fIfd\fR and \fIsty\fR files LaTeX needs.
\&\fBautoinst\fR simplifies the font installation
process by generating and executing all commands for \fIotftotfm\fR
and by creating all necessary \fIfd\fR and \fIsty\fR files. All the user then needs
to do is move these files to a suitable location
-(\f(CW\*(C`$LOCALTEXMF/tex/latex/<Supplier>/<FontFamily>/\*(C'\fR is the
+(\f(CW\*(C`$LOCALTEXMF/tex/latex/<Supplier>/<FontFamily>/\*(C'\fR being the
canonical choice) and update TeX's filename database.
.PP
Given a family of font files (in either \fI.ttf\fR or \fI.otf\fR format),
@@ -257,7 +249,7 @@ where \fI<FontFile>\fR is the name of the OpenType file, \fI<suffix>\fR
is the same as above (but in lowercase), \fI<shape>\fR is either empty,
`sc', `swash' or `titling', and \fI<enc>\fR is the encoding.
A typical name in this scheme is \fIMinionPro\-Regular\-osf\-sc\-ly1\fR.
-.Sh "On the choice of text encoding"
+.SS "On the choice of text encoding"
.IX Subsection "On the choice of text encoding"
By default, all text families use the \s-1LY1\s0 encoding. This has been chosen
over T1 (Cork) because many OpenType fonts contain additional ligatures
@@ -265,7 +257,7 @@ such as fj and Th, and \s-1LY1\s0 has a number of empty slots to accommodate the
.PP
A different encoding can be selected using the \fB \-\-encoding\fR
command line option (see below).
-.Sh "Using the fonts with LaTeX"
+.SS "Using the fonts with LaTeX"
.IX Subsection "Using the fonts with LaTeX"
\&\fBautoinst\fR generates a style file for using the font in LaTeX documents,
named `<\fIFontFamily\fR>.sty'. This style file also takes care of loading the
@@ -343,14 +335,14 @@ the style file doesn't provide high-level access to the more `exotic'
font shapes and styles. In that case, you're limited to using the lower-level
commands from standard \s-1NFSS\s0, or even plain TeX's \f(CW\*(C`\efont\*(C'\fR primitive
(and it's called `primitive' for a reason!)
-.Sh "Using multiple font families in one document"
+.SS "Using multiple font families in one document"
.IX Subsection "Using multiple font families in one document"
If you want to use several font families in one document, make sure
all fonts were installed using the same version of \fBautoinst\fR.
\&\fBautoinst\fR has seen some non-backward-compatible changes in the past,
and \fI.sty\fR and \fI.fd\fR files that were generated by different versions
of \fBautoinst\fR may not be able to coexist peacefully.
-.Sh "\s-1NFSS\s0 codes"
+.SS "\s-1NFSS\s0 codes"
.IX Subsection "NFSS codes"
In \s-1NFSS\s0, weight and width are concatenated into a single `series' attribute.
(\fINote:\fR versions of \fBautoinst\fR before 2007\-07\-27 erroneously formed
@@ -396,7 +388,7 @@ this shouldn't cause problems in real life.
To the best of my knowledge, the only font family that has two `Roman' shapes
is Silentium; since this has no `Italic' shape,
the `it' code is (ab)used for the `RomanII' shape.
-.Sh "A note for MikTeX users"
+.SS "A note for MikTeX users"
.IX Subsection "A note for MikTeX users"
Calling \fIotftotfm\fR with the \fB \-\-automatic\fR option (as \fBautoinst\fR does by
default) requires a TeX-installation that uses the \fIkpathsea\fR library; with
@@ -549,17 +541,17 @@ running \fBautoinst\fR with the \fB \-\-verbose\fR option.
Please make sure that this output includes all error messages (if any);
this can be done using the command
.PP
-.Vb 1
-\& autoinst (... all options and files ...) >autoinst.log 2>&1
-.Ve
+\&\f(CW\*(C`autoinst \f(CI(... all options and files ...)\f(CW >autoinst.log 2>&1\*(C'\fR
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 2005\-2009 Marc Penninga.
+Copyright (C) 2005, 2006, 2007, 2009, 2010 Marc Penninga.
.SH "LICENSE"
.IX Header "LICENSE"
This program is free software; you can redistribute it and/or modify
-it under the terms of version 2 of the \s-1GNU\s0 General Public License
-as published by the Free Software Foundation.
+it under the terms of the \s-1GNU\s0 General Public License
+as published by the Free Software Foundation,
+either version 2 of the License, or (at your option)
+any later version.
.PP
A copy of the \s-1GNU\s0 General Public License is included with the \fIfontools\fR
collection; see the file \fIGPLv2.txt\fR.
@@ -572,12 +564,22 @@ but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty
.SH "RECENT CHANGES"
.IX Header "RECENT CHANGES"
(See the source code for the full story.)
+.IP "\fI2010\-04\-23\fR" 12
+.IX Item "2010-04-23"
+Always provide the \f(CW\*(C` \-\-feature=kern\*(C'\fR option to \fIotftotfm\fR,
+even if the font doesn't have a \fIkern\fR feature;
+this will make \fIotftotfm\fR use the \fIkern\fR table if present.
+For fonts without a \fIliga\fR feature, add \f(CW\*(C` \-\-ligkern\*(C'\fR
+options for the common f\-ligatures to the \fIotftotfm\fR command line,
+so that any ligatures present in the font will still be used.
+Bug fix: the generated \fI.sty\fR files now work for font families
+with names containing digits.
.IP "\fI2009\-04\-09\fR" 12
.IX Item "2009-04-09"
Prefixed the filenames of the included encoding files with
-`fontools_', to prevent name clashes with other packages.
+\&\fIfontools_\fR, to prevent name clashes with other packages.
.IP "\fI2009\-04\-06\fR" 12
.IX Item "2009-04-06"
-A small patch to the make_ornament_encoding subroutine;
+A small patch to the \f(CW\*(C`make_ornament_encoding\*(C'\fR subroutine;
it now also recognises the \fIbullet.xxx\fR ornament glyphs
in Adobe's Kepler Pro.