texlive[47134] trunk: fontools (26mar18)

commits+karl at tug.org commits+karl at tug.org
Mon Mar 26 23:16:10 CEST 2018


Revision: 47134
          http://tug.org/svn/texlive?view=revision&revision=47134
Author:   karl
Date:     2018-03-26 23:16:09 +0200 (Mon, 26 Mar 2018)
Log Message:
-----------
fontools (26mar18)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst
    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.man1.pdf
    trunk/Master/texmf-dist/doc/support/fontools/README
    trunk/Master/texmf-dist/scripts/fontools/autoinst

Modified: trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst	2018-03-26 21:15:20 UTC (rev 47133)
+++ trunk/Build/source/texk/texlive/linked_scripts/fontools/autoinst	2018-03-26 21:16:09 UTC (rev 47134)
@@ -48,29 +48,39 @@
     all lowercase. Also make sure that the NFSS 'series' attribute
     (the concatenation of weight and width) is unique!
 
-    The 'book' and 'regular' weights and the 'regular' width are mapped
-    to an empty string rather than 'm', because the 'm' disappears when
-    weight and width are combined into the NFSS series (unless *both* are
-    'regular', but we deal with that case separately).
+    The 'regular' weight and width are mapped to an empty string 
+    rather than 'm', because the 'm' disappears when weight and width 
+    are combined into the NFSS series (unless *both* are 'regular', 
+    but we deal with that case separately).
+    
+    'Text' and 'book' are often used instead of 'regular', hence
+    we want to create substitution rules in the .fd files that
+    substitute 'text' or 'book' for the missing 'regular' fonts.
+    Therefore we define these weights via variables, so we can access
+    their values later on when we create the .fd files.
 
 =end Comment
 
 =cut
 
+my $nfss_text = 't';
+my $nfss_book = 'o';
+
 my %FD_WEIGHT = (
     two             => '2',
     four            => '4',
     eight           => '8',
     hair            => 'a',
-    thin            => 't',
+    thin            => 'i',
     ultralight      => 'ul',
     extralight      => 'el',
     light           => 'l',
-    book            => 'sl',
     regular         => '',
+    text            => $nfss_text,
+    book            => $nfss_book,
     medium          => 'mb',
+    demi            => 'db',
     demibold        => 'db',
-    demi            => 'db',
     semibold        => 'sb',
     bold            => 'b',
     extrabold       => 'eb',
@@ -102,6 +112,7 @@
     expanded        => 'e',
     wide            => 'w',
 );
+my @FD_WIDTH = uniq(values %FD_WIDTH);
 
 my %FD_SHAPE = (
     roman           => 'n',
@@ -397,6 +408,14 @@
 }
 
 #-----------------------------------------------------------------------
+# Return a list of unique entries from the input
+#-----------------------------------------------------------------------
+sub uniq {
+    my %tmp = map { ($_ => 1) } @_;
+    return keys %tmp;
+}
+
+#-----------------------------------------------------------------------
 # Determine which figure styles to create for each font;
 # return a list of (font, style) tuples
 #-----------------------------------------------------------------------
@@ -561,6 +580,7 @@
     extra:              @{[ $ARGV{extra} || '<empty>' ]}
 
     figurekern:         @{[ $ARGV{figurekern}   ? 'no action' : 'remove' ]}
+    mergewidths:        @{[ $ARGV{mergewidths}  ? 'yes' : 'no' ]}
     
 
     font files:
@@ -760,6 +780,7 @@
     -manual                 Manual mode (see documentation)
 
     -(no)figurekern         Keep or remove kerns between tabular figures
+    -(no)mergewidths        Merge Condended/Extended subfamilies with main family
 
     -help                   Print this text and exit
     -doc                    Print the complete documentation and exit
@@ -797,6 +818,7 @@
     dryrun       => '0',     # 0 = no, 1 = yes
     logfile      => 'autoinst.log',
     figurekern   => '1',     # 0 = no, 1 = yes
+    mergewidths  => '0',     # 0 = no, 1 = yes
 );
 
 #-----------------------------------------------------------------------
@@ -835,6 +857,7 @@
         'dryrun'              => \$ARGV{dryrun},
         'manual'              => \$ARGV{manual},
         'figurekern!'         => \$ARGV{figurekern},
+        'mergewidths!'        => \$ARGV{mergewidths},
         'verbose+'            => sub {},
     )
     or die "$USAGE";
@@ -1017,6 +1040,18 @@
     $info->{family}    = $data{family};
     $info->{subfamily} = $data{subfamily};
 
+    # Some font families put Condensed or Extended fonts into separate
+    # families; we provide an option to merge these with the 'main'
+    # font family.
+    if ($ARGV{mergewidths}) {
+        if ($info->{width} eq 'regular'
+            && $info->{family} =~ m/(.+?) [ ]* (condensed|extended)$/xmsi)
+        {
+            $info->{family} = $1;
+            $info->{width}  = lc $2;
+        }
+    }
+    
     $info->{basicshape} = $FD_SHAPE{$info->{shape}};
     $info->{fdseries}
         = ($FD_WEIGHT{$info->{weight}} . $FD_WIDTH{$info->{width}}) || 'm';
@@ -1386,7 +1421,7 @@
         :               die "[ERROR] Internal bug, please report!";
 
     my $default_bold;
-    for my $series (qw(ultrablack ultrabold heavy extrablack black
+    for my $series (qw(heavy ultrablack extrablack black ultrabold
                         extrabold demibold semibold bold)) 
     {
         if ($seen{$FD_WEIGHT{$series}}) {
@@ -1399,7 +1434,7 @@
     $defaults .= ",$default_bold" if $default_bold;
 
     my $default_regular;
-    for my $series (qw(light medium book regular)) {
+    for my $series (qw(light medium book text regular)) {
         if ($seen{$FD_WEIGHT{$series} || 'm'}) {
             print {$STY}
                 "\\DeclareOptionX{$series}{\\edef\\mdseries\@$ARGV{nfss}",
@@ -1498,14 +1533,33 @@
         }
     }
     
-    for my $shape (keys %{$data->{sl}}) {
-        if (!exists $data->{m}{$shape}) {
-            print {$FD} <<"END_FD_SSUB_SL";
-\\DeclareFontShape{$enc}{${fam}-${sty}}{m}{$shape}{
-      <-> ssub * ${fam}-${sty}/sl/${shape}
+    # We treat "Text" and "Book" as different from "Regular" (see docs below).
+    # For fonts that have no separate "Regular" weight, we add ssub rules
+    # to substitute "Text" (preferably) or "Book" in its place.
+    for my $width (@FD_WIDTH) {
+        my $regular_series = $width || 'm';
+        my $text_series = $nfss_text . $width;
+        my $book_series = $nfss_book . $width;
+        my @shapes = main::uniq( keys %{$data->{$text_series}},
+                           keys %{$data->{$book_series}} );
+        for my $shape (@shapes) {
+            next if exists $data->{$regular_series}{$shape};
+            if (exists $data->{$text_series}{$shape}) {
+                print {$FD} <<"END_FD_SSUB_TEXT";
+\\DeclareFontShape{$enc}{${fam}-${sty}}{$regular_series}{$shape}{
+      <-> ssub * ${fam}-${sty}/$text_series/${shape}
 }{}
 
-END_FD_SSUB_SL
+END_FD_SSUB_TEXT
+            }
+            elsif (exists $data->{$book_series}{$shape}) {
+                print {$FD} <<"END_FD_SSUB_BOOK";
+\\DeclareFontShape{$enc}{${fam}-${sty}}{$regular_series}{$shape}{
+      <-> ssub * ${fam}-${sty}/$book_series/${shape}
+}{}
+
+END_FD_SSUB_BOOK
+            }
         }
     }
     
@@ -1588,7 +1642,7 @@
 
 =item I<n>
 
-Roman text
+Roman (i.e., upright) text
 
 =item I<it>, I<sl>
 
@@ -1604,8 +1658,7 @@
 
 =item I<tl>
 
-Titling shape. Meant for all-caps text only (even though it sometimes contains
-lowercase glyphs as well), where letterspacing and the positioning of
+Titling shape. Meant for all-caps text; letterspacing and the positioning of 
 punctuation characters have been adjusted to suit all-caps text.
 (This shape is only generated for the families with lining digits, 
 since old-style digits make no sense with all-caps text.)
@@ -1639,16 +1692,16 @@
 
 =item -
 
-An ornament family, in roman, italic and slanted shapes.
+An ornament family, also in roman, italic and slanted shapes.
 
 =back
 
 =back
 
-Of course, if the fonts don't contain italics, oldstyle digits, small caps 
+Of course, if your fonts don't contain italics, oldstyle digits, small caps 
 etc., the corresponding shapes and families are not created.
 In addition, the creation of most families and shapes can be controlled 
-by options (see L</"COMMAND-LINE OPTIONS"> below).
+by the user (see L</"COMMAND-LINE OPTIONS"> below).
 
 These families use the I<FontPro> project's naming scheme: 
 I<< <FontFamily>-<Suffix> >>, where I<< <Suffix> >> is:
@@ -1696,7 +1749,7 @@
 
 =back
 
-The generated fonts are named I<< <FontName>-<suffix>-<shape>-<enc> >>,
+The individual fonts are named I<< <FontName>-<suffix>-<shape>-<enc> >>,
 where I<< <suffix> >> is the same as above (but in lowercase),
 I<< <shape> >> is either empty, "sc", "swash" or "titling",
 and I<< <enc> >> is the encoding (also in lowercase).
@@ -1708,7 +1761,7 @@
 By default, B<autoinst> generates text fonts with OT1, T1 and LY1
 encodings, and the generated style files use LY1 as the default text encoding.
 LY1 has been chosen over T1 because it has some empty slots to accommodate
-the additional ligatures provided by many OpenType fonts.
+the additional ligatures found in many OpenType fonts.
 Other encodings can be chosen using the I<-encoding> option 
 (see L</"COMMAND-LINE OPTIONS"> below).
 
@@ -1715,11 +1768,11 @@
 
 =head2 Using the fonts in your LaTeX documents
 
-B<autoinst> generates a style file for using the font in LaTeX documents,
+B<autoinst> generates a style file for using the fonts in LaTeX documents,
 named F<< <FontFamily>.sty >>. This style file also takes care of loading the
 F<fontenc> and F<textcomp> packages.
-To use the font, put the command C<<< \usepackage{I<< <FontFamily> >>} >>>
-in the preamble of your document.
+To use the fonts, add the command C<<< \usepackage{I<< <FontFamily> >>} >>>
+to the preamble of your document.
 
 This style file defines a number of options:
 
@@ -1739,12 +1792,12 @@
 
 This option is only available when you have the F<xkeyval> package installed.
 
-=item C<light>, C<medium>, C<regular>
+=item C<light>, C<medium>, C<book>, C<text>, C<regular>
 
 Select the weight that LaTeX will use as the "regular" weight; 
 the default is C<regular>.
 
-=item C<ultrablack>, C<ultrabold>, C<heavy>, C<extrablack>, C<black>, 
+=item C<heavy>, C<ultrablack>, C<extrablack>, C<black>, C<ultrabold>, 
       C<extrabold>, C<demibold>, C<semibold>, C<bold>
 
 Select the weight that LaTeX will use as the "bold" weight; 
@@ -1772,7 +1825,7 @@
 
 
 In addition, the C<\swshape> and C<\textsw> commands are redefined to place
-swash on the secondary shape axis (F<fontaxes> places it on the primary
+swash on F<fontaxes>' secondary shape axis (F<fontaxes> places it on the primary
 shape axis) to make them behave properly when nested, so that
 C<\swshape\upshape> will give upright swash.
 
@@ -1787,7 +1840,7 @@
 running LaTeX on the file F<nfssfont.tex> (part of a standard
 LaTeX installation) and supplying the name of the ornament font.
 
-To access the ornaments, B<autoinst> creates a font-specific encoding file
+To access ornament glyphs, B<autoinst> creates a font-specific encoding file
 F<< <FontFamily>_orn.enc >>, 
 but only if that file doesn't yet exist in the current directory.
 This is a deliberate feature that allows you to provide your own
@@ -1809,7 +1862,7 @@
 these parameters. When this fails
 (e.g., because the font family contains uncommon widths or weights),
 B<autoinst> ends up with different fonts having the I<same> values
-for these font parameters, which means that these fonts cannot be used in NFSS.
+for these font parameters, and so cannot be used in NFSS.
 In that case, B<autoinst> will split the font family into multiple subfamilies
 (based on each font file's "Subfamily" value) and try again.
 (Since many font vendors misunderstand the "Subfamily" concept
@@ -1816,75 +1869,64 @@
 and make each font file its own separate subfamily,
 this strategy is only used as a last resort.)
 
-If such a proliferation of font families is unwanted,
-either run B<autoinst> on a smaller set of fonts or 
-add the missing widths, weights and shapes to the tables C<%FD_WIDTH>,
-C<%FD_WEIGHT> and C<%FD_SHAPE>, at the beginning of the source code.
-Please also send a bug report (see L<AUTHOR> below).
+If a proliferation of font families is unwanted, either run B<autoinst> 
+on a smaller set of fonts or add the missing widths, weights and shapes to 
+the tables C<%FD_WIDTH>, C<%FD_WEIGHT> and C<%FD_SHAPE>, at the beginning 
+of the source code. Please also send a bug report (see L<AUTHOR> below).
 
 B<autoinst> maps widths, weights and shapes to NFSS codes using
 the following tables. These are based on the standard I<Fontname> scheme 
-and Philipp Lehman's F<Font Installation Guide>, but some changes were made 
-to avoid name clashes in font families with many different widths and weights,
+and Philipp Lehman's F<Font Installation Guide>, but some changes had to be made 
+to avoid name clashes in font families with many widths and weights,
 such as Helvetica Neue and Fira Sans.
 
 
     WEIGHT                              WIDTH
-
-    
-    Two            2     [1]            Ultra Compressed    up
-    Four           4     [1]            Extra Compressed    ep
-    Eight          8     [1]            Compressed          p
+    ------------------------            -------------------------------
+    Two            2                    Ultra Compressed    up
+    Four           4                    Extra Compressed    ep
+    Eight          8                    Compressed          p
     Hair           a                    Compact             p
-    Thin           t                    Ultra Condensed     uc
+    Thin           i                    Ultra Condensed     uc
     Ultra Light    ul                   Extra Condensed     ec
     Extra Light    el                   Condensed           c
     Light          l                    Narrow              n
-    Book           sl    [2]            Semicondensed       sc
-    Regular              [3]            Regular                     [3]
-    Medium         mb                   Semiextended        sx
-    Demibold       db                   Extended            x
-    Semibold       sb                   Expanded            e
-    Bold           b                    Wide                w
-    Extra Bold     eb
-    Ultra          ub
-    Ultra Bold     ub                   SHAPE
-    Black          k
-    Extra Black    ek                   Roman, Upright      n       [4]
-    Ultra Black    uk                   Italic              it
-    Heavy          h                    Cursive, Kursiv     it
-    Poster         r                    Oblique             sl      [5]
-                                        Slanted             sl      [5]
-                                        Incline(d)          sl      [5]
+    Regular        -     [1]            Semicondensed       sc
+    Text           t     [2]            Regular             -       [1]
+    Book           o     [2]            Semiextended        sx
+    Medium         mb                   Extended            x
+    Demibold       db                   Expanded            e
+    Semibold       sb                   Wide                w
+    Bold           b                    
+    Extra Bold     eb                   SHAPE
+    Ultra (Bold)   ub                   -------------------------------
+    Black          k                    Roman, Upright      n       [3]
+    Extra Black    ek                   Italic, Cursive,
+    Ultra Black    uk                       Kursiv          it
+    Heavy          h                    Oblique, Slanted,
+    Poster         r                        Incline(d)      sl
 
 
-=head3 Notes
-
 =over 4
 
 =item [1]
 
-These weights only occur (as far as I know) in Fira Sans.
+When I<both> weight and width are empty, the NFSS "series" attribute becomes "m".
 
 =item [2]
 
-Since release 2018-01-09, B<autoinst> adds "ssub" rules to the F<fd> files 
-to substitute "Book" weight for "Regular" when the latter is missing.
-Before that, "Book" was treated as a synonym for "Regular".
+Until release 2017-06-16, "Text" and "Book" were treated as synonyms for
+"Regular". As there are some fonts (IBM Plex, Fira Sans) that contain
+separate "Text" or "Book" in addition to "Regular" weights,
+I decided to give them their own codes.
+When there is no "Regular" weight, B<autoinst> will generate I<ssub> rules 
+to substitute either the "Text" or the "Book" font in its place.
 
 =item [3]
 
-When I<both> weight and width are empty, the "series" attribute becomes "m".
+Adobe Silentium Pro contains two roman shapes;
+"Roman I" is mapped to "n", "Roman II" to "it".
 
-=item [4]
-
-Adobe Silentium Pro contains two "Roman" shapes ("RomanI" and "RomanII");
-the first of these is mapped to "n", the second one to "it".
-
-=item [5]
-
-Since release 2014-01-21; before that, slanted shapes were mapped to "it".
-
 =back
 
 
@@ -1909,7 +1951,7 @@
 =head1 COMMAND-LINE OPTIONS
 
 B<autoinst> tries hard to do The Right Thing (TM) by default, 
-so in many cases you won't need these options;
+so you usually won't really need these options;
 but most aspects of its operation can be fine-tuned if you want to.
 
 You may use either one or two dashes before options,
@@ -1921,8 +1963,8 @@
 
 =item B<-dryrun>
 
-Don't actually do anything, only create the logfile F<autoinst.log> 
-showing which fonts would have been generated. 
+Don't generate any output files; only parse the input fonts and create 
+F<autoinst.log> showing which fonts would have been generated.
 
 =item B<-encoding>=I<encoding[,encoding]>
 
@@ -2005,11 +2047,11 @@
 should use for the inferior characters. The default is not to create fonts 
 with inferior characters.
 
-Note that many fonts contain only one (or even none) of these types
+I<< Note that many fonts contain only one (or even none) of these types
 of inferior characters. If you specify a style of inferiors that isn't
 actually present in the font, B<autoinst> silently falls back to its default
 of not creating fonts with inferiors; it doesn't try to substitute one of
-the other features.
+the other features. >>
 
 =item B<-fractions> / B<-nofractions>
 
@@ -2043,6 +2085,12 @@
 Note that this option leads to very long commands (it adds
 one hundred I< --ligkern> options), which may cause problems on some systems.
 
+=item B<-mergewidths> / B<-nomergewidths>
+
+Some font families put Condensed and Extended fonts in separate families;
+this option tells B<autoinst> to merge those separate families into the "main" font family. 
+The default is B<-nomergewidths>.
+
 =item B<-extra>=I<text>
 
 Append I<text> as extra options to the command lines for I<otftotfm>. 
@@ -2076,10 +2124,10 @@
 =item B<-target>=I<DIRECTORY>
 
 Install all generated files into the TEXMF tree at I<DIRECTORY>.
-
-By default, B<autoinst> searches your $TEXMFLOCAL and $TEXMFHOME paths
-and installs all files into subdirectories of the first writable TEXMF tree
-it finds (or into subdirectories of the current directory,
+This option allows the user to override B<autoinst>'s default behaviour, 
+which is to search the $TEXMFLOCAL and $TEXMFHOME paths and install all files 
+into subdirectories of the first writable TEXMF tree it finds 
+(or into subdirectories of the current directory,
 if no writable directory is found).
 
 =item B<-vendor>=I<VENDOR>
@@ -2107,31 +2155,27 @@
 Eddie Kohler's B<TypeTools> (F<http://www.lcdf.org/type>).
 
 B<Perl> can be obtained from F<http://www.perl.org>; 
-it is a standard part of many Linux distributions.
+it is included in most Linux distributions.
 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>)
 are Unicode-aware TeX engines that can use OpenType fonts directly, 
-without the need for any (La)TeX-specific support files.
+without any (La)TeX-specific support files.
 
 The B<FontPro> project (F<https://github.com/sebschub/FontPro>)
-offers very complete LaTeX support (including math) for Adobe's Minion Pro, 
-Myriad Pro and Cronos Pro font families.
+offers very complete LaTeX support (even for typesetting maths) for Adobe's 
+Minion Pro, Myriad Pro and Cronos Pro font families.
 
-John Owens' B<otfinst> (available from CTAN) is another wrapper
-around F<otftotfm>.
 
-
 =head1 AUTHOR
 
-Marc Penninga <marcpenninga at gmail.com>
+Marc Penninga (F<marcpenninga at gmail.com>)
 
 When sending a bug report, please give as much relevant information as
-possible; this includes at least (but may not be limited to) 
-the log file F<autoinst.log>.
+possible.
 If you see any error messages (either from B<autoinst> itself, from the I<LCDF TypeTools>,
-from Perl or from the OS), please include these I<verbatim> as well; don't paraphrase them.
+from Perl or from the OS), include these I<verbatim>; don't paraphrase.
 
 
 =head1 COPYRIGHT
@@ -2164,11 +2208,17 @@
 
 =over 12
 
+=item I<2018-03-26>
+
+Added the "Text" weight and the I<-(no)mergewidths> option.
+Changed the NFSS codes for "Thin" and "Book" to "i" and "o", respectively.
+Tried to improve the documentation.
+
 =item I<2018-01-09>
 
 Added the "sl" weight for font families (such as Fira Sans) that contain both
 "Book" and "Regular" weights (reported by Bob Tennent). 
-Added the "Two", "Four", "Eight" and "Hair" weights.
+Added the "Two", "Four", "Eight" and "Hair" weights (for Fira Sans).
 
 =item I<2017-06-16>
 

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	2018-03-26 21:15:20 UTC (rev 47133)
+++ trunk/Master/texmf-dist/doc/man/man1/autoinst.1	2018-03-26 21:16:09 UTC (rev 47134)
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "AUTOINST 1"
-.TH AUTOINST 1 "2018-01-09" "fontools" "Marc Penninga"
+.TH AUTOINST 1 "2018-03-26" "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
@@ -160,7 +160,7 @@
 .RS 2
 .IP "\fIn\fR" 8
 .IX Item "n"
-Roman text
+Roman (i.e., upright) text
 .IP "\fIit\fR, \fIsl\fR" 8
 .IX Item "it, sl"
 Italic and slanted (sometimes called oblique) text
@@ -172,8 +172,7 @@
 Swash
 .IP "\fItl\fR" 8
 .IX Item "tl"
-Titling shape. Meant for all-caps text only (even though it sometimes contains
-lowercase glyphs as well), where letterspacing and the positioning of
+Titling shape. Meant for all-caps text; letterspacing and the positioning of 
 punctuation characters have been adjusted to suit all-caps text.
 (This shape is only generated for the families with lining digits, 
 since old-style digits make no sense with all-caps text.)
@@ -200,15 +199,15 @@
 Families with superiors, inferiors, numerators and denominators,
 in roman, italic and slanted shapes.
 .IP "\-" 3
-An ornament family, in roman, italic and slanted shapes.
+An ornament family, also in roman, italic and slanted shapes.
 .RE
 .RS 2
 .RE
 .PP
-Of course, if the fonts don't contain italics, oldstyle digits, small caps 
+Of course, if your fonts don't contain italics, oldstyle digits, small caps 
 etc., the corresponding shapes and families are not created.
 In addition, the creation of most families and shapes can be controlled 
-by options (see \*(L"COMMAND-LINE \s-1OPTIONS\*(R"\s0 below).
+by the user (see \*(L"COMMAND-LINE \s-1OPTIONS\*(R"\s0 below).
 .PP
 These families use the \fIFontPro\fR project's naming scheme: 
 \&\fI<FontFamily>\-<Suffix>\fR, where \fI<Suffix>\fR is:
@@ -243,7 +242,7 @@
 .IX Item "Dnom"
 denominators
 .PP
-The generated fonts are named \fI<FontName>\-<suffix>\-<shape>\-<enc>\fR,
+The individual fonts are named \fI<FontName>\-<suffix>\-<shape>\-<enc>\fR,
 where \fI<suffix>\fR is the same as above (but in lowercase),
 \&\fI<shape>\fR is either empty, \*(L"sc\*(R", \*(L"swash\*(R" or \*(L"titling\*(R",
 and \fI<enc>\fR is the encoding (also in lowercase).
@@ -253,16 +252,16 @@
 By default, \fBautoinst\fR generates text fonts with \s-1OT1, T1\s0 and \s-1LY1\s0
 encodings, and the generated style files use \s-1LY1\s0 as the default text encoding.
 \&\s-1LY1\s0 has been chosen over T1 because it has some empty slots to accommodate
-the additional ligatures provided by many OpenType fonts.
+the additional ligatures found in many OpenType fonts.
 Other encodings can be chosen using the \fI\-encoding\fR option 
 (see \*(L"COMMAND-LINE \s-1OPTIONS\*(R"\s0 below).
 .SS "Using the fonts in your LaTeX documents"
 .IX Subsection "Using the fonts in your LaTeX documents"
-\&\fBautoinst\fR generates a style file for using the font in LaTeX documents,
+\&\fBautoinst\fR generates a style file for using the fonts in LaTeX documents,
 named \fI<FontFamily>.sty\fR. This style file also takes care of loading the
 \&\fIfontenc\fR and \fItextcomp\fR packages.
-To use the font, put the command \f(CW\*(C`\eusepackage{\f(CI<FontFamily>\f(CW}\*(C'\fR
-in the preamble of your document.
+To use the fonts, add the command \f(CW\*(C`\eusepackage{\f(CI<FontFamily>\f(CW}\*(C'\fR
+to the preamble of your document.
 .PP
 This style file defines a number of options:
 .ie n .IP """lining"", ""oldstyle"", ""tabular"", ""proportional""" 4
@@ -279,14 +278,14 @@
 May also be spelled \f(CW\*(C`scaled\*(C'\fR.
 .Sp
 This option is only available when you have the \fIxkeyval\fR package installed.
-.ie n .IP """light"", ""medium"", ""regular""" 4
-.el .IP "\f(CWlight\fR, \f(CWmedium\fR, \f(CWregular\fR" 4
-.IX Item "light, medium, regular"
+.ie n .IP """light"", ""medium"", ""book"", ""text"", ""regular""" 4
+.el .IP "\f(CWlight\fR, \f(CWmedium\fR, \f(CWbook\fR, \f(CWtext\fR, \f(CWregular\fR" 4
+.IX Item "light, medium, book, text, regular"
 Select the weight that LaTeX will use as the \*(L"regular\*(R" weight; 
 the default is \f(CW\*(C`regular\*(C'\fR.
-.ie n .IP """ultrablack"", ""ultrabold"", ""heavy"", ""extrablack"", ""black"", ""extrabold"", ""demibold"", ""semibold"", ""bold""" 4
-.el .IP "\f(CWultrablack\fR, \f(CWultrabold\fR, \f(CWheavy\fR, \f(CWextrablack\fR, \f(CWblack\fR, \f(CWextrabold\fR, \f(CWdemibold\fR, \f(CWsemibold\fR, \f(CWbold\fR" 4
-.IX Item "ultrablack, ultrabold, heavy, extrablack, black, extrabold, demibold, semibold, bold"
+.ie n .IP """heavy"", ""ultrablack"", ""extrablack"", ""black"", ""ultrabold"", ""extrabold"", ""demibold"", ""semibold"", ""bold""" 4
+.el .IP "\f(CWheavy\fR, \f(CWultrablack\fR, \f(CWextrablack\fR, \f(CWblack\fR, \f(CWultrabold\fR, \f(CWextrabold\fR, \f(CWdemibold\fR, \f(CWsemibold\fR, \f(CWbold\fR" 4
+.IX Item "heavy, ultrablack, extrablack, black, ultrabold, extrabold, demibold, semibold, bold"
 Select the weight that LaTeX will use as the \*(L"bold\*(R" weight; 
 the default is \f(CW\*(C`bold\*(C'\fR.
 .PP
@@ -310,7 +309,7 @@
 .Ve
 .PP
 In addition, the \f(CW\*(C`\eswshape\*(C'\fR and \f(CW\*(C`\etextsw\*(C'\fR commands are redefined to place
-swash on the secondary shape axis (\fIfontaxes\fR places it on the primary
+swash on \fIfontaxes\fR' secondary shape axis (\fIfontaxes\fR places it on the primary
 shape axis) to make them behave properly when nested, so that
 \&\f(CW\*(C`\eswshape\eupshape\*(C'\fR will give upright swash.
 .PP
@@ -325,7 +324,7 @@
 running LaTeX on the file \fInfssfont.tex\fR (part of a standard
 LaTeX installation) and supplying the name of the ornament font.
 .PP
-To access the ornaments, \fBautoinst\fR creates a font-specific encoding file
+To access ornament glyphs, \fBautoinst\fR creates a font-specific encoding file
 \&\fI<FontFamily>_orn.enc\fR, 
 but only if that file doesn't yet exist in the current directory.
 This is a deliberate feature that allows you to provide your own
@@ -345,7 +344,7 @@
 these parameters. When this fails
 (e.g., because the font family contains uncommon widths or weights),
 \&\fBautoinst\fR ends up with different fonts having the \fIsame\fR values
-for these font parameters, which means that these fonts cannot be used in \s-1NFSS.\s0
+for these font parameters, and so cannot be used in \s-1NFSS.\s0
 In that case, \fBautoinst\fR will split the font family into multiple subfamilies
 (based on each font file's \*(L"Subfamily\*(R" value) and try again.
 (Since many font vendors misunderstand the \*(L"Subfamily\*(R" concept
@@ -352,68 +351,58 @@
 and make each font file its own separate subfamily,
 this strategy is only used as a last resort.)
 .PP
-If such a proliferation of font families is unwanted,
-either run \fBautoinst\fR on a smaller set of fonts or 
-add the missing widths, weights and shapes to the tables \f(CW%FD_WIDTH\fR,
-\&\f(CW%FD_WEIGHT\fR and \f(CW%FD_SHAPE\fR, at the beginning of the source code.
-Please also send a bug report (see \s-1AUTHOR\s0 below).
+If a proliferation of font families is unwanted, either run \fBautoinst\fR 
+on a smaller set of fonts or add the missing widths, weights and shapes to 
+the tables \f(CW%FD_WIDTH\fR, \f(CW%FD_WEIGHT\fR and \f(CW%FD_SHAPE\fR, at the beginning 
+of the source code. Please also send a bug report (see \s-1AUTHOR\s0 below).
 .PP
 \&\fBautoinst\fR maps widths, weights and shapes to \s-1NFSS\s0 codes using
 the following tables. These are based on the standard \fIFontname\fR scheme 
-and Philipp Lehman's \fIFont Installation Guide\fR, but some changes were made 
-to avoid name clashes in font families with many different widths and weights,
+and Philipp Lehman's \fIFont Installation Guide\fR, but some changes had to be made 
+to avoid name clashes in font families with many widths and weights,
 such as Helvetica Neue and Fira Sans.
 .PP
-.Vb 1
+.Vb 10
 \&    WEIGHT                              WIDTH
-\&
-\&    
-\&    Two            2     [1]            Ultra Compressed    up
-\&    Four           4     [1]            Extra Compressed    ep
-\&    Eight          8     [1]            Compressed          p
+\&    \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-            \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+\&    Two            2                    Ultra Compressed    up
+\&    Four           4                    Extra Compressed    ep
+\&    Eight          8                    Compressed          p
 \&    Hair           a                    Compact             p
-\&    Thin           t                    Ultra Condensed     uc
+\&    Thin           i                    Ultra Condensed     uc
 \&    Ultra Light    ul                   Extra Condensed     ec
 \&    Extra Light    el                   Condensed           c
 \&    Light          l                    Narrow              n
-\&    Book           sl    [2]            Semicondensed       sc
-\&    Regular              [3]            Regular                     [3]
-\&    Medium         mb                   Semiextended        sx
-\&    Demibold       db                   Extended            x
-\&    Semibold       sb                   Expanded            e
-\&    Bold           b                    Wide                w
-\&    Extra Bold     eb
-\&    Ultra          ub
-\&    Ultra Bold     ub                   SHAPE
-\&    Black          k
-\&    Extra Black    ek                   Roman, Upright      n       [4]
-\&    Ultra Black    uk                   Italic              it
-\&    Heavy          h                    Cursive, Kursiv     it
-\&    Poster         r                    Oblique             sl      [5]
-\&                                        Slanted             sl      [5]
-\&                                        Incline(d)          sl      [5]
+\&    Regular        \-     [1]            Semicondensed       sc
+\&    Text           t     [2]            Regular             \-       [1]
+\&    Book           o     [2]            Semiextended        sx
+\&    Medium         mb                   Extended            x
+\&    Demibold       db                   Expanded            e
+\&    Semibold       sb                   Wide                w
+\&    Bold           b                    
+\&    Extra Bold     eb                   SHAPE
+\&    Ultra (Bold)   ub                   \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+\&    Black          k                    Roman, Upright      n       [3]
+\&    Extra Black    ek                   Italic, Cursive,
+\&    Ultra Black    uk                       Kursiv          it
+\&    Heavy          h                    Oblique, Slanted,
+\&    Poster         r                        Incline(d)      sl
 .Ve
-.PP
-\fINotes\fR
-.IX Subsection "Notes"
 .IP "[1]" 4
 .IX Item "[1]"
-These weights only occur (as far as I know) in Fira Sans.
+When \fIboth\fR weight and width are empty, the \s-1NFSS\s0 \*(L"series\*(R" attribute becomes \*(L"m\*(R".
 .IP "[2]" 4
 .IX Item "[2]"
-Since release 2018\-01\-09, \fBautoinst\fR adds \*(L"ssub\*(R" rules to the \fIfd\fR files 
-to substitute \*(L"Book\*(R" weight for \*(L"Regular\*(R" when the latter is missing.
-Before that, \*(L"Book\*(R" was treated as a synonym for \*(L"Regular\*(R".
+Until release 2017\-06\-16, \*(L"Text\*(R" and \*(L"Book\*(R" were treated as synonyms for
+\&\*(L"Regular\*(R". As there are some fonts (\s-1IBM\s0 Plex, Fira Sans) that contain
+separate \*(L"Text\*(R" or \*(L"Book\*(R" in addition to \*(L"Regular\*(R" weights,
+I decided to give them their own codes.
+When there is no \*(L"Regular\*(R" weight, \fBautoinst\fR will generate \fIssub\fR rules 
+to substitute either the \*(L"Text\*(R" or the \*(L"Book\*(R" font in its place.
 .IP "[3]" 4
 .IX Item "[3]"
-When \fIboth\fR weight and width are empty, the \*(L"series\*(R" attribute becomes \*(L"m\*(R".
-.IP "[4]" 4
-.IX Item "[4]"
-Adobe Silentium Pro contains two \*(L"Roman\*(R" shapes (\*(L"RomanI\*(R" and \*(L"RomanII\*(R");
-the first of these is mapped to \*(L"n\*(R", the second one to \*(L"it\*(R".
-.IP "[5]" 4
-.IX Item "[5]"
-Since release 2014\-01\-21; before that, slanted shapes were mapped to \*(L"it\*(R".
+Adobe Silentium Pro contains two roman shapes;
+\&\*(L"Roman I\*(R" is mapped to \*(L"n\*(R", \*(L"Roman \s-1II\*(R"\s0 to \*(L"it\*(R".
 .SS "A note for MiKTeX users"
 .IX Subsection "A note for MiKTeX users"
 Automatically installing the fonts into a suitable \s-1TEXMF\s0 tree
@@ -433,7 +422,7 @@
 .SH "COMMAND-LINE OPTIONS"
 .IX Header "COMMAND-LINE OPTIONS"
 \&\fBautoinst\fR tries hard to do The Right Thing (\s-1TM\s0) by default, 
-so in many cases you won't need these options;
+so you usually won't really need these options;
 but most aspects of its operation can be fine-tuned if you want to.
 .PP
 You may use either one or two dashes before options,
@@ -442,8 +431,8 @@
 but \fB\-e\fR is ambiguous (it may mean either \fB\-encoding\fR or \fB\-extra\fR)).
 .IP "\fB\-dryrun\fR" 4
 .IX Item "-dryrun"
-Don't actually do anything, only create the logfile \fIautoinst.log\fR 
-showing which fonts would have been generated.
+Don't generate any output files; only parse the input fonts and create 
+\&\fIautoinst.log\fR showing which fonts would have been generated.
 .IP "\fB\-encoding\fR=\fIencoding[,encoding]\fR" 4
 .IX Item "-encoding=encoding[,encoding]"
 Generate the specified encoding(s) for the text fonts. The default is 
@@ -513,11 +502,11 @@
 should use for the inferior characters. The default is not to create fonts 
 with inferior characters.
 .Sp
-Note that many fonts contain only one (or even none) of these types
+\&\fINote that many fonts contain only one (or even none) of these types
 of inferior characters. If you specify a style of inferiors that isn't
-actually present in the font, \fBautoinst\fR silently falls back to its default
+actually present in the font, \f(BIautoinst\fI silently falls back to its default
 of not creating fonts with inferiors; it doesn't try to substitute one of
-the other features.
+the other features.\fR
 .IP "\fB\-fractions\fR / \fB\-nofractions\fR" 4
 .IX Item "-fractions / -nofractions"
 Control the creation of fonts with numerators and denominators.
@@ -548,6 +537,11 @@
 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\-mergewidths\fR / \fB\-nomergewidths\fR" 4
+.IX Item "-mergewidths / -nomergewidths"
+Some font families put Condensed and Extended fonts in separate families;
+this option tells \fBautoinst\fR to merge those separate families into the \*(L"main\*(R" font family. 
+The default is \fB\-nomergewidths\fR.
 .IP "\fB\-extra\fR=\fItext\fR" 4
 .IX Item "-extra=text"
 Append \fItext\fR as extra options to the command lines for \fIotftotfm\fR. 
@@ -575,10 +569,10 @@
 .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 your \f(CW$TEXMFLOCAL\fR and \f(CW$TEXMFHOME\fR paths
-and installs all files into subdirectories of the first writable \s-1TEXMF\s0 tree
-it finds (or into subdirectories of the current directory,
+This option allows the user to override \fBautoinst\fR's default behaviour, 
+which is to search the \f(CW$TEXMFLOCAL\fR and \f(CW$TEXMFHOME\fR paths and install all files 
+into subdirectories of the first writable \s-1TEXMF\s0 tree it finds 
+(or into subdirectories of the current directory,
 if no writable directory is found).
 .IP "\fB\-vendor\fR=\fI\s-1VENDOR\s0\fR" 4
 .IX Item "-vendor=VENDOR"
@@ -602,29 +596,25 @@
 Eddie Kohler's \fBTypeTools\fR (\fIhttp://www.lcdf.org/type\fR).
 .PP
 \&\fBPerl\fR can be obtained from \fIhttp://www.perl.org\fR; 
-it is a standard part of many Linux distributions.
+it is included in most Linux distributions.
 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)
 are Unicode-aware TeX engines that can use OpenType fonts directly, 
-without the need for any (La)TeX\-specific support files.
+without any (La)TeX\-specific support files.
 .PP
 The \fBFontPro\fR project (\fIhttps://github.com/sebschub/FontPro\fR)
-offers very complete LaTeX support (including math) for Adobe's Minion Pro, 
-Myriad Pro and Cronos Pro font families.
-.PP
-John Owens' \fBotfinst\fR (available from \s-1CTAN\s0) is another wrapper
-around \fIotftotfm\fR.
+offers very complete LaTeX support (even for typesetting maths) for Adobe's 
+Minion Pro, Myriad Pro and Cronos Pro font families.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
-Marc Penninga <marcpenninga at gmail.com>
+Marc Penninga (\fImarcpenninga at gmail.com\fR)
 .PP
 When sending a bug report, please give as much relevant information as
-possible; this includes at least (but may not be limited to) 
-the log file \fIautoinst.log\fR.
+possible.
 If you see any error messages (either from \fBautoinst\fR itself, from the \fI\s-1LCDF\s0 TypeTools\fR,
-from Perl or from the \s-1OS\s0), please include these \fIverbatim\fR as well; don't paraphrase them.
+from Perl or from the \s-1OS\s0), include these \fIverbatim\fR; don't paraphrase.
 .SH "COPYRIGHT"
 .IX Header "COPYRIGHT"
 Copyright (C) 2005\-2018 Marc Penninga.
@@ -645,11 +635,16 @@
 .SH "RECENT CHANGES"
 .IX Header "RECENT CHANGES"
 (See the source for the full story, all the way back to 2005.)
+.IP "\fI2018\-03\-26\fR" 12
+.IX Item "2018-03-26"
+Added the \*(L"Text\*(R" weight and the \fI\-(no)mergewidths\fR option.
+Changed the \s-1NFSS\s0 codes for \*(L"Thin\*(R" and \*(L"Book\*(R" to \*(L"i\*(R" and \*(L"o\*(R", respectively.
+Tried to improve the documentation.
 .IP "\fI2018\-01\-09\fR" 12
 .IX Item "2018-01-09"
 Added the \*(L"sl\*(R" weight for font families (such as Fira Sans) that contain both
 \&\*(L"Book\*(R" and \*(L"Regular\*(R" weights (reported by Bob Tennent). 
-Added the \*(L"Two\*(R", \*(L"Four\*(R", \*(L"Eight\*(R" and \*(L"Hair\*(R" weights.
+Added the \*(L"Two\*(R", \*(L"Four\*(R", \*(L"Eight\*(R" and \*(L"Hair\*(R" weights (for Fira Sans).
 .IP "\fI2017\-06\-16\fR" 12
 .IX Item "2017-06-16"
 Changed the \fI\-inferiors\fR option from a binary yes-or-no choice to allow

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

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	2018-03-26 21:15:20 UTC (rev 47133)
+++ trunk/Master/texmf-dist/doc/support/fontools/README	2018-03-26 21:16:09 UTC (rev 47134)
@@ -65,4 +65,4 @@
 the license conditions.
 
 
-                                                Marc Penninga, 2018/01/09
+                                                Marc Penninga, 2018/03/26

Modified: trunk/Master/texmf-dist/scripts/fontools/autoinst
===================================================================
--- trunk/Master/texmf-dist/scripts/fontools/autoinst	2018-03-26 21:15:20 UTC (rev 47133)
+++ trunk/Master/texmf-dist/scripts/fontools/autoinst	2018-03-26 21:16:09 UTC (rev 47134)
@@ -48,29 +48,39 @@
     all lowercase. Also make sure that the NFSS 'series' attribute
     (the concatenation of weight and width) is unique!
 
-    The 'book' and 'regular' weights and the 'regular' width are mapped
-    to an empty string rather than 'm', because the 'm' disappears when
-    weight and width are combined into the NFSS series (unless *both* are
-    'regular', but we deal with that case separately).
+    The 'regular' weight and width are mapped to an empty string 
+    rather than 'm', because the 'm' disappears when weight and width 
+    are combined into the NFSS series (unless *both* are 'regular', 
+    but we deal with that case separately).
+    
+    'Text' and 'book' are often used instead of 'regular', hence
+    we want to create substitution rules in the .fd files that
+    substitute 'text' or 'book' for the missing 'regular' fonts.
+    Therefore we define these weights via variables, so we can access
+    their values later on when we create the .fd files.
 
 =end Comment
 
 =cut
 
+my $nfss_text = 't';
+my $nfss_book = 'o';
+
 my %FD_WEIGHT = (
     two             => '2',
     four            => '4',
     eight           => '8',
     hair            => 'a',
-    thin            => 't',
+    thin            => 'i',
     ultralight      => 'ul',
     extralight      => 'el',
     light           => 'l',
-    book            => 'sl',
     regular         => '',
+    text            => $nfss_text,
+    book            => $nfss_book,
     medium          => 'mb',
+    demi            => 'db',
     demibold        => 'db',
-    demi            => 'db',
     semibold        => 'sb',
     bold            => 'b',
     extrabold       => 'eb',
@@ -102,6 +112,7 @@
     expanded        => 'e',
     wide            => 'w',
 );
+my @FD_WIDTH = uniq(values %FD_WIDTH);
 
 my %FD_SHAPE = (
     roman           => 'n',
@@ -397,6 +408,14 @@
 }
 
 #-----------------------------------------------------------------------
+# Return a list of unique entries from the input
+#-----------------------------------------------------------------------
+sub uniq {
+    my %tmp = map { ($_ => 1) } @_;
+    return keys %tmp;
+}
+
+#-----------------------------------------------------------------------
 # Determine which figure styles to create for each font;
 # return a list of (font, style) tuples
 #-----------------------------------------------------------------------
@@ -561,6 +580,7 @@
     extra:              @{[ $ARGV{extra} || '<empty>' ]}
 
     figurekern:         @{[ $ARGV{figurekern}   ? 'no action' : 'remove' ]}
+    mergewidths:        @{[ $ARGV{mergewidths}  ? 'yes' : 'no' ]}
     
 
     font files:
@@ -760,6 +780,7 @@
     -manual                 Manual mode (see documentation)
 
     -(no)figurekern         Keep or remove kerns between tabular figures
+    -(no)mergewidths        Merge Condended/Extended subfamilies with main family
 
     -help                   Print this text and exit
     -doc                    Print the complete documentation and exit
@@ -797,6 +818,7 @@
     dryrun       => '0',     # 0 = no, 1 = yes
     logfile      => 'autoinst.log',
     figurekern   => '1',     # 0 = no, 1 = yes
+    mergewidths  => '0',     # 0 = no, 1 = yes
 );
 
 #-----------------------------------------------------------------------
@@ -835,6 +857,7 @@
         'dryrun'              => \$ARGV{dryrun},
         'manual'              => \$ARGV{manual},
         'figurekern!'         => \$ARGV{figurekern},
+        'mergewidths!'        => \$ARGV{mergewidths},
         'verbose+'            => sub {},
     )
     or die "$USAGE";
@@ -1017,6 +1040,18 @@
     $info->{family}    = $data{family};
     $info->{subfamily} = $data{subfamily};
 
+    # Some font families put Condensed or Extended fonts into separate
+    # families; we provide an option to merge these with the 'main'
+    # font family.
+    if ($ARGV{mergewidths}) {
+        if ($info->{width} eq 'regular'
+            && $info->{family} =~ m/(.+?) [ ]* (condensed|extended)$/xmsi)
+        {
+            $info->{family} = $1;
+            $info->{width}  = lc $2;
+        }
+    }
+    
     $info->{basicshape} = $FD_SHAPE{$info->{shape}};
     $info->{fdseries}
         = ($FD_WEIGHT{$info->{weight}} . $FD_WIDTH{$info->{width}}) || 'm';
@@ -1386,7 +1421,7 @@
         :               die "[ERROR] Internal bug, please report!";
 
     my $default_bold;
-    for my $series (qw(ultrablack ultrabold heavy extrablack black
+    for my $series (qw(heavy ultrablack extrablack black ultrabold
                         extrabold demibold semibold bold)) 
     {
         if ($seen{$FD_WEIGHT{$series}}) {
@@ -1399,7 +1434,7 @@
     $defaults .= ",$default_bold" if $default_bold;
 
     my $default_regular;
-    for my $series (qw(light medium book regular)) {
+    for my $series (qw(light medium book text regular)) {
         if ($seen{$FD_WEIGHT{$series} || 'm'}) {
             print {$STY}
                 "\\DeclareOptionX{$series}{\\edef\\mdseries\@$ARGV{nfss}",
@@ -1498,14 +1533,33 @@
         }
     }
     
-    for my $shape (keys %{$data->{sl}}) {
-        if (!exists $data->{m}{$shape}) {
-            print {$FD} <<"END_FD_SSUB_SL";
-\\DeclareFontShape{$enc}{${fam}-${sty}}{m}{$shape}{
-      <-> ssub * ${fam}-${sty}/sl/${shape}
+    # We treat "Text" and "Book" as different from "Regular" (see docs below).
+    # For fonts that have no separate "Regular" weight, we add ssub rules
+    # to substitute "Text" (preferably) or "Book" in its place.
+    for my $width (@FD_WIDTH) {
+        my $regular_series = $width || 'm';
+        my $text_series = $nfss_text . $width;
+        my $book_series = $nfss_book . $width;
+        my @shapes = main::uniq( keys %{$data->{$text_series}},
+                           keys %{$data->{$book_series}} );
+        for my $shape (@shapes) {
+            next if exists $data->{$regular_series}{$shape};
+            if (exists $data->{$text_series}{$shape}) {
+                print {$FD} <<"END_FD_SSUB_TEXT";
+\\DeclareFontShape{$enc}{${fam}-${sty}}{$regular_series}{$shape}{
+      <-> ssub * ${fam}-${sty}/$text_series/${shape}
 }{}
 
-END_FD_SSUB_SL
+END_FD_SSUB_TEXT
+            }
+            elsif (exists $data->{$book_series}{$shape}) {
+                print {$FD} <<"END_FD_SSUB_BOOK";
+\\DeclareFontShape{$enc}{${fam}-${sty}}{$regular_series}{$shape}{
+      <-> ssub * ${fam}-${sty}/$book_series/${shape}
+}{}
+
+END_FD_SSUB_BOOK
+            }
         }
     }
     
@@ -1588,7 +1642,7 @@
 
 =item I<n>
 
-Roman text
+Roman (i.e., upright) text
 
 =item I<it>, I<sl>
 
@@ -1604,8 +1658,7 @@
 
 =item I<tl>
 
-Titling shape. Meant for all-caps text only (even though it sometimes contains
-lowercase glyphs as well), where letterspacing and the positioning of
+Titling shape. Meant for all-caps text; letterspacing and the positioning of 
 punctuation characters have been adjusted to suit all-caps text.
 (This shape is only generated for the families with lining digits, 
 since old-style digits make no sense with all-caps text.)
@@ -1639,16 +1692,16 @@
 
 =item -
 
-An ornament family, in roman, italic and slanted shapes.
+An ornament family, also in roman, italic and slanted shapes.
 
 =back
 
 =back
 
-Of course, if the fonts don't contain italics, oldstyle digits, small caps 
+Of course, if your fonts don't contain italics, oldstyle digits, small caps 
 etc., the corresponding shapes and families are not created.
 In addition, the creation of most families and shapes can be controlled 
-by options (see L</"COMMAND-LINE OPTIONS"> below).
+by the user (see L</"COMMAND-LINE OPTIONS"> below).
 
 These families use the I<FontPro> project's naming scheme: 
 I<< <FontFamily>-<Suffix> >>, where I<< <Suffix> >> is:
@@ -1696,7 +1749,7 @@
 
 =back
 
-The generated fonts are named I<< <FontName>-<suffix>-<shape>-<enc> >>,
+The individual fonts are named I<< <FontName>-<suffix>-<shape>-<enc> >>,
 where I<< <suffix> >> is the same as above (but in lowercase),
 I<< <shape> >> is either empty, "sc", "swash" or "titling",
 and I<< <enc> >> is the encoding (also in lowercase).
@@ -1708,7 +1761,7 @@
 By default, B<autoinst> generates text fonts with OT1, T1 and LY1
 encodings, and the generated style files use LY1 as the default text encoding.
 LY1 has been chosen over T1 because it has some empty slots to accommodate
-the additional ligatures provided by many OpenType fonts.
+the additional ligatures found in many OpenType fonts.
 Other encodings can be chosen using the I<-encoding> option 
 (see L</"COMMAND-LINE OPTIONS"> below).
 
@@ -1715,11 +1768,11 @@
 
 =head2 Using the fonts in your LaTeX documents
 
-B<autoinst> generates a style file for using the font in LaTeX documents,
+B<autoinst> generates a style file for using the fonts in LaTeX documents,
 named F<< <FontFamily>.sty >>. This style file also takes care of loading the
 F<fontenc> and F<textcomp> packages.
-To use the font, put the command C<<< \usepackage{I<< <FontFamily> >>} >>>
-in the preamble of your document.
+To use the fonts, add the command C<<< \usepackage{I<< <FontFamily> >>} >>>
+to the preamble of your document.
 
 This style file defines a number of options:
 
@@ -1739,12 +1792,12 @@
 
 This option is only available when you have the F<xkeyval> package installed.
 
-=item C<light>, C<medium>, C<regular>
+=item C<light>, C<medium>, C<book>, C<text>, C<regular>
 
 Select the weight that LaTeX will use as the "regular" weight; 
 the default is C<regular>.
 
-=item C<ultrablack>, C<ultrabold>, C<heavy>, C<extrablack>, C<black>, 
+=item C<heavy>, C<ultrablack>, C<extrablack>, C<black>, C<ultrabold>, 
       C<extrabold>, C<demibold>, C<semibold>, C<bold>
 
 Select the weight that LaTeX will use as the "bold" weight; 
@@ -1772,7 +1825,7 @@
 
 
 In addition, the C<\swshape> and C<\textsw> commands are redefined to place
-swash on the secondary shape axis (F<fontaxes> places it on the primary
+swash on F<fontaxes>' secondary shape axis (F<fontaxes> places it on the primary
 shape axis) to make them behave properly when nested, so that
 C<\swshape\upshape> will give upright swash.
 
@@ -1787,7 +1840,7 @@
 running LaTeX on the file F<nfssfont.tex> (part of a standard
 LaTeX installation) and supplying the name of the ornament font.
 
-To access the ornaments, B<autoinst> creates a font-specific encoding file
+To access ornament glyphs, B<autoinst> creates a font-specific encoding file
 F<< <FontFamily>_orn.enc >>, 
 but only if that file doesn't yet exist in the current directory.
 This is a deliberate feature that allows you to provide your own
@@ -1809,7 +1862,7 @@
 these parameters. When this fails
 (e.g., because the font family contains uncommon widths or weights),
 B<autoinst> ends up with different fonts having the I<same> values
-for these font parameters, which means that these fonts cannot be used in NFSS.
+for these font parameters, and so cannot be used in NFSS.
 In that case, B<autoinst> will split the font family into multiple subfamilies
 (based on each font file's "Subfamily" value) and try again.
 (Since many font vendors misunderstand the "Subfamily" concept
@@ -1816,75 +1869,64 @@
 and make each font file its own separate subfamily,
 this strategy is only used as a last resort.)
 
-If such a proliferation of font families is unwanted,
-either run B<autoinst> on a smaller set of fonts or 
-add the missing widths, weights and shapes to the tables C<%FD_WIDTH>,
-C<%FD_WEIGHT> and C<%FD_SHAPE>, at the beginning of the source code.
-Please also send a bug report (see L<AUTHOR> below).
+If a proliferation of font families is unwanted, either run B<autoinst> 
+on a smaller set of fonts or add the missing widths, weights and shapes to 
+the tables C<%FD_WIDTH>, C<%FD_WEIGHT> and C<%FD_SHAPE>, at the beginning 
+of the source code. Please also send a bug report (see L<AUTHOR> below).
 
 B<autoinst> maps widths, weights and shapes to NFSS codes using
 the following tables. These are based on the standard I<Fontname> scheme 
-and Philipp Lehman's F<Font Installation Guide>, but some changes were made 
-to avoid name clashes in font families with many different widths and weights,
+and Philipp Lehman's F<Font Installation Guide>, but some changes had to be made 
+to avoid name clashes in font families with many widths and weights,
 such as Helvetica Neue and Fira Sans.
 
 
     WEIGHT                              WIDTH
-
-    
-    Two            2     [1]            Ultra Compressed    up
-    Four           4     [1]            Extra Compressed    ep
-    Eight          8     [1]            Compressed          p
+    ------------------------            -------------------------------
+    Two            2                    Ultra Compressed    up
+    Four           4                    Extra Compressed    ep
+    Eight          8                    Compressed          p
     Hair           a                    Compact             p
-    Thin           t                    Ultra Condensed     uc
+    Thin           i                    Ultra Condensed     uc
     Ultra Light    ul                   Extra Condensed     ec
     Extra Light    el                   Condensed           c
     Light          l                    Narrow              n
-    Book           sl    [2]            Semicondensed       sc
-    Regular              [3]            Regular                     [3]
-    Medium         mb                   Semiextended        sx
-    Demibold       db                   Extended            x
-    Semibold       sb                   Expanded            e
-    Bold           b                    Wide                w
-    Extra Bold     eb
-    Ultra          ub
-    Ultra Bold     ub                   SHAPE
-    Black          k
-    Extra Black    ek                   Roman, Upright      n       [4]
-    Ultra Black    uk                   Italic              it
-    Heavy          h                    Cursive, Kursiv     it
-    Poster         r                    Oblique             sl      [5]
-                                        Slanted             sl      [5]
-                                        Incline(d)          sl      [5]
+    Regular        -     [1]            Semicondensed       sc
+    Text           t     [2]            Regular             -       [1]
+    Book           o     [2]            Semiextended        sx
+    Medium         mb                   Extended            x
+    Demibold       db                   Expanded            e
+    Semibold       sb                   Wide                w
+    Bold           b                    
+    Extra Bold     eb                   SHAPE
+    Ultra (Bold)   ub                   -------------------------------
+    Black          k                    Roman, Upright      n       [3]
+    Extra Black    ek                   Italic, Cursive,
+    Ultra Black    uk                       Kursiv          it
+    Heavy          h                    Oblique, Slanted,
+    Poster         r                        Incline(d)      sl
 
 
-=head3 Notes
-
 =over 4
 
 =item [1]
 
-These weights only occur (as far as I know) in Fira Sans.
+When I<both> weight and width are empty, the NFSS "series" attribute becomes "m".
 
 =item [2]
 
-Since release 2018-01-09, B<autoinst> adds "ssub" rules to the F<fd> files 
-to substitute "Book" weight for "Regular" when the latter is missing.
-Before that, "Book" was treated as a synonym for "Regular".
+Until release 2017-06-16, "Text" and "Book" were treated as synonyms for
+"Regular". As there are some fonts (IBM Plex, Fira Sans) that contain
+separate "Text" or "Book" in addition to "Regular" weights,
+I decided to give them their own codes.
+When there is no "Regular" weight, B<autoinst> will generate I<ssub> rules 
+to substitute either the "Text" or the "Book" font in its place.
 
 =item [3]
 
-When I<both> weight and width are empty, the "series" attribute becomes "m".
+Adobe Silentium Pro contains two roman shapes;
+"Roman I" is mapped to "n", "Roman II" to "it".
 
-=item [4]
-
-Adobe Silentium Pro contains two "Roman" shapes ("RomanI" and "RomanII");
-the first of these is mapped to "n", the second one to "it".
-
-=item [5]
-
-Since release 2014-01-21; before that, slanted shapes were mapped to "it".
-
 =back
 
 
@@ -1909,7 +1951,7 @@
 =head1 COMMAND-LINE OPTIONS
 
 B<autoinst> tries hard to do The Right Thing (TM) by default, 
-so in many cases you won't need these options;
+so you usually won't really need these options;
 but most aspects of its operation can be fine-tuned if you want to.
 
 You may use either one or two dashes before options,
@@ -1921,8 +1963,8 @@
 
 =item B<-dryrun>
 
-Don't actually do anything, only create the logfile F<autoinst.log> 
-showing which fonts would have been generated. 
+Don't generate any output files; only parse the input fonts and create 
+F<autoinst.log> showing which fonts would have been generated.
 
 =item B<-encoding>=I<encoding[,encoding]>
 
@@ -2005,11 +2047,11 @@
 should use for the inferior characters. The default is not to create fonts 
 with inferior characters.
 
-Note that many fonts contain only one (or even none) of these types
+I<< Note that many fonts contain only one (or even none) of these types
 of inferior characters. If you specify a style of inferiors that isn't
 actually present in the font, B<autoinst> silently falls back to its default
 of not creating fonts with inferiors; it doesn't try to substitute one of
-the other features.
+the other features. >>
 
 =item B<-fractions> / B<-nofractions>
 
@@ -2043,6 +2085,12 @@
 Note that this option leads to very long commands (it adds
 one hundred I< --ligkern> options), which may cause problems on some systems.
 
+=item B<-mergewidths> / B<-nomergewidths>
+
+Some font families put Condensed and Extended fonts in separate families;
+this option tells B<autoinst> to merge those separate families into the "main" font family. 
+The default is B<-nomergewidths>.
+
 =item B<-extra>=I<text>
 
 Append I<text> as extra options to the command lines for I<otftotfm>. 
@@ -2076,10 +2124,10 @@
 =item B<-target>=I<DIRECTORY>
 
 Install all generated files into the TEXMF tree at I<DIRECTORY>.
-
-By default, B<autoinst> searches your $TEXMFLOCAL and $TEXMFHOME paths
-and installs all files into subdirectories of the first writable TEXMF tree
-it finds (or into subdirectories of the current directory,
+This option allows the user to override B<autoinst>'s default behaviour, 
+which is to search the $TEXMFLOCAL and $TEXMFHOME paths and install all files 
+into subdirectories of the first writable TEXMF tree it finds 
+(or into subdirectories of the current directory,
 if no writable directory is found).
 
 =item B<-vendor>=I<VENDOR>
@@ -2107,31 +2155,27 @@
 Eddie Kohler's B<TypeTools> (F<http://www.lcdf.org/type>).
 
 B<Perl> can be obtained from F<http://www.perl.org>; 
-it is a standard part of many Linux distributions.
+it is included in most Linux distributions.
 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>)
 are Unicode-aware TeX engines that can use OpenType fonts directly, 
-without the need for any (La)TeX-specific support files.
+without any (La)TeX-specific support files.
 
 The B<FontPro> project (F<https://github.com/sebschub/FontPro>)
-offers very complete LaTeX support (including math) for Adobe's Minion Pro, 
-Myriad Pro and Cronos Pro font families.
+offers very complete LaTeX support (even for typesetting maths) for Adobe's 
+Minion Pro, Myriad Pro and Cronos Pro font families.
 
-John Owens' B<otfinst> (available from CTAN) is another wrapper
-around F<otftotfm>.
 
-
 =head1 AUTHOR
 
-Marc Penninga <marcpenninga at gmail.com>
+Marc Penninga (F<marcpenninga at gmail.com>)
 
 When sending a bug report, please give as much relevant information as
-possible; this includes at least (but may not be limited to) 
-the log file F<autoinst.log>.
+possible.
 If you see any error messages (either from B<autoinst> itself, from the I<LCDF TypeTools>,
-from Perl or from the OS), please include these I<verbatim> as well; don't paraphrase them.
+from Perl or from the OS), include these I<verbatim>; don't paraphrase.
 
 
 =head1 COPYRIGHT
@@ -2164,11 +2208,17 @@
 
 =over 12
 
+=item I<2018-03-26>
+
+Added the "Text" weight and the I<-(no)mergewidths> option.
+Changed the NFSS codes for "Thin" and "Book" to "i" and "o", respectively.
+Tried to improve the documentation.
+
 =item I<2018-01-09>
 
 Added the "sl" weight for font families (such as Fira Sans) that contain both
 "Book" and "Regular" weights (reported by Bob Tennent). 
-Added the "Two", "Four", "Eight" and "Hair" weights.
+Added the "Two", "Four", "Eight" and "Hair" weights (for Fira Sans).
 
 =item I<2017-06-16>
 



More information about the tex-live-commits mailing list