diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/relenc/t1rzcm.fdd')
-rw-r--r-- | Master/texmf-dist/source/latex/relenc/t1rzcm.fdd | 273 |
1 files changed, 273 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/relenc/t1rzcm.fdd b/Master/texmf-dist/source/latex/relenc/t1rzcm.fdd new file mode 100644 index 00000000000..2be089ec314 --- /dev/null +++ b/Master/texmf-dist/source/latex/relenc/t1rzcm.fdd @@ -0,0 +1,273 @@ +%% \CheckSum{26} +% \iffalse (Comment) +% This file contains a breif description of the T1R/zcm font family, +% the code for its font definition file, and the code the ecsubzcm +% package. +% \fi +% +% \iffalse (Skip the driver code when DocInputting.) +% (The driver code is still enclosed in a macrocode environment, just +% in case.) +% \begin{macrocode} +%<*driver> +\documentclass{ltxdoc} +\newcommand\package[1]{\textsf{#1}} +\title{The \texttt{zcm} example font family} +\author{Lars Hellstr\"om% + \thanks{E-mail: \texttt{Lars.Hellstrom@math.umu.se}}% +} +\begin{document} +\maketitle +\DocInput{t1rzcm.fdd}\Finale +\begin{thebibliography}{9} +\bibitem{ltoutenc} + Johannes Braams, David Carlisle, Alan Jeffrey, Frank Mittelbach, + Chris Rowley, Rainer Sch\"opf: \texttt{ltoutenc.dtx} (part of the + \LaTeXe\ base distribution). +\end{thebibliography} +\end{document} +%</driver> +% \end{macrocode} +% \fi +% +% \section{The \texttt{zcm} font family and \texttt{reldemo.tex}} +% \label{zcm-family} +% % +% The \texttt{zcm} family of fonts consists of only two fonts and it is +% meant to accompany the \package{relenc} package documentation. These +% fonts are really just combinations of glyphs taken from other fonts, +% primarily the Computer Modern fonts (hence the \texttt{cm}), but +% there are also some glyphs which are taken from some \LaTeX\ symbol +% fonts (\texttt{lasy10} and \texttt{lcircle10}). +% +% The primary reason these fonts exist is that I felt I needed an example +% of what can be done with the \package{relenc} package. As one really +% cannot expect that people will have any font that is not either a +% Computer Modern or a \LaTeX\ font, such an example has to be made +% using these fonts. I am well aware that some of the glyphs look +% terrible, but the \texttt{zcm} family is not intended to be used +% for any serious typesetting. +% +% The font family consists of two fonts: \texttt{zcmr8d} and +% \texttt{zcmra}. The first of these is declared as +% \texttt{T1R}\slash\texttt{zcm}\slash\texttt{m}\slash\texttt{n} and its +% coding scheme is identical to that of the \texttt{T1} encoding. The +% second is declared as \texttt{T1R}\slash\texttt{zcm}\slash +% \texttt{m}\slash\texttt{a} and its coding scheme deviates from that of +% the \texttt{T1} encoding in four slots, which have been reassigned to +% contain ligatures instead of accented letters. +% +% A demonstration of these fonts is generated by typesetting +% \texttt{reldemo.tex}; this document contains a font table listing the +% contents of each slot, a demonstration of all the symbol commands, a +% demonstration of the effects of applying the accenting commands to the +% non-accented letters, and a comprehensive list of character pairs, for +% both fonts. The reason I have put it in a separate file is (i) that +% the \package{relenc} package will have to be installed before these +% fonts can be viewed (the files needed are \texttt{relenc.sty}, +% \texttt{t1renc.def}, and \texttt{t1rzcm.fd}) and (ii) that there +% might be some problems connected to viewing these fonts. +% +% To begin with, both fonts are virtual fonts and some DVI drivers cannot +% handle these. If you only have such drivers, you should get one that +% can (not just for the sake of the \package{relenc} package---virtual +% fonts are in general neat to be able to use). +% +% One of the fonts used to make these virtaul fonts---the +% \texttt{lcircle10} font---occurs under two other names as well: +% \texttt{circle10} and \texttt{lcirc10}. Unfortunately, one cannot +% expect that there is more than one of these in any given \TeX\ ^^A +% installation. Thus you will get some problems if your installation +% uses another name for this font. Some DVI drivers will translate the +% name used in the virtual font to that of the font names which actually +% occurs in the system, and in this case there is no problem, but if not +% then you will have to intervene yourself. +% +% The easiest way to do this is simply to rename a few virtual font +% files, since there are such files accompanying the \package{relenc} +% package for using the \texttt{lcircle10} font under any one of these +% names. What you have to see too is that the ones which use the font +% under the name on your system are the ones which are named +% \texttt{zcmr8d.vf} and \texttt{zcmra.vf} respectively. The following +% table shows what the file names are and which font it uses +% $$ +% \mbox{^^A +% \begin{tabular}{cc} +% Virtual font file& \texttt{lcircle10} name used^^A +% \\[-0.9\ht\strutbox] +% \hrulefill&\hrulefill\\ +% \texttt{zcmr8d.vf}& \texttt{lcricle10}\\ +% \texttt{zcmra.vf}& \texttt{lcricle10}\\ +% \texttt{zcmr8d.vf2}& \texttt{cricle10}\\ +% \texttt{zcmra.vf2}& \texttt{cricle10}\\ +% \texttt{zcmr8d.vf3}& \texttt{lcric10}\\ +% \texttt{zcmra.vf3}& \texttt{lcric10} +% \end{tabular}^^A +% } +% $$ +% Note that all the above files are virtual font files. The reason +% only two have been given the correct suffix \texttt{.vf} is that there +% really are no more than two fonts, so they should not take up any more +% font name space than that either. +% +% Finally, there is one other use for the \texttt{T1R}\slash +% \texttt{zcm}\slash\texttt{m}\slash\texttt{n} font---it is the final +% substitution font in the \texttt{T1R} encoding. \LaTeX\ requires that +% there is such a font, so it might as well be this one. This means that +% you should see to that the files which are this font (\texttt{zcmr8d.tfm} +% and \texttt{zcmr8d.vf}) are put in such locations that \TeX\ and its +% helper programs (DVI drivers etc.) will find them if they are needed. +% You should not need to move them before you typeset \texttt{reldemo.tex} +% for the first time, however, as these fonts are initially in the same +% directory as this and \TeX\ looks for files there first. +% +% If you do have the \texttt{ec} family of fonts however, you may (quite +% understandably) want to use one of them as final substitution font for +% the \texttt{T1R} encoding instead. There is a package called +% \package{ecsubzcm} that is installed with \package{relenc}. This +% package declares the \texttt{zcm} family in encoding \texttt{T1R} and +% \texttt{ecrm1000} under the encoding\slash family\slash series\slash +% shape combination \texttt{T1R}\slash\texttt{zcm}\slash\texttt{m}\slash +% \texttt{n}. After loading this package, \LaTeX\ will not bother to +% input the font definition file \texttt{t1rzcm.fd}, so the ``real'' +% \texttt{zcm} fonts will not get involved. +% +% \section{Implementation} +% \subsection{Font definition file} +% +% \StopEventually{} +% +% As is the custom, the file starts by announcing itself. +% \begin{macrocode} +%<*fd> +\ProvidesFile{t1rzcm.fd}[1999/01/19 Font definitions for T1R/zcm.] +% \end{macrocode} +% +% Then the family is declared. So far, there is nothing out of the +% ordinary. +% \begin{macrocode} +\DeclareFontFamily{T1R}{zcm}{} +% \end{macrocode} +% +% Next the shapes are declared. There is nothing strange about this +% either. +% \begin{macrocode} +\DeclareFontShape{T1R}{zcm}{m}{n}{ + <-> zcmr8d +}{} +% \end{macrocode} +% \begin{macrocode} +\DeclareFontShape{T1R}{zcm}{m}{a}{ + <-> zcmra +}{} +% \end{macrocode} +% +% That would be all in a normal font definition file. This file does +% however go on with defining some variants of commands and +% compositions, to compensate for the differences between the coding +% scheme of the \texttt{zcmra} font and the default coding scheme. +% +% Slot number 128 is used for a ligature instead of the default `\u{A}', +% so this has to be compensated for. In this case it is done by making +% another default definition of the |\u| command and defining all the +% other compositions of that command again. +% \begin{macrocode} +\DefineTextAccentVariant{\u}{T1R}{zcm}{}{a}{8} +\DefineTextVariantComposition{\u}{T1R}{zcm}{}{a}{G}{135} +\DefineTextVariantComposition{\u}{T1R}{zcm}{}{a}{a}{160} +\DefineTextVariantComposition{\u}{T1R}{zcm}{}{a}{g}{167} +% \end{macrocode} +% It should be noted at this point that this font definition file is +% not set up in the most efficient way. Normally, one would want to +% minimize the number of variants that needs to be defined---something +% which the above most certainly does not do---and one often achieves +% this by trying to affect as few accenting commands as possible. The +% four extra ligatures of the \texttt{zcmra} font could have been put in +% slots 128, 135, 160, and 167---that would have made it possible to +% get by with the single variant definition +%\begin{verbatim} +% \DefineTextAccentVariant{\u}{T1R}{zcm}{}{a}{8} +%\end{verbatim} +% although a font designer who frequently use the |\u| command will +% probably prefer to use slots for compositions of some other +% command---but \texttt{zcmra} has been set up more to show what is +% possible than what is optimal. +% +% The same problem occurs with slot 131, which does not contain the +% `\v{C}' glyph that the encoding-level composition of |\v| with |C| +% assumes it does. Another solution to the problem is to give an +% explicit definition of the composition at a lower level, as in +% \begin{macrocode} +\DefineTextVariantCompositionCommand{\v}{T1R}{zcm}{}{a}{C}{% + \add@accent{7}{C}% +} +% \end{macrocode} +% |\add@accent| is standard \LaTeX\ and its definition can be found +% in~\cite{ltoutenc}. This solution gets by using only two variants (the +% \texttt{T1R}\slash\texttt{zcm}\slash\texttt{?}\slash\texttt{a} variant +% of |\v|, and the compositon of that variant with |C|). Had instead +% the first solution been used here, it would have required the code +%\begin{verbatim} +%\DefineTextAccentVariant{\v}{T1R}{zcm}{}{a}{7} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{D}{132} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{E}{133} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{L}{137} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{N}{140} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{R}{144} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{S}{146} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{T}{148} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{Z}{154} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{c}{163} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{d}{164} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{e}{165} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{l}{169} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{n}{172} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{r}{176} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{s}{178} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{t}{180} +%\DefineTextVariantComposition{\v}{T1R}{zcm}{}{a}{z}{186} +%\end{verbatim} +% which defines another 18 control sequences. The |\v| command sure has +% many compositions, hasn't it? +% +% Things are a bit different when the slot is used for a variant of a +% composition, instead of a composition of a variant. In the former case, +% there is a special command that can be used to extract the default +% definition of the accenting command. +% \begin{macrocode} +\DefineTextUncomposedVariant{\'}{T1R}{zcm}{}{a}{C} +% \end{macrocode} +% +% Finally, another example like |\v|. +% \begin{macrocode} +\DefineTextVariantCompositionCommand{\k}{T1R}{zcm}{}{a}{a}% + {a\llap{\char12\kern-0.07em}} +%</fd> +% \end{macrocode} +% This definition demonstrates that there is absolutely no need to base +% the definition of a composition on the default definition; using that +% in this case would (i) be much longer, (ii) be unstable, as the default +% definition of |\k| positions the accent incorrectly if not both the +% height of the accent and the depth of the letter is zero or less, +% and (iii) probably not kern particularly good (at least this definition +% kerns like `a' to the left, the default does not kern at all). +% +% +% \subsection{The \package{ecsubzcm} package} +% +% \begin{macrocode} +%<*package> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{ecsubzcm}[1999/01/19] +% \end{macrocode} +% \begin{macrocode} +\DeclareFontFamily{T1R}{zcm}{} +% \end{macrocode} +% \begin{macrocode} +\DeclareFontShape{T1R}{zcm}{m}{n}{ + <-> ecrm1000 +}{} +%</package> +% \end{macrocode} +\endinput + |