%%% ====================================================================
%%%  @TeX-font-metrics-file{
%%%     author          = "Alan Jeffrey and Ulrik Vieth and
%%%                        Lars Hellstr{\"o}m",
%%%     version         = "1.923",
%%%     date            = "2003-03-29",
%%%     time            = "01:24:47 +01:00",
%%%     filename        = "llbuild.mtx",
%%%     email           = "fontinst@tug.org",
%%%     URL             = "http://www.tug.org/applications/fontinst/",
%%%     checksum        = "",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "metrics, TeX, PostScript",
%%%     supported       = "yes",
%%%     abstract        = "This is a font metrics file, for use with the
%%%                        fontinst utility. It builds upper case latin
%%%                        letters.",
%%%     package         = "fontinst",
%%%     dependencies    = "fontinst.sty, fontdoc.sty",
%%%  }
%%% ====================================================================

\relax

\documentclass[twocolumn]{article}

\usepackage{fontdoc}[2002/03/01]
\showbranches

\title{Building lower case}
\author{Alan Jeffrey\and Ulrik Vieth\and Lars Hellstr\"om}
\date{5 January 2002\\Version 1.923}

\begin{document}
\maketitle

\section{Introduction}

This file builds lower case (small, \texttt{l} case) latin letters, 
or more precisely, it makes sure that a set of glyphs is defined that 
cover the lower case letters used in European latin scripts. 
Even that is a slight exaggeration, because there are a couple of 
``exotic'' letters that are missing, but most people never try to use 
those anyway.

For the glyphs set in this file to look anything like the letters they 
are supposed to be, it is necessary that the glyphs for unaccented 
letters and for accents already exist and look like they are supposed 
to. In that case, the commands below will manufacture decent 
substitutes for the missing glyphs by composing letters and accents. 
If some of these base glyphs are missing, then a ``missing glyph'' 
substitute will be supplied for them. Such substitutes will show up in 
print as black squares, and most DVI drivers will emit a warning when 
producing them.

The most common case encountered is that almost all unaccented letters 
and accents are available, but only about half of the accented 
letters. Then for the other half, quite decent substitutes are made, 
but a few letters only show up as ``missing glyph'' boxes. 


\metrics

\needsfontinstversion{1.910}
\usemtxpackage{ltcmds}

\ProvidesMtxPackage{llbuild}

\begincomment
\section{Lower case base glyphs}

\subsection{Unfakable glyphs}

The following commands make sure all the unaccented letter glyphs and 
accent glyphs are set. If any of them are not already set at this 
point, then those will be set to ``missing glyph'' boxes.
\endcomment

\unfakable{a}
\unfakable{ae}
\unfakable{b}
\unfakable{c}
\unfakable{d}
\unfakable{dotlessi}
\unfakable{e}
\unfakable{eng}
\unfakable{eth}
\unfakable{f}
\unfakable{g}
\unfakable{germandbls}
\unfakable{h}
\unfakable{i}
\unfakable{j}
\unfakable{k}
\unfakable{l}
\unfakable{m}
\unfakable{n}
\unfakable{o}
\unfakable{oe}
\unfakable{oslash}
\unfakable{p}
\unfakable{q}
\unfakable{r}
\unfakable{s}
\unfakable{t}
\unfakable{thorn}
\unfakable{u}
\unfakable{v}
\unfakable{w}
\unfakable{x}
\unfakable{y}
\unfakable{z}


\unfakabletopaccent{acute}
\unfakabletopaccent{breve}
\unfakabletopaccent{caron}
\unfakable{cedilla}
\unfakabletopaccent{circumflex}
\unfakabletopaccent{dieresis}
\unfakabletopaccent{dotaccent}
\unfakabletopaccent{grave}
\unfakabletopaccent{hungarumlaut}
\unfakable{lslashslash}
\unfakabletopaccent{macron}
\unfakable{ogonek}
\unfakabletopaccent{quoteright}
\unfakabletopaccent{ring}
\unfakabletopaccent{tilde}

\begincomment
\subsection{Fakable lower case glyphs}
\endcomment

\ifisglyph{dcroat}\then
   \setglyph{dbar}
      \glyph{dcroat}{1000}
   \endsetglyph
\Else
   \setglyph{dbar}
      \push
         \movert{\sub{\width{d}}{\width{macron}}}
         \moveup{
            \sub{\half{\add{\height{d}}{\int{xheight}}}}
                {\height{macron}}}
         \glyph{macron}{1000}
      \pop
      \glyph{d}{1000}
   \endsetglyph
\Fi
\setleftrightkerning{dbar}{d}{1000}

\setglyph{dotlessj}
   \glyph{j}{1000}
   \resetheight{\int{xheight}}
   \comment{The reason \texttt{dotlessj} \emph{can} be faked using a 
     \texttt{j} is that it is not a distinct character. Unlike 
     \texttt{dotlessi}, which is in Turkish a letter distinct from 
     \texttt{i}, the only thing \texttt{dotlessj} is ever used for is 
     as the base glyph for accented j's.}
\endsetglyph
\setleftrightkerning{dotlessj}{j}{1000}


\begincomment
\subsection{Aliased lower case glyphs}
\endcomment

\setglyph{ng}
   \glyph{eng}{1000}
\endsetglyph
\setleftkerning{ng}{n}{1000}
\setrightkerning{ng}{j}{1000}


\begincomment
\subsection{Some extra kerning}
\endcomment

\setleftkerning{oe}{o}{1000}
\setrightkerning{oe}{e}{1000}

\setleftrightkerning{oslash}{o}{1000}



\begincomment
\section{Accented lower case glyphs}
\endcomment

\setglyph{aacute}
   \topaccent{a}{acute}{500}
\endsetglyph
\setleftrightkerning{aacute}{a}{1000}

\setglyph{abreve}
   \topaccent{a}{breve}{500}
\endsetglyph
\setleftrightkerning{abreve}{a}{1000}

\setglyph{acircumflex}
   \topaccent{a}{circumflex}{500}
\endsetglyph
\setleftrightkerning{acircumflex}{a}{1000}

\setglyph{adieresis}
   \topaccent{a}{dieresis}{500}
\endsetglyph
\setleftrightkerning{adieresis}{a}{1000}

\setglyph{agrave}
   \topaccent{a}{grave}{500}
\endsetglyph
\setleftrightkerning{agrave}{a}{1000}

\setglyph{aogonek}
   \botaccent{a}{ogonek}{850}
\endsetglyph
\setleftrightkerning{aogonek}{a}{1000}

\setglyph{aring}
   \topaccent{a}{ring}{500}
\endsetglyph
\setleftrightkerning{aring}{a}{1000}

\setglyph{atilde}
   \topaccent{a}{tilde}{500}
\endsetglyph
\setleftrightkerning{atilde}{a}{1000}

\setglyph{cacute}
   \topaccent{c}{acute}{500}
\endsetglyph
\setleftrightkerning{cacute}{c}{1000}

\setglyph{ccaron}
   \topaccent{c}{caron}{500}
\endsetglyph
\setleftrightkerning{ccaron}{c}{1000}

\setglyph{ccedilla}
   \botaccent{c}{cedilla}{500}
\endsetglyph
\setleftrightkerning{ccedilla}{c}{1000}

\setglyph{dcaron}
   \glyph{d}{1000}
   \ifisint{monowidth}\then\Else
      \movert{-75}
   \Fi
   \glyph{quoteright}{1000}
\endsetglyph
\setleftkerning{dcaron}{d}{1000}

\setglyph{eacute}
   \topaccent{e}{acute}{500}
\endsetglyph
\setleftrightkerning{eacute}{e}{1000}

\setglyph{ecaron}
   \topaccent{e}{caron}{500}
\endsetglyph
\setleftrightkerning{ecaron}{e}{1000}

\setglyph{ecircumflex}
   \topaccent{e}{circumflex}{500}
\endsetglyph
\setleftrightkerning{ecircumflex}{e}{1000}

\setglyph{edieresis}
   \topaccent{e}{dieresis}{500}
\endsetglyph
\setleftrightkerning{edieresis}{e}{1000}

\setglyph{egrave}
   \topaccent{e}{grave}{500}
\endsetglyph
\setleftrightkerning{egrave}{e}{1000}

\setglyph{eogonek}
   \botaccent{e}{ogonek}{500}
\endsetglyph
\setleftrightkerning{eogonek}{e}{1000}

\setglyph{gbreve}
   \topaccent{g}{breve}{500}
\endsetglyph
\setleftrightkerning{gbreve}{g}{1000}

\setglyph{iacute}
   \topaccent{dotlessi}{acute}{500}
\endsetglyph
\setleftrightkerning{iacute}{i}{1000}

\setglyph{icircumflex}
   \topaccent{dotlessi}{circumflex}{500}
\endsetglyph
\setleftrightkerning{icircumflex}{i}{1000}

\setglyph{idieresis}
   \topaccent{dotlessi}{dieresis}{500}
\endsetglyph
\setleftrightkerning{idieresis}{i}{1000}

\setglyph{idotaccent}
   \comment{This should be the normal `\texttt{i}', except in 
      smallcaps fonts.}
   \ifnumber{\height{i}}>{\scale{\int{xheight}}{1050}}\then
      \comment{Some quick statistics showed that the height of an 
        `\texttt{i}' with dot is usually around 140\% of the 
        x-height, but to be on the safe side we assume all 
        \texttt{i}s whose height exceed 105\% of the x-height to 
        be dotted.}
      \glyph{i}{1000}
   \Else
      \topaccent{i}{dotaccent}{500}
   \Fi
\endsetglyph
\setleftrightkerning{idotaccent}{i}{1000}

\setglyph{igrave}
   \topaccent{dotlessi}{grave}{500}
\endsetglyph
\setleftrightkerning{igrave}{i}{1000}

\setglyph{lacute}
   \topaccent{l}{acute}{500}
\endsetglyph
\setleftrightkerning{lacute}{l}{1000}

\setglyph{lcaron}
   \glyph{l}{1000}
   \ifisint{monowidth}\then\Else
      \movert{-100}
   \Fi
   \glyph{quoteright}{1000}
\endsetglyph
\setleftkerning{lcaron}{l}{1000}

\setglyph{lslash}
   \glyph{lslashslash}{1000}
   \movert{\kerning{lslashslash}{l}}
   \glyph{l}{1000}
\endsetglyph
\comment{I'm not sure what this should kern like.}

\setglyph{nacute}
   \topaccent{n}{acute}{500}
\endsetglyph
\setleftrightkerning{nacute}{n}{1000}

\setglyph{ncaron}
   \topaccent{n}{caron}{500}
\endsetglyph
\setleftrightkerning{ncaron}{n}{1000}

\setglyph{ntilde}
   \topaccent{n}{tilde}{500}
\endsetglyph
\setleftrightkerning{ntilde}{n}{1000}

\setglyph{oacute}
   \topaccent{o}{acute}{500}
\endsetglyph
\setleftrightkerning{oacute}{o}{1000}

\setglyph{ocircumflex}
   \topaccent{o}{circumflex}{500}
\endsetglyph
\setleftrightkerning{ocircumflex}{o}{1000}

\setglyph{odieresis}
   \topaccent{o}{dieresis}{500}
\endsetglyph
\setleftrightkerning{odieresis}{o}{1000}

\setglyph{ograve}
   \topaccent{o}{grave}{500}
\endsetglyph
\setleftrightkerning{ograve}{o}{1000}

\setglyph{ohungarumlaut}
   \topaccent{o}{hungarumlaut}{500}
\endsetglyph
\setleftrightkerning{ohungarumlaut}{o}{1000}

\setglyph{otilde}
   \topaccent{o}{tilde}{500}
\endsetglyph
\setleftrightkerning{otilde}{o}{1000}

\setglyph{racute}
   \topaccent{r}{acute}{500}
\endsetglyph
\setleftrightkerning{racute}{r}{1000}

\setglyph{rcaron}
   \topaccent{r}{caron}{500}
\endsetglyph
\setleftrightkerning{rcaron}{r}{1000}

\setglyph{sacute}
   \topaccent{s}{acute}{500}
\endsetglyph
\setleftrightkerning{sacute}{s}{1000}

\setglyph{scaron}
   \topaccent{s}{caron}{500}
\endsetglyph
\setleftrightkerning{scaron}{s}{1000}

\setglyph{scedilla}
   \botaccent{s}{cedilla}{500}
\endsetglyph
\setleftrightkerning{scedilla}{s}{1000}

\setglyph{tcaron}
   \glyph{t}{1000}
   \ifisint{monowidth}\then\Else
      \movert{-75}
   \Fi
   \glyph{quoteright}{1000}
\endsetglyph
\setleftkerning{tcaron}{t}{1000}
\comment{I don't know what this should kern like on the right.}

\setglyph{tcedilla}
   \botaccent{t}{cedilla}{500}
\endsetglyph
\setleftrightkerning{tcedilla}{t}{1000}

\setglyph{ugrave}
   \topaccent{u}{grave}{500}
\endsetglyph
\setleftrightkerning{ugrave}{u}{1000}

\setglyph{uacute}
   \topaccent{u}{acute}{500}
\endsetglyph
\setleftrightkerning{uacute}{u}{1000}

\setglyph{ucircumflex}
   \topaccent{u}{circumflex}{500}
\endsetglyph
\setleftrightkerning{ucircumflex}{u}{1000}

\setglyph{udieresis}
   \topaccent{u}{dieresis}{500}
\endsetglyph
\setleftrightkerning{udieresis}{u}{1000}

\setglyph{uhungarumlaut}
   \topaccent{u}{hungarumlaut}{500}
\endsetglyph
\setleftrightkerning{uhungarumlaut}{u}{1000}

\setglyph{uring}
   \topaccent{u}{ring}{500}
\endsetglyph
\setleftrightkerning{uring}{u}{1000}

\setglyph{yacute}
   \topaccent{y}{acute}{500}
\endsetglyph
\setleftrightkerning{yacute}{y}{1000}

\setglyph{ydieresis}
   \topaccent{y}{dieresis}{500}
\endsetglyph
\setleftrightkerning{ydieresis}{y}{1000}

\setglyph{zacute}
   \topaccent{z}{acute}{500}
\endsetglyph
\setleftrightkerning{zacute}{z}{1000}

\setglyph{zcaron}
   \topaccent{z}{caron}{500}
\endsetglyph
\setleftrightkerning{zcaron}{z}{1000}

\setglyph{zdotaccent}
   \topaccentas{z}{dotaccent}{500}{idotaccent}
\endsetglyph
\setleftrightkerning{zdotaccent}{z}{1000}


\begincomment
\section{Lower case ligatures}
\endcomment

\setglyph{fi}
   \glyph{f}{1000}
   \movert{\kerning{f}{i}}
   \glyph{i}{1000}
\endsetglyph
\setleftkerning{fi}{f}{1000}
\setrightkerning{fi}{i}{1000}

\setglyph{ff}
   \glyph{f}{1000}
   \movert{\kerning{f}{f}}
   \glyph{f}{1000}
\endsetglyph
\setleftrightkerning{ff}{f}{1000}

\setglyph{fl}
   \glyph{f}{1000}
   \movert{\kerning{f}{l}}
   \glyph{l}{1000}
\endsetglyph
\setleftkerning{fl}{f}{1000}
\setrightkerning{fl}{l}{1000}

\setglyph{ffi}
   \glyph{f}{1000}
   \movert{\kerning{f}{f}}
   \glyph{fi}{1000}
\endsetglyph
\setleftkerning{ffi}{f}{1000}
\setrightkerning{ffi}{i}{1000}

\setglyph{ffl}
   \glyph{f}{1000}
   \movert{\kerning{f}{f}}
   \glyph{fl}{1000}
\endsetglyph
\setleftkerning{ffl}{f}{1000}
\setrightkerning{ffl}{l}{1000}


\setglyph{ij}
   \glyph{i}{1000}
   \movert{\kerning{i}{j}}
   \glyph{j}{1000}
\endsetglyph
\setleftkerning{ij}{i}{1000}
\setrightkerning{ij}{j}{1000}




\endmetrics

\section{Changes}

The original version of this file was created in February 2003, 
although it is based on code from the traditional \texttt{latin.mtx}. 
The changes that have been made after that are as follows.

2003/03/15: Using \verb|\unfakabletopaccent| for the accent 
characters. This should change the appearence of accented letters 
built using such a character from ``a black square'' to ``a letter 
with a black square above''. Neither is satisfactory, but the latter 
conveys more information. (LH)

2003/03/15: Modified the construction of `\texttt{zdotaccent}' so that 
it always has the dot at the same vertical position as a dotted i, as 
requested by Walter Schmidt. Also added the `\texttt{idotaccent}' 
glyph to have something to compare with. (LH)

2003/03/15: Added kerning for ligatures; it seems I had forgotten 
that. (LH)

2003/03/29: Added some kerning for non-English unfakable letters. (LH)

\end{document}

