diff options
author | Karl Berry <karl@freefriends.org> | 2018-01-09 22:35:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-01-09 22:35:27 +0000 |
commit | 1dbc8fa89c0f6fc256c3c480740e52bd6d47ba05 (patch) | |
tree | adad1223cb27d2c982f0b7d45806e6132c14e7b5 /Master/texmf-dist/scripts | |
parent | a492b6280e5865d3e6cdf114d9fc46d6634e4899 (diff) |
fontools (9jan18)
git-svn-id: svn://tug.org/texlive/trunk@46264 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-x | Master/texmf-dist/scripts/fontools/autoinst | 108 |
1 files changed, 65 insertions, 43 deletions
diff --git a/Master/texmf-dist/scripts/fontools/autoinst b/Master/texmf-dist/scripts/fontools/autoinst index 963bb89b2fc..3a5b6cdf3a1 100755 --- a/Master/texmf-dist/scripts/fontools/autoinst +++ b/Master/texmf-dist/scripts/fontools/autoinst @@ -4,7 +4,7 @@ ---------------------------------------------------------------------------- - Copyright (C) 2005-2017 Marc Penninga. + Copyright (C) 2005-2018 Marc Penninga. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -58,11 +58,15 @@ my $TODAY = sprintf "%04d/%02d/%02d", $y + 1900, $m + 1, $d; =cut my %FD_WEIGHT = ( + two => '2', + four => '4', + eight => '8', + hair => 'a', thin => 't', ultralight => 'ul', extralight => 'el', light => 'l', - book => '', + book => 'sl', regular => '', medium => 'mb', demibold => 'db', @@ -1395,7 +1399,7 @@ END_STY_XKEYVAL $defaults .= ",$default_bold" if $default_bold; my $default_regular; - for my $series (qw(light medium regular)) { + for my $series (qw(light medium book regular)) { if ($seen{$FD_WEIGHT{$series} || 'm'}) { print {$STY} "\\DeclareOptionX{$series}{\\edef\\mdseries\@$ARGV{nfss}", @@ -1494,6 +1498,17 @@ END_FD_SSUB } } + 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} +}{} + +END_FD_SSUB_SL + } + } + for my $shape (keys %{$data->{b}}) { if (!exists $data->{bx}{$shape}) { print {$FD} <<"END_FD_SSUB_BX"; @@ -1786,16 +1801,6 @@ cannot be found, you're limited to using the lower-level commands from standard NFSS (C<\fontfamily>, C<\fontseries>, C<\fontshape> etc.). -=head2 Using multiple font families in one document - -Style files generated by versions of B<autoinst> older dan 2013-07-25 -redefined C<\mddefault> and C<\bfdefault>, whereas newer style files -build on the facilities of the F<mweights> package instead. -If you use multiple B<autoinst>-generated font familes in the same document, -it might be best if all style files are generated by the same version of -B<autoinst>; re-generate the older families if necessary. - - =head2 NFSS codes NFSS identifies fonts by a combination of family, series @@ -1821,35 +1826,36 @@ 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, -such as Helvetica Neue. +such as Helvetica Neue and Fira Sans. WEIGHT WIDTH - Thin t Ultra Compressed up - Ultra Light ul Extra Compressed ep - Extra Light el Compressed p - Light l Compact p - Book [1] Ultra Condensed uc - Regular [1] Extra Condensed ec - Medium mb Condensed c - Demibold db Narrow n - Semibold sb Semicondensed sc - Bold b Regular [1] - Extra Bold eb Semiextended sx - Ultra ub Extended x - Ultra Bold ub Expanded e - Black k Wide w - Extra Black ek - Ultra Black uk - Heavy h SHAPE - Poster r - Roman, Upright n [2] - Italic it - Cursive, Kursiv it - Oblique sl [3] - Slanted sl [3] - Incline(d) sl [3] + + Two 2 [1] Ultra Compressed up + Four 4 [1] Extra Compressed ep + Eight 8 [1] Compressed p + Hair a Compact p + Thin t 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] =head3 Notes @@ -1858,14 +1864,24 @@ such as Helvetica Neue. =item [1] -When I<both> weight and width are empty, the "series" attribute becomes "m". +These weights only occur (as far as I know) in Fira Sans. =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". + +=item [3] + +When I<both> weight and width are empty, the "series" attribute becomes "m". + +=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 [3] +=item [5] Since release 2014-01-21; before that, slanted shapes were mapped to "it". @@ -2114,13 +2130,13 @@ Marc Penninga <marcpenninga@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>. -If you see any error messages (either from B<autoinst> itself, from Perl or -from the OS), please include these I<verbatim> as well; don't paraphrase them. +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. =head1 COPYRIGHT -Copyright (C) 2005-2017 Marc Penninga. +Copyright (C) 2005-2018 Marc Penninga. =head1 LICENSE @@ -2148,6 +2164,12 @@ GNU General Public License for more details. =over 12 +=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. + =item I<2017-06-16> Changed the I<-inferiors> option from a binary yes-or-no choice to allow |