hyphen appears twice in 8r.etx (fontinst 1.91)

Lars Hellström Lars.Hellstrom@math.umu.se
Wed, 27 Mar 2002 17:49:33 +0100


At 16.32 +0100 2002-03-27, Walter Schmidt wrote:
>On Wed, 27 Mar 2002 14:36:36 +0100, Lars Hellström wrote:
>
>>Modifying the ETX
>>to make the lower hyphen dominant is straightforward, though.
>
>Ok, I have changed the code back to what we had in fontinst 1.8,
>where the upper hyphen is named `alternate-hyphen'.

I was rather thinking about moving the upper \setslot{hyphen} so that it
appears before the lower \setslot{hyphen}.

>Actually,
>there is no urgent need to do so, but I think it's just safer.
>Strangely, fontinst issues a warning now:
>
>  Warning: \ligature for unknown slot `alternate-hyphen'.
>
>This did not happen with fontinst 1.8.  The rsulting VF's seem
>to be ok.

The VFs should be OK, but I suspect you will find that the alternate-hyphen
is missing from the ligful PL. If you reintroduce alternate-hyphen in
8r.etx you have to reintroduce it in 8r.mtx as well (where it was
\setglyph{alternate-hyphen} \glyph{hyphen}{1000} \endsetglyph, but that is
really a hack since \installrawfont doesn't care about how a glyph is made).

If you're into that much editing of 8r.etx, you should probably also redo
most of the \ifisint{typewriter} stuff. I didn't understand how that
concept should be used when I wrote that stuff, and I haven't found the
energy to correct it any time afterwards. I did update the relevant part in
fisource.tex with what I learnt though, so I have included that below.
(This is not on CTAN, not yet anyway, but I know it really should be.)

Lars Hellström


\subsection{On verbatim, typewriter, and monowidth fonts}

The verbatim, typewriter, and monowidth concepts are common sources
of confusion for those who use \package{fontinst} to install fonts
with \AllTeX;\footnote{Myself \emph{not} excepted. /LH} in particular
there are many misconceptions about the relation between them. The
official view (of which not much has actually been brought forward)
is that these concepts are really about three quite different things.

A font is a \emph{monowidth} (monospaced, fixed-pitch) font if all
glyphs in it have exactly the same width. Some font formats make
special provisions for such fonts; the most notable example is the
AFM format, where a single \texttt{CharWidth} keyword specifies the
width for all glyphs in the font. \package{fontinst} responds to this
by including the command
\begin{quote}
  |\setint{monowidth}{1}|
\end{quote}
in the MTX file generated from an AFM, but that is everything that is
hard-wired into the program. That a font is monowidth is however
something that one should take note of when installing it for \TeX,
as it means many of the glyphs in it have such a strange appearance
that they are (pretty much) useless. The \texttt{endash} is for
example usually only half as long as the \texttt{hyphen} and the
letters in ligature glyphs are only half as wide as normal letters.
Many of the ETX and MTX files that come with \package{fontinst}
contain special commands to avoid making use of such degenerate
glyphs.

That a font is a \emph{typewriter} font really only means that it has
a typewriterish look about it. The two most familiar typewriter fonts
are probably Computer Modern Typewriter (\texttt{cmtt}) and Courier.
Both of these fonts are monowidth, but there is no absolute rule about
this. One of the standard \TeX\ fonts is for example Computer Modern
Variable-width Typewriter (\texttt{cmvtt}), which is not a monowidth
font, as Figure~\ref{Fig:TTvsVTT} shows.
\begin{figure}
  \begin{tabular}{ll}
    \texttt{cmtt}:& \fontfamily{cmtt}\selectfont
      The quick brown fox jumps over the lazy dog.\\
    \texttt{cmvtt}:& \fontfamily{cmvtt}\selectfont
      The quick brown fox jumps over the lazy dog.
  \end{tabular}
  \caption{Two typewriter fonts}
  \label{Fig:TTvsVTT}
\end{figure}

The verbatim concept has very little to do with fonts at all; in
\LaTeX\ it is considered to be a property of the environment
(\texttt{verbatim}, \texttt{macrocode}, etc.) rather than a property
of the font. The connection there is with fonts is that the encoding
of the font must contain visible ASCII (as defined in Appendix~C
of \emph{The \TeX book}~\cite{TeXbook}) as a subset for the text to
be rendered correctly. The \texttt{cmtt} family is the only one amongst
the original Computer Modern fonts which meets this criterium and
that is the primary grounds for the idea that these three concepts
should be connected. Today that reason is at best a very weak one, as
all \texttt{T1}-encoded fonts also meet the criterium of containing
visible ASCII as a subset.

A circumstance which has probably added to the confusion is that
\texttt{OT1} is usually claimed to be a single encoding. In reality
the Computer Modern fonts that are declared in \LaTeX\ as being
\texttt{OT1} display as many as five different encodings, as shown in
Table~\ref{Tab:OT1-fonts}.
\begin{table}
  \begin{tabular}{lccc}
    & \texttt{TEX TEXT}&
      \begin{tabular}[b]{c}\texttt{TEX TEXT WITHOUT}\\
        \texttt{F-LIGATURES}\end{tabular}&
      \texttt{TEX TYPEWRITER TEXT}\\
      \noalign{\medskip}
    non-italic&
      \begin{tabular}{l}
        \texttt{cmb10}\\
        \texttt{cmbx5}--\texttt{12}\\
        \texttt{cmbxsl10}\\
        \texttt{cmdunh10}\\
        \texttt{cmff10}\\
        \texttt{cmfib8}\\
        \texttt{cmr6}--\texttt{17}\\
        \texttt{cmsl8}--\texttt{12}\\
        \texttt{cmss8}--\texttt{17}\\
        \texttt{cmssbx10}\\
        \texttt{cmssdc10}\\
        \texttt{cmssi8}--\texttt{17}\\
        \texttt{cmssq8}\\
        \texttt{cmssqi8}\\
        \texttt{cmvtt10}
      \end{tabular}&
      \begin{tabular}{l}
        \texttt{cmcsc8}--\texttt{10}\\
        \texttt{cmr5}
      \end{tabular}&
      \begin{tabular}{l}
        \texttt{cmsltt10}\\
        \texttt{cmtcsc10}\\
        \texttt{cmtt8}--\texttt{12}
      \end{tabular}\\
      \noalign{\medskip}
    italic&
      \begin{tabular}{l}
        \texttt{cmbxti10}\\
        \texttt{cmfi10}\\
        \texttt{cmti7}--\texttt{12}\\
        \texttt{cmu10}
      \end{tabular}&&
      \begin{tabular}{l}
        \texttt{cmitt10}
      \end{tabular}
  \end{tabular}
  \caption{``\texttt{OT1}-encoded'' Computer Modern fonts, collected
    according to the actual font encoding}
  \label{Tab:OT1-fonts}
\end{table}
Since most monowidth fonts are only used for setting verbatim text,
there is some code in \texttt{ot1.etx} which automatically chooses a
\texttt{TEX TYPEWRITER TEXT} encoding for the font when the
\texttt{monowidth} integer is set. The only reason for this is the
guess that this is what the user wanted. There is no reason for other
ETX files to do anything similar.