summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-05-11 20:54:38 +0000
committerKarl Berry <karl@freefriends.org>2020-05-11 20:54:38 +0000
commit99753a4a0edc3571fa82cee09e2b0c74618e58cb (patch)
treee8bb702ea54976668ad0fc82873ee01d2701ca5e /Master/texmf-dist/doc
parent1e28eec3048eca3b4bb303fd89731719d16274e7 (diff)
fontools (11may20)
git-svn-id: svn://tug.org/texlive/trunk@55105 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/man/man1/afm2afm.14
-rw-r--r--Master/texmf-dist/doc/man/man1/afm2afm.man1.pdfbin26863 -> 26658 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/autoinst.186
-rw-r--r--Master/texmf-dist/doc/man/man1/autoinst.man1.pdfbin70332 -> 70590 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/ot2kpx.14
-rw-r--r--Master/texmf-dist/doc/man/man1/ot2kpx.man1.pdfbin27153 -> 26952 bytes
-rwxr-xr-xMaster/texmf-dist/doc/support/fontools/splitttc99
7 files changed, 128 insertions, 65 deletions
diff --git a/Master/texmf-dist/doc/man/man1/afm2afm.1 b/Master/texmf-dist/doc/man/man1/afm2afm.1
index dd60d1fc084..66decb7cd5d 100644
--- a/Master/texmf-dist/doc/man/man1/afm2afm.1
+++ b/Master/texmf-dist/doc/man/man1/afm2afm.1
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "AFM2AFM 1"
-.TH AFM2AFM 1 "2020-04-28" "fontools" "Marc Penninga"
+.TH AFM2AFM 1 "2020-05-11" "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 @@ but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of
See the \s-1GNU\s0 General Public License for more details.
.SH "VERSION"
.IX Header "VERSION"
-This document describes \fBafm2afm\fR version 20200428.
+This document describes \fBafm2afm\fR version 20200511.
.SH "RECENT CHANGES"
.IX Header "RECENT CHANGES"
(See the source code for the rest of the story.)
diff --git a/Master/texmf-dist/doc/man/man1/afm2afm.man1.pdf b/Master/texmf-dist/doc/man/man1/afm2afm.man1.pdf
index 8cb1e3b1855..79c05127eaa 100644
--- a/Master/texmf-dist/doc/man/man1/afm2afm.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/afm2afm.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/autoinst.1 b/Master/texmf-dist/doc/man/man1/autoinst.1
index 07ef5232dee..86c989f1406 100644
--- a/Master/texmf-dist/doc/man/man1/autoinst.1
+++ b/Master/texmf-dist/doc/man/man1/autoinst.1
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "AUTOINST 1"
-.TH AUTOINST 1 "2020-04-28" "fontools" "Marc Penninga"
+.TH AUTOINST 1 "2020-05-11" "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
@@ -143,7 +143,7 @@ autoinst \- wrapper around the LCDF TypeTools,
for installing and using OpenType fonts in LaTeX.
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
-\&\fBautoinst\fR [\fIoptions\fR] \fBfontfile(s)\fR
+\&\fBautoinst\fR [\fIoptions\fR] \fBfont(s)\fR
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Eddie Kohler's \fI\s-1LCDF\s0 TypeTools\fR are superb tools for installing
@@ -361,19 +361,6 @@ There are no commands for accessing the numerator and denominator
fonts; these can be selected using \fIfontaxes\fR' standard commands,
e.g., \f(CW\*(C`\efontfigurestyle{numerator}\eselectfont\*(C'\fR.
.PP
-The style file also provides a command \f(CW\*(C`\eornament{\f(CI<number>\f(CW}\*(C'\fR,
-where \f(CW\*(C`\f(CI<number>\f(CW\*(C'\fR is a number from 0 to the total number of
-ornaments minus one. Ornaments are always typeset using the current family,
-series and shape. A list of all ornaments in a font can be created by
-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 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 encoding
-vector, e.g. if your fonts use non-standard glyph names for ornaments.
-.PP
These commands are only generated for existing shapes and number styles;
no commands are generated for shapes and styles that don't exist,
or whose generation was turned off by the user.
@@ -385,6 +372,29 @@ By default, \fBautoinst\fR generates text fonts with \s-1OT1, LY1\s0 and T1
encodings, and the generated style files use T1 as the default text encoding.
Other encodings can be chosen using the \fI\-encoding\fR option
(see \*(L"COMMAND-LINE \s-1OPTIONS\*(R"\s0 below).
+.PP
+\fIOrnaments\fR
+.IX Subsection "Ornaments"
+.PP
+Ornament fonts are regular LY1\-encoded fonts, with a number of
+\&'regular' characters replaced by ornament glyphs.
+The OpenType specification says that fonts should only put their
+ornaments in place of the lowercase \s-1ASCII\s0 letters or the 'bullet'
+character, but some fonts put them in other positions (such as those
+of the digits) as well.
+.PP
+Ornament glyphs can be accessed like \f(CW\*(C`{\eornaments abc}\*(C'\fR and
+\&\f(CW\*(C`{\eornaments\echar"61}\*(C'\fR, or equivalently
+\&\f(CW\*(C`\etextornaments{abc}\*(C'\fR and \f(CW\*(C`\etextornaments{\echar"61}\*(C'\fR.
+To see which ornaments a font contains (and at which positions),
+run LaTeX on the file \fInfssfont.tex\fR (which is included in any
+standard LaTeX installation), supply the name of the ornament font
+(i.e., \f(CW\*(C`GaramondLibre\-Regular\-orn\-u\*(C'\fR) and say \f(CW\*(C`\etable\ebye\*(C'\fR;
+this will create a table of all glyphs in that font.
+.PP
+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.
.SS "\s-1NFSS\s0 codes"
.IX Subsection "NFSS codes"
LaTeX's New Font Selection System (\s-1NFSS\s0)
@@ -401,8 +411,8 @@ since there's no way distinguish them.
When \fBautoinst\fR detects such a situation, it will print an error message
and abort.
If that happens, either rerun \fBautoinst\fR on a smaller set of fonts,
-or add the missing widths, weights and shapes to the tables \f(CW\*(C`NFSS_WIDTH\*(C'\fR,
-\&\f(CW\*(C`NFSS_WEIGHT\*(C'\fR and \f(CW\*(C`NFSS_SHAPE\*(C'\fR, near the top of the source code.
+or add the missing widths, weights and shapes to the tables \f(CW\*(C`WIDTH\*(C'\fR,
+\&\f(CW\*(C`WEIGHT\*(C'\fR and \f(CW\*(C`SHAPE\*(C'\fR in the source code.
Please also send a bug report (see \s-1AUTHOR\s0 below).
.PP
The mapping of shapes to \s-1NFSS\s0 codes is done using the following table:
@@ -454,7 +464,7 @@ one can always use the \f(CW\*(C`\efontseries\*(C'\fR command with the full seri
.SH "COMMAND-LINE OPTIONS"
.IX Header "COMMAND-LINE OPTIONS"
\&\fBautoinst\fR tries hard to do The Right Thing (\s-1TM\s0) by default,
-so you usually won't really need these options;
+so you usually won't 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,
@@ -478,19 +488,18 @@ 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. Repeat this option for even more info.
+Add more details to the log file.
.IP "\fB\-encoding\fR=\fIencoding[,encoding]\fR" 4
.IX Item "-encoding=encoding[,encoding]"
Generate the specified encoding(s) for the text fonts.
-Multiple encodings may be specified as a comma-separated list:
-\&\f(CW\*(C`\-encoding=OT1,LY1,T1\*(C'\fR (without spaces!).
-The style file passes these to \fIotftotfm\fR in the specified order,
-so the \fIlast\fR one will become the default text encoding of your document.
+Multiple encodings may be specified as a comma-separated list
+(without spaces!); the default choice of encodings is \*(L"\s-1OT1,LY1,T1\*(R".\s0
.Sp
-The default choice of encodings is \*(L"\s-1OT1,LY1,T1\*(R".\s0
-For each encoding, a file \fI<encoding>.enc\fR (in all \fIlowercase\fR!)
-should be somewhere where \fIotftotfm\fR can find it. Suitable encoding files
-for \s-1OT1, T1/TS1, LY1, LGR, T2A/B/C\s0 and T3/TS3 come with \fBautoinst\fR.
+For each specified encoding \s-1XYZ,\s0 \fBautoinst\fR will first see if there is
+an encoding file \fI\s-1XYZ\s0.enc\fR in the current directory, and if found it will
+use that; otherwise it will use one of its built-in encoding files.
+Currently \fBautoinst\fR comes with support for the \s-1OT1, T1/TS1, LY1, LGR,
+T2A/B/C\s0 and T3/TS3 encodings.
(These files are called \fIfontools_ot1.enc\fR etc. to avoid name clashes
with other packages; the \*(L"fontools_\*(R" prefix may be omitted.)
.IP "\fB\-ts1\fR/\fB\-nots1\fR" 4
@@ -560,7 +569,7 @@ as inferiors or subscripts: \*(L"Subscripts\*(R" (OpenType feature \*(L"subs\*(R
This option allows the user to determine which of these styles \fBautoinst\fR
should use for the inferior characters.
Alternatively, the value \*(L"auto\*(R" tells \fBautoinst\fR to use the first value
-in \*(L"subs\*(R", \*(L"sinf\*(R" or \*(L"dnom\*(R" that is supported by the font.
+in \*(L"sinf\*(R", \*(L"subs\*(R" or \*(L"dnom\*(R" that is supported by the font.
Saying just \fB\-inferiors\fR is equivalent to \fB\-inferiors=auto\fR;
otherwise the default is \fB\-noinferiors\fR.
.Sp
@@ -571,6 +580,9 @@ with inferiors at all; it won't try to substitute one of the other styles.\fR
.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),
@@ -605,16 +617,6 @@ 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\-mergewidths\fR/\fB\-nomergewidths\fR, \fB\-mergeweights\fR/\fB\-nomergeweights\fR, \fB\-mergeshapes\fR/\fB\-nomergeshapes\fR" 4
-.IX Item "-mergewidths/-nomergewidths, -mergeweights/-nomergeweights, -mergeshapes/-nomergeshapes"
-Some font put different widths, weights or shapes (e.g., small caps)
-in separate families.
-These options tell \fBautoinst\fR to merge those separate families into
-the main family.
-Since this is usually desirable, they are all enabled by default.
-.Sp
-In earlier versions, \fB\-mergeshapes\fR was called \fB\-mergesmallcaps\fR;
-for reasons of backward compatibility, that option is still supported.
.IP "\fB\-nfssweight\fR=\fIcode\fR=\fIweight\fR, \fB\-nfsswidth\fR=\fIcode\fR=\fIwidth\fR" 4
.IX Item "-nfssweight=code=weight, -nfsswidth=code=width"
Map the \s-1NFSS\s0 code \fIcode\fR to the given weight or width,
@@ -741,10 +743,16 @@ but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of
\&\s-1GNU\s0 General Public License for more details.
.SH "VERSION"
.IX Header "VERSION"
-This document describes \fBautoinst\fR version 20200428.
+This document describes \fBautoinst\fR version 20200511.
.SH "RECENT CHANGES"
.IX Header "RECENT CHANGES"
(See the source for the full story, all the way back to 2005.)
+.IP "\fI2020\-05\-11\fR" 12
+.IX Item "2020-05-11"
+When present, use encoding files in the current working directory
+in preference of the ones that come with \fBautoinst\fR.
+Changed the way ornament fonts are created; ornament glyphs are now
+always included in the position chosen by the font's designer.
.IP "\fI2020\-04\-28\fR" 12
.IX Item "2020-04-28"
Fix a bug where the first font argument would be mistaken for
diff --git a/Master/texmf-dist/doc/man/man1/autoinst.man1.pdf b/Master/texmf-dist/doc/man/man1/autoinst.man1.pdf
index b41c16cdf7e..b80d92eda19 100644
--- a/Master/texmf-dist/doc/man/man1/autoinst.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/autoinst.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/ot2kpx.1 b/Master/texmf-dist/doc/man/man1/ot2kpx.1
index 1c3387e0244..a0553ce814d 100644
--- a/Master/texmf-dist/doc/man/man1/ot2kpx.1
+++ b/Master/texmf-dist/doc/man/man1/ot2kpx.1
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "OT2KPX 1"
-.TH OT2KPX 1 "2020-04-28" "fontools" "Marc Penninga"
+.TH OT2KPX 1 "2020-05-11" "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 @@ but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of
See the \s-1GNU\s0 General Public License for more details.
.SH "VERSION"
.IX Header "VERSION"
-This document describes \fBot2kpx\fR version 20200428.
+This document describes \fBot2kpx\fR version 20200511.
.SH "RECENT CHANGES"
.IX Header "RECENT CHANGES"
(See the source code for the rest of the story.)
diff --git a/Master/texmf-dist/doc/man/man1/ot2kpx.man1.pdf b/Master/texmf-dist/doc/man/man1/ot2kpx.man1.pdf
index 151bac87df0..143d26672d3 100644
--- a/Master/texmf-dist/doc/man/man1/ot2kpx.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/ot2kpx.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/fontools/splitttc b/Master/texmf-dist/doc/support/fontools/splitttc
index 5c6d6037ec5..19c7781427f 100755
--- a/Master/texmf-dist/doc/support/fontools/splitttc
+++ b/Master/texmf-dist/doc/support/fontools/splitttc
@@ -33,11 +33,12 @@
use strict;
use warnings;
+use Encode;
use File::Basename;
use Getopt::Long;
use Pod::Usage;
-my $VERSION = "20200428";
+my $VERSION = "20200511";
parse_commandline();
@@ -47,8 +48,7 @@ use constant {
};
my $filename_in = $ARGV[0];
-my ($basename_out, undef, undef) = fileparse($filename_in, qw(.ttc .otc));
-my $output_prefix = $ARGV{output_prefix} // $basename_out;
+my ($basename, undef, undef) = fileparse($filename_in, qw(.ttc .otc));
open my $fh, '<:raw', $filename_in
or die "[ERROR] cannot open $filename_in: $!";
@@ -79,7 +79,7 @@ for my $i_font (1..$num_fonts) {
: $sfnt_version eq "\x00\x01\x00\x00" ? 'ttf'
: die
;
- my $filename_out = sprintf "%s%d.%s", $output_prefix, $i_font, $file_ext;
+ my $filename_out = sprintf "%s%d.%s", $basename, $i_font, $file_ext;
# unpack Table Records and create list of tables
my $table_records
@@ -108,6 +108,13 @@ for my $i_font (1..$num_fonts) {
for my $table_record (@table_records) {
$table_record->{offset} = $file_pos;
$file_pos += length $table_record->{table};
+
+ if ($table_record->{table_tag} eq 'name') {
+ my $postscript_name = get_postscript_name($table_record->{table});
+ if ($postscript_name) {
+ $filename_out = $postscript_name . q(.) . $file_ext;
+ }
+ }
}
open my $filehandle_out, '>:raw', $filename_out
@@ -126,9 +133,10 @@ for my $i_font (1..$num_fonts) {
or die "[ERROR] something went wrong when closing $filename_out: $!";
}
-#-----------------------------------------------------------------------
-# Read the command-line options
-#-----------------------------------------------------------------------
+
+# --------------------------------------------------------------------------
+# Reads the command-line options.
+# --------------------------------------------------------------------------
sub parse_commandline {
Getopt::Long::GetOptions(
'help|?' => sub { pod2usage(-verbose => 1) },
@@ -143,6 +151,53 @@ sub parse_commandline {
}
+# --------------------------------------------------------------------------
+# Parses the 'name' table and returns the font's PostScript name.
+# --------------------------------------------------------------------------
+sub get_postscript_name {
+ my $name_table = shift;
+
+ my ($version, $count, $string_offset) = unpack '@0n3', $name_table;
+ if ($version > 1) {
+ # Don't try to parse future versions
+ return;
+ }
+
+ my @name_records = unpack "\@6(a12)$count", $name_table;
+ for my $name_record (@name_records) {
+ my ($platform_id, $encoding_id, $language_id,
+ $name_id, $length, $offset) = unpack 'n6', $name_record;
+
+ if ($name_id != 6) {
+ next;
+ }
+
+ my $postscript_data
+ = substr $name_table, $string_offset + $offset, $length;
+ my $postscript_name;
+ if ($platform_id == 3
+ and $encoding_id == 1
+ and $language_id == 0x409) {
+ $postscript_name = Encode::decode('UTF-16BE', $postscript_data);
+ }
+ elsif ($platform_id == 1
+ and $encoding_id == 0
+ and $language_id == 0) {
+ $postscript_name = Encode::decode('MacRoman', $postscript_data);
+ }
+ else {
+ # According to the 'Recommendations' in the OpenType spec,
+ # any PostScript names other than the above two may be ignored.
+ next;
+ }
+
+ return $postscript_name;
+ }
+
+ return;
+}
+
+
__END__
@@ -166,7 +221,6 @@ splitttc - split an OpenType Collection F<ttc> or F<otc> file
=item B<splitttc>
[B<-help>]
[B<-version>]
-[B<-output-prefix>=I<< <prefix> >>]
B<< <ttc-or-otc-file> >>
=back
@@ -187,6 +241,7 @@ cannot handle such OpenType Collections; they only work for individual fonts.
B<splitttc> takes an OpenType Collection file
and splits it into its constituent parts.
+
=head1 OPTIONS AND ARGUMENTS
=over 4
@@ -199,12 +254,6 @@ Print a short description of the syntax and exit.
Print version number and exit.
-=item B<-output-prefix>=I<< <prefix> >>
-
-Write the individual fonts to files named I<< <prefix> >>1.ttf,
-I<< <prefix> >>2.ttf etc.
-The default is to take the prefix from the filename of the input file.
-
=item B<< <ttc-or-otc-file> >>
The F<ttc> or F<otc> file to be split.
@@ -215,6 +264,15 @@ You may use either one or two dashes before options,
and option names may be shortened to a unique prefix.
+=head1 OUTPUT
+
+B<splitttc> tries to determine the 'PostScript name' of the resulting fonts
+and uses this to name the output files.
+If it cannot determine the PostScript name, it uses the basename of the input
+font collection file plus a three-digit sequence number:
+F<<< I<< <input> >> 001.otf >>>, F<<< I<< <input> >> 002.otf >>> etc.
+
+
=head1 AUTHOR
Marc Penninga <marcpenninga@gmail.com>
@@ -245,7 +303,7 @@ See the GNU General Public License for more details.
=head1 VERSION
-This document describes B<splitttc> version 20200428.
+This document describes B<splitttc> version 20200511.
=head1 RECENT CHANGES
@@ -254,16 +312,13 @@ This document describes B<splitttc> version 20200428.
=over 12
-=item I<2019-06-25>
-
-First release.
-
-=back
+=item I<2020-05-11>
+Use the 'PostScript name' to name the output fonts.
-=begin Really_old_history
+=item I<2019-06-25>
-=over 12
+First release.
=back