summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/fontinst/base/fimapgen.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/fontinst/base/fimapgen.dtx')
-rw-r--r--Master/texmf-dist/source/fontinst/base/fimapgen.dtx100
1 files changed, 82 insertions, 18 deletions
diff --git a/Master/texmf-dist/source/fontinst/base/fimapgen.dtx b/Master/texmf-dist/source/fontinst/base/fimapgen.dtx
index fccdf30b5e2..0ebd1fe7d78 100644
--- a/Master/texmf-dist/source/fontinst/base/fimapgen.dtx
+++ b/Master/texmf-dist/source/fontinst/base/fimapgen.dtx
@@ -1,4 +1,4 @@
-% \CheckSum{876}
+% \CheckSum{916}
% \iffalse meta-comment
%
% Copyright 1999 the fontinst maintenance team and any individual
@@ -95,10 +95,10 @@
% \end{quote}
% The only real difference between |\fromafm| and |\frompl| at this
% stage is that the former specifies the PS name of the font, but the
-% latter do not. If you write a |\store|\-|map|\-|data| command yourself
+% latter does not. If you write a |\store|\-|map|\-|data| command yourself
% and want to supply the PS name then you should use |\fromafm| even if
% you took the font metrics from a PL.
-% There is a important difference between |\fromvpl| and the first three
+% There is an important difference between |\fromvpl| and the first three
% in that virtual fonts need no map file entry (and hence there should
% not be any either). Besides some error checking, |\fromvpl| causes a
% |\makemapentry| to do essentially nothing.
@@ -829,10 +829,11 @@
% \end{quote}
% \meta{postscript name} is the name by which the encoding is known to
% the postscript interpreter, and \meta{action} lists any additional
-% action that must be taken before the encoding can be used. So far the
-% only action known is \DescribeMacro{\download}|\download|\marg{file},
-% which will cause code for downloading the file by the name \meta{file}
-% (suffix included) to be inserted in the output.
+% action that must be taken before the encoding can be used.
+% ^^A So far the only actions known is
+% ^^A \DescribeMacro{\download}|\download|\marg{file},
+% ^^A which will cause code for downloading the file by the name
+% ^^A \meta{file} (suffix included) to be inserted in the output.
%
% \begin{macro}{\declarepsencoding}
% Data is entered in a |\pse-|\meta{etx} macro using the
@@ -842,6 +843,38 @@
% \end{quote}
% \begin{macrocode}
\def\declarepsencoding#1#2#3{\x_cs\gdef{pse-#1}{{#2}{#3}}}
+%</map>
+% \end{macrocode}
+% In main \package{fontinst}, |\declarepsencoding| should be a noop so
+% that it can appear in encoding files. It's probably a good idea to
+% show it when typesetting as well.
+% \changes{1.931}{2005/05/13}{Added main \package{fontinst} and
+% \package{fontdoc} definitions. (LH)}
+% \begin{macrocode}
+%<pkg>\let\declarepsencoding=\gobble_three
+%<*doc>
+\def\declarepsencoding#1#2#3{\comment{%
+ This file corresponds to the \FD@typeset@string{#2} encoding vector.}}
+%</doc>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\providepsencoding}
+% This command is basically the same as |\declarepsencoding|, but it
+% checks whether the encoding has already been set and does nothing
+% if that is the case. It is used for autogenerated declarations, to
+% allow the user to override the setting.
+% \changes{1.931}{2005/05/13}{Command added. (LH)}
+% \begin{macrocode}
+%<*map>
+\def\providepsencoding#1#2#3{
+ \if_undefined{pse-#1}\then
+ \declarepsencoding{#1}{#2}{#3}
+ \fi
+}
+%</map>
+%<pkg>\let\providepsencoding=\gobble_three
+%<doc>\newcommand\providepsencoding[3]{}
% \end{macrocode}
% \end{macro}
%
@@ -849,6 +882,7 @@
% By default |\download| gobbles its argument. It should be redefined
% when that is not the desired effect.
% \begin{macrocode}
+%<*map>
\let\download=\gobble_one
% \end{macrocode}
% \end{macro}
@@ -863,9 +897,19 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\encodingdownload}
+% By default this defaults to being a synonym of |\download|, to
+% simplify matters for drivers where the distinction is not relevant.
+% They should be redefined when that is not the desired effect.
+% \changes{1.931}{2005/05/04}{Command added. (LH)}
+% \begin{macrocode}
+\def\encodingdownload#1{\download{#1}}
+% \end{macrocode}
+% \end{macro}
+%
% Some encodings seem to always be present, so they can be declared here.
% \begin{macrocode}
-\declarepsencoding{8r}{TeXBase1Encoding}{\download{8r.enc}}
+\declarepsencoding{8r}{TeXBase1Encoding}{\encodingdownload{8r.enc}}
\declarepsencoding{8a}{StandardEncoding}{}
% \end{macrocode}
% \package{fontinst} must be told about other postscript encodings (if you
@@ -924,6 +968,12 @@
% | \download{MinionMM.pfb}\download{zmnl8ac6.pro}%|\\
% |}|
% \end{quote}
+% (It should probably be remarked that the most common method of
+% defining a multiple master font instance is not to explicitly
+% create it as in this example, but to simply use it as any ordinary
+% PS font and then rely on the PS \textsf{findfont} operator to
+% automagically create it for you. This requires using a special
+% naming scheme for instances of multiple master fonts.)
% \item Fonts which do not fit any of the general naming schemes.
% \end{itemize}
%
@@ -1299,19 +1349,27 @@
% \begin{macro}{\append_download}
% The |\downloads_list| is a token list register which is especially
% used for accumulating |\download| commands. Each driver maker which
-% uses it should begin by emptying it.
+% uses it should begin by emptying it. The command
% \begin{quote}
-% |\append_download|\marg{arg}
+% |\append_download|\marg{cseq}\marg{string expression}
% \end{quote}
+% \changes{1.931}{2005/05/10}{New syntax (two arguments)! The second
+% is expanded, whereas the first is protected by a \cs{noexpand}.
+% (LH)}
% appends
% \begin{quote}
-% |\download|\marg{arg}
+% \meta{cseq}\marg{expanded string expression}
% \end{quote}
-% to |\downloads_list|.
+% to |\downloads_list|. It overwrites |\a_macro|.
% \begin{macrocode}
\newtoks\downloads_list
-\def\append_download#1{
- \downloads_list=\expandafter{ \the\downloads_list \download{#1} }
+\def\append_download#1#2{
+ \edef\a_macro{
+ \downloads_list =
+ \noexpand\expandafter{ \noexpand\the \downloads_list
+ \noexpand#1 {#2} }
+ }
+ \a_macro
}
% \end{macrocode}
% \end{macro}\end{macro}
@@ -1323,13 +1381,17 @@
% mapfile entry is on one line, the entire entry is written at once.
% The \meta{font transformations} is collected as explicit text in the
% macro |\postscript_code|. The \meta{downloads} is collected as a
-% sequence of |\download| commands in the |\downloads_list| token
-% register.
+% sequence of |\|\dots|download| commands in the |\downloads_list|
+% token register.
+% \changes{1.931}{2005/05/10}{Supporting \cs{fulldownload} and
+% \cs{encodingdownload}. (LH)}
% \begin{macrocode}
\def\make_dvips{
\downloads_list={}
\let\postscript_code\empty_command
- \let\download\append_download
+ \def\download{\append_download\download}
+ \def\fulldownload{\append_download\fulldownload}
+ \def\encodingdownload{\append_download\encodingdownload}
\ifx \reencode_etx\empty_command \else
\if_undefined{pse-\reencode_etx}\then
\etxtoenc{\reencode_etx}{\reencode_etx}
@@ -1377,7 +1439,7 @@
\fi\fi
\if_a_
\ifx \PS_font_file\unknown_str \get_PS_font_file \fi
- \append_download{\PS_font_file}
+ \append_download\download{\PS_font_file}
\ifx \PS_font_file\clueless_str
\includewarning\warn_undecided_data
\fi
@@ -1390,6 +1452,8 @@
% expanding the |\the| with an |\expandafter|.
% \begin{macrocode}
\def\download##1{~<##1}
+ \def\fulldownload##1{~<<##1}
+ \def\encodingdownload##1{~<[##1}
\pout_line\output_dvips{
\TeX_font_name\space\PS_font_name
\expandafter\empty_command \the\downloads_list