diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-11 23:51:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-11 23:51:24 +0000 |
commit | e6346f16fc97bdad0b9ac09c159a961b5e65c66a (patch) | |
tree | 36a11c73b0a1f6ec8bdbb5cf542614c87f765380 /Master/texmf-dist/source | |
parent | 4c32003e66a6e75946c2b34b54afef5ee98660c8 (diff) |
trunk/Master/texmf-dist/source/latex/bookhands
git-svn-id: svn://tug.org/texlive/trunk@169 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
26 files changed, 61724 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/bookhands/auncial/auncial.dtx b/Master/texmf-dist/source/latex/bookhands/auncial/auncial.dtx new file mode 100644 index 00000000000..2a0f8e6439f --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/auncial/auncial.dtx @@ -0,0 +1,3803 @@ +% \iffalse meta-comment +% +% auncial.dtx +% Copyright 1999 Peter R. Wilson +% +% This program is provided under the terms of the +% LaTeX Project Public License distributed from CTAN +% archives in directory macros/latex/base/lppl.txt. +% +% Author: Peter Wilson (CUA) (now at: peter.r.wilson@boeing.com) +% +% If you do not have the docmfp package (available from CTAN in +% tex-archive/macros/latex/contrib/supported), comment out the +% \usepackage{docmfp} line below and uncomment the line following it. +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{docmfp} +%%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{} +\EnableCrossrefs +\CodelineIndex +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{auncial.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{132} +% +% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} +% \DoNotIndex{\@centercr,\@cite} +% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} +% \DoNotIndex{\@input,\@ixpt,\@m} +% \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} +% \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} +% \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} +% \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} +% \DoNotIndex{\advance,\Alph,\alph} +% \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\bullet} +% \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} +% \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} +% \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} +% \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +% \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} +% \DoNotIndex{\fbox} +% \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} +% \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +% \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} +% \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} +% \DoNotIndex{\input} +% \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} +% \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} +% \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +% \DoNotIndex{\NeedsTeXFormat,\newdimen} +% \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} +% \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} +% \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} +% \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +% \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +% \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +% \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} +% \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} +% \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} +% \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} +% \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} +% \DoNotIndex{\viipt,\vipt,\vskip,\vspace} +% \DoNotIndex{\wd,\xiipt,\year,\z@} +% +% \changes{v1.0}{1999/05/22}{First public release} +% \changes{v1.0a}{2001/01/02}{Fixed missing * in fd files} +% +% ^^A \def\fileversion{v1.0} +% ^^A \def\filedate{1999/05/22} +% \def\fileversion{v1.0a} +% \def\filedate{2001/01/02} +% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package +% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option +% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file +% \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter +% \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle +% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment +% \newcommand*{\AD}{\textsc{ad}} +% \newcommand*{\thisfont}{Artificial Uncial} +% +% \title{The \Lpack{Artificial Uncial} fonts\thanks{This +% file has version number \fileversion, last revised +% \filedate.}} +% +% \author{% +% Peter Wilson\\ +% Catholic University of America \\ +% Now at \texttt{peter.r.wilson@boeing.com} +% } +% \date{\filedate} +% \maketitle +% \begin{abstract} +% The \Lpack{auncial} and \Lpack{allauncl} packages provide a set of +% Metafont \thisfont{} book-hands +% as used +% for manuscripts in the 6th to the 10th century. This is one in a series +% of manuscript fonts. +% \end{abstract} +% \tableofcontents +% \listoftables +% +% \StopEventually{} +% +% +% +% \section{Introduction} +% +% The \Lpack{auncial} and \Lpack{allauncl} packages provide a Metafont~\cite{METAFONT} version +% of the \thisfont{} manuscript book-hand that was in use between about the +% sixth and tenth centuries~\AD. It is part of a project to provide fonts +% covering the major manuscript hands between the first century~\AD{} and +% the invention of printing. The principal resources used in this project +% are listed in the Bibliography. +% +% This manual is typeset according to the conventions of the +% \LaTeX{} \textsc{docstrip} utility which enables the automatic +% extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. +% The \Lpack{docmfp} package is used for documenting the Metafont portions +% of the distribution~\cite{DOCMFP}. +% +% Section~\ref{sec:usc} describes the usage of the package. +% Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} +% and source code for the package is in Section~\ref{sec:code}. +% +% \subsection{Manuscript book-hands} +% +% Before the invention of printing all books were written by hand. The book-hands +% used by the scribes and copyists for the manuscripts changed as time +% went on. Table~\ref{tab:1} lists some of the common book-hands which were used +% between the 1st and 15th centuries. The later book-hands formed the basis of the +% fonts used by the early printers, which in turn form the basis of the printing +% fonts in use today. +% +% The manuscript book-hands were written with a broad nibbed reed or quill +% pen. Among the distinguishing characteristics of a hand, apart from the +% actual shape of the letters, are the angle of the pen (which controls the +% variation between thick and thin strokes) and the height of a letter compared +% to the width of the nib. The lower the ratio of the letter height to nib +% width, the more condensed is the script. The scripts also varied in their +% typical height. +% +% Table~\ref{tab:1} gives an `average' x-height for each +% script, which I obtained by measuring a sample of photographs of +% manuscripts written in the various hands. About a dozen examples +% of each book-hand were measured. This figure should not be taken too +% seriously. +% +% There was not a sharp division between the use of one hand and another. +% Many manuscripts exhibit a variety of hands in the same document. For example, +% the scribe writing in an Uncial hand may have used Roman Rustic letters +% for capitals. Usually the same pen was used for the two different scripts. +% +% Generally speaking, as a hand got older it became more embelished, and +% therefore took longer to write. As this happened a new hand would appear that +% was faster, and which would eventually make the earlier one obsolete. +% +% Many of the book-hands were single-cased; that is, they did not have an +% upper- and lower-case as we do nowadays in Western scripts. On the other +% hand, a script might be majuscule or minuscule. A \textit{majuscule} script +% is one, like our upper-case, where the letters are drawn between two lines +% and are of a uniform height with no ascenders or descenders. +% A \textit{minuscule} script, like our lower-case, is drawn between four lines +% and has ascenders and descenders. +% +% \begin{table} +% \centering +% \caption{The main manuscript book-hands} \label{tab:1} +% \begin{tabular}{lccccc} \hline +% Name & Century & x-height & Height & Pen & Normalised \\ +% & & (mm) & (nib widths) & angle & height \\ \hline +% Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\ +% Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\ +% Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\ +% Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\ +% Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\ +% Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\ +% Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\ +% Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\ +% Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\ +% Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\ +% Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\ +% Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline +% \end{tabular} +% \end{table} +% +% During the period under consideration arabic numerals were effectively +% not used. At the beginning they were unknown and even though some knew +% of them towards the end, the glyphs used for them are not recognisable --- +% to me they look somewhat like cryllic letters --- and each locality +% and time had its own highly individualistic rendering. The general rule +% when using one of these book-hands is to write all numbers using +% roman numerals. +% +% The Roman alphabet consisted of 23 capital letters --- the J, U and W +% were absent. The book-hands initially used both a `u' and a `v' interchangeably +% but by the 10th century the practice had become to use the `v' before a vowel +% and the `u' otherwise. The letter corresponding to the W sound appeared +% in England around the 7th century in +% the form of the runic \textit{wen} character and by about the 11th century +% the `w' chacter was generally used. The `J' is the newest letter of all, not +% appearing until about the mid 16th century. +% +% In the first century punctuation was virtually unknown, and typically +% would not even be any additional space between individual words, never +% mind denoting ends of sentences. Sometimes a dot at mid-height would be +% used as a word seperator, or to mark off the end of a paragraph. Effectively +% a text was a continuous stream of letters. By the time that printing was +% invented, though, all of our modern punctuation marks were being used. +% +% Among all these manuscript hands, the Carolingian minuscule is the +% most important as our modern fonts are based on its letter shapes, and it is +% also at this point in time where the division occured between the black letter +% scripts as used even today in Germany, and the lighter fonts used elesewhere. +% The Rotunda and Humanist minuscule hands were developed in Italy and were +% essentially a rediscovery of the Carolingian minusucle. Guthenberg took the +% Gothic scripts as the model for his types. Later printers, +% such as Nicholas Jenson of Venice, +% took the Humanist scripts as their models. +% +% +% \subsection{The \thisfont{} script} +% +% The \thisfont{} hand, which is a minuscule script, was in use for some five +% centuries and was, in a sense, the sucessor to the Uncial book-hand. It was +% a much more calligraphic script, and as time went on it became even more +% decorated, until it was too time consuming to use. Usually the +% lettering in a manuscript was all one size. If the scribe felt the need +% for `capital' letters then, using the same pen, would either write a larger +% \thisfont{} letter or a Roman Capital letter. The capitals were only used at +% the start of a line, and were either fully or partially in the margin. The +% capitals were large, perhaps two to four times the size of a normal letter, +% and were the start of versals. As versals for use with other book-hands, +% the script lived on until the end of the Middle Ages. +% +% I have provided a set of `capital' letters that are only a little larger +% than the normal letters for use in running text. If you want to typeset +% using versals, then I suggest Daniel Flipo's \Lpack{lettrine} +% package~\cite{LETTRINE}. +% During the time the \thisfont{} script was used the alphabet only had 24 +% letters. I have included the missing J. +% +% Arabic numerals were unknown at this time, so all numbers were written +% using the roman numbering system. I have provided Uncial versions of +% the arabic digits. +% +% Punctuation was used, but not with the frequency of today. +% A sentence might be ended with +% a dot at mid-height or a paragraph ended with a colon, also at mid-height. +% The start +% of a paragraph might be marked with a capital letter (as a versal). +% The comma was was a small pointed +% slash; the semi-colon was known, as was the single quotation +% mark which was represented by a raised comma. +% +% +% \section{The \Lpack{auncial} and \Lpack{allauncl} packages} \label{sec:usc} +% +% The \thisfont{} font family is called |auncl|. The font is supplied in both +% OT1 and T1 encodings. +% +% \subsection{The \Lpack{auncial} package} +% +% This is intended for the occasions when some short pieces of text have +% to be written in \thisfont{} while the majority of the document is in another +% font. The normal baselineskips are used. +% +% \DescribeMacro{\aunclfamily} +% The |\aunclfamily| declaration starts typesetting with the \thisfont{} fonts. +% Use of the \thisfont{} font will continue until either there is another |\...family| +% declaration or the current group (e.g., environment) is closed. +% +% \DescribeMacro{\textuncl} +% The command |\textuncl{|\meta{text}|}| will typeset \meta{text} using the +% \thisfont{} fonts. +% +% \subsection{The \Lpack{allauncl} package} +% +% +% This package is for when the entire document will be typeset with the +% \thisfont font. The baselineskips are set to those appropriate to the +% book-hand. +% +% This is a minimalist package. Apart from declaring \thisfont{} to be the +% default font and setting the baselineskips appropriately, it makes no other +% alterations. +% Vertical spacing +% before and after section titles and before and after lists, etc., will be +% too small as the \LaTeX{} design assumes a font comparable in size to +% normal printing fonts, and the book-hand is much taller. +% To capture more of the flavour of the time, all numbers +% should be written using roman numerals. +% The \Lpack{romannum} package~\cite{ROMANNUM} +% can be used so that \LaTeX{} will typeset the numbers that it generates, +% like sectioning or caption numbers, using roman numerals instead of arabic +% digits. +% +% \DescribeMacro{\cmrfamily} +% \DescribeMacro{\textcmr} +% \DescribeMacro{\cmssfamily} +% \DescribeMacro{\textcmss} +% \DescribeMacro{\cmttfamily} +% \DescribeMacro{\textcmtt} +% The |...family| declarations start typesetting with the Computer Modern Roman +% (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer +% Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}| +% commands will typeset \meta{text} in the corresponding Computer Modern font. +% +% The \Lpack{allauncl} package automatically loads the \Lpack{auncial} package, +% so its font commands are available if necessary. +% +% +% +% \section{The Metafont code} \label{sec:mf} +% +% +% As previously noted, this work is part of a larger project to provide +% fonts covering the main manuscript book-hands. As such, one of the +% aims is to produce a coordinated set of fonts, especially as multiple +% hands might be used in a single document. +% +% Noting that the hands tend to be somewhat larger than the typical 10pt +% size (where the x-height is approximately 1.5mm) used for modern books, +% I have also designed the fonts +% at a larger than normal size, then applied some non-linear factors when reducing +% them down to a 10pt size. +% Further, I have used the height of the Carolingian minuscule as a +% normalising factor when deciding on the absolute height of any particular +% script. The x-height of the Carolingian font is made equal to the +% x-height of the Computer Modern Roman (CMR) font. +% +% Modern fonts are effectively drawn. That is, the outline of the letter is +% drawn carefully and the center is filled with ink. This is shown to good +% effect in the Metafont code for the Computer Modern fonts~\cite{CM}. +% In contrast, the manuscript letters were inked by single pen strokes in +% a calligraphic manner. I have tried to repeat this calligraphic style +% in the Metafont code. +% +% As much as possible I have tried to use parameter values from the +% Computer Modern Roman (CMR) fonts in order to reduce possible +% infelicities if the CM and manuscript fonts are used together. However, +% few of the CMR parameters are applicable to the calligraphic style. +% +% +% \subsection{The parameter file} +% +% We deal with the parameter files first, and start by announcing +% what they are for. The \thisfont{} font comes in three sizes and also as a normal +% and a bold font. +% \begin{macrocode} +%<*base7|base10|base17|base7b|base10b|base17b> +%<base7>%%% AUNCL7.MF Artificial Uncial at 7 point design size. +%<base10>%%% AUNCL10.MF Artificial Uncial at 10 point design size. +%<base17>%%% AUNCL17.MF Artificial Uncial at 17 point design size. +%<base7b>%%% AUNCLB7.MF Artificial Uncial Bold at 7 point design size. +%<base10b>%%% AUNCLB10.MF Artificial Uncial Bold at 10 point design size. +%<base17b>%%% AUNCLB17.MF Artificial Uncial Bold at 17 point design size. +% +% \end{macrocode} +% Parameters from CMR are used as much as possible. We also +% make sure that \Lpack{cmbase} is loaded as well as plain Metafont. +% \begin{macrocode} +if unknown cmbase: input cmbase fi + +%<base7>font_identifier:="AUNCL"; font_size 7pt#; +%<base10>font_identifier:="AUNCL"; font_size 10pt#; +%<base17>font_identifier:="AUNCL"; font_size 17.28pt#; +%<base7b>font_identifier:="AUNCLB"; font_size 7pt#; +%<base10b>font_identifier:="AUNCLB"; font_size 10pt#; +%<base17b>font_identifier:="AUNCLB"; font_size 17.28pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutstretch} +% The CMR scaling for lowercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> jutstretch:=1.19; +%<base10|base10b> jutstretch:=1.152; +%<base17|base17b> jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{stemstretch} +% The CMR scaling for lowercase stem widths wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> stemstretch:=1.50; +%<base10|base10b> stemstretch:=1.31; +%<base17|base17b> stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{caprat} +% The scaling for `capitals' wrt `lowercase'. This is pretty much a guess. +% \begin{macrocode} + caprat:=1.25; % ratio of capital height to minuscule height +% \end{macrocode} +% +% \DescribeVariable{cap_jutstretch} +% The CMR scaling for uppercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_jutstretch:=1.3; +%<base10|base10b> cap_jutstretch:=1.2; +%<base17|base17b> cap_jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{cap_stemstretch} +% The CMR scaling for uppercase stem width wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_stemstretch:=1.45; +%<base10|base10b> cap_stemstretch:=1.31; +%<base17|base17b> cap_stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{bfudge} +% Letter width scaling for bold font wrt normal font. +% \begin{macrocode} +%<base7|base10|base17> bfudge:=1.0; +%<base7b|base10b|base17b> bfudge:=1.2; +% \end{macrocode} +% +% \DescribeVariable{szfudge} +% Width scaling wrt 17pt letter width. +% \begin{macrocode} +%<base7|base7b> szfudge:=1.18; +%<base10|base10b> szfudge:=1.0; +%<base17|base17b> szfudge:=1.0; +% \end{macrocode} +% +% \DescribeVariable{hstretch} +% Horizontal stretching factor wrt 17pt size letter width. +% \begin{macrocode} + hstretch:=szfudge*bfudge; +% \end{macrocode} +% +% \DescribeVariable{carol_height} +% The x-height of the Carolingian minuscule font. +% \begin{macrocode} +%<base7|base7b> carol_height#:=108.5/36pt#; +%<base10|base10b> carol_height#:=155/36pt#; +%<base17|base17b> carol_height#:=268/36pt#; +% \end{macrocode} +% +% \DescribeVariable{vstretch} +% The height of this font wrt the Carolingian font. +% \begin{macrocode} + vstretch:=1.4; + +% \end{macrocode} +% +% \DescribeVariable{x_height} +% The x-height of lower case letters. Scaled from the Carolingian font. +% \begin{macrocode} + x_height#:=vstretch*carol_height#; +% \end{macrocode} +% +% \DescribeVariable{u} +% The unit width. The CMR values are used. +% \begin{macrocode} +%<base7> u#:=15.5/36pt#; +%<base10> u#:=20/36pt#; +%<base17> u#:=32.5/36pt#; +%<base7b> u#:=17.9/36pt#; +%<base10b> u#:=23/36pt#; +%<base17b> u#:=37/36pt#; +% \end{macrocode} +% +% \DescribeVariable{width_adj} +% \DescribeVariable{serif_fit} +% \DescribeVariable{cap_serif_fit} +% \DescribeVariable{letter_fit} +% The majority of these parameters and values are constant. +% They are for fine adjustements of characters. The CM values are used. +% \begin{macrocode} + width_adj#:=0pt#; % width adjustment for certain characters + serif_fit#:=0pt#; % extra sidebar near lowercase serifs +%<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs +%<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +%<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs +%<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars + +% \end{macrocode} +% +% \DescribeVariable{cap_height} +% The height of capital letters. +% \begin{macrocode} +%<base7|base7b> cap_height#:=172.2/36pt#; % height of caps +%<base10|base10b> cap_height#:=246/36pt#; % height of caps +%<base17|base17b> cap_height#:=425/36pt#; % height of caps +% \end{macrocode} +% +% \DescribeVariable{thickfudge} +% The reciprocal of the font height in nib widths. Normal font height +% is 5 nib widths and the bold font height is 3.5 nib widths. +% \begin{macrocode} +%<base7|base10|base17> thickfudge:=1/5; +%<base7b|base10b|base17b> thickfudge:=1/3.5; +% \end{macrocode} +% +% \DescribeVariable{thinfudge} +% The nib sharpness. +% \begin{macrocode} +thinfudge:=1/6; +% \end{macrocode} +% +% \DescribeVariable{thick} +% The maximum nib width. +% That is, the width of the thickest line that can be penned. +% \begin{macrocode} +thick#:=stemstretch*thickfudge*x_height#; % max pen breadth +% \end{macrocode} +% +% \DescribeVariable{thin} +% The nib thinness. +% That is, the width of the thinnest line that can be penned. +% \begin{macrocode} +thin#:=thinfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{pangle} +% The pen angle (in degrees). +% \begin{macrocode} +pangle:=10; % pen angle +% \end{macrocode} +% +% \DescribeVariable{asc_height} +% The height of lower case ascenders. +% \begin{macrocode} + asc_height#:=4/3x_height#; +% \end{macrocode} +% +% \DescribeVariable{desc_depth} +% The depth of lower case descenders. +% \begin{macrocode} + desc_depth#:=2/3x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_height} +% The height of numerals. Make these midway between normal and capital +% letters. +% \begin{macrocode} + fig_height#:=(0.5[1,caprat])*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_width} +% The width of numerals. All numerals are the same width (roughly, an `o'). +% \begin{macrocode} + fig_width#:=hstretch*(x_height#); +% \end{macrocode} +% +% \DescribeVariable{body_height} +% The height of the tallest character. +% \begin{macrocode} + body_height#:=caprat*asc_height#; +% \end{macrocode} +% +% \DescribeVariable{body_depth} +% The depth of the lowest character. +% \begin{macrocode} + body_depth#:=caprat*desc_depth#; +% \end{macrocode} +% +% \DescribeVariable{half_height} +% Half the normal letter height. +% \begin{macrocode} + half_height#:=1/2x_height#; % half the height of x height letters + +% \end{macrocode} +% +% \DescribeVariable{side} +% We might be using a square for the character design. +% \begin{macrocode} +side#:=x_height#; +% \end{macrocode} +% +% \DescribeVariable{rule_thickness} +% Thickness of rules (in math symbols). The CMR values are used. +% \begin{macrocode} +%<base7|base7b> rule_thickness#:=.34pt#; +%<base10|base10b> rule_thickness#:=.4pt#; +%<base17|base17b> rule_thickness#:=.6pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutfudge} +% Controls the protrusion of serifs. +% \begin{macrocode} +jutfudge:= 3/4; +% \end{macrocode} +% +% \DescribeVariable{jut} +% The lowercase serif protrusion. +% \begin{macrocode} +jut#:=jutstretch*jutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{srad} +% |srad| with |0 < srad < 1| controls the serif radius. +% \begin{macrocode} +srad:=0.5; +% \end{macrocode} +% +% \DescribeVariable{o} +% Amount of overshoot for curves (as in an `o'). Use CMR values. +% \begin{macrocode} +%<base7|base7b> o#:=5/36pt#; +%<base10|base10b> o#:=8/36pt#; +%<base17|base17b> o#:=10/36pt#; + +% \end{macrocode} +% +% \DescribeVariable{slant} +% |slant| is the amount the font slopes to the right. +% \begin{macrocode} +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ + +% \end{macrocode} +% +% \DescribeVariable{monospace} +% We are generating a variable-width font. +% \begin{macrocode} +monospace:=false; % should all characters have the same width? + +% \end{macrocode} +% +% \DescribeVariable{dot_size} +% The size of (punctuation) dots. +% \begin{macrocode} +dot_size#:=5thin#; % size of dots +% \end{macrocode} +% +% \DescribeVariable{comma_width} +% The horizontal width of a comma. +% \begin{macrocode} +comma_width#:=2.5dot_size#; + +% \end{macrocode} +% +% Finally, call the driver file for the font. +% \begin{macrocode} +generate auncltitle %% switch to the driver file + +% \end{macrocode} +% +% The end of this code section. +% \begin{macrocode} +%</base7|base10|base17|base7b|base10b|base17b> +% \end{macrocode} +% +% +% \subsection{The driver file} +% +% The driver file sets up the font parameters and also contains +% the macros used in the definition of the characters. +% +% \begin{macrocode} +%<*mfd> +% This is UNCLTITLE.MF for the Artificial Uncial font. +% This makes a short font. +% This file also contains special macros universally needed in the +% font but either not in the cmbase.mf file or modifications of these. +% +% \end{macrocode} +% +% \begin{routine}{makebox} +% This is a new version of the \Lpack{cmbase.mf} |makebox| macro. +% Essentially, as we are only generating a single case font, we don't +% need all the horizontals for the CMR characters. +% +% \begin{macrocode} +% A new version of cmbase.mf makebox macro +def makebox(text rule) = + for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth: + rule((l,y)t_,(r,y)t_); endfor % horizontals + for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals + for x=u*(1+floor(1/u)) step u until r-1: + rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals + if charic<>0: + rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{proofpcbb} +% The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the +% square, and at the bottom and top midpoints, where the point |zS| is at +% position |(xoff,yoff)| in the square. +% \begin{macrocode} + +% A macro to delineate a letter's bounding square in proof mode. +% Point z$ is at (xoff,yoff) in the bounding square. +def proofpcbb(suffix $)(expr xoff, yoff) = +if proofing > 0: + x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner + z$br = (x$bl+side, y$bl); % BRHC + z$tr = (x$bl+side, y$bl+side); % TRHC + z$tl = (x$bl, y$bl+side); % TLHC + z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points + pair hc, vc; + hc = (2u,0); vc = (0,2u); + pickup pensquare scaled 2; + for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc: + draw s-hc--s+hc; + draw s-vc--s+vc; + endfor +fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{auncial_font_setup} +% This macro contains the set up for the \thisfont{} fonts. +% \begin{macrocode} + +def auncial_font_setup= % contains special stuff for auncial fonts + define_pixels(side,half_height,carol_height,comma_width); + define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit, + cap_serif_fit,jut,cap_jut); + define_pixels(fig_width); + define_whole_pixels(letter_fit); + define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height, + desc_depth,body_depth,fig_height); + define_corrected_pixels(o); + define_blacker_pixels(thick,thin); + let adjust_fit = normal_adjust_fit; +% \end{macrocode} +% \DescribeVariable{stylus} +% The pen for drawing the thinnest lines is |stylus|. +% \begin{macrocode} + pickup pencircle scaled thin; + stylus:=savepen; +% \end{macrocode} +% \DescribeVariable{thickstylus} +% The pen for drawing lines a bit thicker than the thinnest is |thickstylus|. +% \begin{macrocode} + pickup pencircle scaled (1.5thin); + thickstylus:=savepen; +% \end{macrocode} +% \DescribeVariable{quill} +% The normal calligraphic pen is |quill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated pangle; + quill:=savepen; + numeric pcshiftx#; % x value of LHS of box wrt origin of char box + define_pixels(pcshiftx); + numeric sqxside#; % x size of the square + numeric sqyside#; % y size of the square + define_pixels(sqxside,sqyside); + +enddef; % end of auncial_font_setup + +% \end{macrocode} +% \end{routine} +% +% +% \DescribeVariable{ductus} +% A boolean to control drawing the ductus (TRUE) or the full letter (FALSE). +% \begin{macrocode} +boolean ductus; +ductus:=false; +% \end{macrocode} +% +% \DescribeVariable{qhor} +% \DescribeVariable{qvert} +% The cosine and sine of the pen angle. +% \begin{macrocode} +numeric qhor, qvert; +qhor:=cosd(pangle); qvert:=sind(pangle); +% \end{macrocode} +% +% \DescribeVariable{pdir} +% The vector corresponding to the pen angle. +% \begin{macrocode} +pair pdir; pdir=dir(pangle); +% \end{macrocode} +% +% \DescribeVariable{ppdir} +% The vector that is perpendicular (anticlockwise) to the pen angle. +% \begin{macrocode} +pair ppdir; ppdir=dir(pangle+90); +% \end{macrocode} +% +% \begin{routine}{draw_serif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_serif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; + z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + top_serif:=false; + z$c=z$b shifted (bjut*pdir); + fi +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_serif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_istem} +% A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs +% are of extent |jut|. There is a top left and bottom right serif. +% The serif radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_istem(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % top serif + draw_serif($$, $, fr); % bottom serif + draw z$a--z$$a; % the stem +enddef; % end of draw_istem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tstem} +% A macro to draw the shape of the stem of a `t'. |draw_tstem(1,2,f)| draws a +% stem whose +% top is at |z1| and bottom at |z2| with a right serif at |z2|. The radius +% is controlled by |f|, with $0 < f < 1$. +% It draws with the current pen and the serif is of extent |jut|. +% \begin{macrocode} + +def draw_tstem(suffix $, $$)(expr fr)= + draw_serif($$, $, fr); % the serif + draw z$--z$$a; % the stem +enddef; % end of draw_tstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tlserif} +% A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serif +% is of extent |jut|. It also draws the stem to the point |z2|. The serif +% radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_tlserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % the serif + draw z$a--z$$; % the stem +enddef; % end of draw_tlserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flick} +% A macro to draw a flick (like an eyebrow). +% |draw_flick(1,rise,fall,fjut)| draws a stroke starting at |z1| rising up by +% |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is +% |fjut| to the right of |z1|. It is drawn with the current pen. +% \begin{macrocode} + +def draw_flick(suffix $)(expr rise, fall, fjut)= +% \end{macrocode} +% The points |z$a| and |z$b|, together with |z$| make up three points on the +% ductus. +% \begin{macrocode} + rt x$b = x1+fjut; top y$b=y$-fall; + x$a=0.5[x$,x$b]; top y$a=y$+rise; +% \end{macrocode} +% Draw the part, and finish off. +% \begin{macrocode} + draw z$..z$a..z$b; + labels($a,$b); +enddef; % end of draw_flick + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_wave} +% A macro to draw a (horizontal) stroke with a flick at each end +% (down at the left and up at the right). |draw_wave(1,2,f)| uses the current +% pen to draw from |z1wl| to |z1wr|, where |x1wl=x1|, |y1wl=y1-f|, and +% |x1wr=x2|, |y1wr=y2+f|, with |z1| assumed to be at the left of |z2|. +% \begin{macrocode} + +def draw_wave(suffix $,$$)(expr f)= + x$wl=x$; y$wl=y$-f; + x$wr=x$$; y$wr=y$$+f; + z$wc=0.5[z$wl,z$wr]; + draw z$wl{pdir}..z$wc{right}..{pdir}z$wr; + labels($wl,$wc,$wr); +enddef; % end of draw_wave +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tail} +% A macro to draw a tail at the bottom of a (vertical) stem. +% |draw_tail(1,fjut)| draws a tail at the bottom of the stem which ends at |z1|. +% The depth is controlled by the |desc_depth| value and the jut by |fjut|. +% \begin{macrocode} + +def draw_tail(suffix $)(expr fj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$tl' = lft x$; y$tl=bot y$; + pickup stylus; + lft x$tl=x$tl'; + x$tb=x$tl-fj; bot y$tb=y$tl-1/2desc_depth; + filldraw z${down}..{-pdir}z$tb & z$tb{pdir}..{up}z$tl--cycle; + pickup oldpen; + labels($tb,$tl); +enddef; % end of draw_tail +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_triangle} +% A macro to draw a downward pointing equilateral triangle. +% |draw_triangle(1,sz)| draws a triangle of side length with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_triangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$-0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_triangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rtriangle} +% A macro to draw a downward pointing right angled triangle. +% |draw_triangle(1,sz)| draws a triangle of side length with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rtriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$-sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rtriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rutriangle} +% A macro to draw an upward pointing right angled triangle. +% |draw_triangle(1,sz)| draws a triangle of side length with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rutriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$+sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rutriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_fork} +% A macro to draw a forked line. +% |draw_fork(1,2,sz)| draws a graduated line from |z1| to |z2| with a forked +% end of size |sz|. +% \begin{macrocode} + +def draw_fork(suffix $, $$)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$f1'=lft x$; y$f1'=bot y$; + x$f3'=rt x$; y$f3'=top y$; + pickup stylus; + lft x$f1=x$f1'; bot y$f1=y$f1'; + rt x$f3=x$f3'; y$f3-y$=2*(y$-y$f1); + rt x$f2=x$$-sz; bot y$f2=y$$; + rt x$f4= rt x$f5=x$$; + bot y$f5=y$$-sz; top y$f4=y$$+1/2sz; + filldraw z$f1--z$f2--z$f3--cycle; % the line + draw z$f2{right}..z$f4; % upper fork + draw z$f2{right}..z$f5; % lower fork + pickup oldpen; + labels($f1,$f2,$f3,$f4,$f5); +enddef; % end of draw_fork +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pdot} +% A macro to draw a period dot. +% |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|. +% \begin{macrocode} + +def draw_pdot(suffix $)(expr sz)= +% \end{macrocode} +% Draw a square rotated 45 degrees. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$ shifted (0.5sz*up); + z$u = z$s shifted (sz*right); + z$v = z$t shifted (sz*down); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pdot + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pcomma} +% A macro to draw a period comma. +% |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. The pen is |stylus|. +% \begin{macrocode} + +def draw_pcomma(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping back and down at 45 degrees +% for a total width of |ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s-ar; y$v=y$s-ar; + z$u = z$v shifted (sz*right); + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$u--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pcomma + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_plq} +% A macro to draw a period left quote. +% |draw_pcomma(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. +% \begin{macrocode} + +def draw_plq(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping forward and down at 45 degrees +% for a total width of |ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s+ar; y$v=y$s-ar; + z$u = z$v shifted (sz*right); + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_plq + +% \end{macrocode} +% \end{routine} +% +% +% Set the mode and font setup. +% \begin{macrocode} + +font_coding_scheme:="ASCII minuscules and punctuation"; +mode_setup; +auncial_font_setup; + +% \end{macrocode} +% +% +% We generate letters, together with some punctuation and +% analphabetics. +% \begin{macrocode} + +input auncll; % minuscules (lower case) +input aunclu; % majuscules (capitals) +input aunclpunct; % punctuation +input auncllig; % the several dashes +input auncldig; % arabic digits +%%%input aunclp; % ampersand and ?mark + +% \end{macrocode} +% +% Finally, do the uppercase ligtable. +% +% \begin{macrocode} + +font_slant slant; font_x_height x_height#; +if monospace: font_normal_space 9u#; % no stretching or shrinking + font_quad 18u#; + font_extra_space 9u#; +else: font_normal_space 6u#+2letter_fit#; + font_normal_stretch 3u#; font_normal_shrink 2u#; + font_quad 18u#+4letter_fit#; + font_extra_space 2u#; + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning +%% ligtable "P": "T": "Y": "A" kern kk#; +%% ligtable "F": "V": "W": "A" kern if serifs: kkk# else: kk#fi, +%% "K": "X": "O" kern k#, "C" kern k#, "G" kern k#, "Q" kern k#; +%% ligtable "O": "D": "X" kern k#, "W" kern k#, "A" kern k#, +%% "V" kern k#, "Y" kern k#; +%% ligtable "A": if serifs: "R": fi +%% "C" kern k#, "O" kern k#, "G" kern k#, "U" kern k#, "Q" kern k#, +%% "L": "T" kern kk#, "Y" kern kkk#, "V" kern kk#, "W" kern kkk#; +%%ligtable "I": "I" kern -k#; % Richard III +fi + +bye. + +%</mfd> +% \end{macrocode} +% +% \subsection{The code for normal letters} +% +% The following code is for the minuscule characters. +% +% \begin{macrocode} +%<*min> +% AUNCLL.MF Program file for Artificial Uncial minuscules +% + + +% \end{macrocode} +% +% +% \begin{routine}{a} +% The letter `a'. +% \begin{macrocode} +cmchar "AUncial letter a"; +beginchar("a", 2u#+hstretch*(x_height#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx+2jut; rt x2=w-u-jut; +top y1=h; bot y2=0; +% for the bowl +z3=3/4[z2,z1]; +x5=lft x3; y5=bot y3; +z13=1/2[z2,z1]; +x15=lft x13; y15=bot y13; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % the stem +pickup thickstylus; % for the bowl +lft x4=pcshiftx; bot y4=0; +z14=0.2[z4,z5]; +draw z14{pdir}...{z5-z4}z15; % bowl bottom +draw z5--z4; % bowl top +ductus:=false; +penlabels(1,2,3,4,5,6,14,15,100); +endchar; % end "a" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{b} +% The letter `b'. +% \begin{macrocode} +cmchar "AUncial letter b"; +beginchar("b", 2u#+hstretch*(x_height#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +% lower bowl +rt x4=w-pcshiftx; y4=1/3h; +lft x5=rt x1+2thin; y5=2/3h; +z6=z1; +rt x7=0.67[x1,x4]; y7=y6; +x9=rt x7-thin; y9=h-thin; +x8=lft x5+thin; y8=bot y5+thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % the stem +draw z2{right}..z4{up}..{left}z5; % bottom bowl +draw z6--z7; % top bowl +pickup stylus; +draw z9--z8; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "b" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{c} +% The letter `c'. +% \begin{macrocode} +cmchar "AUncial letter c"; +beginchar("c", 2u#+hstretch*(x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x5=x6=x3; +y5=0.1h; +top y6=0.95h; y6'=top y6; y6''=bot y6; x6''=lft x6; +% the serif +pickup stylus; +rt x16=w-pcshiftx; top y16=y6'; +x17=x6; y17=y16-jut; +lft x18=x6''; bot y18=y6''; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; +pickup stylus; +filldraw z17..z18--z16--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,16,17,18,100); +endchar; % end "c" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{d} +% The letter `d'. +% \begin{macrocode} +cmchar "AUncial letter d"; +beginchar("d", 2u#+hstretch*(4/3x_height#), 4/3x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; +x2=x4=w/2; top y2=3/4h; bot y4=0; +y1=y3=0.5[y4,y2]; +lft x5=pcshiftx; top y5=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z2{-pdir}..z1{down}..z4{right}..z3{up}..z5; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "d" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{e} +% The letter `e'. +% \begin{macrocode} +cmchar "AUncial letter e"; +beginchar("e", 2u#+hstretch*(x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x5=x6=x3; +y5=0.1h; +top y6=0.95h; y6'=top y6; y6''=bot y6; x6''=lft x6; +% the serif +pickup stylus; +rt x16=w-pcshiftx; top y16=y6'; +x17=x6; y17=y16-jut; +lft x18=x6''; bot y18=y6''; +pickup quill; +% the bar +x7=x1; y7=y1; +x8=w-pcshiftx; y8=y7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; % the bowl +pickup stylus; +filldraw z17..z18--z16--cycle; % the serif +draw_fork(7,8,jut); % the bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,16,17,18,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{f} +% The letter `f'. +% \begin{macrocode} +cmchar "AUncial letter f"; +beginchar("f", 2u#+hstretch*(x_height#), x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=-d/2; +% bars +x3=x4=x1; y3=y1; bot y4=0; +rt x5= rt x6=w-pcshiftx; y5=y3; y6=y4; +% triangles +x15=x16=rt x5-1/2thin; +y15=y5; y16=y6; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % stem +draw_tail(2,jut); +draw z3--z5; % top bar +draw_rtriangle(15,jut); +draw z4--z6; % bottom bar +draw_rtriangle(16,jut); +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "f" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{g} +% The letter `g'. +% \begin{macrocode} +cmchar "AUncial letter g"; +beginchar("g", 2u#+hstretch*(x_height#), x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the bowl +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x5=x6=x3; +y5=0.1h; +top y6=0.95h; y6'=top y6; y6''=bot y6; x6''=lft x6; +% the serif +pickup stylus; +rt x16=w-pcshiftx; top y16=y6'; +x17=x6; y17=y16-jut; +lft x18=x6''; bot y18=y6''; +pickup quill; +% the stem +x7=rt x5-1/2thin; y7=top y5-1/2thin; +pickup stylus; +lft x8=w/2; bot y8=-d; +pickup quill; +pair vec[]; vec1:=z7-z8; vec2:=z8-z7; +y21=y8+3/2thick; z21=whatever[z8,z7]; +y22=y8+ thick; z22=whatever[z8,z7]; +x23=x8-thick; y23=y8; +x24=x23+1/2thick; y24=y23+1/2thick; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; % the bowl +pickup stylus; +filldraw z17..z18--z16--cycle; % the serif +draw z7--z22; % the stem +filldraw z22{vec2}..{left}z23--z24{right}..{vec1}z21--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,16,17,18,21,22,23,24,100); +endchar; % end "g" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{h} +% The letter `h'. +% \begin{macrocode} +cmchar "AUncial letter h"; +beginchar("h", 2u#+hstretch*(x_height#+jut#), asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +% bowl +rt x5=w-pcshiftx; y5=3/8h; +lft x6=2/3w; bot y6=0; +x4=0.5[x1,x5]; top y4=3/4h; +x4'=0.5[x4,x1]; y4'=y4; +z4''=z4' shifted (-w*pdir); +z3'=whatever[z4',z4'']=whatever[z1,z2]; +x3=rt x3'; y3=y3'; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % stem +draw z3{pdir}..z4{right}..z5{down}..z6; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "h" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{i} +% The letter i. +% \begin{macrocode} +cmchar "AUncial letter i"; +beginchar("i", 2u#+hstretch*(thick#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%%ductus:=true; +draw_tlserif(1,2,srad); +draw_tail(2,jut); +ductus:=false; +penlabels(1,2,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{j} +% The letter `j'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "AUncial letter j"; +beginchar("j", 2u#+hstretch*(thick#+jut#), x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=-1/2d; +%%ductus:=true; +draw_tlserif(1,2,srad); +draw_tail(2,jut); +ductus:=false; +penlabels(1,2,100); +endchar; % end "j" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{k} +% The letter `k'. +% \begin{macrocode} +cmchar "AUncial letter k"; +beginchar("k", 2u#+hstretch*(4/3x_height#), asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +% for the flick +numeric rise,fall,fjut; +x3=rt x1; y3=5/8h; +rise:=1/6h; fall:=-rise/2; fjut:=1/2w; +% for the leg +%%x4=x1; y4=y3; +z4=z3; +x5=w-pcshiftx-jut; y5=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % stem +draw_tail(2,jut); +draw_flick(3,rise,fall,fjut); % upper diag +draw_tstem(4,5,srad); % lower diag +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "k" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{l} +% The letter `l'. +% \begin{macrocode} +cmchar "AUncial letter l"; +beginchar("l", 2u#+hstretch*(x_height#), asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +z3=z2; +x4=w-u; y4=0; +%%ductus:=true; +draw_tlserif(1,2,srad); % the stem +draw_fork(3,4,jut); % the foot +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "l" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{m} +% The letter `m'. +% \begin{macrocode} +cmchar "AUncial letter m"; +beginchar("m", 2u#+hstretch*(2x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=1/4w; bot y1=0; +lft x2= pcshiftx; y2=h/2; +x4=w/2; y4=2/3h; +x3=0.5[x2,x4]; top y3=h; +x5=x4; y5=y1; +z6=z4; +x7=3/4w; top y7=h; +rt x8=w-pcshiftx; y8=y2; +lft x9=3/4w; y9=y1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{up}..z3{right}..{down}z4; % left half +draw_tstem(4,5,srad); % middle stem +draw z6..z7{right}..z8{down}..{-pdir}z9; % right half +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "m" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{n} +% The letter `n'. +% \begin{macrocode} +cmchar "AUncial letter n"; +beginchar("n", 2u#+hstretch*(2jut#+x_height#), x_height#, 0.5desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +% right stem +rt x4=w-pcshiftx-jut; y4=y1; +x3=x4; bot y3=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % left stem +draw_tail(2,jut); +draw_istem(4,3,srad); % right stem +draw z1--z3; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "n" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{o} +% The letter `o'. +% \begin{macrocode} +cmchar "AUncial letter o"; +beginchar("o", 2u#+hstretch*(7/6x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "o" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{p} +% The letter `p'. +% \begin{macrocode} +cmchar "AUncial letter p"; +beginchar("p", 2u#+hstretch*(7/6x_height#), x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+jut; top y1=h; bot y2=-1/2d; +% bowl +z3=z1; +rt x5=w-pcshiftx; y5=1/2h; +lft x7=rt x1; bot y7=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % stem +draw_tail(2,jut); +draw z3{pdir}..z5{down}..{-pdir}z7; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "p" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{q} +% The letter `q'. +% \begin{macrocode} +cmchar "AUncial letter q"; +beginchar("q", 2u#+hstretch*(7/6x_height#), x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right stem +rt x1=rt x2=w-pcshiftx; top y1=h; bot y2=-1/2d; +% bowl +z3=z1; +lft x5=pcshiftx; y5=1/2h; +rt x7=lft x1; y7=0.1h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % right stem +draw_tail(2,jut); +draw z3{left}..z5{down}..{pdir}z7; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{r} +% The letter `r'. +% \begin{macrocode} +cmchar "AUncial letter r"; +beginchar("r", 2u#+hstretch*(4/3x_height#), x_height#, 1/2desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+jut; top y1=h; bot y2=0; +% bowl +lft x3=rt x1-thin; y3=y1; +rt x5=3/4w; y5=3/4h; +lft x7=rt x1; bot y7=1/3h; +% leg +z8=z7; +rt x9=w-pcshiftx; bot y9=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % stem +draw_tail(2,jut); +draw z3{pdir}..z5{down}..{-pdir}z7; % bowl +draw z8{-ppdir}..{right}z9; % leg +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "r" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{s} +% The letter `s'. +% \begin{macrocode} +cmchar "AUncial letter s"; +beginchar("s", 2u#+hstretch*(x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx; top y1=h-thin; +x2=w/2; top y2=h; +lft x3=pcshiftx; y3=0.75h; +x4=w/2; y4=h/2; +rt x5=w-pcshiftx; y5=0.25h; +x6=w/2; bot y6=0; +lft x7= pcshiftx; bot y7 = thin; +path p[]; +p1=z1..z2{left}..z3{down}..z4..z5{down}..z6{left}..z7; +pair vec[]; +vec1= direction 0 of p1; +vec2= direction (length p1) of p1; +z11=z1 shifted vec1; +z17=z7 shifted -vec2; +y6'=top y1; y6''=bot y1; x6''=lft x1; +% the serif +pickup stylus; +rt x26=w-pcshiftx; top y26=y6'; +x27=x1; y27=y26-0.75jut; +lft x28=x6''; bot y28=y6''; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw_serif(1,11,srad); +%%draw_serif(7,17,srad); +%%draw z1a..z2{left}..z3{down}..z4..z5{down}..z6{left}..z7a; +draw p1; % the curve +pickup stylus; +filldraw z27..z28--z26--cycle; % the serif +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,26,27,28,100); +endchar; % end "s" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{t} +% The letter `t'. +% \begin{macrocode} +cmchar "AUncial letter t"; +beginchar("t", 2u#+hstretch*(4/3x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=0.5jut; +pickup quill; +x1=x2=w/2; +top y1=h; bot y2=0; +lft x3=pcshiftx; rt x4=w-pcshiftx; y3=y4=y1; +x5=pcshiftx+alpha; y5=h-1/2thin; +x6=w-pcshiftx-1/2thin; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw z3--z4; % top bar +draw_triangle(5,2alpha); draw_rtriangle(6,2alpha); +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "t" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{u} +% The letter `u'. +% \begin{macrocode} +cmchar "AUncial letter u"; +beginchar("u", 2u#+hstretch*(4/3x_height#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left half first +lft x6=pcshiftx+jut; +top y6=h-2thin; +lft x7=pcshiftx; y7=h/2; +x8=0.5[x6,x1]; bot y8=0; +% the stem +rt x1=w-pcshiftx-jut; top y1=h; +x2=x1; bot y2=0; +% construction points for the curved part +x5=0.5[x8,x1]; y5=y8; +z5'=z5 shifted (w*pdir); +path p[]; +p1=z5--z5'; +p2=z1--z2; +z9= p2 intersectionpoint p1; +pair vec[]; +p3=z6..z7{down}..{right}z8; +vec3 = direction 0 of p3; +z16=z6 shifted vec3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_serif(6,16,srad); % left half +draw z6a..z7{down}..z8{right}..{pdir}z9; +draw_istem(1,2,srad); % right stem +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "u" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{v} +% The letter `v'. The right half of the `w' is used for the `v' (or vice-versa +% if you prefer). +% \begin{macrocode} +cmchar "AUncial letter v"; +beginchar("v", 2u#+hstretch*(7/6x_height#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right side of W +numeric midx; midx:= pcshiftx; +lft x1=midx+jut; top y1=h; +x2=x1; y2=h/2; +rt x4=w-pcshiftx; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-thick; y5=y1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_tlserif(1,2,srad); +draw z2{down}..z3{right}..z4{up}..z5; +ductus:=false; +penlabels(1,2,3,4,5,11,100); +endchar; % end "v" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{w} +% The letter `w'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "AUncial letter w"; +beginchar("w", 2u#+hstretch*(2x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right side first +numeric midx; midx:= w/2-jut; +lft x1=midx+jut; top y1=h; +x2=x1; y2=h/2; +rt x4=w-pcshiftx; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-thick; y5=y1; +% left side +lft x6=pcshiftx+jut; +top y6=h-2thin; +lft x7=pcshiftx; y7=y2; +x8=0.5[x7,x1]; y8=y3; +% construction points +x15=0.5[x8,x1]; y15=y8; +z15'=z15 shifted (w*pdir); +x2'=x2; y2'=y15; +path p[]; +p1=z1--z2'; +p2=z15--z15'; +z9= p2 intersectionpoint p1; +pair vec[]; +p3=z6..z7{down}..{right}z8; +vec3 = direction 0 of p3; +z16=z6 shifted vec3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_tlserif(1,2,srad); % right half +draw z2{down}..z3{right}..z4{up}..z5; +draw_serif(6,16,srad); % left half +draw z6a..z7{down}..z8{right}..z9; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "w" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{x} +% The letter `x'. +% \begin{macrocode} +cmchar "AUncial letter x"; +beginchar("x", 2u#+hstretch*(4/3x_height#+jut#), x_height#, 1/2desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% thick diagonal +lft x1=pcshiftx+jut; rt x2=w-pcshiftx-jut; +y1=h; y2=0; +% thin diagonal +lft x3=pcshiftx; bot y3=-d; +rt x5=w-pcshiftx; top y5=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % thick diagonal +draw z3..{pdir}z5; % thin diagonal +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "x" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{y} +% The letter `y'. This has a dot on top! +% \begin{macrocode} +cmchar "AUncial letter y"; +beginchar("y", 2u#+hstretch*(4/3x_height#), x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left stroke +lft x1=pcshiftx+jut; top y1=h; +rt x2=3/4w; top y2=0; +% right stroke +pickup stylus; +rt x3=w-pcshiftx; top y3=h; +lft x4=pcshiftx; bot y4=-d; +x5=x3-3thin; y5=y3; +x7=x2-3/2thin; y7=y2; +pickup quill; +% the dot +x8=w/2; y8=h+jut; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % left stroke +draw_pdot(8,dot_size); % the dot +pickup stylus; +filldraw z3..z2..z4 & z4..z7..z5--cycle; % right stroke +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{z} +% The letter `z'. +% \begin{macrocode} +cmchar "AUncial letter z"; +beginchar("z", 2u#+hstretch*(7/6x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% bottom stroke +lft x4=pcshiftx; bot y4=0; +x6=w-pcshiftx; y6=0; +% top stroke +x1=x4; top y1=h; +rt x3=6/7w; y3=y1; +x11=pcshiftx+0.5jut; y11=h-thin/2; % y11=h-thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z3; % top stroke +draw_triangle(11,jut); +draw_fork(4,6,jut); +draw z4--z3; % diagonal +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "z" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file +% \begin{macrocode} +%</min> +% \end{macrocode} +% +% +% \subsection{The code for capital letters} +% +% \thisfont{} `capitals' were drawn with the same pen as for the minuscules, +% and the letters were merely larger versions of the minuscules. +% +% \begin{macrocode} +%<*maj> +% AUNCLU.MF Program file for Artificial Uncial `capitals' +% + +% \end{macrocode} +% +% +% \begin{routine}{A} +% The letter `A'. +% \begin{macrocode} +cmchar "AUncial letter A"; +beginchar("A", 2u#+hstretch*caprat*(x_height#+jut#), caprat*(x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx+2jut; rt x2=w-u-jut; +top y1=h; bot y2=0; +% for the bowl +z3=3/4[z2,z1]; +x5=lft x3; y5=bot y3; +z13=1/2[z2,z1]; +x15=lft x13; y15=bot y13; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % the stem +pickup thickstylus; % for the bowl +lft x4=pcshiftx; bot y4=0; +z14=0.2[z4,z5]; +draw z14{pdir}...{z5-z4}z15; % bowl bottom +draw z5--z4; % bowl top +ductus:=false; +penlabels(1,2,3,4,5,6,14,15,100); +endchar; % end "A" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{B} +% The letter `B'. +% \begin{macrocode} +cmchar "AUncial letter B"; +beginchar("B", 2u#+hstretch*caprat*(x_height#+jut#), caprat*(x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +% lower bowl +rt x4=w-pcshiftx; y4=1/3h; +lft x5=rt x1+2thin; y5=2/3h; +z6=z1; +rt x7=0.67[x1,x4]; y7=y6; +x9=rt x7-thin; y9=h-thin; +x8=lft x5+thin; y8=bot y5+thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % the stem +draw z2{right}..z4{up}..{left}z5; % bottom bowl +draw z6--z7; % top bowl +pickup stylus; +draw z9--z8; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "B" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{C} +% The letter `C'. +% \begin{macrocode} +cmchar "AUncial letter C"; +beginchar("C", 2u#+hstretch*caprat*(x_height#), caprat*(x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x5=x6=x3; +y5=0.1h; +top y6=0.95h; y6'=top y6; y6''=bot y6; x6''=lft x6; +% the serif +pickup stylus; +rt x16=w-pcshiftx; top y16=y6'; +x17=x6; y17=y16-jut; +lft x18=x6''; bot y18=y6''; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; +pickup stylus; +filldraw z17..z18--z16--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,16,17,18,100); +endchar; % end "C" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{D} +% The letter `D'. +% \begin{macrocode} +cmchar "AUncial letter D"; +beginchar("D", 2u#+hstretch*caprat*(4/3x_height#), caprat*(4/3x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; +x2=x4=w/2; top y2=3/4h; bot y4=0; +y1=y3=0.5[y4,y2]; +lft x5=pcshiftx; top y5=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z2{-pdir}..z1{down}..z4{right}..z3{up}..z5; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "D" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{E} +% The letter `E'. +% \begin{macrocode} +cmchar "AUncial letter E"; +beginchar("E", 2u#+hstretch*caprat*(x_height#), caprat*(x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x5=x6=x3; +y5=0.1h; +top y6=0.95h; y6'=top y6; y6''=bot y6; x6''=lft x6; +% the serif +pickup stylus; +rt x16=w-pcshiftx; top y16=y6'; +x17=x6; y17=y16-jut; +lft x18=x6''; bot y18=y6''; +pickup quill; +% the bar +x7=x1; y7=y1; +x8=w-pcshiftx; y8=y7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; % the bowl +pickup stylus; +filldraw z17..z18--z16--cycle; % the serif +draw_fork(7,8,jut); % the bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,16,17,18,100); +endchar; % end "E" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{F} +% The letter `F'. +% \begin{macrocode} +cmchar "AUncial letter F"; +beginchar("F", 2u#+hstretch*caprat*(x_height#), caprat*(x_height#), + caprat*(desc_depth#)); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=-d/2; +% bars +x3=x4=x1; y3=y1; bot y4=0; +rt x5= rt x6=w-pcshiftx; y5=y3; y6=y4; +% triangles +x15=x16=rt x5-1/2thin; +y15=y5; y16=y6; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % stem +draw_tail(2,jut); +draw z3--z5; % top bar +draw_rtriangle(15,jut); +draw z4--z6; % bottom bar +draw_rtriangle(16,jut); +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "F" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{G} +% The letter `G'. +% \begin{macrocode} +cmchar "AUncial letter G"; +beginchar("G", 2u#+hstretch*caprat*(x_height#), caprat*(x_height#), + caprat*(desc_depth#)); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the bowl +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x5=x6=x3; +y5=0.1h; +top y6=0.95h; y6'=top y6; y6''=bot y6; x6''=lft x6; +% the serif +pickup stylus; +rt x16=w-pcshiftx; top y16=y6'; +x17=x6; y17=y16-jut; +lft x18=x6''; bot y18=y6''; +pickup quill; +% the stem +x7=rt x5-1/2thin; y7=top y5-1/2thin; +pickup stylus; +lft x8=w/2; bot y8=-d; +pickup quill; +pair vec[]; vec1:=z7-z8; vec2:=z8-z7; +y21=y8+3/2thick; z21=whatever[z8,z7]; +y22=y8+ thick; z22=whatever[z8,z7]; +x23=x8-thick; y23=y8; +x24=x23+1/2thick; y24=y23+1/2thick; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; % the bowl +pickup stylus; +filldraw z17..z18--z16--cycle; % the serif +draw z7--z22; % the stem +filldraw z22{vec2}..{left}z23--z24{right}..{vec1}z21--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,16,17,18,21,22,23,24,100); +endchar; % end "G" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{H} +% The letter `H'. +% \begin{macrocode} +cmchar "AUncial letter H"; +beginchar("H", 2u#+hstretch*caprat*(x_height#+jut#), caprat*(asc_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +% bowl +rt x5=w-pcshiftx; y5=3/8h; +lft x6=2/3w; bot y6=0; +x4=0.5[x1,x5]; top y4=3/4h; +x4'=0.5[x4,x1]; y4'=y4; +z4''=z4' shifted (-w*pdir); +z3'=whatever[z4',z4'']=whatever[z1,z2]; +x3=rt x3'; y3=y3'; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % stem +draw z3{pdir}..z4{right}..z5{down}..z6; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "H" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{I} +% The letter I. +% \begin{macrocode} +cmchar "AUncial letter I"; +beginchar("I", 2u#+hstretch*(thick#+jut#), caprat*(x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%%ductus:=true; +draw_tlserif(1,2,srad); +draw_tail(2,jut); +ductus:=false; +penlabels(1,2,100); +endchar; % end "I" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{J} +% The letter `J'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "AUncial letter J"; +beginchar("J", 2u#+hstretch*(thick#+jut#), caprat*(x_height#), + caprat*(desc_depth#)); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=-1/2d; +%%ductus:=true; +draw_tlserif(1,2,srad); +draw_tail(2,jut); +ductus:=false; +penlabels(1,2,100); +endchar; % end "J" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{K} +% The letter `K'. +% \begin{macrocode} +cmchar "AUncial letter K"; +beginchar("K", 2u#+hstretch*caprat*(4/3x_height#), caprat*(asc_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +% for the flick +numeric rise,fall,fjut; +x3=rt x1; y3=5/8h; +rise:=1/6h; fall:=-rise/2; fjut:=1/2w; +% for the leg +%%x4=x1; y4=y3; +z4=z3; +x5=w-pcshiftx-jut; y5=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % stem +draw_tail(2,jut); +draw_flick(3,rise,fall,fjut); % upper diag +draw_tstem(4,5,srad); % lower diag +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "K" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{L} +% The letter `L'. +% \begin{macrocode} +cmchar "AUncial letter L"; +beginchar("L", 2u#+hstretch*caprat*(x_height#), caprat*(asc_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +z3=z2; +x4=w-u; y4=0; +%%ductus:=true; +draw_tlserif(1,2,srad); % the stem +draw_fork(3,4,jut); % the foot +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "L" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{M} +% The letter `M'. +% \begin{macrocode} +cmchar "AUncial letter M"; +beginchar("M", 2u#+hstretch*caprat*(2x_height#), caprat*(x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=1/4w; bot y1=0; +lft x2= pcshiftx; y2=h/2; +x4=w/2; y4=2/3h; +x3=0.5[x2,x4]; top y3=h; +x5=x4; y5=y1; +z6=z4; +x7=3/4w; top y7=h; +rt x8=w-pcshiftx; y8=y2; +lft x9=3/4w; y9=y1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{up}..z3{right}..{down}z4; % left half +draw_tstem(4,5,srad); % middle stem +draw z6..z7{right}..z8{down}..{-pdir}z9; % right half +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "M" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{N} +% The letter `N'. +% \begin{macrocode} +cmchar "AUncial letter N"; +beginchar("N", 2u#+hstretch*caprat*(2jut#+x_height#), caprat*(x_height#), + caprat*(0.5desc_depth#)); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +% right stem +rt x4=w-pcshiftx-jut; y4=y1; +x3=x4; bot y3=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % left stem +draw_tail(2,jut); +draw_istem(4,3,srad); % right stem +draw z1--z3; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "N" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{O} +% The letter `O'. +% \begin{macrocode} +cmchar "AUncial letter O"; +beginchar("O", 2u#+hstretch*caprat*(7/6x_height#), caprat*(x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "O" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{P} +% The letter `P'. +% \begin{macrocode} +cmchar "AUncial letter P"; +beginchar("P", 2u#+hstretch*caprat*(7/6x_height#), caprat*(x_height#), + caprat*(desc_depth#)); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+jut; top y1=h; bot y2=-1/2d; +% bowl +z3=z1; +rt x5=w-pcshiftx; y5=1/2h; +lft x7=rt x1; bot y7=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % stem +draw_tail(2,jut); +draw z3{pdir}..z5{down}..{-pdir}z7; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "P" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Q} +% The letter `Q'. +% \begin{macrocode} +cmchar "AUncial letter Q"; +beginchar("Q", 2u#+hstretch*caprat*(7/6x_height#), caprat*(x_height#), + caprat*(desc_depth#)); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right stem +rt x1=rt x2=w-pcshiftx; top y1=h; bot y2=-1/2d; +% bowl +z3=z1; +lft x5=pcshiftx; y5=1/2h; +rt x7=lft x1; y7=0.1h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % right stem +draw_tail(2,jut); +draw z3{left}..z5{down}..{pdir}z7; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "Q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{R} +% The letter `R'. +% \begin{macrocode} +cmchar "AUncial letter R"; +beginchar("R", 2u#+hstretch*caprat*(4/3x_height#), caprat*(x_height#), + caprat*(1/2desc_depth#)); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+jut; top y1=h; bot y2=0; +% bowl +lft x3=rt x1-thin; y3=y1; +rt x5=3/4w; y5=3/4h; +lft x7=rt x1; bot y7=1/3h; +% leg +z8=z7; +rt x9=w-pcshiftx; bot y9=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % stem +draw_tail(2,jut); +draw z3{pdir}..z5{down}..{-pdir}z7; % bowl +draw z8{-ppdir}..{right}z9; % leg +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "R" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{S} +% The letter `S'. +% \begin{macrocode} +cmchar "AUncial letter S"; +beginchar("S", 2u#+hstretch*caprat*(x_height#), caprat*(x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx; top y1=h-thin; +x2=w/2; top y2=h; +lft x3=pcshiftx; y3=0.75h; +x4=w/2; y4=h/2; +rt x5=w-pcshiftx; y5=0.25h; +x6=w/2; bot y6=0; +lft x7= pcshiftx; bot y7 = thin; +path p[]; +p1=z1..z2{left}..z3{down}..z4..z5{down}..z6{left}..z7; +pair vec[]; +vec1= direction 0 of p1; +vec2= direction (length p1) of p1; +z11=z1 shifted vec1; +z17=z7 shifted -vec2; +y6'=top y1; y6''=bot y1; x6''=lft x1; +% the serif +pickup stylus; +rt x26=w-pcshiftx; top y26=y6'; +x27=x1; y27=y26-0.75jut; +lft x28=x6''; bot y28=y6''; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw p1; % the curve +pickup stylus; +filldraw z27..z28--z26--cycle; % the serif +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,26,27,28,100); +endchar; % end "S" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{T} +% The letter `T'. +% \begin{macrocode} +cmchar "AUncial letter T"; +beginchar("T", 2u#+hstretch*caprat*(4/3x_height#), caprat*(x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=0.5jut; +pickup quill; +x1=x2=w/2; +top y1=h; bot y2=0; +lft x3=pcshiftx; rt x4=w-pcshiftx; y3=y4=y1; +x5=pcshiftx+alpha; y5=h-1/2thin; +x6=w-pcshiftx-1/2thin; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw z3--z4; % top bar +draw_triangle(5,2alpha); draw_rtriangle(6,2alpha); +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "T" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{U} +% The letter `U'. +% \begin{macrocode} +cmchar "AUncial letter U"; +beginchar("U", 2u#+hstretch*caprat*(4/3x_height#+jut#), caprat*(x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left half first +lft x6=pcshiftx+jut; +top y6=h-2thin; +lft x7=pcshiftx; y7=h/2; +x8=0.5[x6,x1]; bot y8=0; +% the stem +rt x1=w-pcshiftx-jut; top y1=h; +x2=x1; bot y2=0; +% construction points for the curved part +x5=0.5[x8,x1]; y5=y8; +z5'=z5 shifted (w*pdir); +path p[]; +p1=z5--z5'; +p2=z1--z2; +z9= p2 intersectionpoint p1; +pair vec[]; +p3=z6..z7{down}..{right}z8; +vec3 = direction 0 of p3; +z16=z6 shifted vec3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_serif(6,16,srad); % left half +draw z6a..z7{down}..z8{right}..{pdir}z9; +draw_istem(1,2,srad); % right stem +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "U" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{V} +% The letter `V'. The right half of the `w' is used for the `v' (or vice-versa +% if you prefer). +% \begin{macrocode} +cmchar "AUncial letter V"; +beginchar("V", 2u#+hstretch*caprat*(7/6x_height#+jut#), caprat*(x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right side of W +numeric midx; midx:= pcshiftx; +lft x1=midx+jut; top y1=h; +x2=x1; y2=h/2; +rt x4=w-pcshiftx; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-thick; y5=y1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_tlserif(1,2,srad); +draw z2{down}..z3{right}..z4{up}..z5; +ductus:=false; +penlabels(1,2,3,4,5,11,100); +endchar; % end "V" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{W} +% The letter `W'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "AUncial letter W"; +beginchar("W", 2u#+hstretch*caprat*(2x_height#), caprat*(x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right side first +numeric midx; midx:= w/2-jut; +lft x1=midx+jut; top y1=h; +x2=x1; y2=h/2; +rt x4=w-pcshiftx; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-thick; y5=y1; +% left side +lft x6=pcshiftx+jut; +top y6=h-2thin; +lft x7=pcshiftx; y7=y2; +x8=0.5[x7,x1]; y8=y3; +% construction points +x15=0.5[x8,x1]; y15=y8; +z15'=z15 shifted (w*pdir); +x2'=x2; y2'=y15; +path p[]; +p1=z1--z2'; +p2=z15--z15'; +z9= p2 intersectionpoint p1; +pair vec[]; +p3=z6..z7{down}..{right}z8; +vec3 = direction 0 of p3; +z16=z6 shifted vec3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_tlserif(1,2,srad); % right half +draw z2{down}..z3{right}..z4{up}..z5; +draw_serif(6,16,srad); % left half +draw z6a..z7{down}..z8{right}..z9; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "W" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{X} +% The letter `X'. +% \begin{macrocode} +cmchar "AUncial letter X"; +beginchar("X", 2u#+hstretch*caprat*(4/3x_height#+jut#), caprat*(x_height#), + caprat*(1/2desc_depth#)); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% thick diagonal +lft x1=pcshiftx+jut; rt x2=w-pcshiftx-jut; +y1=h; y2=0; +% thin diagonal +lft x3=pcshiftx; bot y3=-d; +rt x5=w-pcshiftx; top y5=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % thick diagonal +draw z3..{pdir}z5; % thin diagonal +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "X" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Y} +% The letter `Y'. This has a dot on top! +% \begin{macrocode} +cmchar "AUncial letter Y"; +beginchar("Y", 2u#+hstretch*caprat*(4/3x_height#), caprat*(x_height#), + caprat*(desc_depth#)); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left stroke +lft x1=pcshiftx+jut; top y1=h; +rt x2=3/4w; top y2=0; +% right stroke +pickup stylus; +rt x3=w-pcshiftx; top y3=h; +lft x4=pcshiftx; bot y4=-d; +x5=x3-3thin; y5=y3; +x7=x2-3/2thin; y7=y2; +pickup quill; +% the dot +x8=w/2; y8=h+jut; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % left stroke +draw_pdot(8,dot_size); % the dot +pickup stylus; +filldraw z3..z2..z4 & z4..z7..z5--cycle; % right stroke +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "Y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{Z} +% The letter `Z'. +% \begin{macrocode} +cmchar "AUncial letter Z"; +beginchar("Z", 2u#+hstretch*caprat*(7/6x_height#), caprat*(x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% bottom stroke +lft x4=pcshiftx; bot y4=0; +x6=w-pcshiftx; y6=0; +% top stroke +x1=x4; top y1=h; +rt x3=6/7w; y3=y1; +x11=pcshiftx+0.5jut; y11=h-thin/2; % y11=h-thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z3; % top stroke +draw_triangle(11,jut); +draw_fork(4,6,jut); +draw z4--z3; % diagonal +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "Z" + +% \end{macrocode} +% \end{routine} +% +% +% +% +% The end of this file +% \begin{macrocode} +%</maj> +% \end{macrocode} +% +% +% +% \subsection{The punctuation file} +% +% The main punctuation marks are defined in this file. +% +% \begin{macrocode} +%<*punct> +% AUNCLPUNCT.MF This file contains punctuation marks + +% \end{macrocode} +% +% +% \begin{routine}{,} +% The `,' character. +% \begin{macrocode} + +cmchar "Uncial Comma"; +beginchar(",",2u#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h/2; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "," + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{.} +% The `.' character. +% \begin{macrocode} + +cmchar "Uncial Period"; +beginchar(".",2u#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=u; +x1=w/2; y1=h/2; +draw_pdot(1,dot_size); +penlabels(1); +endchar; % end of "." + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{:} +% The `:' character. +% \begin{macrocode} + +cmchar "Uncial Colon"; +beginchar(":",2u#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=u; +x1=x2=w/2; y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pdot(2,dot_size); +penlabels(1,2); +endchar; % end ":" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{;} +% The `;' character. +% \begin{macrocode} + +cmchar "Uncial Semicolon"; +beginchar(";",2u#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pcomma(2,dot_size,comma_width); +penlabels(1,2); +endchar; % end of ";" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{'} +% The `'' character. +% \begin{macrocode} + +cmchar "Uncial Apostrophe"; +beginchar("'",2u#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "'" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{`} +% The ``' character. +% \begin{macrocode} + +cmchar "Uncial Reverse apostrophe"; +beginchar("`",2u#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=pcshiftx+(0.5hstretch*dot_size); y1=h; +draw_plq(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "`" + +% \end{macrocode} +% \end{routine} +% +% The end of this file. +% \begin{macrocode} +%</punct> +% \end{macrocode} +% +% +% \subsection{The ligatures and dashes file} +% +% The ligatured punctuation marks and dashes are defined in this file. +% \begin{macrocode} +%<*lig> +% AUNCLLIG.MF Uncial ligatured punctation and dashes + +% \end{macrocode} +% First the ligtables. +% \begin{macrocode} + +ligtable "`": "`"=:oct"134"; +ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#; + +ligtable "-": "-"=:oct"173"; +ligtable oct"173": "-"=:oct"174"; + +% \end{macrocode} +% +% \begin{routine}{''} +% The `''' ligature. +% \begin{macrocode} + +cmchar "Uncial closing quotes"; +beginchar(oct"042",2u#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h; +x2=x1-(2hstretch*dot_size); +draw_pcomma(1,dot_size,comma_width); % right +draw_pcomma(2,dot_size,comma_width); % left +penlabels(1,2); +endchar; % end of "''" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{``} +% The ```' ligature. +% \begin{macrocode} + +cmchar "Uncial opening quotes"; +beginchar(oct"134",2u#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h; +x2=x1+(2hstretch*dot_size); +draw_plq(1,dot_size,comma_width); % left +draw_plq(2,dot_size,comma_width); % right +penlabels(1,2); +endchar; % end of "``" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{-} +% The `-' character. +% \begin{macrocode} + +cmchar "Uncial hyphen"; +beginchar("-",u#+hstretch*(0.8x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u/2; +numeric alpha; alpha:=w/8; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +x11=lft x1+alpha/2; y11=top y1-0.5thin; +x12=rt x2; y12=bot y1+0.5thin; +draw z1--z2; % bar +draw_triangle(11,alpha); +draw_rutriangle(12,alpha); +penlabels(1,2); +endchar; % end of "-" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{--} +% The -- ligature. +% \begin{macrocode} + +cmchar "Uncial en dash"; +beginchar(oct"173",u#+hstretch*(x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u/2; +numeric alpha; alpha:=w/8; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +x11=lft x1+alpha/2; y11=top y1-0.5thin; +x12=rt x2; y12=bot y1+0.5thin; +draw z1--z2; % bar +draw_triangle(11,alpha); +draw_rutriangle(12,alpha); +penlabels(1,2); +endchar; % end of "--" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{---} +% The `---' ligature. The em dash is twice the width of the en dash. +% \begin{macrocode} + +cmchar "Uncial em dash"; +beginchar(oct"174",u#+hstretch*(2x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u/2; +numeric alpha; alpha:=w/8; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +x11=lft x1+alpha/2; y11=top y1-0.5thin; +x12=rt x2; y12=bot y1+0.5thin; +draw z1--z2; % bar +draw_triangle(11,alpha); +draw_rutriangle(12,alpha); +penlabels(1,2); +endchar; % end of "---" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{&} +% The ampersand (which is really an `et' ligature). +% \begin{macrocode} + +cmchar "Uncial ampersand"; +beginchar("&", 2u#+hstretch*(7/4x_height#), x_height#, 0.5desc_depth#); +adjust_fit(0,0); +pcshiftx:=u; +numeric alpha; alpha:=4/7w-u; +pickup quill; +% for the e part +lft x1=pcshiftx; rt x3= alpha; y1=y3=h/2; +x2=x4=alpha/2; top y2=h; bot y4=0; +x5=x6=x3; +y5=0.1h; +top y6=0.95h; y6'=top y6; y6''=bot y6; x6''=lft x6; +pickup stylus; +rt x16=alpha; top y16=y6'; +x17=x6; y17=y16-jut; +lft x18=x6''; bot y18=y6''; +pickup quill; +% the bar +x7=x1; y7=y1; +x8=w-pcshiftx; y8=y7; +% the t part +lft x31=alpha+2thin; y31=y8; +x32=x31; bot y32=-d; +x33=rt x8-0.5thin; y33=top y31-0.5thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; % the bowl +draw_tstem(31,32,srad); % t stem +draw z7--z8; % the (top) bar +draw_rtriangle(33,jut); % t bar serif +pickup stylus; +filldraw z17..z18--z16--cycle; % e serif +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,16,17,18,31,32,33); +endchar; % end of "&" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</lig> +% \end{macrocode} +% +% \subsection{The digits file} +% +% These are arabic digits in the style of the book-hand. They are a +% modern invention. +% +% \begin{macrocode} +%<*dig> +% AUNCLDIG.MF Program file for Artificial Uncial digits +% + +% \end{macrocode} +% +% +% \begin{routine}{1} +% The digit `1'. +% \begin{macrocode} +cmchar "AUncial digit 1"; +beginchar("1", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +x1=x2=w/2; +y1=h; bot y2=0; +%%ductus:=true; +draw_tlserif(1,2,srad); +draw_tail(2,jut); +ductus:=false; +penlabels(1,2,100); +endchar; % end "1" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{2} +% The digit `2'. +% \begin{macrocode} +cmchar "AUncial digit 2"; +beginchar("2", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=pcshiftx; y1=3/4h; +x2=1/2w; top y2= h+o; +rt x3=w-pcshiftx; y3=3/4h; +% foot +lft x5=pcshiftx; bot y5=0; +rt x6=w-pcshiftx; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_fork(5,6,jut); % foot +draw z1{up}..z2{right}..z3{down}..{down}z5; % curve +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "2" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{3} +% The digit `3'. +% \begin{macrocode} +cmchar "AUncial digit 3"; +beginchar("3", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% x values +lft x3=pcshiftx; x10=x3; +rt x5=w-pcshiftx; x8=x5-3thin; +x4=0.5[x3,x5]; +x9=0.5[x10,x8]; +lft x6=pcshiftx; x7=x6; +% y values +y3=1/4h; y10=3/4h; +y6=0.5[y3,y10]; y7=y6; +bot y4=-thin; top y9=h+thin; +y5=0.5[y4,y6]; +y8=0.5[y7,y9]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z3{down}..z4{right}..z5{up}...{left}z6; % bottom bowl +draw z7{right}...z8{up}..z9{left}..{down}z10; % top bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "3" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{4} +% The digit `4'. +% \begin{macrocode} +cmchar "AUncial digit 4"; +beginchar("4", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the stem +x1=x2=w-pcshiftx-jut; +y1=h; bot y2=0; +% the crossbar +lft x3=pcshiftx; y3=0.33h; +rt x4=w-pcshiftx; y4=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % main stem +draw_wave(3,4,thin); % crossbar +draw z3wl--z1; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "4" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{5} +% The digit `5'. +% \begin{macrocode} +cmchar "AUncial digit 5"; +beginchar("5", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% for the top +rt x1=w-pcshiftx; top y1=h; +lft x2=pcshiftx; y2=y1; +% the S curve +x3=x2; y3=0.5h+thin; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +rt x5=w-pcshiftx; y5=0.3h; +x6=w/2; bot y6=0; +lft x7=pcshiftx; bot y7=2thin; +x8=w-pcshiftx; y8=h-0.5thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw_wave(2,1,thin); % top squiggle +draw z2--z1; % top bar +draw_rtriangle(8,3/4jut); +draw z3{pdir}..z5{down}..z6{left}..z7; % curve +draw z2--z3; % vertical +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "5" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{6} +% The digit `6'. +% \begin{macrocode} +cmchar "AUncial digit 6"; +beginchar("6", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx; top y1=h; +x2=1/2w; top y2= h; +lft x3=pcshiftx; y3=1/2h; +x4=x2; bot y4=0; +rt x5=w-pcshiftx; y5=1/4h; +lft x6=rt x3; bot y6=y3; +x8=w-pcshiftx; y8=h-0.5thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{left}..z3{down}..z4{right}..z5{up}..{-pdir}z6; +draw_rtriangle(8,3/4jut); +ductus:=false; +penlabels(1,2,3,4,5,6,8,100); +endchar; % end "6" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{7} +% The digit `7'. +% \begin{macrocode} +cmchar "AUncial digit 7"; +beginchar("7", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% top bar +lft x1=pcshiftx; +rt x2=w-pcshiftx; +top y1=top y2=h; +x8=pcshiftx+3/8jut; y8=h-0.5thin; +% bowed leg +x4=w/2; bot y4=0; +x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % top bar +draw_triangle(8,3/4jut); +draw z2..z3..z4; % leg +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "7" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{8} +% The digit `8'. +% \begin{macrocode} +cmchar "AUncial digit 8"; +beginchar("8", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=1; +pickup quill; +lft x1=alpha*pcshiftx+o; rt x3=w-alpha*pcshiftx-o; y1=y3=3/4h; +x2=x4=w/2; top y2=h+o; bot y4=-o; +x5=x2; y5=h/2+2o; +lft x11=pcshiftx; rt x13=w-pcshiftx; y11=y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z5..z11..z4..z13..z5..cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,100); +endchar; % end "8" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{9} +% The digit `9'. +% \begin{macrocode} +cmchar "AUncial digit 9"; +beginchar("9", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; bot y1=2thin; +x2=1/2w; bot y2= 0; +rt x3=w-pcshiftx; y3=1/2h; +x4=x2; top y4=h; +lft x5=pcshiftx; y5=3/4h; +rt x6=lft x3; top y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{up}..z4{left}..z5{down}..{pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "9" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{0} +% The digit `0'. +% \begin{macrocode} +cmchar "Uncial digit 0"; +beginchar("0", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "0" + +% \end{macrocode} +% \end{routine} +% +% +% +% +% The end of this file. +% \begin{macrocode} +%</dig> +% \end{macrocode} +% +% \section{The font definition files} \label{sec:fd} +% +% The font comes in normal and bold weights only. +% +% \begin{macrocode} +%<*fdot1> +\DeclareFontFamily{OT1}{auncl}{} + \DeclareFontShape{OT1}{auncl}{m}{n}{ <-8.5> auncl7 <8.5-15> auncl10 <15-> auncl17 }{} + \DeclareFontShape{OT1}{auncl}{m}{sl}{ <-> sub * auncl/m/n }{} + \DeclareFontShape{OT1}{auncl}{m}{it}{ <-> sub * auncl/m/n }{} + \DeclareFontShape{OT1}{auncl}{m}{sc}{ <-> sub * auncl/m/n }{} + \DeclareFontShape{OT1}{auncl}{m}{u}{ <-> sub * auncl/m/n }{} + \DeclareFontShape{OT1}{auncl}{bx}{n}{ <-8.5> aunclb7 <8.5-15> aunclb10 <15-> aunclb17 }{} + \DeclareFontShape{OT1}{auncl}{bx}{it}{ <-> sub * auncl/bx/n }{} + \DeclareFontShape{OT1}{auncl}{bx}{sl}{ <-> sub * auncl/bx/n }{} + \DeclareFontShape{OT1}{auncl}{b}{n}{ <-> sub * auncl/bx/n }{} +%</fdot1> +% \end{macrocode} +% +% +% \begin{macrocode} +%<*fdt1> +\DeclareFontFamily{T1}{auncl}{} + \DeclareFontShape{T1}{auncl}{m}{n}{ <-8.5> auncl7 <8.5-15> auncl10 <15-> auncl17 }{} + \DeclareFontShape{T1}{auncl}{m}{sl}{ <-> sub * auncl/m/n }{} + \DeclareFontShape{T1}{auncl}{m}{it}{ <-> sub * auncl/m/n }{} + \DeclareFontShape{T1}{auncl}{m}{sc}{ <-> sub * auncl/m/n }{} + \DeclareFontShape{T1}{auncl}{m}{u}{ <-> sub * auncl/m/n }{} + \DeclareFontShape{T1}{auncl}{bx}{n}{ <-8.5> aunclb7 <8.5-15> aunclb10 <15-> aunclb17 }{} + \DeclareFontShape{T1}{auncl}{bx}{it}{ <-> sub * auncl/bx/n }{} + \DeclareFontShape{T1}{auncl}{bx}{sl}{ <-> sub * auncl/bx/n }{} + \DeclareFontShape{T1}{auncl}{b}{n}{ <-> sub * auncl/bx/n }{} +%</fdt1> +% \end{macrocode} +% +% \section{The package code} \label{sec:code} +% +% \subsection{The \Lpack{auncial} package} +% +% The \Lpack{auncial} package is for typesetting short pieces of text +% in the \thisfont{} fonts. +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. +% \begin{macrocode} +%<*usc> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{auncial}[1999/05/22 v1.0 package for Artificial Uncial fonts] +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\aunclfamily} +% Selects the \thisfont{} font family in the OT1 or T1 encoding. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \newcommand{\aunclfamily}{\usefont{T1}{auncl}{m}{n}} +\else + \newcommand{\aunclfamily}{\usefont{OT1}{auncl}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textuncl} +% Text command for the \thisfont{} font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textauncl}{\aunclfamily} +% \end{macrocode} +% \end{macro} +% +% The end of this package. +% \begin{macrocode} +%</usc> +% \end{macrocode} +% +% \subsection{The \Lpack{allauncl} package} +% +% The \Lpack{allauncl} package is intended for use when the entire document +% will be typeset in the book-hand. This is a minimal package. Because the +% book-hand should not contain arabic digits a fuller package would redefine +% anything numbered in \LaTeX{} to use roman instead of arabic numbering. +% Also, because of the large |\baselineskip| many other aspects of \LaTeX{} +% to do with vertical positioning should also be redefined. +% +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. It also uses the \Lpack{auncial} package. +% \begin{macrocode} +%<*uscall> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{allauncl}[1999/05/22 v1.0 package for all Artificial Uncial fonts] +\RequirePackage{auncial} +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% Redefine the default fonts to be \thisfont, which has only one family +% member. +% \begin{macro}{\rmdefault} +% \begin{macro}{\sfdefault} +% \begin{macro}{\ttdefault} +% \begin{macrocode} +\renewcommand{\rmdefault}{auncl} +\renewcommand{\sfdefault}{auncl} +\renewcommand{\ttdefault}{auncl} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The `leading' in the book-hand is the same as the |x-height|, which is much +% greater than for the CMR fonts. I have borrowed code from Frank Jensen's +% \Lpack{beton} package~\cite{BETON} to do this. The |x-height| (in points) +% for the CMR +% fonts is given in Table~\ref{tab:cmrx}. Note that the CMR design sizes are +% 5--10, 12, and 17.28 points. The other values given are scaled from these +% figures. +% +% \begin{table} +% \centering +% \caption{The x heights of the CMR and \thisfont{} fonts} \label{tab:cmrx} +% \begin{tabular}{ccc} \hline +% Design & CMR & \thisfont \\ +% Size & X Height & X Height \\ \hline +% 5 & 2.14 & 3.00 \\ +% 6 & 2.58 & 3.61 \\ +% 7 & 3.00 & 4.22 \\ +% 8 & 3.44 & 4.82 \\ +% 9 & 3.86 & 5.40 \\ +% 10 & 4.31 & 6.03 \\ +% 11 & 4.74 & 6.64 \\ +% 12 & 5.17 & 7.24 \\ +% 14 & 6.03 & 8.44 \\ +% 17 & 7.44 & 10.42 \\ +% 20 & 8.75 & 12.25 \\ +% 25 & 10.94 & 15.32 \\ \hline +% \end{tabular} +% \end{table} +% +% \begin{macro}{\auncial@baselineskip@table} +% A table of the normal font sizes and the corresponding baselineskip. +% The distance between baselines for \thisfont{} is over twice +% the |x-height|. +% +% \begin{macrocode} +\newcommand{\auncial@baselineskip@table}{% + <\@vpt>6.6% + <\@vipt>7.9% + <\@viipt>9.3% + <\@viiipt>10.6% + <\@ixpt>11.9% + <\@xpt>13.3% + <\@xipt>14.6% + <\@xiipt>16.5% + <\@xivpt>18.6% + <\@xviipt>22.9% + <\@xxpt>26.9% + <\@xxvpt>33.7} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\auncial@new@setfontsize} +% This is a macro that replaces the |\@setfontsize| macro which is called by +% the font size changing commands. +% \begin{macrocode} +\newcommand{\auncial@new@setfontsize}[3]{% + \edef\@tempa{\def\noexpand\@tempb####1<#2}% + \@tempa>##2<##3\@nil{\def\auncial@baselineskip@value{##2}}% + \edef\@tempa{\noexpand\@tempb\auncial@baselineskip@table<#2}% + \@tempa><\@nil + \ifx\auncial@baselineskip@value\@empty + \def\auncial@baselineskip@value{#3}% + \fi + \auncial@old@setfontsize{#1}{#2}\auncial@baselineskip@value} +% \end{macrocode} +% \end{macro} +% +% We had better give an author a means of using The Computer Modern fonts +% if necessary. +% +% \begin{macro}{\cmrfamily} +% \begin{macro}{\cmssfamily} +% \begin{macro}{\cmttfamily} +% These macros select the Computer Modern Roman, Sans, and Typewriter +% font families in either the T1 or OT1 encodings. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}} +\else + \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcmr} +% Text command for the Computer Modern Roman font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmr}{\cmrfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmss} +% Text command for the Computer Modern Sans font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmss}{\cmssfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmtt} +% Text command for the Computer Modern Typewriter font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmtt}{\cmttfamily} +% \end{macrocode} +% \end{macro} +% +% +% At the start of the document, change the |\@setfontsize| macro and call +% the normal font to implement the change. +% \begin{macrocode} +\AtBeginDocument{% + \let\auncial@old@setfontsize=\@setfontsize + \let\@setfontsize=\auncial@new@setfontsize} +\AtBeginDocument{\normalsize} +% \end{macrocode} +% +% +% The end of this package. +% \begin{macrocode} +%</uscall> +% \end{macrocode} +% +% +% +% \bibliographystyle{alpha} +% \renewcommand{\refname}{Bibliography} +% \begin{thebibliography}{GMS94} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem[And69]{ANDERSON69} +% Donald M.~Anderson. +% \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}. +% \newblock Holt, Rinehart and Winston, 1969. +% +% \bibitem[Bol95]{BOLOGNA95} +% Giulia Bologna. +% \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}. +% \newblock Crescent Books, 1995. +% +% \bibitem[Day95]{DAY95} +% Lewis F.~Day. +% \newblock {\em Alphabets Old \& New}. +% \newblock (3rd edition originally published by B.~T.~Batsford, 1910) +% \newblock Senate, 1995. +% +% \bibitem[Dro80]{DROGIN80} +% Marc Drogin. +% \newblock {\em Medieval Calligraphy: Its History and Technique}. +% \newblock Allenheld, Osmun \& Co., 1980. +% +% \bibitem[Dru95]{DRUCKER95} +% Johanna Drucker. +% \newblock {\em The Alphabetic Labyrinth}. +% \newblock Thames \& Hudson, 1995. +% +% \bibitem[Fir93]{FIRMAGE93} +% Richard A.~Firmage. +% \newblock {\em The Alphabet Abecedarium}. +% \newblock David R~Goodine, 1993. +% +% \bibitem[Fli98]{LETTRINE} +% Daniel Flipo. +% \newblock {\em The LETTRINE package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1998. +% +% \bibitem[Har95]{HARRIS95} +% David Harris. +% \newblock {\em The Art of Calligraphy}. +% \newblock DK Publishing, 1995. +% +% \bibitem[Jen95]{BETON} +% Frank Jensen. +% \newblock {\em The BETON package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1995. +% +% \bibitem[Joh71]{JOHNSTON75} +% Edward Johnston (ed. Heather Child). +% \newblock {\em Formal Penship and Other Papers}. +% \newblock Penthalic, 1971. +% +% \bibitem[Knu87]{CM} +% Donald E.~Knuth. +% \newblock {\em Computer Modern Typefaces}. +% \newblock Addison-Wesley, 1987. +% +% \bibitem[Knu92]{METAFONT} +% Donald E.~Knuth. +% \newblock {\em The METAFONTbook}. +% \newblock Addison-Wesley, 1992. +% +% \bibitem[GMS94]{GOOSSENS94} +% Michel Goossens, Frank Mittelbach, and Alexander Samarin. +% \newblock {\em The LaTeX Companion}. +% \newblock Addison-Wesley Publishing Company, 1994. +% +% \bibitem[Tho75]{THOMAS75} +% Alan G.~Thomas. +% \newblock {\em Great Books and Book Collectors}. +% \newblock Weidenfield and Nichoson, 1975. +% +% \bibitem[Wil99]{DOCMFP} +% Peter R.~Wilson. +% \newblock {\em The DOCMFP Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \bibitem[Wil99b]{ROMANNUM} +% Peter R.~Wilson. +% \newblock {\em The ROMANNUM Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \end{thebibliography} +% +% +% \Finale +% \PrintIndex +% +\endinput + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + diff --git a/Master/texmf-dist/source/latex/bookhands/auncial/auncial.ins b/Master/texmf-dist/source/latex/bookhands/auncial/auncial.ins new file mode 100644 index 00000000000..1e0265bdd3e --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/auncial/auncial.ins @@ -0,0 +1,101 @@ +%% +%% auncial.ins +%% Copyright 1999 Peter R. Wilson +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Peter Wilson (CUA) +%% now at: peter.r.wilson@boeing.com +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{auncial.ins} +\input docstrip.tex +\preamble + + Copyright 1999 Peter R. Wilson + + This program is provided under the terms of the + LaTeX Project Public License distributed from CTAN + archives in directory macros/latex/base/lppl.txt. + +Author: Peter Wilson (CUA) + now at: peter.r.wilson@boeing.com + +\endpreamble + +\keepsilent + +%%% \Msg{*** Generating the driver file ***} +%%% \generateFile{auncial.drv}{t}{\from{auncial.dtx}{driver}} + +\Msg{*** Generating the Metafont files ***} + +\usepostamble\empty +\generateFile{auncl7.mf}{t}{\from{auncial.dtx}{base7}} +\generateFile{auncl10.mf}{t}{\from{auncial.dtx}{base10}} +\generateFile{auncl17.mf}{t}{\from{auncial.dtx}{base17}} +\generateFile{aunclb7.mf}{t}{\from{auncial.dtx}{base7b}} +\generateFile{aunclb10.mf}{t}{\from{auncial.dtx}{base10b}} +\generateFile{aunclb17.mf}{t}{\from{auncial.dtx}{base17b}} +\generateFile{auncll.mf}{t}{\from{auncial.dtx}{min}} +\generateFile{aunclu.mf}{t}{\from{auncial.dtx}{maj}} +\generateFile{auncltitle.mf}{t}{\from{auncial.dtx}{mfd}} +\generateFile{aunclpunct.mf}{t}{\from{auncial.dtx}{punct}} +\generateFile{auncllig.mf}{t}{\from{auncial.dtx}{lig}} +\generateFile{auncldig.mf}{t}{\from{auncial.dtx}{dig}} + +\Msg{*** Generating the Font Definition files ***} +\usepostamble\defaultpostamble + +\generateFile{ot1auncl.fd}{t}{\from{auncial.dtx}{fdot1}} +\generateFile{t1auncl.fd}{t}{\from{auncial.dtx}{fdt1}} + +\Msg{*** Generating the LaTeX2e package files ***} + +\generateFile{auncial.sty}{t}{\from{auncial.dtx}{usc}} +\generateFile{allauncl.sty}{t}{\from{auncial.dtx}{uscall}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into directories searched by TeX:} +\Msg{*} +\Msg{* Move these into the font source area:} +\Msg{* \space\space auncl7.mf} +\Msg{* \space\space auncl10.mf} +\Msg{* \space\space auncl17.mf} +\Msg{* \space\space aunclb7.mf} +\Msg{* \space\space aunclb10.mf} +\Msg{* \space\space aunclb17.mf} +\Msg{* \space\space auncll.mf} +\Msg{* \space\space aunclu.mf} +\Msg{* \space\space auncltitle.mf} +\Msg{* \space\space aunclpunct.mf} +\Msg{* \space\space auncllig.mf} +\Msg{* \space\space auncldig.mf} +\Msg{*} +\Msg{* Move these into the LaTeX macro area:} +\Msg{* \space\space ot1auncl.fd} +\Msg{* \space\space t1auncl.fd} +\Msg{* \space\space auncial.sty} +\Msg{* \space\space allauncl.sty} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{* Process any name.idx file by:} +\Msg{* \space\space\space\space makeindex -s gind.ist name} +\Msg{* Process any name.glo file by:} +\Msg{* \space\space\space\space makeindex -s gglo.ist -o name.gls name.glo} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/bookhands/carolmin/carolmin.dtx b/Master/texmf-dist/source/latex/bookhands/carolmin/carolmin.dtx new file mode 100644 index 00000000000..ee05477a082 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/carolmin/carolmin.dtx @@ -0,0 +1,4924 @@ +% \iffalse meta-comment +% +% carolmin.dtx +% Copyright 1999 Peter R. Wilson +% +% This program is provided under the terms of the +% LaTeX Project Public License distributed from CTAN +% archives in directory macros/latex/base/lppl.txt. +% +% Author: Peter Wilson (CUA) (now at: peter.r.wilson@boeing.com) +% +% If you do not have the docmfp package (available from CTAN in +% tex-archive/macros/latex/contrib/supported), comment out the +% \usepackage{docmfp} line below and uncomment the line following it. +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{docmfp} +%%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{} +\EnableCrossrefs +\CodelineIndex +%% comment out the next line to show the code +\OnlyDescription +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{carolmin.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{134} +% +% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} +% \DoNotIndex{\@centercr,\@cite} +% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} +% \DoNotIndex{\@input,\@ixpt,\@m} +% \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} +% \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} +% \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} +% \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} +% \DoNotIndex{\advance,\Alph,\alph} +% \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\bullet} +% \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} +% \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} +% \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} +% \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +% \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} +% \DoNotIndex{\fbox} +% \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} +% \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +% \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} +% \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} +% \DoNotIndex{\input} +% \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} +% \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} +% \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +% \DoNotIndex{\NeedsTeXFormat,\newdimen} +% \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} +% \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} +% \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} +% \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +% \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +% \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +% \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} +% \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} +% \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} +% \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} +% \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} +% \DoNotIndex{\viipt,\vipt,\vskip,\vspace} +% \DoNotIndex{\wd,\xiipt,\year,\z@} +% +% \changes{v1.0}{2002/12/30}{First public release} +% +% \def\fileversion{v1.0} +% \def\filedate{2002/12/30} +% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package +% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option +% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file +% \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter +% \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle +% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment +% \newcommand*{\AD}{\textsc{ad}} +% \newcommand*{\thisfont}{Carolingian Minuscule} +% +% \title{The \Lpack{Carolingian Minuscule} fonts\thanks{This +% file has version number \fileversion, last revised +% \filedate.}} +% +% \author{% +% Peter Wilson\\ +% Catholic University of America \\ +% Now at \texttt{peter.r.wilson@boeing.com} +% } +% \date{\filedate} +% \maketitle +% \begin{abstract} +% The \Lpack{carolmin} and \Lpack{allcmin} packages provide a set of +% Metafont \thisfont{} book-hands +% as used +% for manuscripts in the 8th to the 12th century. This is one in a series +% of manuscript fonts. +% \end{abstract} +% \tableofcontents +% \listoftables +% +% +% +% +% \section{Introduction} +% +% The \Lpack{carolmin} and \Lpack{allcmin} packages provide a Metafont~\cite{METAFONT} version +% of the \thisfont{} manuscript book-hand that was in use between about the +% eighth and twelfth centuries~\AD. It is part of a project to provide fonts +% covering the major manuscript hands between the first century~\AD{} and +% the invention of printing. The principal resources used in this project +% are listed in the Bibliography. +% +% This manual is typeset according to the conventions of the +% \LaTeX{} \textsc{docstrip} utility which enables the automatic +% extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. +% The \Lpack{docmfp} package is used for documenting the Metafont portions +% of the distribution~\cite{DOCMFP}. +% +% Section~\ref{sec:usc} describes the usage of the package. +% Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} +% and source code for the package is in Section~\ref{sec:code}. +% +% \subsection{Manuscript book-hands} +% +% Before the invention of printing all books were written by hand. The book-hands +% used by the scribes and copyists for the manuscripts changed as time +% went on. Table~\ref{tab:1} lists some of the common book-hands which were used +% between the 1st and 15th centuries. The later book-hands formed the basis of the +% fonts used by the early printers, which in turn form the basis of the printing +% fonts in use today. +% +% The manuscript book-hands were written with a broad nibbed reed or quill +% pen. Among the distinguishing characteristics of a hand, apart from the +% actual shape of the letters, are the angle of the pen (which controls the +% variation between thick and thin strokes) and the height of a letter compared +% to the width of the nib. The lower the ratio of the letter height to nib +% width, the more condensed is the script. The scripts also varied in their +% typical height. +% +% Table~\ref{tab:1} gives an `average' x-height for each +% script, which I obtained by measuring a sample of photographs of +% manuscripts written in the various hands. About a dozen examples +% of each book-hand were measured. This figure should not be taken too +% seriously. +% +% There was not a sharp division between the use of one hand and another. +% Many manuscripts exhibit a variety of hands in the same document. For example, +% the scribe writing in an Uncial hand may have used Roman Rustic letters +% for capitals. Usually the same pen was used for the two different scripts. +% +% Generally speaking, as a hand got older it became more embelished, and +% therefore took longer to write. As this happened a new hand would appear that +% was faster, and which would eventually make the earlier one obsolete. +% +% Many of the book-hands were single-cased; that is, they did not have an +% upper- and lower-case as we do nowadays in Western scripts. On the other +% hand, a script might be majuscule or minuscule. A \textit{majuscule} script +% is one, like our upper-case, where the letters are drawn between two lines +% and are of a uniform height with no ascenders or descenders. +% A \textit{minuscule} script, like our lower-case, is drawn between four lines +% and has ascenders and descenders. +% +% \begin{table} +% \centering +% \caption{The main manuscript book-hands} \label{tab:1} +% \begin{tabular}{lccccc} \hline +% Name & Century & x-height & Height & Pen & Normalised \\ +% & & (mm) & (nib widths) & angle & height \\ \hline +% Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\ +% Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\ +% Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\ +% Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\ +% Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\ +% Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\ +% Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\ +% Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\ +% Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\ +% Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\ +% Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\ +% Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline +% \end{tabular} +% \end{table} +% +% During the period under consideration arabic numerals were effectively +% not used. At the beginning they were unknown and even though some knew +% of them towards the end, the glyphs used for them are not recognisable --- +% to me they look somewhat like cryllic letters --- and each locality +% and time had its own highly individualistic rendering. The general rule +% when using one of these book-hands is to write all numbers using +% roman numerals. +% +% The Roman alphabet consisted of 23 capital letters --- the J, U and W +% were absent. The book-hands initially used both a `u' and a `v' interchangeably +% but by the 10th century the practice had become to use the `v' before a vowel +% and the `u' otherwise. The letter corresponding to the W sound appeared +% in England around the 7th century in +% the form of the runic \textit{wen} character and by about the 11th century +% the `w' chacter was generally used. The `J' is the newest letter of all, not +% appearing until about the mid 16th century. +% +% In the first century punctuation was virtually unknown, and typically +% would not even be any additional space between individual words, never +% mind denoting ends of sentences. Sometimes a dot at mid-height would be +% used as a word seperator, or to mark off the end of a paragraph. Effectively +% a text was a continuous stream of letters. By the time that printing was +% invented, though, all of our modern punctuation marks were being used. +% +% Among all these manuscript hands, the Carolingian minuscule is the +% most important as our modern fonts are based on its letter shapes, and it is +% also at this point in time where the division occured between the black letter +% scripts as used even today in Germany, and the lighter fonts used elesewhere. +% The Rotunda and Humanist minuscule hands were developed in Italy and were +% essentially a rediscovery of the Carolingian minusucle. Guthenberg took the +% Gothic scripts as the model for his types. Later printers, +% such as Nicholas Jenson of Venice, +% took the Humanist scripts as their models. +% +% +% \subsection{The \thisfont{} script} +% +% Charlemagne (742--814), the Holy Roman Emperor, was naturally anxious to consolidate +% his empire. Although he was probably illiterate he employed scribes +% and when he came to the throne there was a wide diversity of bookhands +% in use. For efficiency he needed to have a more uniform style of writing +% so that reading mistakes were less likely to happen. To this end +% he employed the Anglo-Saxon monk Alcuin to be his `Minister for Education'. +% Alcuin produced an elegant, simple and easy-to-write hand that is now +% called \thisfont. +% +% Letters for capitals were taken from contemporary and earlier bookhands, +% thus helping to preserve them. All the modern punctuation marks were in use +% and the letter `v' appears for the first time. As well as the ampersand, the most +% common ligatures were `ct' and `st'; also, a special `half r' was used after +% an `o'. +% +% +% +% \section{The \Lpack{carolmin} and \Lpack{allcmin} packages} \label{sec:usc} +% +% The \thisfont{} font family is called |cmin|. The font is supplied in both +% OT1 and T1 encodings. +% +% \subsection{The \Lpack{carolmin} package} +% +% This is intended for the occasions when some short pieces of text have +% to be written in \thisfont{} while the majority of the document is in another +% font. The normal baselineskips are used. +% +% \DescribeMacro{\cminfamily} +% The |\cminfamily| declaration starts typesetting with the \thisfont{} fonts. +% Use of the \thisfont{} font will continue until either there is another |\...family| +% declaration or the current group (e.g., environment) is closed. +% +% \DescribeMacro{\textcmin} +% The command |\textcmin{|\meta{text}|}| will typeset \meta{text} using the +% \thisfont{} fonts. +% +% \subsection{The \Lpack{allcmin} package} +% +% +% This package is for when the entire document will be typeset with the +% \thisfont{} font. The baselineskips are set to those appropriate to the +% book-hand. +% +% This is a minimalist package. Apart from declaring \thisfont{} to be the +% default font and setting the baselineskips appropriately, it makes no other +% alterations. +% Vertical spacing +% before and after section titles and before and after lists, etc., will be +% too small as the \LaTeX{} design assumes a font comparable in size to +% normal printing fonts, and the book-hand is much taller. +% To capture more of the flavour of the time, all numbers +% should be written using roman numerals. +% The \Lpack{romannum} package~\cite{ROMANNUM} +% can be used so that \LaTeX{} will typeset the numbers that it generates, +% like sectioning or caption numbers, using roman numerals instead of arabic +% digits. +% +% \DescribeMacro{\cmrfamily} +% \DescribeMacro{\textcmr} +% \DescribeMacro{\cmssfamily} +% \DescribeMacro{\textcmss} +% \DescribeMacro{\cmttfamily} +% \DescribeMacro{\textcmtt} +% The |...family| declarations start typesetting with the Computer Modern Roman +% (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer +% Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}| +% commands will typeset \meta{text} in the corresponding Computer Modern font. +% +% The \Lpack{allcmin} package automatically loads the \Lpack{carolmin} package, +% so its font commands are available if necessary. +% +% \StopEventually{ +% \bibliographystyle{alpha} +% \renewcommand{\refname}{Bibliography} +% \begin{thebibliography}{GMS94} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem[And69]{ANDERSON69} +% Donald M.~Anderson. +% \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}. +% \newblock Holt, Rinehart and Winston, 1969. +% +% \bibitem[Bol95]{BOLOGNA95} +% Giulia Bologna. +% \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}. +% \newblock Crescent Books, 1995. +% +% \bibitem[Day95]{DAY95} +% Lewis F.~Day. +% \newblock {\em Alphabets Old \& New}. +% \newblock (3rd edition originally published by B.~T.~Batsford, 1910) +% \newblock Senate, 1995. +% +% \bibitem[Dro80]{DROGIN80} +% Marc Drogin. +% \newblock {\em Medieval Calligraphy: Its History and Technique}. +% \newblock Allenheld, Osmun \& Co., 1980. +% +% \bibitem[Dru95]{DRUCKER95} +% Johanna Drucker. +% \newblock {\em The Alphabetic Labyrinth}. +% \newblock Thames \& Hudson, 1995. +% +% \bibitem[Fir93]{FIRMAGE93} +% Richard A.~Firmage. +% \newblock {\em The Alphabet Abecedarium}. +% \newblock David R~Goodine, 1993. +% +% \bibitem[Fli98]{LETTRINE} +% Daniel Flipo. +% \newblock {\em The LETTRINE package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1998. +% +% \bibitem[Har95]{HARRIS95} +% David Harris. +% \newblock {\em The Art of Calligraphy}. +% \newblock DK Publishing, 1995. +% +% \bibitem[Jen95]{BETON} +% Frank Jensen. +% \newblock {\em The BETON package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1995. +% +% \bibitem[Joh71]{JOHNSTON75} +% Edward Johnston (ed. Heather Child). +% \newblock {\em Formal Penship and Other Papers}. +% \newblock Penthalic, 1971. +% +% \bibitem[Knu87]{CM} +% Donald E.~Knuth. +% \newblock {\em Computer Modern Typefaces}. +% \newblock Addison-Wesley, 1987. +% +% \bibitem[Knu92]{METAFONT} +% Donald E.~Knuth. +% \newblock {\em The METAFONTbook}. +% \newblock Addison-Wesley, 1992. +% +% \bibitem[GMS94]{GOOSSENS94} +% Michel Goossens, Frank Mittelbach, and Alexander Samarin. +% \newblock {\em The LaTeX Companion}. +% \newblock Addison-Wesley Publishing Company, 1994. +% +% \bibitem[Tho75]{THOMAS75} +% Alan G.~Thomas. +% \newblock {\em Great Books and Book Collectors}. +% \newblock Weidenfield and Nichoson, 1975. +% +% \bibitem[Wil99]{DOCMFP} +% Peter R.~Wilson. +% \newblock {\em The DOCMFP Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \bibitem[Wil99b]{ROMANNUM} +% Peter R.~Wilson. +% \newblock {\em The ROMANNUM Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \end{thebibliography} +% } +% +% \section{The Metafont code} \label{sec:mf} +% +% +% As previously noted, this work is part of a larger project to provide +% fonts covering the main manuscript book-hands. As such, one of the +% aims is to produce a coordinated set of fonts, especially as multiple +% hands might be used in a single document. +% +% Noting that the hands tend to be somewhat larger than the typical 10pt +% size (where the x-height is approximately 1.5mm) used for modern books, +% I have also designed the fonts +% at a larger than normal size, then applied some non-linear factors when reducing +% them down to a 10pt size. +% Further, I have used the height of the Carolingian minuscule as a +% normalising factor when deciding on the absolute height of any particular +% script. The x-height of the Carolingian font is made equal to the +% x-height of the Computer Modern Roman (CMR) font. +% +% Modern fonts are effectively drawn. That is, the outline of the letter is +% drawn carefully and the center is filled with ink. This is shown to good +% effect in the Metafont code for the Computer Modern fonts~\cite{CM}. +% In contrast, the manuscript letters were inked by single pen strokes in +% a calligraphic manner. I have tried to repeat this calligraphic style +% in the Metafont code. +% +% As much as possible I have tried to use parameter values from the +% Computer Modern Roman (CMR) fonts in order to reduce possible +% infelicities if the CM and manuscript fonts are used together. However, +% few of the CMR parameters are applicable to the calligraphic style. +% +% +% \subsection{The parameter file} +% +% We deal with the parameter files first, and start by announcing +% what they are for. The \thisfont{} font comes in three sizes and also as a normal +% and a bold font. +% \begin{macrocode} +%<*base7|base10|base17|base7b|base10b|base17b> +%<base7>%%% CMIN7.MF Carolingian Minuscule at 7 point design size. +%<base10>%%% CMIN10.MF Carolingian Minuscule at 10 point design size. +%<base17>%%% CMIN17.MF Carolingian Minuscule at 17 point design size. +%<base7b>%%% CMINB7.MF Carolingian Minuscule Bold at 7 point design size. +%<base10b>%%% CMINB10.MF Carolingian Minuscule Bold at 10 point design size. +%<base17b>%%% CMINB17.MF Carolingian Minuscule Bold at 17 point design size. +% +% \end{macrocode} +% Parameters from CMR are used as much as possible. We also +% make sure that \Lpack{cmbase} is loaded as well as plain Metafont. +% \begin{macrocode} +if unknown cmbase: input cmbase fi + +%<base7>font_identifier:="CMIN"; font_size 7pt#; +%<base10>font_identifier:="CMIN"; font_size 10pt#; +%<base17>font_identifier:="CMIN"; font_size 17.28pt#; +%<base7b>font_identifier:="CMINB"; font_size 7pt#; +%<base10b>font_identifier:="CMINB"; font_size 10pt#; +%<base17b>font_identifier:="CMINB"; font_size 17.28pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutstretch} +% The CMR scaling for lowercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> jutstretch:=1.19; +%<base10|base10b> jutstretch:=1.152; +%<base17|base17b> jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{stemstretch} +% The CMR scaling for lowercase stem widths wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> stemstretch:=1.50; +%<base10|base10b> stemstretch:=1.31; +%<base17|base17b> stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{caprat} +% The scaling for `capitals' wrt `lowercase'. This is pretty much a guess +% (the ratio for CMR10 is 1.59). +% \begin{macrocode} + caprat:=1.5; % ratio of capital height to minuscule height +% \end{macrocode} +% +% \DescribeVariable{cap_jutstretch} +% The CMR scaling for uppercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_jutstretch:=1.3; +%<base10|base10b> cap_jutstretch:=1.2; +%<base17|base17b> cap_jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{cap_stemstretch} +% The CMR scaling for uppercase stem width wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_stemstretch:=1.45; +%<base10|base10b> cap_stemstretch:=1.31; +%<base17|base17b> cap_stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{bfudge} +% Letter width scaling for bold font wrt normal font. +% \begin{macrocode} +%<base7|base10|base17> bfudge:=1.0; +%<base7b|base10b|base17b> bfudge:=1.2; +% \end{macrocode} +% +% \DescribeVariable{szfudge} +% Width scaling wrt 17pt letter width. +% \begin{macrocode} +%<base7|base7b> szfudge:=1.18; +%<base10|base10b> szfudge:=1.0; +%<base17|base17b> szfudge:=1.0; +% \end{macrocode} +% +% \DescribeVariable{hstretch} +% Horizontal stretching factor wrt 17pt size letter width. +% \begin{macrocode} + hstretch:=szfudge*bfudge; +% \end{macrocode} +% +% \DescribeVariable{carol_height} +% The x-height of the Carolingian minuscule font. +% \begin{macrocode} +%<base7|base7b> carol_height#:=108.5/36pt#; +%<base10|base10b> carol_height#:=155/36pt#; +%<base17|base17b> carol_height#:=268/36pt#; +% \end{macrocode} +% +% \DescribeVariable{vstretch} +% The height of this font wrt the Carolingian font. +% \begin{macrocode} + vstretch:=1.00; + +% \end{macrocode} +% +% \DescribeVariable{x_height} +% The x-height of lower case letters. Scaled from the Carolingian font. +% \begin{macrocode} + x_height#:=vstretch*carol_height#; +% \end{macrocode} +% +% \DescribeVariable{u} +% The unit width. The CMR values are used. +% \begin{macrocode} +%<base7> u#:=15.5/36pt#; +%<base10> u#:=20/36pt#; +%<base17> u#:=32.5/36pt#; +%<base7b> u#:=17.9/36pt#; +%<base10b> u#:=23/36pt#; +%<base17b> u#:=37/36pt#; +% \end{macrocode} +% +% \DescribeVariable{width_adj} +% \DescribeVariable{serif_fit} +% \DescribeVariable{cap_serif_fit} +% \DescribeVariable{letter_fit} +% The majority of these parameters and values are constant. +% They are for fine adjustements of characters. The CM values are used. +% \begin{macrocode} + width_adj#:=0pt#; % width adjustment for certain characters + serif_fit#:=0pt#; % extra sidebar near lowercase serifs +%<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs +%<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +%<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs +%<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars +% \end{macrocode} +% +% \DescribeVariable{sb} +% A length used for adjusting the side bearings of characters. +% \begin{macrocode} +%<base7|base7b> sb#:=1/2u#; % unit for side bearings +%<base10|base10b> sb#:=1/2u#; % unit for side bearings +%<base17|base17b> sb#:=1/2u#; % unit for side bearings + +% \end{macrocode} +% +% \DescribeVariable{cap_height} +% The height of capital letters. +% \begin{macrocode} +%<base7|base7b> cap_height#:=172.2/36pt#; % height of caps +%<base10|base10b> cap_height#:=246/36pt#; % height of caps +%<base17|base17b> cap_height#:=425/36pt#; % height of caps +% \end{macrocode} +% +% \DescribeVariable{thickfudge} +% The reciprocal of the font height in nib widths. Normal font height +% is 5 nib widths and the bold font height is 4 nib widths. +% \begin{macrocode} +%<base7|base10|base17> thickfudge:=1/5; +%<base7b|base10b|base17b> thickfudge:=1/4; +% \end{macrocode} +% +% \DescribeVariable{thinfudge} +% The nib sharpness. +% \begin{macrocode} +thinfudge:=1/6; +% \end{macrocode} +% +% \DescribeVariable{thick} +% The maximum nib width. +% That is, the width of the thickest line that can be penned. +% \begin{macrocode} +thick#:=stemstretch*thickfudge*x_height#; % max pen breadth +% \end{macrocode} +% +% \DescribeVariable{thin} +% The nib thinness. +% That is, the width of the thinnest line that can be penned. +% \begin{macrocode} +thin#:=thinfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{pangle} +% The pen angle (in degrees). +% \begin{macrocode} +pangle:=45; % pen angle +% \end{macrocode} +% +% \DescribeVariable{ascratio} +% The height of lower case ascenders wrt |x_height|. +% \begin{macrocode} + ascratio:=6/4; +% \end{macrocode} +% +% \DescribeVariable{asc_height} +% The height of lower case ascenders. +% \begin{macrocode} + asc_height#:=ascratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{descratio} +% The depth of lower case descenders wrt |x_height|. +% \begin{macrocode} + descratio:=3/4; +% \end{macrocode} +% +% \DescribeVariable{desc_depth} +% The depth of lower case descenders. +% \begin{macrocode} + desc_depth#:=descratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_height} +% The height of numerals. Make these midway between normal and capital +% letters. +% \begin{macrocode} + fig_height#:=(0.5[1,caprat])*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_width} +% The width of numerals. All numerals are the same width (roughly, an `o'). +% \begin{macrocode} + fig_width#:=hstretch*(x_height#); +% \end{macrocode} +% +% \DescribeVariable{body_height} +% The height of the tallest character. +% \begin{macrocode} + body_height#:=caprat*asc_height#; +% \end{macrocode} +% +% \DescribeVariable{body_depth} +% The depth of the lowest character. +% \begin{macrocode} + body_depth#:=caprat*desc_depth#; +% \end{macrocode} +% +% \DescribeVariable{half_height} +% Half the normal letter height. +% \begin{macrocode} + half_height#:=1/2x_height#; % half the height of x height letters + +% \end{macrocode} +% +% \DescribeVariable{side} +% We might be using a square for the character design. +% \begin{macrocode} +side#:=x_height#; +% \end{macrocode} +% +% \DescribeVariable{rule_thickness} +% Thickness of rules (in math symbols). The CMR values are used. +% \begin{macrocode} +%<base7|base7b> rule_thickness#:=.34pt#; +%<base10|base10b> rule_thickness#:=.4pt#; +%<base17|base17b> rule_thickness#:=.6pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutfudge} +% Controls the protrusion of serifs. +% \begin{macrocode} +%%%jutfudge:= 3/4; +jutfudge:= 1/2; +% \end{macrocode} +% +% \DescribeVariable{jut} +% The lowercase serif protrusion. +% \begin{macrocode} +jut#:=jutstretch*jutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{srad} +% |srad| with |0 < srad < 1| controls the serif radius. +% \begin{macrocode} +srad:=0.8; % was 0.5 +% \end{macrocode} +% +% \DescribeVariable{trijut} +% The lowercase triangular serif protrusion. +% \begin{macrocode} +trijut#:=0.75jutstretch*thick#; +% \end{macrocode} +% +% \DescribeVariable{clubjutfudge} +% The fractional protusion of a club serif. +% \begin{macrocode} +clubjutfudge:=1/2; +% \end{macrocode} +% +% \DescribeVariable{clubjut} +% The lowercase club serif protrusion. +% \begin{macrocode} +clubjut#:=jutstretch*clubjutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{o} +% Amount of overshoot for curves (as in an `o'). Use CMR values. +% \begin{macrocode} +%<base7|base7b> o#:=5/36pt#; +%<base10|base10b> o#:=8/36pt#; +%<base17|base17b> o#:=10/36pt#; + +% \end{macrocode} +% +% \DescribeVariable{slant} +% |slant| is the amount the font slopes to the right. \\ +% 5 degrees = 9/100; 10 degrees = 11/50. +% \begin{macrocode} +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +%%%%%%slant:= sind 10/cosd 10; %% 10 degree slant + +% \end{macrocode} +% +% \DescribeVariable{monospace} +% We are generating a variable-width font. +% \begin{macrocode} +monospace:=false; % should all characters have the same width? + +% \end{macrocode} +% +% \DescribeVariable{dot_size} +% The size of (punctuation) dots. +% \begin{macrocode} +dot_size#:=5thin#; % size of dots +% \end{macrocode} +% +% \DescribeVariable{comma_width} +% The horizontal width of a comma. +% \begin{macrocode} +comma_width#:=5/4dot_size#; + +% \end{macrocode} +% +% Finally, call the driver file for the font. +% \begin{macrocode} +generate cmintitle %% switch to the driver file + +% \end{macrocode} +% +% The end of this code section. +% \begin{macrocode} +%</base7|base10|base17|base7b|base10b|base17b> +% \end{macrocode} +% +% +% \subsection{The driver file} +% +% The driver file sets up the font parameters and also contains +% the macros used in the definition of the characters. +% +% \begin{macrocode} +%<*mfd> +% This is CMINTITLE.MF for the Carolingian Minuscule font. +% This makes a short font. +% This file also contains special macros universally needed in the +% font but either not in the cmbase.mf file or modifications of these. +% +% \end{macrocode} +% +% \begin{routine}{makebox} +% This is a new version of the \Lpack{cmbase.mf} |makebox| macro. +% Essentially, as we are only generating a single case font, we don't +% need all the horizontals for the CMR characters. +% +% \begin{macrocode} +% A new version of cmbase.mf makebox macro +def makebox(text rule) = + for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth: + rule((l,y)t_,(r,y)t_); endfor % horizontals + for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals + for x=u*(1+floor(1/u)) step u until r-1: + rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals + if charic<>0: + rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{proofpcbb} +% The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the +% square, and at the bottom and top midpoints, where the point |zS| is at +% position |(xoff,yoff)| in the square. +% \begin{macrocode} + +% A macro to delineate a letter's bounding square in proof mode. +% Point z$ is at (xoff,yoff) in the bounding square. +def proofpcbb(suffix $)(expr xoff, yoff) = +if proofing > 0: + x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner + z$br = (x$bl+side, y$bl); % BRHC + z$tr = (x$bl+side, y$bl+side); % TRHC + z$tl = (x$bl, y$bl+side); % TLHC + z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points + pair hc, vc; + hc = (2u,0); vc = (0,2u); + pickup pensquare scaled 2; + for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc: + draw s-hc--s+hc; + draw s-vc--s+vc; + endfor +fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{carolmin_font_setup} +% This macro contains the set up for the \thisfont{} fonts. +% \begin{macrocode} + +def carolmin_font_setup= % contains special stuff for carolmin fonts + define_pixels(side,half_height,carol_height,comma_width); + define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit, + cap_serif_fit,jut,clubjut,cap_jut,trijut); + define_pixels(fig_width); + define_whole_pixels(letter_fit,sb); + define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height, + desc_depth,body_depth,fig_height); + define_corrected_pixels(o); + define_blacker_pixels(thick,thin); + let adjust_fit = normal_adjust_fit; +% \end{macrocode} +% \DescribeVariable{stylus} +% The pen for drawing the thinnest lines is |stylus|. +% \begin{macrocode} + pickup pencircle scaled thin; + stylus:=savepen; +% \end{macrocode} +% \DescribeVariable{thickstylus} +% The pen for drawing lines a bit thicker than the thinnest is |thickstylus|. +% \begin{macrocode} + pickup pencircle scaled (1.5thin); + thickstylus:=savepen; +% \end{macrocode} +% \DescribeVariable{quill} +% The normal calligraphic pen is |quill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated pangle; + quill:=savepen; + +% \end{macrocode} +% +% \DescribeVariable{threequarterquill} +% A pen with 3/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 3/4thick yscaled thin rotated pangle; + threequarterquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{halfquill} +% A pen with 1/2 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/2thick yscaled thin rotated pangle; + halfquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{quarterquill} +% A pen with 1/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/4thick yscaled thin rotated pangle; + quarterquill := savepen; + +% \end{macrocode} +% +% +% \begin{macrocode} + numeric pcshiftx#; % x value of LHS of box wrt origin of char box + define_pixels(pcshiftx); + numeric sqxside#; % x size of the square + numeric sqyside#; % y size of the square + define_pixels(sqxside,sqyside); + +enddef; % end of carolmin_font_setup + +% \end{macrocode} +% \end{routine} +% +% +% \DescribeVariable{ductus} +% A boolean to control drawing the ductus (TRUE) or the full letter (FALSE). +% \begin{macrocode} +boolean ductus; +ductus:=false; +% \end{macrocode} +% +% \DescribeVariable{qhor} +% \DescribeVariable{qvert} +% The cosine and sine of the pen angle. +% \begin{macrocode} +numeric qhor, qvert; +qhor:=cosd(pangle); qvert:=sind(pangle); +% \end{macrocode} +% +% \DescribeVariable{pdir} +% The vector corresponding to the pen angle. +% \begin{macrocode} +pair pdir; pdir=dir(pangle); +% \end{macrocode} +% +% \DescribeVariable{ppdir} +% The vector that is perpendicular (anticlockwise) to the pen angle. +% \begin{macrocode} +pair ppdir; ppdir=dir(pangle+90); +% \end{macrocode} +% +% \begin{routine}{draw_serif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_serif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; + z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + top_serif:=false; + z$c=z$b shifted (bjut*pdir); + fi +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_serif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_roundserif} +% The |draw_serif| routine can leave a bump at the end of the stem. +% The |draw_roundserif| routine, which takes the same arguments, +% is meant to eliminate the bump. +% \begin{macrocode} + +def draw_roundserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); + undraw z$--z$a; +enddef; % end of draw_roundserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flatserif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. This produces a serif like |draw_serif| except +% that one side of the seerif is flat. +% \begin{macrocode} + +def draw_flatserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; +%%% z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-jut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (jut*pdir); + fi + z$b = fr[z$,z$c]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$a--z$; + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_flatserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_clubserif} +% A macro to draw a clubbed serif. |draw_clubserif(1,2,f)| uses the current +% pen to +% draw a clubbed serif of extent |clubjut| at |z1| to the left of the line +% from |z2| +% to |z1|. The serif matches |z1| like the flatserif does and ends at the +% point |f[z1,z2]|. +% \begin{macrocode} + +def draw_clubserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| controls the length of the serif. +% \begin{macrocode} +%% beta=1-fr; + ajut=clubjut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem, |fr| between |$| and |$$|. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); +%% vec2=ajut*vec1; +%% z$a=z$ shifted vec2; + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-clubjut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (clubjut*pdir); + fi + z$a = fr[z$,z$$]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$c..z$a{vec1}; + labels($a,$b,$c); +enddef; % end of draw_clubserif + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{draw_triserif} +% A macro to draw a triangular top left serif. +% |draw_triserif(1,tj)| draws a serif at |z1| with its leftmost x +% value at |x1-tj|, where it is assumed that the +% top point on the stem is at |z1| and the stem was drawn with |quill|. +% \begin{macrocode} + +def draw_triserif(suffix $)(expr tj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$ts1'=lft x$; y$ts1'=bot y$; + pickup stylus; + lft x$ts1=x$ts1'; bot y$ts1=y$ts1'; + x$ts2=x$ts1-tj; z$ts2=whatever[z$,z$ts1]; + x$ts3=x$ts1; y$ts3=y$ts2-tj; + pickup stylus; +%% filldraw z$ts1--z$ts2--z$ts3--cycle; + filldraw z$--z$ts2--z$ts3--cycle; + pickup oldpen; + labels($ts1,$ts2,$ts3); +enddef; % end of draw_triserif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_istem} +% A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs +% are of extent |jut|. There is a top left and bottom right serif. +% The serif radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_istem(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % top serif + draw_serif($$, $, fr); % bottom serif + draw z$a--z$$a; % the stem +enddef; % end of draw_istem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tstem} +% A macro to draw the shape of the stem of a `t'. |draw_tstem(1,2,f)| draws a +% stem whose +% top is at |z1| and bottom at |z2| with a right serif at |z2|. The radius +% is controlled by |f|, with $0 < f < 1$. +% It draws with the current pen and the serif is of extent |jut|. +% NOTE: for the CMIN font, just the stem is drawn --- no serif! +% \begin{macrocode} + +def draw_tstem(suffix $, $$)(expr fr)= +%% draw_serif($$, $, fr); % the serif +%% draw z$--z$$a; % the stem + draw z$--z$$; +enddef; % end of draw_tstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tlserif} +% A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serif +% is of extent |jut|. It also draws the stem to the point |z2|. The serif +% radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_tlserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % the serif + draw z$a--z$$; % the stem +enddef; % end of draw_tlserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flick} +% A macro to draw a flick (like an eyebrow). +% |draw_flick(1,rise,fall,fjut)| draws a stroke starting at |z1| rising up by +% |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is +% |fjut| to the right of |z1|. It is drawn with the current pen. +% \begin{macrocode} + +def draw_flick(suffix $)(expr rise, fall, fjut)= +% \end{macrocode} +% The points |z$a| and |z$b|, together with |z$| make up three points on the +% ductus. +% \begin{macrocode} + rt x$b = x1+fjut; top y$b=y$-fall; + x$a=0.5[x$,x$b]; top y$a=y$+rise; +% \end{macrocode} +% Draw the part, and finish off. +% \begin{macrocode} + draw z$..z$a..z$b; + labels($a,$b); +enddef; % end of draw_flick + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_wave} +% A macro to draw a (horizontal) stroke with a flick at each end +% (down at the left and up at the right). |draw_wave(1,2,f)| uses the current +% pen to draw from |z1wl| to |z1wr|, where |x1wl=x1|, |y1wl=y1-f|, and +% |x1wr=x2|, |y1wr=y2+f|, with |z1| assumed to be at the left of |z2|. +% \begin{macrocode} + +def draw_wave(suffix $,$$)(expr f)= + x$wl=x$; y$wl=y$-f; + x$wr=x$$; y$wr=y$$+f; + z$wc=0.5[z$wl,z$wr]; + draw z$wl{pdir}..z$wc{right}..{pdir}z$wr; + labels($wl,$wc,$wr); +enddef; % end of draw_wave +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tail} +% A macro to draw a tail at the bottom of a (vertical) stem. +% |draw_tail(1,fjut)| draws a tail at the bottom of the stem which ends at |z1|. +% The depth is controlled by the |desc_depth| value and the jut by |fjut|. +% \begin{macrocode} + +def draw_tail(suffix $)(expr fj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$tl' = lft x$; y$tl=bot y$; + pickup stylus; + lft x$tl=x$tl'; + x$tb=x$tl-fj; bot y$tb=y$tl-1/2desc_depth; + filldraw z${down}..{-pdir}z$tb & z$tb{pdir}..{up}z$tl--cycle; + pickup oldpen; + labels($tb,$tl); +enddef; % end of draw_tail +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_triangle} +% A macro to draw a downward pointing equilateral triangle. +% |draw_triangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_triangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$-0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_triangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_utriangle} +% A macro to draw an upward pointing equilateral triangle. +% |draw_utriangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_utriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$+0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_utriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rtriangle} +% A macro to draw a downward pointing right angled triangle. +% |draw_rtriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rtriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$-sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rtriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rutriangle} +% A macro to draw an upward pointing right angled triangle. +% |draw_rutriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rutriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$+sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rutriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_fork} +% A macro to draw a forked line. +% |draw_fork(1,2,sz)| draws a graduated line from |z1| to |z2| with a forked +% end of size |sz|. +% \begin{macrocode} + +def draw_fork(suffix $, $$)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$f1'=lft x$; y$f1'=bot y$; + x$f3'=rt x$; y$f3'=top y$; + pickup stylus; + lft x$f1=x$f1'; bot y$f1=y$f1'; + rt x$f3=x$f3'; y$f3-y$=2*(y$-y$f1); + rt x$f2=x$$-sz; bot y$f2=y$$; + rt x$f4= rt x$f5=x$$; + bot y$f5=y$$-sz; top y$f4=y$$+1/2sz; + filldraw z$f1--z$f2--z$f3--cycle; % the line + draw z$f2{right}..z$f4; % upper fork + draw z$f2{right}..z$f5; % lower fork + pickup oldpen; + labels($f1,$f2,$f3,$f4,$f5); +enddef; % end of draw_fork +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_urswish} +% A macro to draw a line up and to the right with an under curl at the end. +% |draw_urswish(1,2)| draws from |z1| towards |z2|, which is the max upper right +% of a bounding box, where the curl is. +% \begin{macrocode} + +def draw_urswish(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + pickup quill; + rt x$$s1=x$$-thick; top y$$s1=y$$; + rt x$$s2=x$$; +%% x$$s3=x$$-thick; + lft x$$s3=x$$s1; + bot y$$s3=y$$-thick; y$$s2=0.5[y$$s1,y$$s3]; +%% draw z$---z$$s1{right}..z$$s2{down}..{-pdir}z$$s3; + draw z$..z$$s1{pdir}..z$$s2{down}; + labels($$s1,$$s2,$$s3); +enddef; % end of draw_urswish +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{bowl_stem} +% Calculate where a bowl should meet a stem so that the pen is moving in the +% pen direction. +% |bowl_stem(1,2)| calculates the point |z1i|, where |z1| is on the bowl and +% there is a vertical line at |x2|. +% +% \begin{macrocode} + +def bowl_stem(suffix $, $$)= + x$'=0.5[x$,x$$]; y$'=y$; % the mid-point + z$''=z$' shifted (thick*pdir); + x$i=x$$; z$i=whatever[z$',z$'']; + labels($',$i); +enddef; % end of bowl_stem +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_clubbase} +% Draw a clubbed bottom of a vertical stem for the CMIN font. +% |draw_clubbase(1, 2, st, left, right)| draws from |st[z2,z1]| to |z2|. +% At |z2| the pen +% is shifted |left| fraction of the pen width and |right| fraction of the +% pen width, both in the direction of the pen angle. Pen draws smoothly the +% path |z1|, |left|, |right|, |z1|. +% \begin{macrocode} + +% draw clubbed bottom of vertical stem for CMIN font. +def draw_clubbase(suffix $, $$)(expr st, lft, rt)= + z$$l = z$$ shifted (lft*thick*(-pdir)); + z$$r = z$$ shifted (rt*thick*(pdir)); + z$$t = st[z$$,z$]; + draw z$$t{z$$-z$}..z$$l--z$$r..{z$-z$$}z$$t; + labels($$t,$$l,$$r); +enddef; % end of draw_clubbase + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pdot} +% A macro to draw a period dot. +% |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|. +% \begin{macrocode} + +def draw_pdot(suffix $)(expr sz)= +% \end{macrocode} +% Draw a square rotated 45 degrees. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$ shifted (0.5sz*up); + z$u = z$s shifted (sz*right); + z$v = z$t shifted (sz*down); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pdot + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pcomma} +% A macro to draw a period comma. +% |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. The pen is |stylus|. +% \begin{macrocode} + +def draw_pcomma(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line at |z$| of width |sz| sloping back and down +% for a total width of |ar| and depth of |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s-ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu{down}..{left}z$uv--z$vu{right}..{up}z$sv--cycle; + labels($s,$t,$u,$v,$sv,$tu,$uv,$vu); +enddef; % end of draw_pcomma + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_plq} +% A macro to draw a period left quote. +% |draw_plq(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. +% \begin{macrocode} + +def draw_plq(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping forward and down +% for a total width of |ar| and depth of |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s+ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu{down}..{right}z$uv--z$vu{left}..{up}z$sv--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_plq + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{offsetbowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for a non-centered letter `o'. |offsetbowl($, sx, sy, fx, fy)| +% calculates the paths for an `o' +% enclosed in a rectangle size |sx| by |sy| with its bottom lefthand corner +% located at |z$|, where the center of the o is at |(fx*sx, fy*sy)| in the +% bounding rectangle. +% +% Two construction paths, namely |obfirst| and |obsecond| are also +% available. They should be identical. +% +% All paths have points listed in a clockwise direction, starting with +% |z$nh| or |z$minl| as appropriate. +% +% |offsetbowl($, sx, sy, 1/2, 1/2)| gives the same results as |obowl($, sx, sy)|. +% \begin{macrocode} + +path obouter, obinner, obfirst, obsecond; +def offsetbowl(suffix $)(expr sx, sy, fx, fy)= + numeric inx, iny, cx, cy; + pair pt[]; + path pth[]; + inx := 1/2thick*cosd(pangle); iny := 1/2thick*sind(pangle); + cx := x$+fx*sx; cy := y$+fy*sy; + z$obc = (cx,cy); +% \end{macrocode} +% Calulate points on the centre path of the pen. These are offset by |inx| +% from the rectangles vertical sides and by |iny| from the horizontal sides. +% If the pen is parallel to a side, offset the point by half the pen's +% dimension. First do the West, East, North and South points. +% \begin{macrocode} + if pangle = 90: + z$wt=(x$+1/2thin, cy); + z$et=(x$+sx-1/2thin, cy); + else: + z$wt=(x$+inx, cy); + z$et=(x$+sx-inx, cy); + penpos$wt(thick,pangle); + penpos$et(thick,pangle); + fi + if pangle = 0: + z$nh=(cx, y$+sy-1/2thin); + z$sh=(cx, y$+1/2thin); + else: + z$nh=(cx, y$+sy-iny); + z$sh=(cx, y$+iny); + penpos$nh(thick,pangle); + penpos$sh(thick,pangle); + fi + obfirst := z$nh{right}..z$et{down}..z$sh{left}..z$wt{up}..cycle; +% \end{macrocode} +% Now calculate the points on the path |obfirst| where the pen will +% draw the min width lines (i.e., the points where the pen will be +% moving parallel to |pangle|). +% \begin{macrocode} + if pangle = 90: + z$minl = z$wt; z$maxr = z$nh; z$minr = z$et; z$maxl = z$sh; + else: + if pangle = 0: + z$minl = z$nh; z$maxr = z$et; z$minr = z$sh; z$maxl = z$wt; + else: + z$minl = directionpoint dir(pangle) of obfirst; + z$minr = directionpoint -dir(pangle) of obfirst; +% \end{macrocode} +% The max points are roughly where the inner and outer diverge +% the most. These are simple for 0 and 90 degree pens and have +% been calculated above. It's not so simple for intermediate +% angles. For a reasonable looking result, we pick the max +% points to be halfway between the min points. This involves +% calculating some angles, paths and intersections. +% \begin{macrocode} + pt1 := z$minr - z$minl; % direction + pt2 := (- ypart pt1, xpart pt1); % perpendicular + pt3 := 1/2[z$minl, z$minr]; + pt4 := pt3 shifted pt2; + pt5 := pt3 shifted -pt2; + pth1 := pt3--pt4; + pth2 := pt3--pt5; + z$maxr = pth1 intersectionpoint obfirst; + z$maxl = pth2 intersectionpoint obfirst; + \fi + \fi +% \end{macrocode} +% Place the pen at each of these points to get the outer and inner points. +% \begin{macrocode} + penpos$minl(thin,pangle+90); + penpos$maxr(thick,pangle); + penpos$minr(thin,pangle+90); + penpos$maxl(thick,pangle); +% \end{macrocode} +% Finally, the outer and inner paths. +% \begin{macrocode} + obsecond := z$minl..z$maxr..z$minr..z$maxl..cycle; + z$minlo = z$minl.r; z$maxro = z$maxr.r; + z$minro = z$minr.l; z$maxlo = z$maxl.l; + obouter := z$minlo{dir(pangle)}...z$maxro...z$minro{-dir(pangle)}...z$maxlo...cycle; + z$minli = z$minl.l; z$maxri = z$maxr.l; + z$minri = z$minr.r; z$maxli = z$maxl.r; + obinner := z$minli...z$maxri...z$minri...z$maxli...cycle; + labels($obc, $nh, $et, $sh, $wt); + labels($minl, $maxr, $minr, $maxl); + labels($minlo, $maxro, $minro, $maxlo); + labels($minli, $maxri, $minri, $maxli); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{obowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for the letter `o'. |obowl($, sx, sy)| calculates the paths for an `o' +% centered and enclosed in a rectangle size |sx| by |sy| with its bottom +% lefthand corner located at |z$|. +% \begin{macrocode} + +def obowl(suffix $)(expr sx, sy)= + offsetbowl($, sx, sy, 1/2, 1/2); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{scalarprod} +% |v scalarprod w| calulates the scalar product between the +% two vectors |v| and |w|. +% \begin{macrocode} + +primarydef v scalarprod w = + (xpart v * ypart w - ypart v * xpart w) +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{tangentpoint} +% |tangentpoint($, path)| calculates the point |z$tan| on the |path| +% so that |z$tan--z$| is tangent to the path. It uses a binary search +% to find a point on the path such that the path direction is +% (anti-) parallel to the dirction from that point to the given point. +% \begin{macrocode} + +def tangentpoint(suffix $)(expr pth)= + pair vecll, veclr, veclm; % "tangent" line directions + numeric pl, pr, pm; % path parameter values + pair vecpl, vecpr, vecpm; % path directions + pair ptl, ptr, ptm; % path points + numeric sl, sr, sm; % scalar products of path/line directions + numeric stpsize; % size of current binary step + numeric tantol; % tolerance + boolean wtest; % a boolean + + tantol := eps; +% \end{macrocode} +% Initialise using the left right and middle points on the path. +% \begin{macrocode} + pl:=0; pr:=length pth; pm:=0.5(pl+pr); stpsize:=pr-pl; + ptl := point pl of pth; + ptm := point pm of pth; + ptr := point pr of pth; +% \end{macrocode} +% Now the various vectors, and make sure they are unit vectors to +% have a consistent measure scale when we take the scalar products. +% \begin{macrocode} + vecll := unitvector (z$-ptl); + veclm := unitvector (z$-ptm); + veclr := unitvector (z$-ptr); + vecpl := unitvector (direction pl of pth); + vecpm := unitvector (direction pm of pth); + vecpr := unitvector (direction pr of pth); + sl := vecll scalarprod vecpl; + sm := veclm scalarprod vecpm; + sr := veclr scalarprod vecpr; +% \end{macrocode} +% We stop if any of the points is the tangent point, or if the step +% size is too small, or if the signs of the left and right scalar +% products are the same. +% \begin{macrocode} + wtest := (stpsize < tantol) or (sl*sr > 0) or + (abs sl < tantol) or (abs sm < tantol) or (abs sr < tantol); + if wtest: + if (stpsize < tantol): + z$tan=(0,0); + errmessage("No tangent; path too short"); + else: + if (sl*sr > 0): + z$tan=(0,0); + errmessage("No tangent; end products have the same sign"); + else: + if (abs sl < tantol): + z$tan=ptl; + else: + if (abs sm < tantol): + z$tan=ptm; + else: + z$tan=ptr; + fi + fi + fi + fi + else: +% \end{macrocode} +% There should be a tangent and we iterate to find it, using +% bisection. If there is one to be found it will be at the +% current middle point. The tangent point will be somewhere +% between the two points that lead to opposite signed scalar +% products. +% \begin{macrocode} + forever: + if (sl*sm < 0): % opposite signs, look between pl & pm + pr:=pm; pm:=0.5(pr+pl); + vecpr := vecpm; veclr := veclm; sr:=sm; + else: + pl:=pm; pm:=0.5(pr+pl); + vecpl:=vecpm; vecll:=veclm; sl:=sm; + fi + stpsize:=pr-pl; + ptm := point pm of pth; + veclm := unitvector (z$-ptm); + vecpm := unitvector (direction pm of pth); + sm := veclm scalarprod vecpm; +% \end{macrocode} +% We stop the iteration if the step size is too small or the +% middle point is the tangent point. In either case, the +% middle point is the best guess that can be made. +% \begin{macrocode} + wtest := (stpsize < tantol) or (abs sm < tantol); + if wtest: + if (abs sm < tantol): + z$tan = ptm; + else: + z$tan = ptm; +%%%%%% errmessage("Warning: tangent approximated"); + fi + fi + exitif wtest; + endfor + fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% Set the mode and font setup. +% \begin{macrocode} + +font_coding_scheme:="ASCII minuscules and punctuation"; +mode_setup; +carolmin_font_setup; + +% \end{macrocode} +% +% +% We generate letters, together with some punctuation and +% analphabetics. +% \begin{macrocode} + +input cminl; % lower case +input cminu; % capitals +input cminpunct; % punctuation +input cminlig; % the several dashes +input cmindig; % arabic digits + +% \end{macrocode} +% +% Set up the spacings, stretches and shrinks. +% +% \begin{macrocode} + +font_slant slant; font_x_height x_height#; +if monospace: + font_normal_space vstretch*9u#; % no stretching or shrinking + font_quad vstretch*18u#; + font_extra_space vstretch*9u#; +else: + font_normal_space vstretch*6u#+2letter_fit#; + font_normal_stretch vstretch*3u#; font_normal_shrink vstretch*2u#; + font_quad vstretch*18u#+4letter_fit#; + font_extra_space vstretch*2u#; + +% \end{macrocode} +% +% Finally, do the ligtables, but I don't think they are needed (yet?). +% +% \begin{macrocode} + +fi + +bye. + + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + kks#:=-4u#; kkx#:=-1.5u#; kkj#:=-2u#; kkr#:=-5u#; kkrs#:=-2u#; kkrl#:=-8u#; + ligtable "s": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "S": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "x": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "X": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "a": "A": + "b": "B": + "c": "C": + "d": "D": + "e": "E": + "h": "H": + "i": "I": + "k": "K": + "l": "L": + "m": "M": + "n": "N": + "o": "O": + "p": "P": + "t": "T": + "u": "U": + "v": "V": + "w": "W": + "z": "Z": + "j" kern kkj#, "J" kern kkj#; + + ligtable "r": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + ligtable "R": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + +fi + +bye. + +%</mfd> +% \end{macrocode} +% +% \subsection{The code for normal letters} +% +% The following code is for the lower case characters. +% +% \begin{macrocode} +%<*min> +% CMINL.MF Program file for Carolingian Minuscule lower case +% + +% \end{macrocode} +% +% +% \begin{routine}{a} +% The letter `a'. +% \begin{macrocode} +cmchar "CMIN letter a"; +beginchar("a", 2sb#+hstretch*(3/4x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup quill; +n1 := w - 2pcshiftx -jut; % effective letter width +% "stem" +x1 = pcshiftx + 6/8n1; top y1=h; +rt x2 = pcshiftx + n1; bot y2=0; +z16 = 1/6[z2,z1]; +rt x6 = x16; y6=y16; +lft x4 = pcshiftx; y4 = 1/2h; +% stem path +pth1 := z1{down}..z2; +pr1 := direction 1 of pth1; +z20 = z2 shifted -10pr1; + +z11 = point 3/13 of pth1; z15 = point 10/13 of pth1; +lft x13 = pcshiftx; y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +else: + % draw stem + draw pth1; + draw_roundserif(1,2,srad); + draw_roundserif(2,20,srad); + % draw bowl +%% draw z1{-pdir}..z4{down}..z6{pdir}; + draw z11{-pdir}..z13{down}..z15{pdir}; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +endchar; % end "a" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{b} +% The letter `b'. +% \begin{macrocode} +cmchar "CMIN letter b"; +beginchar("b", 2sb#+hstretch*(3/4x_height#+clubjut#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=h/ascratio; % top of bowl +%%ductus:=true; +lft x1 = pcshiftx+clubjut; top y1=h; +x3 = x1; y3=1/2n2; +rt x5 = w-pcshiftx; y5=y3; +x4 = 1/2[x3,x5]; bot y4=0; +x6=x4; top y6=n2; +pth1 := z1..z3{down}..z4{right}.. z5{up}; +z98=(0,3/4n2); z99=(w,y98); +pth2 := z98--z99; +z7 = pth1 intersectionpoint pth2; +if ductus: + pickup stylus; +fi +draw z1..z3{down}..z4{right}..z5{up}..z6{left}..z7{-pdir}; +draw_clubserif(1,3,0.75); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "b" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{c} +% The letter `c'. +% \begin{macrocode} +cmchar "CMIN letter c"; +beginchar("c", 2sb#+hstretch*(5/8x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z24..z1{left}..z2{down}..z3{right}..z4{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "c" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{d} +% The letter `d'. +% \begin{macrocode} +cmchar "CMIN letter d"; +beginchar("d", 2sb#+hstretch*(5/8x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1 = h/ascratio; % x-height +rt x1=w-pcshiftx-jut; top y1=h; +x2 = x1; bot y2=0; +x3 = x1; y3 = 1/4n1; +lft x5 = pcshiftx; y5=1/2n1; +x4 = 1/2[x3,x5]; bot y4 = 0; +x6=x4; top y6 = n1; +x7=x3; y7=3/4n1; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +%%draw_flatserif(1,2,srad); +draw_clubserif(1,2,0.25); +draw_roundserif(2,1,srad); +draw z3..z4{left}..z5{up}..z6{right}..z7; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "d" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{e} +% The letter `e'. +% \begin{macrocode} +cmchar "CMIN letter e"; +beginchar("e", sb#+hstretch*(8/8x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-pcshiftx; % actual letter width +n2 := 6/8n1; % width of bowl +x1 = pcshiftx + 5/8n2; top y1=h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = pcshiftx + 1/2n2; bot y3 = 0; +rt x4 = pcshiftx + n2; y4 = 1/4h; +%%z98=(0,3/8h); z99=(w,y98); +z98=(0,2/8h); z99=(w,y98); +pth1 := z98--z99; +pth2 := z1{left}..z2{down}..z3{right}; +z7 = pth1 intersectionpoint pth2; +rt x9 = w-pcshiftx; y9 = 3/4h; +z8=1/2[z7,z9]; + +z70 = z7 shifted 10pdir; +z17 = whatever[z7,z70]; +%%x17 = w-pcshiftx; +top y17 = h; + +rt x27=w-pcshiftx; top y27=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z7{pdir}..z1{left}..z2{down}..z3{right}..z4{pdir}; +%%draw z7{pdir}..z8{right}..z9{pdir}; +%%draw z7--z17; +draw z7--z27; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,17,70,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{f} +% The letter `f'. +% \begin{macrocode} +cmchar "CMIN letter f"; +beginchar("f", 2sb#+hstretch*(3/4x_height#+jut#), + (asc_height#), 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := h/ascratio; % x-height +%% stem +lft x1=lft x2=pcshiftx+jut; top y1=n1; bot y2=0; +%% flick +x4=x2; y4 = 1/2n1; +rt x6=w-pcshiftx; y6 = 2/3h; +x5 = 2/3[x4,x6]; top y5=h; +%% bar +z14=1/2[z4,z1]; +rt x16 = w -pcshiftx; top y16 = 1/2[y14,y6]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z4{up}...z5{right}...z6; % top +draw z14{right}..z16{pdir}; % bar +ductus:=false; +ductus:=false; +penlabels(1,2,3,4,5,6,7,14,15,16,100); +endchar; % end "f" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{g} +% The letter `g'. +% \begin{macrocode} +cmchar "CMIN letter g"; +beginchar("g", 2sb#+hstretch*(5/4x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +path pth[]; +pair vec[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := 4/5w - 2pcshiftx; % width of top o +%% top O +x1 = x3 = pcshiftx + 1/2n1; top y1=h; bot y3=1/8h; +lft x4 = pcshiftx; rt x2 = pcshiftx+n1; y2 = y4 = 1/2[y1,y3]; + +%% top flick +lft x11 = rt x1; y11=y1; +rt x13 = w-pcshiftx; y13 = h; + +%% bottom +z31=z3; +x33 = w-pcshiftx; y33 = -1/2d; +x35=x31; bot y35 = -d; +rt x36 = lft x4; y36 = 1/2[y35,y33]; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; % top O +draw z11{right}..z13{pdir}; % flick +draw z31{right}..z33{down}..z35{left}..z36; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,12,13,31,32,33,34,35,36,100); +endchar; % end "g" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{h} +% The letter `h'. +% \begin{macrocode} +cmchar "CMIN letter h"; +beginchar("h", 2sb#+hstretch*(6/8x_height#+clubjut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% bowl +z3=1/2[z2,z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h/ascratio; +%%lft x6=x4; bot y6=0; +x6=1/2[x4,x5]; +bot y6=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +%%draw_flatserif(1,2,srad); +draw_clubserif(1,2,0.5); +draw_roundserif(2,1,srad); +draw z3{pdir}..z4..z5..z6{-pdir}; + +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "h" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{i} +% The letter `i'. +% \begin{macrocode} +cmchar "CMIN letter i"; +beginchar("i", 2sb#+hstretch*(thick#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +ductus:=false; +penlabels(1,2,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{j} +% The letter `j'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "CMIN letter j"; +beginchar("j", sb#+hstretch*(3/8x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +rt x1 = w-pcshiftx; top y1 = h; +x2=x1; y2=-1/2d; +%% bottom hook +lft x3 = 0; bot y3 = -d; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw_flatserif(1,2,srad); +draw z2{down}..z3{-pdir}; % hook +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "j" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{k} +% The letter `k'. +% \begin{macrocode} +cmchar "CMIN letter k"; +beginchar("k", 2sb#+hstretch*(7/8x_height#+clubjut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +%% stem +n1 = h/ascratio; % x-height +lft x1=lft x2=pcshiftx+clubjut; +y1=h; bot y2=0; +%% top arm +%%z3=(x1,1/2n1); +x3 = x1; top y3 = 1/2n1; +rt x5=5/8[x1,w-pcshiftx]; top y5=n1; +x4=1/2[x3,x5]; top y4=n1; +pth1 := z3{pdir}..z5{up}; +%% lower arm +pth2 := (rt x1,0)--(rt x1,h); +z13 = pth1 intersectionpoint pth2; +pickup threequarterquill; +lft x14 = x13; bot y14 = y13; +rt x7=w-pcshiftx; bot y7=0; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_clubserif(1,2,0.5); +draw_roundserif(2,1,srad); +draw pth1; % upper arm +pickup threequarterquill; +%%draw z14{down}..z7{-ppdir}; % lower arm +%%draw z14{down}..z7; % lower arm +draw z14{-ppdir}..z7{right}; % lower arm +pickup quill; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,100); +endchar; % end "k" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{l} +% The letter `l'. +% \begin{macrocode} +cmchar "CMIN letter l"; +beginchar("l", 2sb#+hstretch*(thick#+clubjut#+jut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx+clubjut; top y1=h; +x2=x1; bot y2 =0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +draw_clubserif(1,2,0.5); +draw_roundserif(2,1,srad); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "l" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{m} +% The letter `m'. +% \begin{macrocode} +cmchar "CMIN letter m"; +beginchar("m", 2sb#+hstretch*(x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +%% start of bowl +x13=x1; y13=3/4h; +%% bottom of right and middle stems +rt x6 = w -pcshiftx - jut; y6=y2; +z4 = 1/2[z2,z6]; +%% top of middle and right stems +x3=x4; y3=y1; +x5=x6; y5=y13; +%% top of bowls +x14=2/3[x13,x3]; top y14 = h; +x33=x4; y33=y13; +x34=2/3[x33,x5]; y34 = y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left half +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z13{pdir}..z14{right}..z33{down}--z4; +draw_roundserif(4,3,srad); +draw z33{pdir}..z34{right}..z5{down}--z6; +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100); +endchar; % end "m" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{n} +% The letter `n'. +% \begin{macrocode} +cmchar "CMIN letter n"; +beginchar("n", 2sb#+hstretch*(5/8x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +% start of bowl +x13=x1; y13=3/4h; +%% right stem +rt x4 = w-pcshiftx-jut; y4=y2; +x3 = x4; y3 = y13; +% top of bowl +x14 = 2/3[x13,x3]; top y14 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z13{pdir}..z14{right}..z3{down}--z4; +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "n" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{o} +% The letter `o'. +% \begin{macrocode} +cmchar "CMIN letter o"; +beginchar("o", 2sb#+hstretch*(3/4x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +draw z1..z2..z3..z4..cycle; +z5=(pcshiftx,-o); +obowl(5, w-2pcshiftx, h+2o); +%%ductus:=true; +if ductus: + pickup stylus; + draw obfirst; draw obsecond; draw obouter; draw obinner; +else: +%% fill obouter; unfill obinner; +fi +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "o" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{p} +% The letter `p'. +% \begin{macrocode} +cmchar "CMIN letter p"; +beginchar("p", 2sb#+hstretch*(3/4x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=-d; +%% bowl % from "d" +z3=3/4[(x1,0),z1]; +rt x5 = w-pcshiftx; y5=1/2h; +x4=1/2[x3,x5]; top y4 = h; +x6=x4; bot y6=0; +z7=1/4[(x1,0),z1]; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad) +draw z3{pdir}..z4{right}..z5{down}..z6{left}..z7; % bowl (from d) +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "p" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{q} +% The letter `q'. +% \begin{macrocode} +cmchar "CMIN letter q"; +beginchar("q", 2sb#+hstretch*(3/4x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% right stem +rt x1=w-pcshiftx-jut; top y1=h; +x2=x1; bot y2=-d; +%% bowl +z3=1/4[(x1,0),z1]; +lft x5=pcshiftx; y5=1/2h; +x4=1/2[x3,x5]; bot y4=0; +x6=x4; top y6=h; +z7=3/4[(x1,0),z1]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +%%draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3{-pdir}..z4{left}..z5{up}..z6{right}..z7; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{r} +% The letter `r'. +% \begin{macrocode} +cmchar "CMIN letter r"; +beginchar("r", 2sb#+hstretch*(7/8x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% bowl +z3=3/4[z2,z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3{pdir}..z4{right}..z5{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "r" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{s} +% The letter `s'. This is a `long' S. +% \begin{macrocode} +cmchar "CMIN letter s"; +beginchar("s", 2sb#+hstretch*(3/4x_height#+clubjut#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := h/ascratio; % x-height +%% stem +lft x1=lft x2=pcshiftx+clubjut; top y1=n1; bot y2=0; +%% flick +x4=x2; y4 = 1/2n1; +rt x6=w-pcshiftx; y6 = 2/3h; +x5 = 2/3[x4,x6]; top y5=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_clubserif(1,2,0.5); +draw_roundserif(2,1,srad); +draw z4{up}...z5{right}...z6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100); +endchar; % end "s" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{t} +% The letter `t'. +% \begin{macrocode} +cmchar "CMIN letter t"; +beginchar("t", 2sb#+hstretch*(x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% bar +top y3=h; n3 := h - top y3; +lft x1 = pcshiftx; rt x2=w-pcshiftx; +%%top y1 = y3-n3; bot y2=y3+n3; +y1 = y3-n3; y2=y3; +n1 := w; % width of bowl +n2 := h; % height of bowl +x3=1/2[x1,x2]; +lft x4 = pcshiftx + 1/8n1; y4 = 1/2h; +x5=x3; bot y5 = 0; +rt x6 = pcshiftx + 3/4n1; top y6 = 1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{pdir}..z3..z2{pdir}; % bar +draw z3..z4{down}..z5{right}..z6{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "t" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{u} +% The letter `u'. +% \begin{macrocode} +cmchar "CMIN letter u"; +beginchar("u", 2sb#+hstretch*(5/8x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-jut; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; +draw_flatserif(1,13,srad); +draw_tstem(3,4,srad); % right stem +draw_flatserif(3,4,srad); +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "u" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{v} +% The letter `v'. +% \begin{macrocode} +cmchar "CMIN letter v"; +beginchar("v", 2sb#+hstretch*(3/4x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-jut; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +rt x23=w-pcshiftx; y23=3/4h; +lft x26=x14; top y26=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}; % left stem +draw_flatserif(1,13,srad); +draw z14{pdir}..z23{up}..z26; + +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "v" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{w} +% The letter `w'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "CMIN letter w"; +beginchar("w", 2sb#+hstretch*(x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x5=w-pcshiftx-jut; y5=y1; +x6=x5; bot y6=0; +z53=1/4[z6,z5]; % start of bowl +% middle stem +z3 = 1/2[z1,z5]; +z33=(x3,y13); +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +% middle of right bowl +x34=1/3[x3,x5]; y34=y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; % left +draw_flatserif(1,13,srad); +draw z3--z33{down}..z34{right}..z53{pdir}; % middle +draw_flatserif(3,33,srad); +draw_tstem(5,6,srad); % right stem +draw_flatserif(5,6,srad); +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "w" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{x} +% The letter `x'. +% \begin{macrocode} +cmchar "CMIN letter x"; +beginchar("x", 2sb#+hstretch*(x_height#), + x_height#, 0); +adjust_fit(0,0); +path pth[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := w-2pcshiftx; % total width +n2 := thick; % triangle side +%% diag top left to bottom right +lft x1=pcshiftx; bot y1=2/3h; +x2=pcshiftx+1/7n1; top y2=h; +x5=pcshiftx+11/14n1; bot y5=-1/4d; +rt x6=pcshiftx+n1; top y6=1/6h; +z25 = 1/3[z2,z5]; +pth1 := z2{right}..z5{right}; +z251 = point 1/3 of pth1; +z252 = point 2/3 of pth1; +%% diag bottom left to top right +lft x10 = -w + 2pcshiftx; bot y10=-d; +x50=x5; top y50=h; +rt x60 = w -pcshiftx; bot y60=2/3h; +x40=pcshiftx+8/14n1; y40=h; + +x150=x2; bot y150 = 0; +lft x160 = pcshiftx; top y160=1/3h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z5{right}..z6; % top left to bottom right +%%draw z10{1/2pdir}..z25..z50{right}..z60; % bottom left to top right +draw z251..z50{right}..z60; % middle to top right +draw z252..z150{left}..z160; % middle to bottom left +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,150,60,160,100); +endchar; % end "x" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{y} +% The letter `y'. Modern, but with a dot on top. +% \begin{macrocode} +cmchar "CMIN letter y"; +beginchar("y", 2sb#+hstretch*(7/8x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +%% left stem top +lft x1 = pcshiftx + jut; top y1 = h; +bot y3 = 0; +%% right stem +rt x5=w-pcshiftx; top y5 = h; +lft x9=-1/2w; bot y9 = -d; +pth1 := z9{right}..z5{up}; +pth2 := (0,y3)--(w,y3); +z99 = pth1 intersectionpoint pth2; +x3 = x99; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}..z3; % left stem +draw_flatserif(1,3,srad); +draw pth1; % right stem +draw_flatserif(5,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{z} +% The letter `z'. +% \begin{macrocode} +cmchar "CMIN letter z"; +beginchar("z", 2sb#+hstretch*(x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +%% top bar ends +top y12 = h; +n1 := h - y12; +lft x1 = pcshiftx; rt x2 = w-pcshiftx; +%%y1 = y12-n1; y2=y12+n1; +y1 = y12-n1; y2=y12; +x12 = 1/2[x1,x2]; +pth1 := z1{pdir}..z12{right}..z2{pdir}; +%% bottom bar ends +bot y34 = 0; +x3=x1; x4=x2; +%%y3=y34-n1; y4=y34+n1; +y3=y34-n1; y4=y34; +x34 = 1/2[x3,x4]; +pth2 := z3{pdir}..z34{right}..z4{pdir}; +%% diagonal +z5=z3; +pth3 := z5--(3/4w,h+jut); +z6 = pth3 intersectionpoint pth1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw pth2; % bars +draw z5--z6; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "z" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file +% \begin{macrocode} +%</min> +% \end{macrocode} +% +% +% \subsection{The code for capital letters} +% +% \thisfont{} `capitals' were drawn with the same pen as for the minuscules, +% and the letters were merely larger versions of the minuscules. +% +% \begin{macrocode} +%<*maj> +% CMINU.MF Program file for Carolingian Minuscule `capitals' +% + +% \end{macrocode} +% +% +% \begin{routine}{A} +% The letter `A'. +% \begin{macrocode} +cmchar "CMIN letter A"; +beginchar("A", 2sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup quill; +n1 := w - 2pcshiftx -jut; % effective letter width +% "stem" +x1 = pcshiftx + 6/8n1; top y1=h; +rt x2 = pcshiftx + n1; bot y2=0; +z16 = 1/6[z2,z1]; +rt x6 = x16; y6=y16; +lft x4 = pcshiftx; y4 = 1/2h; +% stem path +pth1 := z1{down}..z2; +pr1 := direction 1 of pth1; +z20 = z2 shifted -10pr1; + +z11 = point 3/13 of pth1; z15 = point 10/13 of pth1; +lft x13 = pcshiftx; y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +else: + % draw stem + draw pth1; + draw_roundserif(1,2,srad); + draw_roundserif(2,20,srad); + % draw bowl +%% draw z1{-pdir}..z4{down}..z6{pdir}; + draw z11{-pdir}..z13{down}..z15{pdir}; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +endchar; % end "A" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{B} +% The letter `B'. +% \begin{macrocode} +cmchar "CMIN letter B"; +beginchar("B", 2sb#+caprat*hstretch*(3/4x_height#+clubjut#), + caprat*asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=h/ascratio; % top of bowl +%%ductus:=true; +lft x1 = pcshiftx+clubjut; top y1=h; +x3 = x1; y3=1/2n2; +rt x5 = w-pcshiftx; y5=y3; +x4 = 1/2[x3,x5]; bot y4=0; +x6=x4; top y6=n2; +pth1 := z1..z3{down}..z4{right}.. z5{up}; +z98=(0,3/4n2); z99=(w,y98); +pth2 := z98--z99; +z7 = pth1 intersectionpoint pth2; +if ductus: + pickup stylus; +fi +draw z1..z3{down}..z4{right}..z5{up}..z6{left}..z7{-pdir}; +draw_clubserif(1,3,0.75); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "B" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{C} +% The letter `C'. +% \begin{macrocode} +cmchar "CMIN letter C"; +beginchar("C", 2sb#+caprat*hstretch*(5/8x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z24..z1{left}..z2{down}..z3{right}..z4{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "C" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{D} +% The letter `D'. +% \begin{macrocode} +cmchar "CMIN letter D"; +beginchar("D", 2sb#+caprat*hstretch*(5/8x_height#+jut#), + caprat*asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1 = h/ascratio; % x-height +rt x1=w-pcshiftx-jut; top y1=h; +x2 = x1; bot y2=0; +x3 = x1; y3 = 1/4n1; +lft x5 = pcshiftx; y5=1/2n1; +x4 = 1/2[x3,x5]; bot y4 = 0; +x6=x4; top y6 = n1; +x7=x3; y7=3/4n1; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +%%draw_flatserif(1,2,srad); +draw_clubserif(1,2,0.25); +draw_roundserif(2,1,srad); +draw z3..z4{left}..z5{up}..z6{right}..z7; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "D" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{E} +% The letter `E'. +% \begin{macrocode} +cmchar "CMIN letter E"; +beginchar("E", sb#+caprat*hstretch*(8/8x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-pcshiftx; % actual letter width +n2 := 6/8n1; % width of bowl +x1 = pcshiftx + 5/8n2; top y1=h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = pcshiftx + 1/2n2; bot y3 = 0; +rt x4 = pcshiftx + n2; y4 = 1/4h; +%%z98=(0,3/8h); z99=(w,y98); +z98=(0,2/8h); z99=(w,y98); +pth1 := z98--z99; +pth2 := z1{left}..z2{down}..z3{right}; +z7 = pth1 intersectionpoint pth2; +rt x9 = w-pcshiftx; y9 = 3/4h; +z8=1/2[z7,z9]; + +z70 = z7 shifted 10pdir; +z17 = whatever[z7,z70]; +%%x17 = w-pcshiftx; +top y17 = h; + +rt x27=w-pcshiftx; top y27=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z7{pdir}..z1{left}..z2{down}..z3{right}..z4{pdir}; +%%draw z7{pdir}..z8{right}..z9{pdir}; +%%draw z7--z17; +draw z7--z27; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,17,70,100); +endchar; % end "E" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{F} +% The letter `F'. +% \begin{macrocode} +cmchar "CMIN letter F"; +beginchar("F", 2sb#+caprat*hstretch*(3/4x_height#+jut#), + (asc_height#), 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := h/ascratio; % x-height +%% stem +lft x1=lft x2=pcshiftx+jut; top y1=n1; bot y2=0; +%% flick +x4=x2; y4 = 1/2n1; +rt x6=w-pcshiftx; y6 = 2/3h; +x5 = 2/3[x4,x6]; top y5=h; +%% bar +z14=1/2[z4,z1]; +rt x16 = w -pcshiftx; top y16 = 1/2[y14,y6]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z4{up}...z5{right}...z6; % top +draw z14{right}..z16{pdir}; % bar +ductus:=false; +ductus:=false; +penlabels(1,2,3,4,5,6,7,14,15,16,100); +endchar; % end "F" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{G} +% The letter `G'. +% \begin{macrocode} +cmchar "CMIN letter G"; +beginchar("G", 2sb#+caprat*hstretch*(5/4x_height#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +path pth[]; +pair vec[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := 4/5w - 2pcshiftx; % width of top o +%% top O +x1 = x3 = pcshiftx + 1/2n1; top y1=h; bot y3=1/8h; +lft x4 = pcshiftx; rt x2 = pcshiftx+n1; y2 = y4 = 1/2[y1,y3]; + +%% top flick +lft x11 = rt x1; y11=y1; +rt x13 = w-pcshiftx; y13 = h; + +%% bottom +z31=z3; +x33 = w-pcshiftx; y33 = -1/2d; +x35=x31; bot y35 = -d; +rt x36 = lft x4; y36 = 1/2[y35,y33]; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; % top O +draw z11{right}..z13{pdir}; % flick +draw z31{right}..z33{down}..z35{left}..z36; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,12,13,31,32,33,34,35,36,100); +endchar; % end "G" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{H} +% The letter `H'. +% \begin{macrocode} +cmchar "CMIN letter H"; +beginchar("H", 2sb#+caprat*hstretch*(6/8x_height#+clubjut#), + caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% bowl +z3=1/2[z2,z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h/ascratio; +%%lft x6=x4; bot y6=0; +x6=1/2[x4,x5]; +bot y6=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +%%draw_flatserif(1,2,srad); +draw_clubserif(1,2,0.5); +draw_roundserif(2,1,srad); +draw z3{pdir}..z4..z5..z6{-pdir}; + +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "H" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{I} +% The letter `I'. +% \begin{macrocode} +cmchar "CMIN letter I"; +beginchar("I", 2sb#+caprat*hstretch*(thick#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +ductus:=false; +penlabels(1,2,100); +endchar; % end "I" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{J} +% The letter `J'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "CMIN letter J"; +beginchar("J", sb#+caprat*hstretch*(3/8x_height#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +rt x1 = w-pcshiftx; top y1 = h; +x2=x1; y2=-1/2d; +%% bottom hook +lft x3 = 0; bot y3 = -d; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw_flatserif(1,2,srad); +draw z2{down}..z3{-pdir}; % hook +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "J" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{K} +% The letter `K'. +% \begin{macrocode} +cmchar "CMIN letter K"; +beginchar("K", 2sb#+caprat*hstretch*(7/8x_height#+clubjut#), + caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +%% stem +n1 = h/ascratio; % x-height +lft x1=lft x2=pcshiftx+clubjut; +y1=h; bot y2=0; +%% top arm +%%z3=(x1,1/2n1); +x3 = x1; top y3 = 1/2n1; +rt x5=5/8[x1,w-pcshiftx]; top y5=n1; +x4=1/2[x3,x5]; top y4=n1; +pth1 := z3{pdir}..z5{up}; +%% lower arm +pth2 := (rt x1,0)--(rt x1,h); +z13 = pth1 intersectionpoint pth2; +pickup threequarterquill; +lft x14 = x13; bot y14 = y13; +rt x7=w-pcshiftx; bot y7=0; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_clubserif(1,2,0.5); +draw_roundserif(2,1,srad); +draw pth1; % upper arm +pickup threequarterquill; +%%draw z14{down}..z7{-ppdir}; % lower arm +%%draw z14{down}..z7; % lower arm +draw z14{-ppdir}..z7{right}; % lower arm +pickup quill; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,100); +endchar; % end "K" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{L} +% The letter `L'. +% \begin{macrocode} +cmchar "CMIN letter L"; +beginchar("L", 2sb#+caprat*hstretch*(thick#+clubjut#+jut#), + caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx+clubjut; top y1=h; +x2=x1; bot y2 =0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +draw_clubserif(1,2,0.5); +draw_roundserif(2,1,srad); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "L" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{M} +% The letter `M'. +% \begin{macrocode} +cmchar "CMIN letter M"; +beginchar("M", 2sb#+caprat*hstretch*(x_height#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +%% start of bowl +x13=x1; y13=3/4h; +%% bottom of right and middle stems +rt x6 = w -pcshiftx - jut; y6=y2; +z4 = 1/2[z2,z6]; +%% top of middle and right stems +x3=x4; y3=y1; +x5=x6; y5=y13; +%% top of bowls +x14=2/3[x13,x3]; top y14 = h; +x33=x4; y33=y13; +x34=2/3[x33,x5]; y34 = y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left half +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z13{pdir}..z14{right}..z33{down}--z4; +draw_roundserif(4,3,srad); +draw z33{pdir}..z34{right}..z5{down}--z6; +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100); +endchar; % end "M" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{N} +% The letter `N'. +% \begin{macrocode} +cmchar "CMIN letter N"; +beginchar("N", 2sb#+caprat*hstretch*(5/8x_height#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +% start of bowl +x13=x1; y13=3/4h; +%% right stem +rt x4 = w-pcshiftx-jut; y4=y2; +x3 = x4; y3 = y13; +% top of bowl +x14 = 2/3[x13,x3]; top y14 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z13{pdir}..z14{right}..z3{down}--z4; +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "N" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{O} +% The letter `O'. +% \begin{macrocode} +cmchar "CMIN letter O"; +beginchar("O", 2sb#+caprat*hstretch*(3/4x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +draw z1..z2..z3..z4..cycle; +z5=(pcshiftx,-o); +obowl(5, w-2pcshiftx, h+2o); +%%ductus:=true; +if ductus: + pickup stylus; + draw obfirst; draw obsecond; draw obouter; draw obinner; +else: +%% fill obouter; unfill obinner; +fi +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "O" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{P} +% The letter `P'. +% \begin{macrocode} +cmchar "CMIN letter P"; +beginchar("P", 2sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=-d; +%% bowl % from "d" +z3=3/4[(x1,0),z1]; +rt x5 = w-pcshiftx; y5=1/2h; +x4=1/2[x3,x5]; top y4 = h; +x6=x4; bot y6=0; +z7=1/4[(x1,0),z1]; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad) +draw z3{pdir}..z4{right}..z5{down}..z6{left}..z7; % bowl (from d) +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "P" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Q} +% The letter `Q'. +% \begin{macrocode} +cmchar "CMIN letter Q"; +beginchar("Q", 2sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% right stem +rt x1=w-pcshiftx-jut; top y1=h; +x2=x1; bot y2=-d; +%% bowl +z3=1/4[(x1,0),z1]; +lft x5=pcshiftx; y5=1/2h; +x4=1/2[x3,x5]; bot y4=0; +x6=x4; top y6=h; +z7=3/4[(x1,0),z1]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +%%draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3{-pdir}..z4{left}..z5{up}..z6{right}..z7; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "Q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{R} +% The letter `R'. +% \begin{macrocode} +cmchar "CMIN letter R"; +beginchar("R", 2sb#+caprat*hstretch*(7/8x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% bowl +z3=3/4[z2,z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3{pdir}..z4{right}..z5{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "R" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{S} +% The letter `S'. This is a `long' S. +% \begin{macrocode} +cmchar "CMIN letter S"; +beginchar("S", 2sb#+caprat*hstretch*(3/4x_height#+clubjut#), + caprat*asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := h/ascratio; % x-height +%% stem +lft x1=lft x2=pcshiftx+clubjut; top y1=n1; bot y2=0; +%% flick +x4=x2; y4 = 1/2n1; +rt x6=w-pcshiftx; y6 = 2/3h; +x5 = 2/3[x4,x6]; top y5=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_clubserif(1,2,0.5); +draw_roundserif(2,1,srad); +draw z4{up}...z5{right}...z6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100); +endchar; % end "S" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{T} +% The letter `T'. +% \begin{macrocode} +cmchar "CMIN letter T"; +beginchar("T", 2sb#+caprat*hstretch*(x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% bar +top y3=h; n3 := h - top y3; +lft x1 = pcshiftx; rt x2=w-pcshiftx; +%%top y1 = y3-n3; bot y2=y3+n3; +y1 = y3-n3; y2=y3; +n1 := w; % width of bowl +n2 := h; % height of bowl +x3=1/2[x1,x2]; +lft x4 = pcshiftx + 1/8n1; y4 = 1/2h; +x5=x3; bot y5 = 0; +rt x6 = pcshiftx + 3/4n1; top y6 = 1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{pdir}..z3..z2{pdir}; % bar +draw z3..z4{down}..z5{right}..z6{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "T" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{U} +% The letter `U'. +% \begin{macrocode} +cmchar "CMIN letter U"; +beginchar("U", 2sb#+caprat*hstretch*(5/8x_height#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-jut; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; +draw_flatserif(1,13,srad); +draw_tstem(3,4,srad); % right stem +draw_flatserif(3,4,srad); +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "U" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{V} +% The letter `V'. +% \begin{macrocode} +cmchar "CMIN letter V"; +beginchar("V", 2sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-jut; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +rt x23=w-pcshiftx; y23=3/4h; +lft x26=x14; top y26=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}; % left stem +draw_flatserif(1,13,srad); +draw z14{pdir}..z23{up}..z26; + +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "V" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{W} +% The letter `W'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "CMIN letter W"; +beginchar("W", 2sb#+caprat*hstretch*(x_height#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x5=w-pcshiftx-jut; y5=y1; +x6=x5; bot y6=0; +z53=1/4[z6,z5]; % start of bowl +% middle stem +z3 = 1/2[z1,z5]; +z33=(x3,y13); +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +% middle of right bowl +x34=1/3[x3,x5]; y34=y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; % left +draw_flatserif(1,13,srad); +draw z3--z33{down}..z34{right}..z53{pdir}; % middle +draw_flatserif(3,33,srad); +draw_tstem(5,6,srad); % right stem +draw_flatserif(5,6,srad); +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "W" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{X} +% The letter `X'. +% \begin{macrocode} +cmchar "CMIN letter X"; +beginchar("X", 2sb#+caprat*hstretch*(x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +path pth[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := w-2pcshiftx; % total width +n2 := thick; % triangle side +%% diag top left to bottom right +lft x1=pcshiftx; bot y1=2/3h; +x2=pcshiftx+1/7n1; top y2=h; +x5=pcshiftx+11/14n1; bot y5=-1/4d; +rt x6=pcshiftx+n1; top y6=1/6h; +z25 = 1/3[z2,z5]; +pth1 := z2{right}..z5{right}; +z251 = point 1/3 of pth1; +z252 = point 2/3 of pth1; +%% diag bottom left to top right +lft x10 = -w + 2pcshiftx; bot y10=-d; +x50=x5; top y50=h; +rt x60 = w -pcshiftx; bot y60=2/3h; +x40=pcshiftx+8/14n1; y40=h; + +x150=x2; bot y150 = 0; +lft x160 = pcshiftx; top y160=1/3h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z5{right}..z6; % top left to bottom right +%%draw z10{1/2pdir}..z25..z50{right}..z60; % bottom left to top right +draw z251..z50{right}..z60; % middle to top right +draw z252..z150{left}..z160; % middle to bottom left +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,150,60,160,100); +endchar; % end "X" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Y} +% The letter `Y'. Modern, but with a dot on top. +% \begin{macrocode} +cmchar "CMIN letter Y"; +beginchar("Y", 2sb#+caprat*hstretch*(7/8x_height#+jut#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +%% left stem top +lft x1 = pcshiftx + jut; top y1 = h; +bot y3 = 0; +%% right stem +rt x5=w-pcshiftx; top y5 = h; +lft x9=-1/2w; bot y9 = -d; +pth1 := z9{right}..z5{up}; +pth2 := (0,y3)--(w,y3); +z99 = pth1 intersectionpoint pth2; +x3 = x99; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}..z3; % left stem +draw_flatserif(1,3,srad); +draw pth1; % right stem +draw_flatserif(5,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "Y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{Z} +% The letter `Z'. +% \begin{macrocode} +cmchar "CMIN letter Z"; +beginchar("Z", 2sb#+caprat*hstretch*(x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +%% top bar ends +top y12 = h; +n1 := h - y12; +lft x1 = pcshiftx; rt x2 = w-pcshiftx; +%%y1 = y12-n1; y2=y12+n1; +y1 = y12-n1; y2=y12; +x12 = 1/2[x1,x2]; +pth1 := z1{pdir}..z12{right}..z2{pdir}; +%% bottom bar ends +bot y34 = 0; +x3=x1; x4=x2; +%%y3=y34-n1; y4=y34+n1; +y3=y34-n1; y4=y34; +x34 = 1/2[x3,x4]; +pth2 := z3{pdir}..z34{right}..z4{pdir}; +%% diagonal +z5=z3; +pth3 := z5--(3/4w,h+jut); +z6 = pth3 intersectionpoint pth1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw pth2; % bars +draw z5--z6; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "Z" + +% \end{macrocode} +% \end{routine} +% +% +% +% The end of this file +% \begin{macrocode} +%</maj> +% \end{macrocode} +% +% +% +% \subsection{The punctuation file} +% +% The main punctuation marks are defined in this file. +% +% \begin{macrocode} +%<*punct> +% IMINPUNCT.MF This file contains punctuation marks + +% \end{macrocode} +% +% +% \begin{routine}{!} +% The `!' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Exclamation mark"; +beginchar("!", 2sb#+hstretch*(thick#+trijut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +x1=w/2; top y1 = h; +z3=(x1, 1/2dot_size); +z2=(x1, y3+3/2dot_size); +draw z1--z2; +draw_pdot(3,dot_size); +penlabels(1,2,3); + +endchar; % end of "!" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{?} +% The `?' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Question mark"; +beginchar("?", 2sb#+hstretch*(3/4x_height#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-2pcshiftx; % actual character width +n2 := 1/3h; % height of top bowl +n3 := n2; % height of bottom bowl +z5=(1/2w,1/2dot_size); +x4 = x5; y4=y5+3/2dot_size; +lft x1 = pcshiftx; y1 = 3/4h; +x2 = 1/2w; top y2 = h; +rt x3 = w-pcshiftx; y3 = 2/3h; + +%%ductus:= true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{down}..z4{down}; +draw_pdot(5, dot_size); +penlabels(1,2,3,4,5); +endchar; % end of "?" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{,} +% The `,' character. +% \begin{macrocode} + +cmchar "Comma"; +beginchar(",",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=1/2dot_size; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "," + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{.} +% The `.' character. +% \begin{macrocode} + +cmchar "Period"; +beginchar(".",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +z1=(w/2, 1/2dot_size); +draw_pdot(1,dot_size); +penlabels(1); +endchar; % end of "." + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{:} +% The `:' character. +% \begin{macrocode} + +cmchar "Colon"; +beginchar(":",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +x1=x2=w/2; y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pdot(2,dot_size); +penlabels(1,2); +endchar; % end ":" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{;} +% The `;' character. +% \begin{macrocode} + +cmchar "Semicolon"; +beginchar(";",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pcomma(2,dot_size,comma_width); +penlabels(1,2); +endchar; % end of ";" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{'} +% The `'' character. +% \begin{macrocode} + +cmchar "Apostrophe"; +beginchar("'",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "'" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{`} +% The ``' character. +% \begin{macrocode} + +cmchar "Reverse apostrophe"; +beginchar("`",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=h; +draw_plq(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "`" + +% \end{macrocode} +% \end{routine} +% +% The end of this file. +% \begin{macrocode} +%</punct> +% \end{macrocode} +% +% +% \subsection{The ligatures and dashes file} +% +% The ligatured letters, punctuation marks and dashes are defined in this file. +% \begin{macrocode} +%<*lig> +% CMINLIG.MF Carolingian ligatured letters, punctation and dashes + +% \end{macrocode} +% First the ligtables. +% \begin{macrocode} + +ligtable "`": "`"=:oct"134"; +ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#; + +ligtable "-": "-"=:oct"173"; +ligtable oct"173": "-"=:oct"174"; + +ligtable "c": "t"=:oct"014"; +ligtable "s": "t"=:oct"015"; + +% \end{macrocode} +% +% \begin{routine}{ct} +% The `ct' ligature. +% \begin{macrocode} + +cmchar "The ct ligature"; +beginchar(oct"014", 2sb#+hstretch*(6/4x_height#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair vc[]; +pickup quill; +%%%%%%%%%%% C + +n1:=1/2(w-2pcshiftx); % actual letter width +n2 := h/ascratio; % x-height +x1=pcshiftx + 1/2n1; top y1 = n2; +lft x2 = pcshiftx; y2 = 1/2n2; +x3 = x1; bot y3 = 0; +rt x4 = n1; y4 = 1/4n2; +x6 = x4; +%%y6 = 3/4n2; +top y6 = y1; +pth1 := z6..z1{left}..z2{down}..z3{right}..z4{pdir}; +%%%%%%%%%%%%% T + +%% bar +top y33=n2; n3 := n2 - top y33; +%%lft x31 = n1+pcshiftx; +lft x31 = n1; +rt x32=w-pcshiftx; +%%top y31 = y33-n3; bot y32=y33+n3; +top y31 = y33-n3; y32=y33; +x33=1/2[x31,x32]; +pth2 := z31{pdir}..z33..z32{pdir}; % T bar +n31 := n1; % width of bowl +%%lft x34 = pcshiftx + n1 + 1/8n31; +lft x34 = n1 + 1/8n31; +y34 = 1/2n2; +x35=x33; bot y35 = 0; +rt x36 = pcshiftx + n1 + 3/4n31; top y36 = 1/4n2; +pth3 := z33..z34{down}..z35{right}..z36{pdir}; % T bowl + +%%%%%%%%%%%%%%%%% Ligature + +z51=z6; +z55=z33; +x53 = 1/2[x51,x55]; +top y53 = h; +vc51 := direction 0 of pth1; +vc55 := direction 0 of pth3; +pth4 := z51{vc51}..z53{right}..z55{vc55}; % loop +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; % C +draw pth2; % T bar +draw pth3; % T bowl +draw pth4; % ligature loop +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,31,32,33,34,35,36,100); +endchar; % end of "ct" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{st} +% The `st' ligature. +% \begin{macrocode} + +cmchar "The st ligature"; +beginchar(oct"015", 2sb#+hstretch*(9/8x_height#+clubjut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair vc[]; +pickup quill; +%%%%%%%%%%% S + +n1:=3/7(w-2pcshiftx-clubjut); % actual letter width +n2 := h/ascratio; % x-height + +%% stem +lft x1=lft x2=pcshiftx+clubjut; top y1=n2; bot y2=0; +%% flick +x4=x2; y4 = 1/2n1; +%%%%%%%%%%%%% T + +%% bar +top y33=n2; n3 := n2 - top y33; +%%lft x31 = n1+pcshiftx; +lft x31 = n1; +rt x32=w-pcshiftx; +%%top y31 = y33-n3; bot y32=y33+n3; +top y31 = y33-n3; y32=y33; +x33=1/2[x31,x32]; +pth2 := z31{pdir}..z33..z32{pdir}; % T bar +n31 := n1; % width of bowl +%%lft x34 = pcshiftx + n1 + 1/8n31; +lft x34 = n1 + 1/8n31; +y34 = 1/2n2; +x35=x33; bot y35 = 0; +rt x36 = pcshiftx + n1 + 3/4n31; top y36 = 1/4n2; +pth3 := z33..z34{down}..z35{right}..z36{pdir}; % T bowl + +%%%%%%%%%%%%%%%%% Ligature + +z51=z4; +z55=z33; +x53 = 5/8[x51,x55]; +top y53 = h; +vc51 := up; +vc55 := direction 0 of pth3; +pth4 := z51{vc51}...z53{right}..z55{vc55}; % loop +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % S stem +draw_clubserif(1,2,0.5); +draw_roundserif(2,1,srad); +draw pth2; % T bar +draw pth3; % T bowl +draw pth4; % ligature loop +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,31,32,33,34,35,36,100); +endchar; % end of "st" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{''} +% The `''' ligature. +% \begin{macrocode} + +cmchar "Closing quotes"; +beginchar(oct"042",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h; +x2=x1-(2hstretch*dot_size); +draw_pcomma(1,dot_size,comma_width); % right +draw_pcomma(2,dot_size,comma_width); % left +penlabels(1,2); +endchar; % end of "''" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{``} +% The ```' ligature. +% \begin{macrocode} + +cmchar "Opening quotes"; +beginchar(oct"134",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h; +x2=x1+(2hstretch*dot_size); +draw_plq(1,dot_size,comma_width); % left +draw_plq(2,dot_size,comma_width); % right +penlabels(1,2); +endchar; % end of "``" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{-} +% The `-' (hyphen) character. +% \begin{macrocode} + +cmchar "Hyphen"; +beginchar("-",sb#+hstretch*(0.8x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +%%pickup quill; +%%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +%%x11=lft x1+alpha/2; y11=top y1-0.5thin; +%%x12=rt x2; y12=bot y1+0.5thin; +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +%%pickup thickstylus; +pickup halfquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +draw z21--z22; +draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "-" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{--} +% The `--' (en-dash) ligature. +% \begin{macrocode} + +cmchar "En dash"; +beginchar(oct"173",sb#+hstretch*(x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +pickup quill; +%%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +%%x11=lft x1+alpha/2; y11=top y1-0.5thin; +%%x12=rt x2; y12=bot y1+0.5thin; +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +%%pickup thickstylus; +pickup halfquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +draw z21--z22; +draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "--" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{---} +% The `---' (em dash) ligature. The em dash is twice the width of the en dash. +% \begin{macrocode} + +cmchar "Em dash"; +beginchar(oct"174",sb#+hstretch*(2x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +pickup quill; +%%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +%%x11=lft x1+alpha/2; y11=top y1-0.5thin; +%%x12=rt x2; y12=bot y1+0.5thin; +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +%%pickup thickstylus; +pickup halfquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +draw z21--z22; +draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "---" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{&} +% The ampersand (which is really an `et' ligature). +% \begin{macrocode} + +cmchar "CMIN ampersand"; +beginchar("&", 2sb#+hstretch*(5/4x_height#+2jut#), asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx:=sb; +pickup quill; +%% alpha looking part +n1 := w-2pcshiftx-jut; % actual letter width +n2 := h/ascratio; % x-height +n3 := 16/16n2; % height of alpha +x1 = w-pcshiftx; bot y1 = 0; +x3 = pcshiftx + 12/16n1; y3 = 1/2n3; % 10/16 too small +lft x5 = pcshiftx; y5=y3; +x4 = x6 = 1/2[x5,x3]; +top y4 = n3; bot y6 = 0; +rt x8 = w-pcshiftx-jut; top y8 = h; +x9 = x8-2jut; x10 = x8+2jut; +y9 = y10 = y8; +pth1 := z1{left}..z3..z4{left}..z5{down}..z6{right}..z3..z8{up}; +%% loop +z21 = z5; +z25 = point 1.5 of pth1; +x23 = 1/2[x21,x25]; +y23 = 6/8[y4,y8]; +pth2 := z21{up}..z23{right}..z25{down}; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw z9--z10; % alpha part +draw pth2; % loop +penlabels(1,2,3,4,5,6,7,8,9,10,16,17,18,19,21,22,23,24,25); +endchar; % end of "&" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</lig> +% \end{macrocode} +% +% \subsection{The digits file} +% +% These are arabic digits in the style of the book-hand. They are a +% modern invention. +% +% \begin{macrocode} +%<*dig> +% CMINDIG.MF Program file for Carolingian Minuscule digits +% + +% \end{macrocode} +% +% +% +% \begin{routine}{1} +% The digit `1'. +% \begin{macrocode} +cmchar "Carolingian digit 1"; +beginchar("1", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=x2=w/2; +y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,100); +endchar; % end "1" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{2} +% The digit `2'. +% \begin{macrocode} +cmchar "Carolingian digit 2"; +beginchar("2", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=pcshiftx+o; top y1=h-2thin; +x2=1/2w; top y2= h+o; +rt x3=w-pcshiftx-o; y3=3/4h; +% foot +lft x5=pcshiftx; bot y5=0; +rt x6=w-pcshiftx; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(5,6,thin); % foot +draw z1..z2{right}..z3{down}..{-pdir}z5wl; % curve +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "2" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{3} +% The digit `3'. +% \begin{macrocode} +cmchar "Carolingian digit 3"; +beginchar("3", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% x values +lft x3=pcshiftx; x10=x3; +rt x5=w-pcshiftx; x8=x5-3thin; +x4=0.5[x3,x5]; +x9=0.5[x10,x8]; +%%lft x6=pcshiftx+3thin; x7=x6; +x6=1/2[x3,x9]; x7=x6; +% y values +bot y3=thin; top y10=h-2thin; +y6=0.5[y3,y10]; y7=y6; +bot y4=-thin; top y9=h+thin; +y5=0.5[y3,y6]; +y8=11/12[y7,y10]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw z3..z4{right}..z5{up}...{-pdir}z6; % bottom bowl +%%draw z7{pdir}..z8{up}..z9{left}..z10; % top bowl +draw z3..z4{right}..z5{up}...{left}z6; % bottom bowl +draw z7{right}..z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "3" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{4} +% The digit `4'. +% \begin{macrocode} +cmchar "Carolingian digit 4"; +beginchar("4", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the stem +x1=x2=w-pcshiftx-jut; +y1=h; bot y2=0; +% the crossbar +lft x3=pcshiftx; y3=0.33h; +rt x4=w-pcshiftx; y4=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % main stem +draw_wave(3,4,thin); % crossbar +draw z3wl--z1; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "4" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{5} +% The digit `5'. +% \begin{macrocode} +cmchar "Carolingian digit 5"; +beginchar("5", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% for the top +rt x1=w-pcshiftx; top y1=h; +lft x2=pcshiftx; y2=y1; +% the S curve +x3=x2; y3=0.5h+thin; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +rt x5=w-pcshiftx; y5=0.3h; +x6=w/2; bot y6=0; +lft x7=pcshiftx; bot y7=2thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(2,1,thin); % top squiggle +draw z3{pdir}..z5{down}..z6{left}..z7; % curve +draw z2wl--z3; % vertical +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "5" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{6} +% The digit `6'. +% \begin{macrocode} +cmchar "Carolingian digit 6"; +beginchar("6", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx; top y1=h-2thin; +x2=1/2w; top y2= h; +lft x3=pcshiftx; y3=1/2h; +x4=x2; bot y4=0; +rt x5=w-pcshiftx; y5=1/4h; +lft x6=rt x3; bot y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{left}..z3{down}..z4{right}..z5{up}..{-pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "6" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{7} +% The digit `7'. +% \begin{macrocode} +cmchar "Carolingian digit 7"; +beginchar("7", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% top bar +lft x1=pcshiftx; +rt x2=w-pcshiftx; +top y1=top y2=h; +% bowed leg +x4=w/2; bot y4=0; +x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(1,2,thin); % top bar +draw z1wr..z3..z4; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "7" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{8} +% The digit `8'. +% \begin{macrocode} +cmchar "Carolingian digit 8"; +beginchar("8", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=1; +pickup quill; +lft x1=alpha*pcshiftx+o; rt x3=w-alpha*pcshiftx-o; y1=y3=3/4h; +x2=x4=w/2; top y2=h+o; bot y4=-o; +x5=x2; y5=h/2+2o; +lft x11=pcshiftx; rt x13=w-pcshiftx; y11=y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z5..z11..z4..z13..z5..cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,100); +endchar; % end "8" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{9} +% The digit `9'. +% \begin{macrocode} +cmchar "Carolingian digit 9"; +beginchar("9", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; bot y1=2thin; +x2=1/2w; bot y2= 0; +rt x3=w-pcshiftx; y3=1/2h; +x4=x2; top y4=h; +lft x5=pcshiftx; y5=3/4h; +rt x6=lft x3; top y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{up}..z4{left}..z5{down}..{pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "9" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{0} +% The digit `0'. +% \begin{macrocode} +cmchar "Carolingian digit 0"; +beginchar("0", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "0" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</dig> +% \end{macrocode} +% +% +% \section{The font definition files} \label{sec:fd} +% +% The font comes in normal and bold weights only. +% +% \begin{macrocode} +%<*fdot1> +\DeclareFontFamily{OT1}{cmin}{} + \DeclareFontShape{OT1}{cmin}{m}{n}{ <-8.5> cmin7 <8.5-15> cmin10 <15-> cmin17 }{} + \DeclareFontShape{OT1}{cmin}{m}{sl}{ <-> sub * cmin/m/n }{} + \DeclareFontShape{OT1}{cmin}{m}{it}{ <-> sub * cmin/m/n }{} + \DeclareFontShape{OT1}{cmin}{m}{sc}{ <-> sub * cmin/m/n }{} + \DeclareFontShape{OT1}{cmin}{m}{u}{ <-> sub * cmin/m/n }{} + \DeclareFontShape{OT1}{cmin}{bx}{n}{ <-8.5> cminb7 <8.5-15> cminb10 <15-> cminb17 }{} + \DeclareFontShape{OT1}{cmin}{bx}{it}{ <-> sub * cmin/bx/n }{} + \DeclareFontShape{OT1}{cmin}{bx}{sl}{ <-> sub * cmin/bx/n }{} + \DeclareFontShape{OT1}{cmin}{b}{n}{ <-> sub * cmin/bx/n }{} +%</fdot1> +% \end{macrocode} +% +% +% \begin{macrocode} +%<*fdt1> +\DeclareFontFamily{T1}{cmin}{} + \DeclareFontShape{T1}{cmin}{m}{n}{ <-8.5> cmin7 <8.5-15> cmin10 <15-> cmin17 }{} + \DeclareFontShape{T1}{cmin}{m}{sl}{ <-> sub * cmin/m/n }{} + \DeclareFontShape{T1}{cmin}{m}{it}{ <-> sub * cmin/m/n }{} + \DeclareFontShape{T1}{cmin}{m}{sc}{ <-> sub * cmin/m/n }{} + \DeclareFontShape{T1}{cmin}{m}{u}{ <-> sub * cmin/m/n }{} + \DeclareFontShape{T1}{cmin}{bx}{n}{ <-8.5> cminb7 <8.5-15> cminb10 <15-> cminb17 }{} + \DeclareFontShape{T1}{cmin}{bx}{it}{ <-> sub * cmin/bx/n }{} + \DeclareFontShape{T1}{cmin}{bx}{sl}{ <-> sub * cmin/bx/n }{} + \DeclareFontShape{T1}{cmin}{b}{n}{ <-> sub * cmin/bx/n }{} +%</fdt1> +% \end{macrocode} +% +% \section{The package code} \label{sec:code} +% +% \subsection{The \Lpack{carolmin} package} +% +% The \Lpack{carolmin} package is for typesetting short pieces of text +% in the \thisfont{} fonts. +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. +% \begin{macrocode} +%<*usc> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{carolmin}[2002/12/30 v1.0 package for Carolingian Minuscule fonts] +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\cminfamily} +% Selects the \thisfont{} font family in the OT1 or T1 encoding. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \newcommand{\cminfamily}{\usefont{T1}{cmin}{m}{n}} +\else + \newcommand{\cminfamily}{\usefont{OT1}{cmin}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmin} +% Text command for the \thisfont{} font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmin}{\cminfamily} +% \end{macrocode} +% \end{macro} +% +% The end of this package. +% \begin{macrocode} +%</usc> +% \end{macrocode} +% +% \subsection{The \Lpack{allcmin} package} +% +% The \Lpack{allcmin} package is intended for use when the entire document +% will be typeset in the book-hand. This is a minimal package. Because the +% book-hand should not contain arabic digits a fuller package would redefine +% anything numbered in \LaTeX{} to use roman instead of arabic numbering. +% Also, because of the large |\baselineskip| many other aspects of \LaTeX{} +% to do with vertical positioning should also be redefined. +% +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. It also uses the \Lpack{carolmin} package. +% \begin{macrocode} +%<*uscall> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{allcmin}[2002/12/30 v1.0 package for all Carolingian Minuscule fonts] +\RequirePackage{carolmin} +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% Redefine the default fonts to be \thisfont, which has only one family +% member. +% \begin{macro}{\rmdefault} +% \begin{macro}{\sfdefault} +% \begin{macro}{\ttdefault} +% \begin{macrocode} +\renewcommand{\rmdefault}{cmin} +\renewcommand{\sfdefault}{cmin} +\renewcommand{\ttdefault}{cmin} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The `leading' in the book-hands is a function of the |x-height|, which is +% normally much +% greater than for the CMR fonts. I have borrowed code from Frank Jensen's +% \Lpack{beton} package~\cite{BETON} to do this. The |x-height| (in points) +% for the CMR +% fonts is given in Table~\ref{tab:cmrx}. Note that the CMR design sizes are +% 5--10, 12, and 17.28 points. The other values given are scaled from these +% figures. +% +% \begin{table} +% \centering +% \caption{The x heights of the CMR and \thisfont{} fonts} \label{tab:cmrx} +% \begin{tabular}{ccc} \hline +% Design & CMR & \thisfont \\ +% Size & X Height & X Height \\ \hline +% 5 & 2.14 & 3.00 \\ ^^A CMR skip = 6pt = 2.8 times +% 6 & 2.58 & 3.61 \\ ^^A CMR skip = 7pt = 2.7 times +% 7 & 3.00 & 4.20 \\ ^^A CMR skip = 8pt = 2.7 times +% 8 & 3.44 & 4.81 \\ ^^A CMR skip = 9.5pt = 2.8 times +% 9 & 3.86 & 5.40 \\ ^^A CMR skip = 11pt = 2.8 times +% 10 & 4.31 & 6.03 \\ ^^A CMR skip = 12pt = 2.8 times +% 11 & 4.74 & 6.64 \\ ^^A CMR skip = 13.6pt = 2.8 times +% 12 & 5.17 & 7.24 \\ ^^A CMR skip = 14.5pt = 2.8 times +% 14 & 6.03 & 8.44 \\ ^^A CMR skip = 18pt = 3.0 times +% 17 & 7.44 & 10.41 \\ ^^A CMR skip = 22pt = 3.0 times +% 20 & 8.75 & 12.25 \\ ^^A CMR skip = 25pt = 2.9 times +% 25 & 10.94 & 15.32 \\ ^^A CMR skip = 30pt = 2.7 times +% \hline +% \end{tabular} +% \end{table} +% +% \begin{macro}{\cmin@baselineskip@table} +% A table of the normal font sizes and the corresponding baselineskip. +% The distance between baselines for \thisfont{} is over twice +% the |x-height|. ^^A actually 2.5 times to nearest half point +% +% \begin{macrocode} +\newcommand{\cmin@baselineskip@table}{% + <\@vpt>7.5% + <\@vipt>9.0% + <\@viipt>10.5% + <\@viiipt>12.0% + <\@ixpt>13.5% + <\@xpt>15.0% + <\@xipt>16.5% + <\@xiipt>18.0% + <\@xivpt>21.0% + <\@xviipt>26.0% + <\@xxpt>30.5% + <\@xxvpt>38.5} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\cmin@new@setfontsize} +% This is a macro that replaces the |\@setfontsize| macro which is called by +% the font size changing commands. +% \begin{macrocode} +\newcommand{\cmin@new@setfontsize}[3]{% + \edef\@tempa{\def\noexpand\@tempb####1<#2}% + \@tempa>##2<##3\@nil{\def\cmin@baselineskip@value{##2}}% + \edef\@tempa{\noexpand\@tempb\cmin@baselineskip@table<#2}% + \@tempa><\@nil + \ifx\cmin@baselineskip@value\@empty + \def\cmin@baselineskip@value{#3}% + \fi + \cmin@old@setfontsize{#1}{#2}\cmin@baselineskip@value} +% \end{macrocode} +% \end{macro} +% +% We had better give an author a means of using The Computer Modern fonts +% if necessary. +% +% \begin{macro}{\cmrfamily} +% \begin{macro}{\cmssfamily} +% \begin{macro}{\cmttfamily} +% These macros select the Computer Modern Roman, Sans, and Typewriter +% font families in either the T1 or OT1 encodings. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}} +\else + \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcmr} +% Text command for the Computer Modern Roman font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmr}{\cmrfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmss} +% Text command for the Computer Modern Sans font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmss}{\cmssfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmtt} +% Text command for the Computer Modern Typewriter font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmtt}{\cmttfamily} +% \end{macrocode} +% \end{macro} +% +% +% At the start of the document, change the |\@setfontsize| macro and call +% the normal font to implement the change. +% \begin{macrocode} +\AtBeginDocument{% + \let\cmin@old@setfontsize=\@setfontsize + \let\@setfontsize=\cmin@new@setfontsize} +\AtBeginDocument{\normalsize} +% \end{macrocode} +% +% +% The end of this package. +% \begin{macrocode} +%</uscall> +% \end{macrocode} +% +% +% +% +% +% \Finale +% \PrintIndex +% +\endinput + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + diff --git a/Master/texmf-dist/source/latex/bookhands/carolmin/carolmin.ins b/Master/texmf-dist/source/latex/bookhands/carolmin/carolmin.ins new file mode 100644 index 00000000000..c014d83af0e --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/carolmin/carolmin.ins @@ -0,0 +1,101 @@ +%% +%% carolmin.ins +%% Copyright 1999 Peter R. Wilson +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Peter Wilson (CUA) +%% now at: peter.r.wilson@boeing.com +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{carolmin.ins} +\input docstrip.tex +\preamble + + Copyright 1999 Peter R. Wilson + + This program is provided under the terms of the + LaTeX Project Public License distributed from CTAN + archives in directory macros/latex/base/lppl.txt. + +Author: Peter Wilson (CUA) + now at: peter.r.wilson@boeing.com + +\endpreamble + +\keepsilent + +%%% \Msg{*** Generating the driver file ***} +%%% \generateFile{carolmin.drv}{t}{\from{carolmin.dtx}{driver}} + +\Msg{*** Generating the Metafont files ***} + +\usepostamble\empty +\generateFile{cmin7.mf}{t}{\from{carolmin.dtx}{base7}} +\generateFile{cmin10.mf}{t}{\from{carolmin.dtx}{base10}} +\generateFile{cmin17.mf}{t}{\from{carolmin.dtx}{base17}} +\generateFile{cminb7.mf}{t}{\from{carolmin.dtx}{base7b}} +\generateFile{cminb10.mf}{t}{\from{carolmin.dtx}{base10b}} +\generateFile{cminb17.mf}{t}{\from{carolmin.dtx}{base17b}} +\generateFile{cminl.mf}{t}{\from{carolmin.dtx}{min}} +\generateFile{cminu.mf}{t}{\from{carolmin.dtx}{maj}} +\generateFile{cmintitle.mf}{t}{\from{carolmin.dtx}{mfd}} +\generateFile{cminpunct.mf}{t}{\from{carolmin.dtx}{punct}} +\generateFile{cminlig.mf}{t}{\from{carolmin.dtx}{lig}} +\generateFile{cmindig.mf}{t}{\from{carolmin.dtx}{dig}} + +\Msg{*** Generating the Font Definition files ***} +\usepostamble\defaultpostamble + +\generateFile{ot1cmin.fd}{t}{\from{carolmin.dtx}{fdot1}} +\generateFile{t1cmin.fd}{t}{\from{carolmin.dtx}{fdt1}} + +\Msg{*** Generating the LaTeX2e package files ***} + +\generateFile{carolmin.sty}{t}{\from{carolmin.dtx}{usc}} +\generateFile{allcmin.sty}{t}{\from{carolmin.dtx}{uscall}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into directories searched by TeX:} +\Msg{*} +\Msg{* Move these into the font source area:} +\Msg{* \space\space cmin7.mf} +\Msg{* \space\space cmin10.mf} +\Msg{* \space\space cmin17.mf} +\Msg{* \space\space cminb7.mf} +\Msg{* \space\space cminb10.mf} +\Msg{* \space\space cminb17.mf} +\Msg{* \space\space cminl.mf} +\Msg{* \space\space cminu.mf} +\Msg{* \space\space cmintitle.mf} +\Msg{* \space\space cminpunct.mf} +\Msg{* \space\space cminlig.mf} +\Msg{* \space\space cmindig.mf} +\Msg{*} +\Msg{* Move these into the LaTeX macro area:} +\Msg{* \space\space ot1cmin.fd} +\Msg{* \space\space t1cmin.fd} +\Msg{* \space\space carolmin.sty} +\Msg{* \space\space allcmin.sty} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{* Process any name.idx file by:} +\Msg{* \space\space\space\space makeindex -s gind.ist name} +\Msg{* Process any name.glo file by:} +\Msg{* \space\space\space\space makeindex -s gglo.ist -o name.gls name.glo} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/bookhands/egothic/egothic.dtx b/Master/texmf-dist/source/latex/bookhands/egothic/egothic.dtx new file mode 100644 index 00000000000..88a6cacefd8 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/egothic/egothic.dtx @@ -0,0 +1,5036 @@ +% \iffalse meta-comment +% +% egothic.dtx +% Copyright 1999 Peter R. Wilson +% +% This program is provided under the terms of the +% LaTeX Project Public License distributed from CTAN +% archives in directory macros/latex/base/lppl.txt. +% +% Author: Peter Wilson (CUA) (now at: peter.r.wilson@boeing.com) +% +% If you do not have the docmfp package (available from CTAN in +% tex-archive/macros/latex/contrib/supported), comment out the +% \usepackage{docmfp} line below and uncomment the line following it. +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{docmfp} +%%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{} +\EnableCrossrefs +\CodelineIndex +%% comment out next line to show the code +\OnlyDescription +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{egothic.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{134} +% +% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} +% \DoNotIndex{\@centercr,\@cite} +% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} +% \DoNotIndex{\@input,\@ixpt,\@m} +% \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} +% \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} +% \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} +% \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} +% \DoNotIndex{\advance,\Alph,\alph} +% \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\bullet} +% \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} +% \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} +% \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} +% \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +% \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} +% \DoNotIndex{\fbox} +% \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} +% \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +% \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} +% \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} +% \DoNotIndex{\input} +% \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} +% \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} +% \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +% \DoNotIndex{\NeedsTeXFormat,\newdimen} +% \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} +% \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} +% \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} +% \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +% \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +% \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +% \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} +% \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} +% \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} +% \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} +% \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} +% \DoNotIndex{\viipt,\vipt,\vskip,\vspace} +% \DoNotIndex{\wd,\xiipt,\year,\z@} +% +% \changes{v1.0}{2002/12/30}{First public release} +% +% \def\fileversion{v1.0} +% \def\filedate{2002/12/30} +% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package +% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option +% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file +% \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter +% \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle +% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment +% \newcommand*{\AD}{\textsc{ad}} +% \newcommand*{\thisfont}{Early Gothic} +% +% \title{The \Lpack{Early Gothic} fonts\thanks{This +% file has version number \fileversion, last revised +% \filedate.}} +% +% \author{% +% Peter Wilson\\ +% Catholic University of America \\ +% Now at \texttt{peter.r.wilson@boeing.com} +% } +% \date{\filedate} +% \maketitle +% \begin{abstract} +% The \Lpack{egothic} and \Lpack{allegoth} packages provide a set of +% Metafont \thisfont{} book-hands +% as used +% for manuscripts in the 11th and 12th centuries. This is one in a series +% of manuscript fonts. +% \end{abstract} +% \tableofcontents +% \listoftables +% +% +% +% +% \section{Introduction} +% +% The \Lpack{egothic} and \Lpack{allegoth} packages provide a Metafont~\cite{METAFONT} version +% of the \thisfont{} manuscript book-hand that was in use between about the +% eleventh and twelfth centuries~\AD. It is part of a project to provide fonts +% covering the major manuscript hands between the first century~\AD{} and +% the invention of printing. The principal resources used in this project +% are listed in the Bibliography. +% +% This manual is typeset according to the conventions of the +% \LaTeX{} \textsc{docstrip} utility which enables the automatic +% extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. +% The \Lpack{docmfp} package is used for documenting the Metafont portions +% of the distribution~\cite{DOCMFP}. +% +% Section~\ref{sec:usc} describes the usage of the package. +% Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} +% and source code for the package is in Section~\ref{sec:code}. +% +% \subsection{Manuscript book-hands} +% +% Before the invention of printing all books were written by hand. The book-hands +% used by the scribes and copyists for the manuscripts changed as time +% went on. Table~\ref{tab:1} lists some of the common book-hands which were used +% between the 1st and 15th centuries. The later book-hands formed the basis of the +% fonts used by the early printers, which in turn form the basis of the printing +% fonts in use today. +% +% The manuscript book-hands were written with a broad nibbed reed or quill +% pen. Among the distinguishing characteristics of a hand, apart from the +% actual shape of the letters, are the angle of the pen (which controls the +% variation between thick and thin strokes) and the height of a letter compared +% to the width of the nib. The lower the ratio of the letter height to nib +% width, the more condensed is the script. The scripts also varied in their +% typical height. +% +% Table~\ref{tab:1} gives an `average' x-height for each +% script, which I obtained by measuring a sample of photographs of +% manuscripts written in the various hands. About a dozen examples +% of each book-hand were measured. This figure should not be taken too +% seriously. +% +% There was not a sharp division between the use of one hand and another. +% Many manuscripts exhibit a variety of hands in the same document. For example, +% the scribe writing in an Uncial hand may have used Roman Rustic letters +% for capitals. Usually the same pen was used for the two different scripts. +% +% Generally speaking, as a hand got older it became more embelished, and +% therefore took longer to write. As this happened a new hand would appear that +% was faster, and which would eventually make the earlier one obsolete. +% +% Many of the book-hands were single-cased; that is, they did not have an +% upper- and lower-case as we do nowadays in Western scripts. On the other +% hand, a script might be majuscule or minuscule. A \textit{majuscule} script +% is one, like our upper-case, where the letters are drawn between two lines +% and are of a uniform height with no ascenders or descenders. +% A \textit{minuscule} script, like our lower-case, is drawn between four lines +% and has ascenders and descenders. +% +% \begin{table} +% \centering +% \caption{The main manuscript book-hands} \label{tab:1} +% \begin{tabular}{lccccc} \hline +% Name & Century & x-height & Height & Pen & Normalised \\ +% & & (mm) & (nib widths) & angle & height \\ \hline +% Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\ +% Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\ +% Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\ +% Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\ +% Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\ +% Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\ +% Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\ +% Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\ +% Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\ +% Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\ +% Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\ +% Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline +% \end{tabular} +% \end{table} +% +% During the period under consideration arabic numerals were effectively +% not used. At the beginning they were unknown and even though some knew +% of them towards the end, the glyphs used for them are not recognisable --- +% to me they look somewhat like cryllic letters --- and each locality +% and time had its own highly individualistic rendering. The general rule +% when using one of these book-hands is to write all numbers using +% roman numerals. +% +% The Roman alphabet consisted of 23 capital letters --- the J, U and W +% were absent. The book-hands initially used both a `u' and a `v' interchangeably +% but by the 10th century the practice had become to use the `v' before a vowel +% and the `u' otherwise. The letter corresponding to the W sound appeared +% in England around the 7th century in +% the form of the runic \textit{wen} character and by about the 11th century +% the `w' chacter was generally used. The `J' is the newest letter of all, not +% appearing until about the mid 16th century. +% +% In the first century punctuation was virtually unknown, and typically +% would not even be any additional space between individual words, never +% mind denoting ends of sentences. Sometimes a dot at mid-height would be +% used as a word seperator, or to mark off the end of a paragraph. Effectively +% a text was a continuous stream of letters. By the time that printing was +% invented, though, all of our modern punctuation marks were being used. +% +% Among all these manuscript hands, the Carolingian minuscule is the +% most important as our modern fonts are based on its letter shapes, and it is +% also at this point in time where the division occured between the black letter +% scripts as used even today in Germany, and the lighter fonts used elesewhere. +% The Rotunda and Humanist minuscule hands were developed in Italy and were +% essentially a rediscovery of the Carolingian minusucle. Guthenberg took the +% Gothic scripts as the model for his types. Later printers, +% such as Nicholas Jenson of Venice, +% took the Humanist scripts as their models. +% +% +% \subsection{The \thisfont{} script} +% +% Towards the end of the 10th century Carolingian Minuscule started to change, +% perhaps driven by an increased demand for books by a better educated public +% and the advent of what would become universities. Economics dictated that +% reproduction had to be quicker and that more words should be squeezed into +% a given space. +% +% To increase speed and word density, curves became straighter and the width +% of individual letter was decreased. The result is what is now called +% \thisfont, which was a short-lived intermediary between Carolingian +% Minuscule and the full blown Gothic scripts. +% +% The `ct' Carolingian ligature went out of fashion but the `half r' +% began to be used after any letter with a bowl. +% +% +% \section{The \Lpack{egothic} and \Lpack{allegoth} packages} \label{sec:usc} +% +% The \thisfont{} font family is called |egoth|. The font is supplied in both +% OT1 and T1 encodings. +% +% \subsection{The \Lpack{egothic} package} +% +% This is intended for the occasions when some short pieces of text have +% to be written in \thisfont{} while the majority of the document is in another +% font. The normal baselineskips are used. +% +% \DescribeMacro{\egothfamily} +% The |\egothfamily| declaration starts typesetting with the \thisfont{} fonts. +% Use of the \thisfont{} font will continue until either there is another |\...family| +% declaration or the current group (e.g., environment) is closed. +% +% \DescribeMacro{\textegoth} +% The command |\textegoth{|\meta{text}|}| will typeset \meta{text} using the +% \thisfont{} fonts. +% +% \subsection{The \Lpack{allegoth} package} +% +% +% This package is for when the entire document will be typeset with the +% \thisfont{} font. The baselineskips are set to those appropriate to the +% book-hand. +% +% This is a minimalist package. Apart from declaring \thisfont{} to be the +% default font and setting the baselineskips appropriately, it makes no other +% alterations. +% Vertical spacing +% before and after section titles and before and after lists, etc., will be +% too small as the \LaTeX{} design assumes a font comparable in size to +% normal printing fonts, and the book-hand is much taller. +% To capture more of the flavour of the time, all numbers +% should be written using roman numerals. +% The \Lpack{romannum} package~\cite{ROMANNUM} +% can be used so that \LaTeX{} will typeset the numbers that it generates, +% like sectioning or caption numbers, using roman numerals instead of arabic +% digits. +% +% \DescribeMacro{\cmrfamily} +% \DescribeMacro{\textcmr} +% \DescribeMacro{\cmssfamily} +% \DescribeMacro{\textcmss} +% \DescribeMacro{\cmttfamily} +% \DescribeMacro{\textcmtt} +% The |...family| declarations start typesetting with the Computer Modern Roman +% (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer +% Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}| +% commands will typeset \meta{text} in the corresponding Computer Modern font. +% +% The \Lpack{allegoth} package automatically loads the \Lpack{egothic} package, +% so its font commands are available if necessary. +% +% \StopEventually{ +% \bibliographystyle{alpha} +% \renewcommand{\refname}{Bibliography} +% \begin{thebibliography}{GMS94} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem[And69]{ANDERSON69} +% Donald M.~Anderson. +% \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}. +% \newblock Holt, Rinehart and Winston, 1969. +% +% \bibitem[Bol95]{BOLOGNA95} +% Giulia Bologna. +% \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}. +% \newblock Crescent Books, 1995. +% +% \bibitem[Day95]{DAY95} +% Lewis F.~Day. +% \newblock {\em Alphabets Old \& New}. +% \newblock (3rd edition originally published by B.~T.~Batsford, 1910) +% \newblock Senate, 1995. +% +% \bibitem[Dro80]{DROGIN80} +% Marc Drogin. +% \newblock {\em Medieval Calligraphy: Its History and Technique}. +% \newblock Allenheld, Osmun \& Co., 1980. +% +% \bibitem[Dru95]{DRUCKER95} +% Johanna Drucker. +% \newblock {\em The Alphabetic Labyrinth}. +% \newblock Thames \& Hudson, 1995. +% +% \bibitem[Fir93]{FIRMAGE93} +% Richard A.~Firmage. +% \newblock {\em The Alphabet Abecedarium}. +% \newblock David R~Goodine, 1993. +% +% \bibitem[Fli98]{LETTRINE} +% Daniel Flipo. +% \newblock {\em The LETTRINE package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1998. +% +% \bibitem[Har95]{HARRIS95} +% David Harris. +% \newblock {\em The Art of Calligraphy}. +% \newblock DK Publishing, 1995. +% +% \bibitem[Jen95]{BETON} +% Frank Jensen. +% \newblock {\em The BETON package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1995. +% +% \bibitem[Joh71]{JOHNSTON75} +% Edward Johnston (ed. Heather Child). +% \newblock {\em Formal Penship and Other Papers}. +% \newblock Penthalic, 1971. +% +% \bibitem[Knu87]{CM} +% Donald E.~Knuth. +% \newblock {\em Computer Modern Typefaces}. +% \newblock Addison-Wesley, 1987. +% +% \bibitem[Knu92]{METAFONT} +% Donald E.~Knuth. +% \newblock {\em The METAFONTbook}. +% \newblock Addison-Wesley, 1992. +% +% \bibitem[GMS94]{GOOSSENS94} +% Michel Goossens, Frank Mittelbach, and Alexander Samarin. +% \newblock {\em The LaTeX Companion}. +% \newblock Addison-Wesley Publishing Company, 1994. +% +% \bibitem[Tho75]{THOMAS75} +% Alan G.~Thomas. +% \newblock {\em Great Books and Book Collectors}. +% \newblock Weidenfield and Nichoson, 1975. +% +% \bibitem[Wil99]{DOCMFP} +% Peter R.~Wilson. +% \newblock {\em The DOCMFP Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \bibitem[Wil99b]{ROMANNUM} +% Peter R.~Wilson. +% \newblock {\em The ROMANNUM Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \end{thebibliography} +% } +% +% \section{The Metafont code} \label{sec:mf} +% +% +% As previously noted, this work is part of a larger project to provide +% fonts covering the main manuscript book-hands. As such, one of the +% aims is to produce a coordinated set of fonts, especially as multiple +% hands might be used in a single document. +% +% Noting that the hands tend to be somewhat larger than the typical 10pt +% size (where the x-height is approximately 1.5mm) used for modern books, +% I have also designed the fonts +% at a larger than normal size, then applied some non-linear factors when reducing +% them down to a 10pt size. +% Further, I have used the height of the Carolingian minuscule as a +% normalising factor when deciding on the absolute height of any particular +% script. The x-height of the Carolingian font is made equal to the +% x-height of the Computer Modern Roman (CMR) font. +% +% Modern fonts are effectively drawn. That is, the outline of the letter is +% drawn carefully and the center is filled with ink. This is shown to good +% effect in the Metafont code for the Computer Modern fonts~\cite{CM}. +% In contrast, the manuscript letters were inked by single pen strokes in +% a calligraphic manner. I have tried to repeat this calligraphic style +% in the Metafont code. +% +% As much as possible I have tried to use parameter values from the +% Computer Modern Roman (CMR) fonts in order to reduce possible +% infelicities if the CM and manuscript fonts are used together. However, +% few of the CMR parameters are applicable to the calligraphic style. +% +% +% \subsection{The parameter file} +% +% We deal with the parameter files first, and start by announcing +% what they are for. The \thisfont{} font comes in three sizes and also as a normal +% and a bold font. +% \begin{macrocode} +%<*base7|base10|base17|base7b|base10b|base17b> +%<base7>%%% EGOTH7.MF Early Gothic at 7 point design size. +%<base10>%%% EGOTH10.MF Early Gothic at 10 point design size. +%<base17>%%% EGOTH17.MF Early Gothic at 17 point design size. +%<base7b>%%% EGOTHB7.MF Early Gothic Bold at 7 point design size. +%<base10b>%%% EGOTHB10.MF Early Gothic Bold at 10 point design size. +%<base17b>%%% EGOTHB17.MF Early Gothic Bold at 17 point design size. +% +% \end{macrocode} +% Parameters from CMR are used as much as possible. We also +% make sure that \Lpack{cmbase} is loaded as well as plain Metafont. +% \begin{macrocode} +if unknown cmbase: input cmbase fi + +%<base7>font_identifier:="EGOTH"; font_size 7pt#; +%<base10>font_identifier:="EGOTH"; font_size 10pt#; +%<base17>font_identifier:="EGOTH"; font_size 17.28pt#; +%<base7b>font_identifier:="EGOTHB"; font_size 7pt#; +%<base10b>font_identifier:="EGOTHB"; font_size 10pt#; +%<base17b>font_identifier:="EGOTHB"; font_size 17.28pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutstretch} +% The CMR scaling for lowercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> jutstretch:=1.19; +%<base10|base10b> jutstretch:=1.152; +%<base17|base17b> jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{stemstretch} +% The CMR scaling for lowercase stem widths wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> stemstretch:=1.50; +%<base10|base10b> stemstretch:=1.31; +%<base17|base17b> stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{caprat} +% The scaling for `capitals' wrt `lowercase'. This is pretty much a guess +% (the ratio for CMR10 is 1.59). +% \begin{macrocode} + caprat:=1.5; % ratio of capital height to minuscule height +% \end{macrocode} +% +% \DescribeVariable{cap_jutstretch} +% The CMR scaling for uppercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_jutstretch:=1.3; +%<base10|base10b> cap_jutstretch:=1.2; +%<base17|base17b> cap_jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{cap_stemstretch} +% The CMR scaling for uppercase stem width wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_stemstretch:=1.45; +%<base10|base10b> cap_stemstretch:=1.31; +%<base17|base17b> cap_stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{bfudge} +% Letter width scaling for bold font wrt normal font. +% \begin{macrocode} +%<base7|base10|base17> bfudge:=1.0; +%<base7b|base10b|base17b> bfudge:=1.2; +% \end{macrocode} +% +% \DescribeVariable{szfudge} +% Width scaling wrt 17pt letter width. +% \begin{macrocode} +%<base7|base7b> szfudge:=1.18; +%<base10|base10b> szfudge:=1.0; +%<base17|base17b> szfudge:=1.0; +% \end{macrocode} +% +% \DescribeVariable{hstretch} +% Horizontal stretching factor wrt 17pt size letter width. +% \begin{macrocode} + hstretch:=szfudge*bfudge; +% \end{macrocode} +% +% \DescribeVariable{carol_height} +% The x-height of the Carolingian gothic font. +% \begin{macrocode} +%<base7|base7b> carol_height#:=108.5/36pt#; +%<base10|base10b> carol_height#:=155/36pt#; +%<base17|base17b> carol_height#:=268/36pt#; +% \end{macrocode} +% +% \DescribeVariable{vstretch} +% The height of this font wrt the Carolingian font. +% \begin{macrocode} + vstretch:=1.27; + +% \end{macrocode} +% +% \DescribeVariable{x_height} +% The x-height of lower case letters. Scaled from the Carolingian font. +% \begin{macrocode} + x_height#:=vstretch*carol_height#; +% \end{macrocode} +% +% \DescribeVariable{u} +% The unit width. The CMR values are used. +% \begin{macrocode} +%<base7> u#:=15.5/36pt#; +%<base10> u#:=20/36pt#; +%<base17> u#:=32.5/36pt#; +%<base7b> u#:=17.9/36pt#; +%<base10b> u#:=23/36pt#; +%<base17b> u#:=37/36pt#; +% \end{macrocode} +% +% \DescribeVariable{width_adj} +% \DescribeVariable{serif_fit} +% \DescribeVariable{cap_serif_fit} +% \DescribeVariable{letter_fit} +% The majority of these parameters and values are constant. +% They are for fine adjustements of characters. The CM values are used. +% \begin{macrocode} + width_adj#:=0pt#; % width adjustment for certain characters + serif_fit#:=0pt#; % extra sidebar near lowercase serifs +%<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs +%<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +%<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs +%<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars +% \end{macrocode} +% +% \DescribeVariable{sb} +% A length used for adjusting the side bearings of characters. +% This is normally |1/2u| but decrease by 3/4 for Gothic lowercase. +% \begin{macrocode} +%<base7|base7b> sb#:=3/8u#; % unit for side bearings +%<base10|base10b> sb#:=3/8u#; % unit for side bearings +%<base17|base17b> sb#:=3/8u#; % unit for side bearings + +% \end{macrocode} +% +% \DescribeVariable{cap_sb} +% A length used for adjusting the side bearings of uppercase characters. +% \begin{macrocode} +%<base7|base7b> cap_sb#:=4/3sb#; % unit for uppercase side bearings +%<base10|base10b> cap_sb#:=4/3sb#; % unit for side bearings +%<base17|base17b> cap_sb#:=4/3sb#; % unit for side bearings + +% \end{macrocode} +% +% \DescribeVariable{cap_height} +% The height of capital letters. +% \begin{macrocode} +%<base7|base7b> cap_height#:=172.2/36pt#; % height of caps +%<base10|base10b> cap_height#:=246/36pt#; % height of caps +%<base17|base17b> cap_height#:=425/36pt#; % height of caps +% \end{macrocode} +% +% \DescribeVariable{thickfudge} +% The reciprocal of the font height in nib widths. Normal font height +% is 6 nib widths and the bold font height is 5 nib widths. +% \begin{macrocode} +%<base7|base10|base17> thickfudge:=1/6; +%<base7b|base10b|base17b> thickfudge:=1/5; +% \end{macrocode} +% +% \DescribeVariable{thinfudge} +% The nib sharpness. +% \begin{macrocode} +thinfudge:=1/6; +% \end{macrocode} +% +% \DescribeVariable{thick} +% The maximum nib width. +% That is, the width of the thickest line that can be penned. +% \begin{macrocode} +thick#:=stemstretch*thickfudge*x_height#; % max pen breadth +% \end{macrocode} +% +% \DescribeVariable{thin} +% The nib thinness. +% That is, the width of the thinnest line that can be penned. +% \begin{macrocode} +thin#:=thinfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{pangle} +% The pen angle (in degrees). +% \begin{macrocode} +pangle:=35; % pen angle +% \end{macrocode} +% +% \DescribeVariable{cappangle} +% The pen angle for capitals (in degrees). +% \begin{macrocode} +cappangle:=0; % pen angle +cappangle := pangle; +% \end{macrocode} +% +% \DescribeVariable{ascratio} +% The height of lower case ascenders wrt |x_height|. +% \begin{macrocode} + ascratio:=6/4; +% \end{macrocode} +% +% \DescribeVariable{asc_height} +% The height of lower case ascenders. +% \begin{macrocode} + asc_height#:=ascratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{descratio} +% The depth of lower case descenders wrt |x_height|. +% \begin{macrocode} + descratio:=2/4; +% \end{macrocode} +% +% \DescribeVariable{desc_depth} +% The depth of lower case descenders. +% \begin{macrocode} + desc_depth#:=descratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_height} +% The height of numerals. Make these midway between normal and capital +% letters. +% \begin{macrocode} + fig_height#:=(0.5[1,caprat])*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_width} +% The width of numerals. All numerals are the same width (roughly, an `o'). +% \begin{macrocode} + fig_width#:=hstretch*(x_height#); +% \end{macrocode} +% +% \DescribeVariable{body_height} +% The height of the tallest character. +% \begin{macrocode} + body_height#:=caprat*asc_height#; +% \end{macrocode} +% +% \DescribeVariable{body_depth} +% The depth of the lowest character. +% \begin{macrocode} + body_depth#:=caprat*desc_depth#; +% \end{macrocode} +% +% \DescribeVariable{half_height} +% Half the normal letter height. +% \begin{macrocode} + half_height#:=1/2x_height#; % half the height of x height letters + +% \end{macrocode} +% +% \DescribeVariable{side} +% We might be using a square for the character design. +% \begin{macrocode} +side#:=x_height#; +% \end{macrocode} +% +% \DescribeVariable{rule_thickness} +% Thickness of rules (in math symbols). The CMR values are used. +% \begin{macrocode} +%<base7|base7b> rule_thickness#:=.34pt#; +%<base10|base10b> rule_thickness#:=.4pt#; +%<base17|base17b> rule_thickness#:=.6pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutfudge} +% Controls the protrusion of serifs. +% \begin{macrocode} +%%%jutfudge:= 3/4; +jutfudge:= 1/2; +% \end{macrocode} +% +% \DescribeVariable{jut} +% The lowercase serif protrusion. +% \begin{macrocode} +jut#:=jutstretch*jutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{sqrcjut} +% Square Capitals flat serif protrusion. +% \begin{macrocode} +sqrcjut# := 2cap_jutstretch*thin#; +% \end{macrocode} +% +% \DescribeVariable{sqrcjutrat} +% Ratio of Square Capitals thin triangle serif to flat serif protrusion. +% \begin{macrocode} +sqrcjutrat := 2; +% \end{macrocode} +% +% \DescribeVariable{srad} +% |srad| with |0 < srad < 1| controls the serif radius. +% \begin{macrocode} +srad:=0.8; % was 0.5 +% \end{macrocode} +% +% \DescribeVariable{trijut} +% The lowercase triangular serif protrusion. +% \begin{macrocode} +trijut#:=0.75jutstretch*thick#; +% \end{macrocode} +% +% \DescribeVariable{clubjutfudge} +% The fractional protusion of a club serif. +% \begin{macrocode} +clubjutfudge:=1/2; +% \end{macrocode} +% +% \DescribeVariable{clubjut} +% The lowercase club serif protrusion. +% \begin{macrocode} +clubjut#:=jutstretch*clubjutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{o} +% Amount of overshoot for curves (as in an `o'). Use CMR values. +% \begin{macrocode} +%<base7|base7b> o#:=5/36pt#; +%<base10|base10b> o#:=8/36pt#; +%<base17|base17b> o#:=10/36pt#; + +% \end{macrocode} +% +% \DescribeVariable{slant} +% |slant| is the amount the font slopes to the right. \\ +% 5 degrees = 9/100; 10 degrees = 11/50. +% \begin{macrocode} +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +%%%%%%slant:= sind 10/cosd 10; %% 10 degree slant + +% \end{macrocode} +% +% \DescribeVariable{monospace} +% We are generating a variable-width font. +% \begin{macrocode} +monospace:=false; % should all characters have the same width? + +% \end{macrocode} +% +% \DescribeVariable{dot_size} +% The size of (punctuation) dots. +% \begin{macrocode} +dot_size#:=5thin#; % size of dots +% \end{macrocode} +% +% \DescribeVariable{comma_width} +% The horizontal width of a comma. +% \begin{macrocode} +comma_width#:=5/4dot_size#; + +% \end{macrocode} +% +% Finally, call the driver file for the font. +% \begin{macrocode} +generate egothtitle %% switch to the driver file + +% \end{macrocode} +% +% The end of this code section. +% \begin{macrocode} +%</base7|base10|base17|base7b|base10b|base17b> +% \end{macrocode} +% +% +% \subsection{The driver file} +% +% The driver file sets up the font parameters and also contains +% the macros used in the definition of the characters. +% +% \begin{macrocode} +%<*mfd> +% This is EGOTHTITLE.MF for the Early Gothic font. +% This makes a short font. +% This file also contains special macros universally needed in the +% font but either not in the cmbase.mf file or modifications of these. +% +% \end{macrocode} +% +% \begin{routine}{makebox} +% This is a new version of the \Lpack{cmbase.mf} |makebox| macro. +% Essentially, as we are only generating a single case font, we don't +% need all the horizontals for the CMR characters. +% +% \begin{macrocode} +% A new version of cmbase.mf makebox macro +def makebox(text rule) = + for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth: + rule((l,y)t_,(r,y)t_); endfor % horizontals + for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals + for x=u*(1+floor(1/u)) step u until r-1: + rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals + if charic<>0: + rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{proofpcbb} +% The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the +% square, and at the bottom and top midpoints, where the point |zS| is at +% position |(xoff,yoff)| in the square. +% \begin{macrocode} + +% A macro to delineate a letter's bounding square in proof mode. +% Point z$ is at (xoff,yoff) in the bounding square. +def proofpcbb(suffix $)(expr xoff, yoff) = +if proofing > 0: + x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner + z$br = (x$bl+side, y$bl); % BRHC + z$tr = (x$bl+side, y$bl+side); % TRHC + z$tl = (x$bl, y$bl+side); % TLHC + z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points + pair hc, vc; + hc = (2u,0); vc = (0,2u); + pickup pensquare scaled 2; + for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc: + draw s-hc--s+hc; + draw s-vc--s+vc; + endfor +fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{egothic_font_setup} +% This macro contains the set up for the \thisfont{} fonts. +% \begin{macrocode} + +def egothic_font_setup= % contains special stuff for egothic fonts + define_pixels(side,half_height,carol_height,comma_width); + define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit, + cap_serif_fit,jut,clubjut,cap_jut,trijut); + define_pixels(fig_width); + define_whole_pixels(letter_fit,sb,cap_sb); + define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height, + desc_depth,body_depth,fig_height); + define_corrected_pixels(o); + define_blacker_pixels(thick,thin); + define_pixels(sqrcjut); + let adjust_fit = normal_adjust_fit; +% \end{macrocode} +% \DescribeVariable{stylus} +% The pen for drawing the thinnest lines is |stylus|. +% \begin{macrocode} + pickup pencircle scaled thin; + stylus:=savepen; +% \end{macrocode} +% \DescribeVariable{thickstylus} +% The pen for drawing lines a bit thicker than the thinnest is |thickstylus|. +% \begin{macrocode} + pickup pencircle scaled (1.5thin); + thickstylus:=savepen; +% \end{macrocode} +% +% \DescribeVariable{quill} +% The normal calligraphic pen is |quill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated pangle; + quill:=savepen; + +% \end{macrocode} +% +% \DescribeVariable{threequarterquill} +% A pen with 3/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 3/4thick yscaled thin rotated pangle; + threequarterquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{halfquill} +% A pen with 1/2 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/2thick yscaled thin rotated pangle; + halfquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{quarterquill} +% A pen with 1/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/4thick yscaled thin rotated pangle; + quarterquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{thinquill} +% A pen with a fraction of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 3/8thick yscaled thin rotated pangle; %% 1/4 too small + thinquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{capquill} +% The normal calligraphic pen for capitals is |capquill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated cappangle; + capquill:=savepen; + +% \end{macrocode} +% +% \DescribeVariable{capthinquill} +% A pen with a fraction of the width as capquill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 3/8thick yscaled thin rotated cappangle; %% 1/4 too small + capthinquill := savepen; + +% \end{macrocode} +% +% +% \begin{macrocode} + numeric pcshiftx#; % x value of LHS of box wrt origin of char box + define_pixels(pcshiftx); + numeric sqxside#; % x size of the square + numeric sqyside#; % y size of the square + define_pixels(sqxside,sqyside); + +enddef; % end of egothic_font_setup + +% \end{macrocode} +% \end{routine} +% +% +% \DescribeVariable{ductus} +% A boolean to control drawing the ductus (TRUE) or the full letter (FALSE). +% \begin{macrocode} +boolean ductus; +ductus:=false; +% \end{macrocode} +% +% \DescribeVariable{qhor} +% \DescribeVariable{qvert} +% The cosine and sine of the pen angle. +% \begin{macrocode} +numeric qhor, qvert; +qhor:=cosd(pangle); qvert:=sind(pangle); +% \end{macrocode} +% +% \DescribeVariable{pdir} +% The vector corresponding to the pen angle. +% \begin{macrocode} +pair pdir; pdir=dir(pangle); +% \end{macrocode} +% +% \DescribeVariable{ppdir} +% The vector that is perpendicular (anticlockwise) to the pen angle. +% \begin{macrocode} +pair ppdir; ppdir=dir(pangle+90); +% \end{macrocode} +% +% \begin{routine}{draw_serif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_serif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; + z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + top_serif:=false; + z$c=z$b shifted (bjut*pdir); + fi +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_serif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_roundserif} +% The |draw_serif| routine can leave a bump at the end of the stem. +% The |draw_roundserif| routine, which takes the same arguments, +% is meant to eliminate the bump. +% \begin{macrocode} + +def draw_roundserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); + undraw z$--z$a; +enddef; % end of draw_roundserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flatserif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. This produces a serif like |draw_serif| except +% that one side of the seerif is flat. +% \begin{macrocode} + +def draw_flatserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; +%%% z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-jut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (jut*pdir); + fi + z$b = fr[z$,z$c]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$a--z$; + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_flatserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_clubserif} +% A macro to draw a clubbed serif. |draw_clubserif(1,2,f)| uses the current +% pen to +% draw a clubbed serif of extent |clubjut| at |z1| to the left of the line +% from |z2| +% to |z1|. The serif matches |z1| like the flatserif does and ends at the +% point |f[z1,z2]|. +% \begin{macrocode} + +def draw_clubserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| controls the length of the serif. +% \begin{macrocode} +%% beta=1-fr; + ajut=clubjut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem, |fr| between |$| and |$$|. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); +%% vec2=ajut*vec1; +%% z$a=z$ shifted vec2; + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-clubjut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (clubjut*pdir); + fi + z$a = fr[z$,z$$]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$c..z$a{vec1}; + labels($a,$b,$c); +enddef; % end of draw_clubserif + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{draw_triserif} +% A macro to draw a triangular top left serif. +% |draw_triserif(1,tj)| draws a serif at |z1| with its leftmost x +% value at |x1-tj|, where it is assumed that the +% top point on the stem is at |z1| and the stem was drawn with |quill|. +% \begin{macrocode} + +def draw_triserif(suffix $)(expr tj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$ts1'=lft x$; y$ts1'=bot y$; + pickup stylus; + lft x$ts1=x$ts1'; bot y$ts1=y$ts1'; + x$ts2=x$ts1-tj; z$ts2=whatever[z$,z$ts1]; + x$ts3=x$ts1; y$ts3=y$ts2-tj; + pickup stylus; +%% filldraw z$ts1--z$ts2--z$ts3--cycle; + filldraw z$--z$ts2--z$ts3--cycle; + pickup oldpen; + labels($ts1,$ts2,$ts3); +enddef; % end of draw_triserif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_istem} +% A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs +% are of extent |jut|. There is a top left and bottom right serif. +% The serif radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_istem(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % top serif + draw_serif($$, $, fr); % bottom serif + draw z$a--z$$a; % the stem +enddef; % end of draw_istem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tstem} +% A macro to draw the shape of the stem of a `t'. |draw_tstem(1,2,f)| draws a +% stem whose +% top is at |z1| and bottom at |z2| with a right serif at |z2|. The radius +% is controlled by |f|, with $0 < f < 1$. +% It draws with the current pen and the serif is of extent |jut|. +% NOTE: for the EGOTH font, just the stem is drawn --- no serif! +% \begin{macrocode} + +def draw_tstem(suffix $, $$)(expr fr)= +%% draw_serif($$, $, fr); % the serif +%% draw z$--z$$a; % the stem + draw z$--z$$; +enddef; % end of draw_tstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tlserif} +% A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serif +% is of extent |jut|. It also draws the stem to the point |z2|. The serif +% radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_tlserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % the serif + draw z$a--z$$; % the stem +enddef; % end of draw_tlserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flick} +% A macro to draw a flick (like an eyebrow). +% |draw_flick(1,rise,fall,fjut)| draws a stroke starting at |z1| rising up by +% |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is +% |fjut| to the right of |z1|. It is drawn with the current pen. +% \begin{macrocode} + +def draw_flick(suffix $)(expr rise, fall, fjut)= +% \end{macrocode} +% The points |z$a| and |z$b|, together with |z$| make up three points on the +% ductus. +% \begin{macrocode} + rt x$b = x1+fjut; top y$b=y$-fall; + x$a=0.5[x$,x$b]; top y$a=y$+rise; +% \end{macrocode} +% Draw the part, and finish off. +% \begin{macrocode} + draw z$..z$a..z$b; + labels($a,$b); +enddef; % end of draw_flick + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_wave} +% A macro to draw a (horizontal) stroke with a flick at each end +% (down at the left and up at the right). |draw_wave(1,2,f)| uses the current +% pen to draw from |z1wl| to |z1wr|, where |x1wl=x1|, |y1wl=y1-f|, and +% |x1wr=x2|, |y1wr=y2+f|, with |z1| assumed to be at the left of |z2|. +% \begin{macrocode} + +def draw_wave(suffix $,$$)(expr f)= + x$wl=x$; y$wl=y$-f; + x$wr=x$$; y$wr=y$$+f; + z$wc=0.5[z$wl,z$wr]; + draw z$wl{pdir}..z$wc{right}..{pdir}z$wr; + labels($wl,$wc,$wr); +enddef; % end of draw_wave +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tail} +% A macro to draw a tail at the bottom of a (vertical) stem. +% |draw_tail(1,fjut)| draws a tail at the bottom of the stem which ends at |z1|. +% The depth is controlled by the |desc_depth| value and the jut by |fjut|. +% \begin{macrocode} + +def draw_tail(suffix $)(expr fj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$tl' = lft x$; y$tl=bot y$; + pickup stylus; + lft x$tl=x$tl'; + x$tb=x$tl-fj; bot y$tb=y$tl-1/2desc_depth; + filldraw z${down}..{-pdir}z$tb & z$tb{pdir}..{up}z$tl--cycle; + pickup oldpen; + labels($tb,$tl); +enddef; % end of draw_tail +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_triangle} +% A macro to draw a downward pointing equilateral triangle. +% |draw_triangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_triangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$-0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_triangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_utriangle} +% A macro to draw an upward pointing equilateral triangle. +% |draw_utriangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_utriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$+0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_utriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rtriangle} +% A macro to draw a downward pointing right angled triangle. +% |draw_rtriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rtriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$-sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rtriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rutriangle} +% A macro to draw an upward pointing right angled triangle. +% |draw_rutriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rutriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$+sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rutriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_fork} +% A macro to draw a forked line. +% |draw_fork(1,2,sz)| draws a graduated line from |z1| to |z2| with a forked +% end of size |sz|. +% \begin{macrocode} + +def draw_fork(suffix $, $$)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$f1'=lft x$; y$f1'=bot y$; + x$f3'=rt x$; y$f3'=top y$; + pickup stylus; + lft x$f1=x$f1'; bot y$f1=y$f1'; + rt x$f3=x$f3'; y$f3-y$=2*(y$-y$f1); + rt x$f2=x$$-sz; bot y$f2=y$$; + rt x$f4= rt x$f5=x$$; + bot y$f5=y$$-sz; top y$f4=y$$+1/2sz; + filldraw z$f1--z$f2--z$f3--cycle; % the line + draw z$f2{right}..z$f4; % upper fork + draw z$f2{right}..z$f5; % lower fork + pickup oldpen; + labels($f1,$f2,$f3,$f4,$f5); +enddef; % end of draw_fork +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_urswish} +% A macro to draw a line up and to the right with an under curl at the end. +% |draw_urswish(1,2)| draws from |z1| towards |z2|, which is the max upper right +% of a bounding box, where the curl is. +% \begin{macrocode} + +def draw_urswish(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + pickup quill; + rt x$$s1=x$$-thick; top y$$s1=y$$; + rt x$$s2=x$$; +%% x$$s3=x$$-thick; + lft x$$s3=x$$s1; + bot y$$s3=y$$-thick; y$$s2=0.5[y$$s1,y$$s3]; +%% draw z$---z$$s1{right}..z$$s2{down}..{-pdir}z$$s3; + draw z$..z$$s1{pdir}..z$$s2{down}; + labels($$s1,$$s2,$$s3); +enddef; % end of draw_urswish +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{bowl_stem} +% Calculate where a bowl should meet a stem so that the pen is moving in the +% pen direction. +% |bowl_stem(1,2)| calculates the point |z1i|, where |z1| is on the bowl and +% there is a vertical line at |x2|. +% +% \begin{macrocode} + +def bowl_stem(suffix $, $$)= + x$'=0.5[x$,x$$]; y$'=y$; % the mid-point + z$''=z$' shifted (thick*pdir); + x$i=x$$; z$i=whatever[z$',z$'']; + labels($',$i); +enddef; % end of bowl_stem +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_clubbase} +% Draw a clubbed bottom of a vertical stem for the EGOTH font. +% |draw_clubbase(1, 2, st, left, right)| draws from |st[z2,z1]| to |z2|. +% At |z2| the pen +% is shifted |left| fraction of the pen width and |right| fraction of the +% pen width, both in the direction of the pen angle. Pen draws smoothly the +% path |z1|, |left|, |right|, |z1|. +% \begin{macrocode} + +% draw clubbed bottom of vertical stem for EGOTH font. +def draw_clubbase(suffix $, $$)(expr st, lft, rt)= + z$$l = z$$ shifted (lft*thick*(-pdir)); + z$$r = z$$ shifted (rt*thick*(pdir)); + z$$t = st[z$$,z$]; + draw z$$t{z$$-z$}..z$$l--z$$r..{z$-z$$}z$$t; + labels($$t,$$l,$$r); +enddef; % end of draw_clubbase + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pdot} +% A macro to draw a period dot. +% |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|. +% \begin{macrocode} + +def draw_pdot(suffix $)(expr sz)= +% \end{macrocode} +% Draw a square rotated 45 degrees. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$ shifted (0.5sz*up); + z$u = z$s shifted (sz*right); + z$v = z$t shifted (sz*down); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pdot + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pcomma} +% A macro to draw a period comma. +% |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. The pen is |stylus|. +% \begin{macrocode} + +def draw_pcomma(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping back and down +% for a total width of |ar| and deptrh of |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s-ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu--z$uv--z$vu--z$v--z$sv--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pcomma + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_plq} +% A macro to draw a period left quote. +% |draw_pcomma(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. +% \begin{macrocode} + +def draw_plq(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping forward and down +% for a total width of |ar| and depth |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s+ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu--z$uv--z$vu--z$v--z$sv--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_plq + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{offsetbowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for a non-centered letter `o'. |offsetbowl($, sx, sy, fx, fy)| +% calculates the paths for an `o' +% enclosed in a rectangle size |sx| by |sy| with its bottom lefthand corner +% located at |z$|, where the center of the o is at |(fx*sx, fy*sy)| in the +% bounding rectangle. +% +% Two construction paths, namely |obfirst| and |obsecond| are also +% available. They should be identical. +% +% All paths have points listed in a clockwise direction, starting with +% |z$nh| or |z$minl| as appropriate. +% +% |offsetbowl($, sx, sy, 1/2, 1/2)| gives the same results as |obowl($, sx, sy)|. +% \begin{macrocode} + +path obouter, obinner, obfirst, obsecond; +def offsetbowl(suffix $)(expr sx, sy, fx, fy)= + numeric inx, iny, cx, cy; + pair pt[]; + path pth[]; + inx := 1/2thick*cosd(pangle); iny := 1/2thick*sind(pangle); + cx := x$+fx*sx; cy := y$+fy*sy; + z$obc = (cx,cy); +% \end{macrocode} +% Calulate points on the centre path of the pen. These are offset by |inx| +% from the rectangles vertical sides and by |iny| from the horizontal sides. +% If the pen is parallel to a side, offset the point by half the pen's +% dimension. First do the West, East, North and South points. +% \begin{macrocode} + if pangle = 90: + z$wt=(x$+1/2thin, cy); + z$et=(x$+sx-1/2thin, cy); + else: + z$wt=(x$+inx, cy); + z$et=(x$+sx-inx, cy); + penpos$wt(thick,pangle); + penpos$et(thick,pangle); + fi + if pangle = 0: + z$nh=(cx, y$+sy-1/2thin); + z$sh=(cx, y$+1/2thin); + else: + z$nh=(cx, y$+sy-iny); + z$sh=(cx, y$+iny); + penpos$nh(thick,pangle); + penpos$sh(thick,pangle); + fi + obfirst := z$nh{right}..z$et{down}..z$sh{left}..z$wt{up}..cycle; +% \end{macrocode} +% Now calculate the points on the path |obfirst| where the pen will +% draw the min width lines (i.e., the points where the pen will be +% moving parallel to |pangle|). +% \begin{macrocode} + if pangle = 90: + z$minl = z$wt; z$maxr = z$nh; z$minr = z$et; z$maxl = z$sh; + else: + if pangle = 0: + z$minl = z$nh; z$maxr = z$et; z$minr = z$sh; z$maxl = z$wt; + else: + z$minl = directionpoint dir(pangle) of obfirst; + z$minr = directionpoint -dir(pangle) of obfirst; +% \end{macrocode} +% The max points are roughly where the inner and outer diverge +% the most. These are simple for 0 and 90 degree pens and have +% been calculated above. It's not so simple for intermediate +% angles. For a reasonable looking result, we pick the max +% points to be halfway between the min points. This involves +% calculating some angles, paths and intersections. +% \begin{macrocode} + pt1 := z$minr - z$minl; % direction + pt2 := (- ypart pt1, xpart pt1); % perpendicular + pt3 := 1/2[z$minl, z$minr]; + pt4 := pt3 shifted pt2; + pt5 := pt3 shifted -pt2; + pth1 := pt3--pt4; + pth2 := pt3--pt5; + z$maxr = pth1 intersectionpoint obfirst; + z$maxl = pth2 intersectionpoint obfirst; + \fi + \fi +% \end{macrocode} +% Place the pen at each of these points to get the outer and inner points. +% \begin{macrocode} + penpos$minl(thin,pangle+90); + penpos$maxr(thick,pangle); + penpos$minr(thin,pangle+90); + penpos$maxl(thick,pangle); +% \end{macrocode} +% Finally, the outer and inner paths. +% \begin{macrocode} + obsecond := z$minl..z$maxr..z$minr..z$maxl..cycle; + z$minlo = z$minl.r; z$maxro = z$maxr.r; + z$minro = z$minr.l; z$maxlo = z$maxl.l; + obouter := z$minlo{dir(pangle)}...z$maxro...z$minro{-dir(pangle)}...z$maxlo...cycle; + z$minli = z$minl.l; z$maxri = z$maxr.l; + z$minri = z$minr.r; z$maxli = z$maxl.r; + obinner := z$minli...z$maxri...z$minri...z$maxli...cycle; + labels($obc, $nh, $et, $sh, $wt); + labels($minl, $maxr, $minr, $maxl); + labels($minlo, $maxro, $minro, $maxlo); + labels($minli, $maxri, $minri, $maxli); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{obowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for the letter `o'. |obowl($, sx, sy)| calculates the paths for an `o' +% centered and enclosed in a rectangle size |sx| by |sy| with its bottom +% lefthand corner located at |z$|. +% \begin{macrocode} + +def obowl(suffix $)(expr sx, sy)= + offsetbowl($, sx, sy, 1/2, 1/2); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{scalarprod} +% |v scalarprod w| calulates the scalar product between the +% two vectors |v| and |w|. +% \begin{macrocode} + +primarydef v scalarprod w = + (xpart v * ypart w - ypart v * xpart w) +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{tangentpoint} +% |tangentpoint($, path)| calculates the point |z$tan| on the |path| +% so that |z$tan--z$| is tangent to the path. It uses a binary search +% to find a point on the path such that the path direction is +% (anti-) parallel to the dirction from that point to the given point. +% \begin{macrocode} + +def tangentpoint(suffix $)(expr pth)= + pair vecll, veclr, veclm; % "tangent" line directions + numeric pl, pr, pm; % path parameter values + pair vecpl, vecpr, vecpm; % path directions + pair ptl, ptr, ptm; % path points + numeric sl, sr, sm; % scalar products of path/line directions + numeric stpsize; % size of current binary step + numeric tantol; % tolerance + boolean wtest; % a boolean + + tantol := eps; +% \end{macrocode} +% Initialise using the left right and middle points on the path. +% \begin{macrocode} + pl:=0; pr:=length pth; pm:=0.5(pl+pr); stpsize:=pr-pl; + ptl := point pl of pth; + ptm := point pm of pth; + ptr := point pr of pth; +% \end{macrocode} +% Now the various vectors, and make sure they are unit vectors to +% have a consistent measure scale when we take the scalar products. +% \begin{macrocode} + vecll := unitvector (z$-ptl); + veclm := unitvector (z$-ptm); + veclr := unitvector (z$-ptr); + vecpl := unitvector (direction pl of pth); + vecpm := unitvector (direction pm of pth); + vecpr := unitvector (direction pr of pth); + sl := vecll scalarprod vecpl; + sm := veclm scalarprod vecpm; + sr := veclr scalarprod vecpr; +% \end{macrocode} +% We stop if any of the points is the tangent point, or if the step +% size is too small, or if the signs of the left and right scalar +% products are the same. +% \begin{macrocode} + wtest := (stpsize < tantol) or (sl*sr > 0) or + (abs sl < tantol) or (abs sm < tantol) or (abs sr < tantol); + if wtest: + if (stpsize < tantol): + z$tan=(0,0); + errmessage("No tangent; path too short"); + else: + if (sl*sr > 0): + z$tan=(0,0); + errmessage("No tangent; end products have the same sign"); + else: + if (abs sl < tantol): + z$tan=ptl; + else: + if (abs sm < tantol): + z$tan=ptm; + else: + z$tan=ptr; + fi + fi + fi + fi + else: +% \end{macrocode} +% There should be a tangent and we iterate to find it, using +% bisection. If there is one to be found it will be at the +% current middle point. The tangent point will be somewhere +% between the two points that lead to opposite signed scalar +% products. +% \begin{macrocode} + forever: + if (sl*sm < 0): % opposite signs, look between pl & pm + pr:=pm; pm:=0.5(pr+pl); + vecpr := vecpm; veclr := veclm; sr:=sm; + else: + pl:=pm; pm:=0.5(pr+pl); + vecpl:=vecpm; vecll:=veclm; sl:=sm; + fi + stpsize:=pr-pl; + ptm := point pm of pth; + veclm := unitvector (z$-ptm); + vecpm := unitvector (direction pm of pth); + sm := veclm scalarprod vecpm; +% \end{macrocode} +% We stop the iteration if the step size is too small or the +% middle point is the tangent point. In either case, the +% middle point is the best guess that can be made. +% \begin{macrocode} + wtest := (stpsize < tantol) or (abs sm < tantol); + if wtest: + if (abs sm < tantol): + z$tan = ptm; + else: + z$tan = ptm; +%%%%%% errmessage("Warning: tangent approximated"); + fi + fi + exitif wtest; + endfor + fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% Set the mode and font setup. +% \begin{macrocode} + +font_coding_scheme:="ASCII minuscules and punctuation"; +mode_setup; +egothic_font_setup; + +% \end{macrocode} +% +% +% We generate letters, together with some punctuation and +% analphabetics. +% \begin{macrocode} + +input egothl; % lower case +input egothu; % capitals +input egothpunct; % punctuation +input egothlig; % the several dashes +input egothdig; % arabic digits + +% \end{macrocode} +% +% Set up the spacings, stretches and shrinks. +% +% \begin{macrocode} + +font_slant slant; font_x_height x_height#; +if monospace: + font_normal_space vstretch*9u#; % no stretching or shrinking + font_quad vstretch*18u#; + font_extra_space vstretch*9u#; +else: + font_normal_space vstretch*6u#+2letter_fit#; + font_normal_stretch vstretch*3u#; font_normal_shrink vstretch*2u#; + font_quad vstretch*18u#+4letter_fit#; + font_extra_space vstretch*2u#; + +% \end{macrocode} +% +% Finally, do the ligtables, but I don't think they are needed (yet?). +% +% \begin{macrocode} + +fi + +bye. + + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + kks#:=-4u#; kkx#:=-1.5u#; kkj#:=-2u#; kkr#:=-5u#; kkrs#:=-2u#; kkrl#:=-8u#; + ligtable "s": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "S": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "x": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "X": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "a": "A": + "b": "B": + "c": "C": + "d": "D": + "e": "E": + "h": "H": + "i": "I": + "k": "K": + "l": "L": + "m": "M": + "n": "N": + "o": "O": + "p": "P": + "t": "T": + "u": "U": + "v": "V": + "w": "W": + "z": "Z": + "j" kern kkj#, "J" kern kkj#; + + ligtable "r": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + ligtable "R": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + +fi + +bye. + +%</mfd> +% \end{macrocode} +% +% \subsection{The code for normal letters} +% +% The following code is for the lower case characters. +% +% \begin{macrocode} +%<*min> +% EGOTHL.MF Program file for Early Gothic lower case +% + +% \end{macrocode} +% +% +% \begin{routine}{a} +% The letter `a'. +% \begin{macrocode} +cmchar "EGOTH letter a"; +beginchar("a", 2sb#+hstretch*(9/16x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup quill; +n1 := w - 2pcshiftx -jut; % effective letter width +% "stem" +rt x1 = w-pcshiftx-jut; top y1=h; +x2 = x1; bot y2=0; +z16 = 1/6[z2,z1]; +rt x6 = x16; y6=y16; +lft x4 = pcshiftx; y4 = 1/2h; +% stem path +pth1 := z1--z2; +pr1 := direction 1 of pth1; +z20 = z2 shifted -10pr1; + +z11 = point 3/13 of pth1; z15 = point 10/13 of pth1; +lft x13 = pcshiftx; y13=1/4h; +n2 := y13 - bot y13; +z23 = (x13, y13+n2); +z33 = (x13, y13-n2); +%%ductus:=true; +if ductus: + pickup stylus; +else: + % draw stem + draw pth1; + draw_roundserif(1,2,srad); + draw_roundserif(2,1,srad); + % draw bowl +%% draw z1{-pdir}..z4{down}..z6{pdir}; + draw z11{-pdir}..z23{down}..z33..z15{pdir}; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +endchar; % end "a" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{b} +% The letter `b'. +% \begin{macrocode} +cmchar "EGOTH letter b"; +beginchar("b", 2sb#+hstretch*(11/16x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=h/ascratio; % top of bowl +%%ductus:=true; +lft x1 = pcshiftx+jut; top y1=h; +x3 = x1; y3=2/8n2; +rt x5 = w-pcshiftx; y5=y3; +x4 = 1/2[x3,x5]; bot y4=0; +x6=1/2[x4,x5]; top y6=n2; +pth1 := z1..z3{down}..z4{right}.. z5{up}; +z98=(0,3/4n2); z99=(w,y98); +pth2 := z98--z99; +%z7 = pth1 intersectionpoint pth2; +z7=(x1,6/8n2); +if ductus: + pickup stylus; +fi +draw z1--z3{down}..z4{right}..z5{up}..z6; +draw z6--z7; +draw_flatserif(1,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "b" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{c} +% The letter `c'. +% \begin{macrocode} +cmchar "EGOTH letter c"; +beginchar("c", 2sb#+hstretch*(9/16x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z24--z1{left}...z2{down}..z3{right}..z4{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "c" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{d} +% The letter `d'. +% \begin{macrocode} +cmchar "EGOTH letter d"; +beginchar("d", 2sb#+hstretch*(11/16x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1 = h/ascratio; % x-height +rt x1=w-pcshiftx-jut; top y1=h; +x2 = x1; bot y2=0; +x3 = x1; y3 = 1/4n1; +lft x5 = pcshiftx; y5=6/8n1; +x4 = 3/8[x3,x5]; bot y4 = 0; +x6=1/2[x4,x5]; top y6 = n1; +x7=x3; top y7=n1; +rt x8 = w-pcshiftx; y8=n1; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3..z4{left}..z5{up}..z6; +draw z6..z7..z8; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "d" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{e} +% The letter `e'. +% \begin{macrocode} +cmchar "EGOTH letter e"; +beginchar("e", sb#+hstretch*(15/16x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-pcshiftx; % actual letter width +n2 := 6/8n1; % width of bowl +x1 = pcshiftx + 5/8n2; top y1=h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = pcshiftx + 1/2n2; bot y3 = 0; +rt x4 = pcshiftx + n2; y4 = 1/4h; +%%z98=(0,3/8h); z99=(w,y98); +z98=(0,2/8h); z99=(w,y98); +pth1 := z98--z99; +pth2 := z1{left}..z2{down}..z3{right}; +z7 = pth1 intersectionpoint pth2; +rt x9 = w-pcshiftx; y9 = 3/4h; +z8=1/2[z7,z9]; + +z70 = z7 shifted 10pdir; +z17 = whatever[z7,z70]; +%%x17 = w-pcshiftx; +top y17 = h; + +rt x27=w-pcshiftx; top y27=h; +pth3 := z7--z27; % diagonal +pth4 := z1--z9; + +z34 = pth3 intersectionpoint pth4; +pth5 := z34--z1{left}...z2{down}..z3{right}..z4{pdir}; % bowl +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw z7{pdir}..z1{left}..z2{down}..z3{right}..z4{pdir}; +%%draw z7{pdir}..z8{right}..z9{pdir}; +%%draw z7--z17; +draw pth5; % bowl +draw pth3; % diagonal +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,17,27,34,70,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{f} +% The letter `f'. +% \begin{macrocode} +cmchar "EGOTH letter f"; +beginchar("f", 2sb#+hstretch*(9/16x_height#+jut#), + (asc_height#), 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := h/ascratio; % x-height +%% stem +lft x1=lft x2=pcshiftx+jut; top y1=h; bot y2=0; +%% flick +x4=x2; y4 = 1/2n1; +%%rt x6=w-pcshiftx; y6 = 2/3h; +%%x5 = 2/3[x4,x6]; top y5=h; +x6 = x1; y6=y1; rt x8 = w-pcshiftx; y8=h; +%% bar +z14=1/2[z4,z1]; +rt x16 = w -pcshiftx; bot y16 = y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z6{right}..z8{pdir}; % top +draw z14{right}..z16{pdir}; % bar +ductus:=false; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,14,15,16,100); +endchar; % end "f" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{g} +% The letter `g'. +% \begin{macrocode} +cmchar "EGOTH letter g"; +beginchar("g", 2sb#+hstretch*(12/16x_height#+2jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +path pth[]; +pair vec[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := 4/5w - 2pcshiftx; % width of top o +%% S shape +x1 = x3 = x5 = 1/2w; +top y1 = h; bot y5 = -d; y3 = 1/2[y1,y5]; +lft x2 = pcshiftx + jut; rt x4 = w - pcshiftx - jut; +y2 = 1/2[y1,y3]; y4 = 1/2[y3,y5]; +%% bow +z12 = (x4,y2); +lft x16 = pcshiftx; bot y16=-d; +pth2 := z16...z12{up}...z1; +n2 := top y5; +pth3 := (0, n2)--(w, n2); +z6 = pth3 intersectionpoint pth2; +%% top flick +%lft x11 = rt x1; y11=y1; +z11=z1; +rt x13 = w-pcshiftx; y13 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{down}..z3..z4{down}..z5{left}..z6; % S +draw pth2; % bow +draw z11{right}..z13{pdir}; % flick +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,12,13,31,32,33,34,35,36,100); +endchar; % end "g" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{h} +% The letter `h'. +% \begin{macrocode} +cmchar "EGOTH letter h"; +beginchar("h", 2sb#+hstretch*(11/16x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% bowl +z3=1/2[z2,z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=9/16[x3,x5]; top y4 = h/ascratio; +%%lft x6=x4; bot y6=0; +x6=9/16[x4,x5]; +bot y6=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3--z4{right}...z5{down}...z6{-pdir}; + +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "h" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{i} +% The letter `i'. +% \begin{macrocode} +cmchar "EGOTH letter i"; +beginchar("i", 2sb#+hstretch*(thick#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +ductus:=false; +penlabels(1,2,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{j} +% The letter `j'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "EGOTH letter j"; +beginchar("j", sb#+hstretch*(3/8x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +rt x1 = w-pcshiftx; top y1 = h; +x2=x1; y2=-1/2d; +%% bottom hook +lft x3 = 0; bot y3 = -d; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw_flatserif(1,2,srad); +draw z2{down}..z3{-pdir}; % hook +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "j" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{k} +% The letter `k'. +% \begin{macrocode} +cmchar "EGOTH letter k"; +beginchar("k", 2sb#+hstretch*(13/16x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +%% stem +n1 = h/ascratio; % x-height +lft x1=lft x2=pcshiftx+jut; +y1=h; bot y2=0; +%% top arm +%%z3=(x1,1/2n1); +x3 = x1; top y3 = 1/2n1; +rt x5=5/8[x1,w-pcshiftx]; top y5=n1; +x4=1/2[x3,x5]; top y4=n1; +pth1 := z3{pdir}..z5{up}; +%% lower arm +pth2 := (rt x1,0)--(rt x1,h); +z13 = pth1 intersectionpoint pth2; +pickup threequarterquill; +lft x14 = x13; bot y14 = y13; +rt x7=w-pcshiftx; bot y7=0; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw pth1; % upper arm +pickup threequarterquill; +%%draw z14{down}..z7{-ppdir}; % lower arm +%%draw z14{down}..z7; % lower arm +draw z14{-ppdir}..z7{right}; % lower arm +pickup quill; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,100); +endchar; % end "k" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{l} +% The letter `l'. +% \begin{macrocode} +cmchar "EGOTH letter l"; +beginchar("l", 2sb#+hstretch*(thick#+2jut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2 =0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "l" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{m} +% The letter `m'. +% \begin{macrocode} +cmchar "EGOTH letter m"; +beginchar("m", 2sb#+hstretch*(15/16x_height#+2jut#), % 12/16 too narrow, 14 a bit + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +%% start of bowl +x13=x1; y13=3/4h; +%% bottom of right and middle stems +rt x6 = w -pcshiftx - jut; y6=y2; +z4 = 1/2[z2,z6]; +%% top of middle and right stems +x3=x4; y3=y1; +x5=x6; y5=y13; +%% top of bowls +x14=2/3[x13,x3]; top y14 = h; +x33=x4; y33=y13; +x34=2/3[x33,x5]; y34 = y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left half +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z13--z14{right}..z33{down}--z4; +draw_roundserif(4,3,srad); +draw z33--z34{right}..z5{down}--z6; +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100); +endchar; % end "m" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{n} +% The letter `n'. +% \begin{macrocode} +cmchar "EGOTH letter n"; +beginchar("n", 2sb#+hstretch*(9/16x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +% start of bowl +x13=x1; y13=3/4h; +%% right stem +rt x4 = w-pcshiftx-jut; y4=y2; +x3 = x4; y3 = y13; +% top of bowl +x14 = 2/3[x13,x3]; top y14 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z13--z14{right}..z3{down}--z4; +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "n" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{o} +% The letter `o'. +% \begin{macrocode} +cmchar "EGOTH letter o"; +beginchar("o", 2sb#+hstretch*(3/4x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +draw z1..z2..z3..z4..cycle; +z5=(pcshiftx,-o); +obowl(5, w-2pcshiftx, h+2o); +%%ductus:=true; +if ductus: + pickup stylus; + draw obfirst; draw obsecond; draw obouter; draw obinner; +else: +%% fill obouter; unfill obinner; +fi +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "o" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{p} +% The letter `p'. +% \begin{macrocode} +cmchar "EGOTH letter p"; +beginchar("p", 2sb#+hstretch*(11/16x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=-d; +%% bowl % from "d" +z3=3/4[(x1,0),z1]; +rt x5 = w-pcshiftx; y5=1/2h; +x4=1/2[x3,x5]; top y4 = h; +x6=x4; bot y6=0; +z7=1/4[(x1,0),z1]; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad) +draw z3--z4; draw z4..z5{down}..z6{left}..z7; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "p" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{q} +% The letter `q'. +% \begin{macrocode} +cmchar "EGOTH letter q"; +beginchar("q", 2sb#+hstretch*(3/4x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% right stem +rt x1=w-pcshiftx-jut; top y1=h; +x2=x1; bot y2=-d; +%% bowl +z3=1/4[(x1,0),z1]; +lft x5=pcshiftx; y5=1/2h; +x4=1/2[x3,x5]; bot y4=0; +x6=x4; top y6=h; +%%z7=3/4[(x1,0),z1]; +z7=z1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +%%draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3{-pdir}..z4{left}..z5{up}..z6{right}..z7{pdir}; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{r} +% The letter `r'. +% \begin{macrocode} +cmchar "EGOTH letter r"; +beginchar("r", 2sb#+hstretch*(13/16x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% bowl +z3=3/4[z2,z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3{pdir}..z4{right}..z5{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "r" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{s} +% The letter `s'. This is a `long' S. +% \begin{macrocode} +cmchar "EGOTH letter s"; +beginchar("s", 2sb#+hstretch*(11/16x_height#+jut#), + 5/6asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := (6/5h)/ascratio; % x-height +%% stem +lft x1=lft x2=pcshiftx+jut; top y1=n1; bot y2=0; +%% flick +x4=x2; y4 = 1/2n1; +rt x6=w-pcshiftx; top y6 = h; +x5 = 1/2[x4,x6]; +%top y5 = y6; +y5 = y6; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +%%draw z4--z5--z6; +draw z1--z5--z6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100); +endchar; % end "s" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{t} +% The letter `t'. +% \begin{macrocode} +cmchar "EGOTH letter t"; +beginchar("t", 2sb#+hstretch*(15/16x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% bar +top y3=h; n3 := h - top y3; +lft x1 = pcshiftx; rt x2=w-pcshiftx; +%%top y1 = y3-n3; bot y2=y3+n3; +y1 = y3-n3; y2=y3; +n1 := w; % width of bowl +n2 := h; % height of bowl +x3=1/2[x1,x2]; +lft x4 = pcshiftx + 1/8n1; y4 = 1/2h; +x5=x3; bot y5 = 0; +rt x6 = pcshiftx + 3/4n1; top y6 = 1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{pdir}..z3..z2{pdir}; % bar +draw z3..z4{down}..z5{right}..z6{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "t" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{u} +% The letter `u'. +% \begin{macrocode} +cmchar "EGOTH letter u"; +beginchar("u", 2sb#+hstretch*(9/16x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-jut; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw z1--z13{down}...z14{right}...z33{pdir}; +draw z1--z13--z14{right}...z33{pdir}; +draw_flatserif(1,13,srad); +draw_tstem(3,4,srad); % right stem +draw_flatserif(3,4,srad); +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "u" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{v} +% The letter `v'. +% \begin{macrocode} +cmchar "EGOTH letter v"; +beginchar("v", 2sb#+hstretch*(11/16x_height#+jut#), % 13/16 too wide + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +%% right stem +rt x5=w-pcshiftx; top y5 = h; +bot y3 = 0; +x3 = 1/2[x1,x5]; +z51 = (x1,0); z55=(x5,0); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}..z3; % left stem +draw_flatserif(1,51,srad); +draw z5{down}..z3; % right stem +draw_flatserif(5,55,srad); +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "v" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{w} +% The letter `w'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "EGOTH letter w"; +beginchar("w", 2sb#+hstretch*(15/16x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x5=w-pcshiftx-jut; y5=y1; +x6=x5; bot y6=0; +z53=1/4[z6,z5]; % start of bowl +% middle stem +z3 = 1/2[z1,z5]; +z33=(x3,y13); +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +% middle of right bowl +x34=1/3[x3,x5]; y34=y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13--z14{right}...z33{pdir}; % left +draw_flatserif(1,13,srad); +draw z3--z33--z34{right}...z53{pdir}; % middle +draw_flatserif(3,33,srad); +draw_tstem(5,6,srad); % right stem +draw_flatserif(5,6,srad); +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "w" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{x} +% The letter `x'. +% \begin{macrocode} +cmchar "EGOTH letter x"; +beginchar("x", 2sb#+hstretch*(15/16x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +path pth[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := w-2pcshiftx; % total width +n2 := thick; % triangle side +%% diag top left to bottom right +lft x1=pcshiftx+jut; top y1=h; +rt x2=w-pcshiftx-jut; bot y2=0; +z251 = 7/16[z1,z2]; +%%z252 = 9/16[z1,z2]; +z252 = z251; +%% diag middle to top right +x60 = w-pcshiftx; +top y50 = h; +x50 = 1/2[x251,x60]; +top y60 = y50; +%% diag bottom left to middle +x10 = -1/3w; bot y10=-d; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % top left to bottom right +draw_flatserif(1,2,srad); draw_roundserif(2,1,srad); +draw z251...z50{right}...z60; % middle to top right +draw z10{right}..z252; % bottom left to middle +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,150,60,160,100); +endchar; % end "x" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{y} +% The letter `y'. Modern, but with a dot on top. +% \begin{macrocode} +cmchar "EGOTH letter y"; +beginchar("y", 2sb#+hstretch*(11/16x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +%% left stem top +lft x1 = pcshiftx + jut; top y1 = h; +bot y3 = 0; +%% right stem +rt x5=w-pcshiftx; top y5 = h; +lft x9=-1/2w; bot y9 = -d; +pth1 := z9{right}..z5{up}; +pth2 := (0,y3)--(w,y3); +z99 = pth1 intersectionpoint pth2; +x3 = x99; +z51 = (x1,0); z55=(x5,0); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}..z3; % left stem +draw_flatserif(1,51,srad); +draw pth1; % right stem +draw_flatserif(5,55,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{z} +% The letter `z'. +% \begin{macrocode} +cmchar "EGOTH letter z"; +beginchar("z", 2sb#+hstretch*(15/16x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +%% top bar ends +top y12 = h; +n1 := h - y12; +lft x1 = pcshiftx; rt x2 = w-pcshiftx; +%%y1 = y12-n1; y2=y12+n1; +y1 = y12-n1; y2=y12; +x12 = 1/2[x1,x2]; +pth1 := z1{pdir}..z12{right}..z2{pdir}; +%% bottom bar ends +bot y34 = 0; +x3=x1; x4=x2; +%%y3=y34-n1; y4=y34+n1; +y3=y34-n1; y4=y34; +x34 = 1/2[x3,x4]; +pth2 := z3{pdir}..z34{right}..z4{pdir}; +%% diagonal +z5=z3; +pth3 := z5--(3/4w,h+jut); +z6 = pth3 intersectionpoint pth1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw pth2; % bars +draw z5--z6; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "z" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file +% \begin{macrocode} +%</min> +% \end{macrocode} +% +% +% +% +% \subsection{The code for capital letters} +% +% \thisfont{} `capitals' were drawn with the same pen as for the minuscules, +% and the letters, in this case, are based on Square Capitals. +% +% \begin{macrocode} +%<*maj> +% EGOTHU.MF Program file for Early Gothic `capitals' +% + +% \end{macrocode} +% +% +% +% \begin{routine}{A} +% The letter `A'. +% \begin{macrocode} +cmchar "EGOTH letter A"; +beginchar("A", 2cap_sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup capquill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% legs +x1 = 6/16w; top y1=h; +rt x3 = w-pcshiftx - n1; bot y3= 0; +pickup capthinquill; +lft x2 = pcshiftx; bot y2 = 0; +x21 = x2 + n2; y21 = y2; +y22 = y21+n2; z22 = whatever[z2,z1]; +pickup capquill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z3; draw (x1-n1,y1)--(x1,y1); draw (x3,y3)--(x3+n1,y3); %% right leg +pickup capthinquill; +draw z1--z2; %% left leg +filldraw z2--z21{left}..{z1-z2}z22--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +endchar; % end "A" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{B} +% The letter `B'. +% \begin{macrocode} +cmchar "EGOTH letter B"; +beginchar("B", 2cap_sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := cap_sb; +pickup capquill; +x100 = 0; +n1 := sqrcjut; +%% stem +lft x1 = pcshiftx + n1; top y1 = h; +x2 = x1; bot y2 = 0; +z12 = 1/2[z1,z2]; +%% bottom bowl +lft x21 = pcshiftx; bot y21 = 0; +z22=z2; +lft x27 = rt x12; y27 = y12; +rt x25 = w-pcshiftx; y25 = 1/2[y22,y27]; +pth1 := z21--z22{right}..z25{up}..{left}z27; +%% top bowl +z32 = z27; z37 = z1; +x38 = x21; y38 = y37; +rt x35 = x25; y35 = 1/2[y32,y37]; +pth2 := z38--z37{right}..z35{down}..{left}z27; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw pth1; draw pth2; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "B" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{C} +% The letter `C'. +% \begin{macrocode} +cmchar "EGOTH letter C"; +beginchar("C", 2cap_sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := cap_sb; +pickup capquill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z24..z1{left}..z2{down}..z3{right}..z4{3pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "C" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{D} +% The letter `D'. +% \begin{macrocode} +cmchar "EGOTH letter D"; +beginchar("D", 2cap_sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := cap_sb; +pickup capquill; +x100 = 0; n1 := rt x100 - lft x100; +%% stem +lft x1 = pcshiftx+sqrcjut; top y1=h; +x2 = x1; bot y2 = 0; +%% bowl +lft x3 = pcshiftx; y3 = y1; +z7 = (x3,y2); +rt x5 = w-pcshiftx; y5 = 1/2[y3,y7]; +pth1 := z3--z1{right}..{down}z5..{left}z2--z7; +if ductus: + pickup stylus; +fi +draw z1--z2; %% stem +draw pth1; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "D" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{E} +% The letter `E'. +% \begin{macrocode} +cmchar "EGOTH letter E"; +beginchar("E", cap_sb#+caprat*hstretch*(9/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup capquill; +x100 = 0; +n1 = rt x100 - lft x100; +%% stem +lft x1 = pcshiftx+sqrcjut; top y1 = h; +x2 = x1; bot y2=0; +%% bars +lft x3 = pcshiftx; y3 = y1; rt x4 = w-pcshiftx; y4=y3; +x5=x1; y5 = 6/16[y1,y2]; x6 = x4; y6 = y5; +x7 = x3; y7 = y2; x8 = x4; y8=y7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw z3--z4; draw z5--z6; draw z7--z8; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,17,70,100); +endchar; % end "E" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{F} +% The letter `F'. +% \begin{macrocode} +cmchar "EGOTH letter F"; +beginchar("F", 2cap_sb#+caprat*hstretch*(9/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := cap_sb; +pickup capquill; +x100 = 0; +n1 := rt x100 - lft x100; +%% stem +lft x1=lft x2=pcshiftx+sqrcjut; bot y1=h; bot y2=0; +%% bars +lft x3 = pcshiftx; y3 = y1; rt x4 = w-pcshiftx; y4 = y3; +x5=x1; y5 = 6/16[y1,y2]; x6 = x4; y6 = y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw z3--z4; draw z5--z6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,14,15,16,100); +endchar; % end "F" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{G} +% The letter `G'. +% \begin{macrocode} +cmchar "EGOTH letter G"; +beginchar("G", 2cap_sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +path pth[]; +pair vec[]; +numeric n[]; +pcshiftx := cap_sb; +pickup capquill; +x100 = 0; +n1 := sqrcjut; +%% bar +rt x52 = w - pcshiftx; y52 = 1/2h; +x51 = x52 - 2n1; y51 = y52; +z512 = 1/2[z51,z52]; +x54=x512; bot y54 = 0; +%% bowl +lft x2 = pcshiftx; y2 = 1/2h; +x4 = x512; y4 = 1/4h; +x3 = x1 = 1/2[x2,x4]; bot y3 = 0; top y1 = h; +x24 = x512; y24 = 3/4h; +pth1 := z24..z1{left}..z2{down}..z3{right}..z4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +%%draw z4--z512; draw z51--z52; +draw z512--z54; draw (x512-n1,y512)--(x512,y512); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,12,13,24,31,32,33,34,35,36,51,52,512,100); +endchar; % end "G" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{H} +% The letter `H'. +% \begin{macrocode} +cmchar "EGOTH letter H"; +beginchar("H", 2cap_sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +pickup capquill; +numeric n[]; +x100 = 0; +n1 := sqrcjut; +%% stems +lft x1=lft x2=pcshiftx+sqrcjut; +top y1=h; bot y2=0; +rt x3 = w - pcshiftx - sqrcjut; x4 = x3; y3 = y1; y4 = y2; +%% bar +z12 = 7/16[z1,z2]; z34 = 7/16[z3,z4]; +% serifs +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; draw z12--z34; +%% serifs +draw (x1-n1,y1)--(x1,y1); draw (x2,y2)--(x2+n1,y2); +draw (x3-n1,y3)--(x3,y3); draw (x4,y4)--(x4+n1,y4); +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "H" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{I} +% The letter `I'. +% \begin{macrocode} +cmchar "EGOTH letter I"; +beginchar("I", 2cap_sb#+caprat*hstretch*(thick#+2sqrcjut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +pickup capquill; +x100 = 0; +n1 := rt x100 - lft x100; +x1 = x2 = 1/2w; +top y1=h; bot y2=0; +%% serifs +lft x111 = pcshiftx; rt x112 = w-pcshiftx; +x211 = x111; x212 = x112; +draw z1--z2; +%% serifs +draw (x111,y1)--(x112,y1); +draw (x211,y2)--(x212,y2); +ductus:=false; +penlabels(1,2,100); +endchar; % end "I" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{J} +% The letter `J'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "EGOTH letter J"; +beginchar("J", 2cap_sb#+caprat*hstretch*(2thick#+sqrcjut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +numeric n[]; +pickup capquill; +x100 = 0; +n1 := sqrcjut; +%% stem +rt x1 = w-pcshiftx; top y1 = h; +x2 = x1; y2 = 1/4h; +%% hook +lft x4 = pcshiftx; bot y4 = 0; +pth1 := z4{pdir}..z2{up}; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2{down}..{-pdir}z4; % stem & hook +draw (x1-n1,y1)--z1; +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "J" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{K} +% The letter `K'. +% \begin{macrocode} +cmchar "EGOTH letter K"; +beginchar("K", 2cap_sb#+caprat*hstretch*(16/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +numeric n[]; +pickup capquill; +x100 = 0; +n1 := sqrcjut; +%% stem +lft x1 = pcshiftx+n1; top y1 = h; +x2 = x1; bot y2 = 0; +z12 = 1/2[z1,z2]; +%% top arm +x3 = rt x12; y3 = y12; +x5 = 1/2[w - pcshiftx, x1]; y5 = y1; +%%pth1 := z3{pdir}..{up}z5; +pth1 := z3--z5; +%% lower arm +z7 = z3; +rt x9 = w-pcshiftx; bot y9 = 0; +pth2 := z7{-ppdir}..{right}z9; +pickup capquill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw pth1; draw pth2; +draw (x1-n1,y1)--(x1,y1); +draw (x2-n1,y2)--(x2+n1,y2); +draw (x5,y5)--(x5+n1,y5); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,100); +endchar; % end "K" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{L} +% The letter `L'. +% \begin{macrocode} +cmchar "EGOTH letter L"; +beginchar("L", 2cap_sb#+caprat*hstretch*(9/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +pickup capquill; +x100 = 0; +n1 := sqrcjut; +lft x1=pcshiftx+n1; bot y1=h; +x2=x1; bot y2 =0; +x3 = x2; rt x4 = w-pcshiftx; y3 = y4 = y2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; +draw (x1-n1,y1)--(x1,y1); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "L" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{M} +% The letter `M'. +% \begin{macrocode} +cmchar "EGOTH letter M"; +beginchar("M", 2cap_sb#+caprat*hstretch*(19/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup capquill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% thick stem tops +lft x1=pcshiftx+n1; top y1=h; +rt x3 = w - pcshiftx -2n1; y3 = y1; +%% right stem bottom +rt x4 = w - pcshiftx - n1; bot y4 = 0; +%% the V +x24 = 1/2w; bot y24 = 0; +%% left stem top and bottom +x81 = lft x1; y81 = top y1; +pickup capthinquill; +lft x11 = x81; top y11 = y81; +lft x2 = pcshiftx; bot y2 = 0; +x2a = x2+n2; y2a = y2; +y2b = y2+n2; z2b = whatever[z2,z11]; +pickup capquill; +%% thin middle top and bottom +x83 = lft x3; y83 = top y3; +x824 = rt x24; y824 = bot y24; +pickup capthinquill; +lft x13 = x83; top y13 = y83; +rt x124 = x824; bot y124 = y824; +pickup capquill; +pth124 := z1{-ppdir}..z24; +pth34 := z3{down}..z4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%% thick legs +draw pth124; draw pth34; +draw (x1-n1,y1)--(x1,y1); draw (x3-n1,y3)--(x3,y3); draw (x4,y4)--(x4+n1,y4); +%% thin legs +pickup capthinquill; +draw z11--z2; +filldraw z2--z2a{left}..{z11-z2}z2b--cycle; +%%%%pickup quarterquill; + draw z13--z124; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100); +endchar; % end "M" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{N} +% The letter `N'. +% \begin{macrocode} +cmchar "EGOTH letter N"; +beginchar("N", 2cap_sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +numeric n[]; +pickup capquill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% diagonal +lft x1=pcshiftx+n1; top y1=h; +rt x4 = w -pcshiftx-n1; bot y4 = 0; +x101 = lft x1; +x104 = rt x4; +pth1 := z1{-ppdir}..z4; +%% stems +pickup capthinquill; +lft x21 = x101; top y21 =h; +x22 = x21; bot y22 = 0; +x22a = x22+n2; y22a=y22; +x22b = x22; y22b=y22+n2; +rt x24 = x104; bot y24 = 0; +x23 = x24; top y23 = h; +x23a = x23-n2; x23b = x23+n1; y23a = y23b = y23; +x23c = x23; y23c = y23-n2; +pickup capquill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%% diagonal +draw pth1; draw (x1-n1,y1)--(x1,y1); +%% stems +pickup capthinquill; +draw z21--z22; +filldraw z22--z22a{left}..{up}z22b--cycle; +draw z23--z24; +filldraw z23--z23a{right}..{down}z23c{up}..{right}z23b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,23,23a,23b,23c,100); +endchar; % end "N" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{O} +% The letter `O'. +% \begin{macrocode} +cmchar "EGOTH letter O"; +beginchar("O", 2cap_sb#+caprat*hstretch*(17/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +pickup capquill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "O" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{P} +% The letter `P'. +% \begin{macrocode} +cmchar "EGOTH letter P"; +beginchar("P", 2cap_sb#+caprat*hstretch*(13/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +numeric n[]; +pickup capquill; +x100 = 0; +n1:= sqrcjut; +%% stem +lft x1=lft x2=pcshiftx+n1; +top y1=h; bot y2=0; +z12 = 1/2[z1,z2]; +%% bowl +lft x3 = pcshiftx; y3 = y1; +x7 = x12; top y7 = y12; +rt x5 = w-pcshiftx; y5 = 1/2[y3,y7]; +pth1 := z3--z1{right}..z5{down}..{left}z7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw pth1; +%%draw (x2-n1,y2)--(x2+n1,y2); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "P" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Q} +% The letter `Q'. +% \begin{macrocode} +cmchar "EGOTH letter Q"; +beginchar("Q", 2cap_sb#+caprat*hstretch*(17/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup capquill; +%% bowl +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +pth1 := z1..z4..z3..z2..cycle; +%% tail +n1 := rt x1 - lft x1; +pth2 := z1..z2..z3..z4; +z5 = directionpoint pdir of pth1; +x7 = x3 + 2n1; top y7 = -n1; +pth3 := z5{-ppdir}..{pdir}z7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +draw pth3; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "Q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{R} +% The letter `R'. +% \begin{macrocode} +cmchar "EGOTH letter R"; +beginchar("R", 2cap_sb#+caprat*hstretch*(15/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup capquill; +x100 = 0; +n1:= sqrcjut; +n3 := sqrcjutrat*sqrcjut; +n2 := 11/15; %% P/R width ratio +%% stem +pickup capthinquill; +lft x1=lft x2=pcshiftx+n1; +top y1=h; bot y2=0; +x2a = x2 + n3; y2a = y2; +x2b = x2; y2b = y2+n3; +z12 = 1/2[z1,z2]; +pickup capquill; +%% bowl +lft x3 = pcshiftx; top y3 = h; x13 = x1; y13 = y3; +lft x7 = x12; top y7 = y12; +rt x5 = w*n2 - pcshiftx; y5 = 1/2[y3,y7]; +pth1 := z3--z13{right}..z5{down}..{left}z7; +%% leg +z21 = z7; +rt x23 = w-pcshiftx; bot y23 = 0; +pth2 := z21{-ppdir}..{right}z23; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw pth2; +pickup capthinquill; +draw z1--z2; +filldraw z2--z2a{left}..{up}z2b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "R" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{S} +% The letter `S'. +% \begin{macrocode} +cmchar "EGOTH letter S"; +beginchar("S", 2cap_sb#+caprat*hstretch*(15/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := cap_sb; +pickup capquill; +x100 = 0; +n1 := rt x100 - lft x100; +x1 = x3 = x5 = 1/2w; +top y1 = h; bot y5 = 0; y3 = 1/2[y1,y5]; +lft x2 = pcshiftx; rt x4 = w-pcshiftx; +y2 = 1/2[y1,y3]; y4 = 1/2[y3,y5]; +rt x101 = w-pcshiftx; top y101 = y1; +lft x102 = pcshiftx; bot y102 = y5; +pth1 := z101..z1..z2..z3..z4..z5..z102; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100); +endchar; % end "S" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{T} +% The letter `T'. +% \begin{macrocode} +cmchar "EGOTH letter T"; +beginchar("T", 2cap_sb#+caprat*hstretch*(10/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup capquill; +%% bar +lft x1 = pcshiftx; rt x2=w-pcshiftx; +top y1 = top y2 = h; +pth1 := z1{pdir}..{pdir}z2; +%% stem +z3 = 1/2[z1,z2]; +x4 = x3; bot y4 = 0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; % bar +draw z3--z4; % stem +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "T" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{U} +% The letter `U'. +% \begin{macrocode} +cmchar "EGOTH letter U"; +beginchar("U", 2cap_sb#+caprat*hstretch*(15/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup capquill; +x100 = 0; +n1 := sqrcjut; +%% left stem +lft x1 = pcshiftx + n1; top y1 = h; +% start of bowl +lft x13=pcshiftx; y13=1/3h; +% right stem +rt x3=w-pcshiftx-n1; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +pth1 := z1..z13{down}..z14{right}..{pdir}z33; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +draw (x1-n1,y1)--(x1,y1); +draw z3--z4; +draw (x3-n1,y3)--(x3,y3); +draw (x4,y4)--(x4+n1,y4); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "U" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{V} +% The letter `V'. +% \begin{macrocode} +cmchar "EGOTH letter V"; +beginchar("V", 2cap_sb#+caprat*hstretch*(13/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup capquill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% stem tops +lft x1 = pcshiftx + n1; top y1 = h; +pickup capthinquill; +rt x3 = w - pcshiftx; top y3 = h; +x3a = x3-n2; y3a=y3; +x3b = x3; y3b = y3-n2; +pickup capquill; +%% bottom +x13 = 10/16[x1,x3]; bot y13 = 0; +x83 = rt x13; y83 = top y13; +pth1 := z1{down}..z13; +pth2 := z3{down}..z83; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +draw (x1-n1,y1)--(x1,y1); + +pickup capthinquill; +draw pth2; +filldraw z3--z3a{right}..{down}z3b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "V" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{W} +% The letter `W'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "EGOTH letter W"; +beginchar("W", 2cap_sb#+caprat*hstretch*(22/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup capquill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% thick leg tops +lft x1 = pcshiftx + n1; top y1 = h; +x3 = 1/2w; y3 = y1; +%% thin leg top +pickup capthinquill; +rt x5 = w-pcshiftx; top y5 = h; +x5a = x5-n2; y5a = y5; +x5b = x5; y5b = y5-n2; +pickup capquill; +%% V bottoms +x13 = 1/2[x1,x3]; bot y13 = 0; +x35 = 1/2[x3,x5]; bot y35 = 0; +pth113 := z1{down}..z13; +pth335 := z3{down}..z35; +x83 = x3; y83 = top y3; +x813 = rt x13; y813 = bot y13; +x835 = rt x35; y835 = bot y35; +%% thin legs +pickup capthinquill; +rt x113 = x813; bot y113 = y813; +rt x135 = x835; bot y135 = y835; +%%ductus:=true; +if ductus: + pickup stylus; +fi +pickup capquill; +draw pth113; draw pth335; draw (x1-n1,y1)--(x1,y1); +pickup capthinquill; +draw z113..{up}z3; draw z135..{up}z5; +filldraw z5--z5a{right}..{down}z5b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "W" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{X} +% The letter `X'. +% \begin{macrocode} +cmchar "EGOTH letter X"; +beginchar("X", 2cap_sb#+caprat*hstretch*(17/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +path pth[]; +numeric n[]; +pcshiftx := cap_sb; +pickup capquill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% diag top left to bottom right +lft x1=pcshiftx+n1; top y1 = h; +rt x2 = w - pcshiftx - n1; bot y2 = 0; +%% diag top right to bottom left +pickup capthinquill; +rt x3 = w - pcshiftx - n1; top y3 = h; +lft x4 = pcshiftx; bot y4 = 0; +x3a = x3-n2; x3b = x3+n1; y3a = y3b = y3; +y3c = y3-n2; z3c = whatever[z3,z4]; +x4a = x4+n2; y4a = y4; +y4b = y4+n2; z4b = whatever[z4,z3]; +pickup capquill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw (x1-n1,y1)--(x1,y1); +draw (x2,y2)--(x2+n1,y2); +pickup capthinquill; +draw z3--z4; +filldraw z3--z3a{right}..{z4-z3}z3c{z3-z4}..{right}z3b--cycle; +filldraw z4--z4a{left}..{z3-z4}z4b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,150,60,160,100); +endchar; % end "X" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Y} +% The letter `Y'. +% \begin{macrocode} +cmchar "EGOTH letter Y"; +beginchar("Y", 2cap_sb#+caprat*hstretch*(13/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +numeric n[]; +pickup capquill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% upright +x5 = 1/2w; y5 = 1/2h; +x6 = x5; bot y6 = 0; +%% left stem top +lft x1 = pcshiftx + n1; top y1 = h; +%% right stem +x85 = rt x5; y85 = top y5; +pickup capthinquill; +rt x3=w-pcshiftx; top y3 = h; +x4=x85; y4 = y85; +x3a=x3-n2; y3a = y3; +y3b = y3-n2; z3b = whatever[z3,z4]; +pickup capquill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5--z6; draw (x6-n1,y6)--(x6+n1,y6); % stem +draw z1--z5; draw (x1-n1,y1)--(x1,y1); % left arm +pickup capthinquill; +draw z3--z4; +filldraw z3--z3a{right}..{z4-z3}z3b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "Y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{Z} +% The letter `Z'. +% \begin{macrocode} +cmchar "EGOTH letter Z"; +beginchar("Z", 2cap_sb#+caprat*hstretch*(13/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +n1 := sqrcjutrat*sqrcjut; +path pth[]; +pcshiftx := cap_sb; +pickup capquill; +%% top bar ends +lft x1 = pcshiftx; rt x2 = w -pcshiftx; top y1 = top y2 = h; +x101 = lft x1; y101 = top y1; +%% bottom bar ends +lft x3 = pcshiftx; rt x4 = w -pcshiftx; bot y3 = bot y4 = 0; +x104 = rt x4; y104 = bot y4; +pickup stylus; +lft x11 = x101; top y11 = y101; +x12 = x11; y12 = y11-n1; +x13 = x11+n1; y13 = y11; +rt x14 = x104; bot y14 = y104; +x15 = x14; y15 = y14 + n1; +x16 = x14 - n1; y16 = y14; +pickup capquill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; +draw z2--z3; +pickup stylus; +filldraw z11--z12{up}..{right}z13--cycle; +filldraw z14--z15{down}..{left}z16--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,14,14,16,20o,20i,100); +endchar; % end "Z" + +% \end{macrocode} +% \end{routine} +% +% +% +% The end of this file +% \begin{macrocode} +%</maj> +% \end{macrocode} +% +% +% +% +% \subsection{The punctuation file} +% +% The main punctuation marks are defined in this file. +% +% \begin{macrocode} +%<*punct> +% EGOTHPUNCT.MF This file contains punctuation marks + +% \end{macrocode} +% +% +% \begin{routine}{!} +% The `!' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Exclamation mark"; +beginchar("!", 2sb#+hstretch*(thick#+trijut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +x1=w/2; top y1 = h; +z3=(x1, 1/2dot_size); +z2=(x1, y3+3/2dot_size); +draw z1--z2; +draw_pdot(3,dot_size); +penlabels(1,2,3); + +endchar; % end of "!" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{?} +% The `?' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Question mark"; +beginchar("?", 2sb#+hstretch*(3/4x_height#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-2pcshiftx; % actual character width +n2 := 1/3h; % height of top bowl +n3 := n2; % height of bottom bowl +z5=(1/2w,1/2dot_size); +x4 = x5; y4=y5+3/2dot_size; +lft x1 = pcshiftx; y1 = 3/4h; +x2 = 1/2w; top y2 = h; +rt x3 = w-pcshiftx; y3 = 2/3h; + +%%ductus:= true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{down}..z4{down}; +draw_pdot(5, dot_size); +penlabels(1,2,3,4,5); +endchar; % end of "?" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{,} +% The `,' character. +% \begin{macrocode} + +cmchar "Comma"; +beginchar(",",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=1/2dot_size; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "," + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{.} +% The `.' character. +% \begin{macrocode} + +cmchar "Period"; +beginchar(".",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +z1=(w/2, 1/2dot_size); +draw_pdot(1,dot_size); +penlabels(1); +endchar; % end of "." + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{:} +% The `:' character. +% \begin{macrocode} + +cmchar "Colon"; +beginchar(":",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +x1=x2=w/2; y1=3/4h; y2=1/4h; +draw_pdot(1,dot_size); +draw_pdot(2,dot_size); +penlabels(1,2); +endchar; % end ":" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{;} +% The `;' character. +% \begin{macrocode} + +cmchar "Semicolon"; +beginchar(";",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=3/4h; y2=1/2dot_size; +draw_pdot(1,dot_size); +draw_pcomma(2,dot_size,comma_width); +penlabels(1,2); +endchar; % end of ";" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{'} +% The `'' character. +% \begin{macrocode} + +cmchar "Apostrophe"; +beginchar("'",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "'" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{`} +% The ``' character. +% \begin{macrocode} + +cmchar "Reverse apostrophe"; +beginchar("`",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=h; +draw_plq(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "`" + +% \end{macrocode} +% \end{routine} +% +% The end of this file. +% \begin{macrocode} +%</punct> +% \end{macrocode} +% +% +% \subsection{The ligatures and dashes file} +% +% The ligatured letters, punctuation marks and dashes are defined in this file. +% \begin{macrocode} +%<*lig> +% EGOTHLIG.MF Uncial ligatured letters, punctation and dashes + +% \end{macrocode} +% First the ligtables. +% \begin{macrocode} + +ligtable "`": "`"=:oct"134"; +ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#; + +ligtable "-": "-"=:oct"173"; +ligtable oct"173": "-"=:oct"174"; + +ligtable "c": "t"=:oct"014"; +ligtable "s": "t"=:oct"015"; + +% \end{macrocode} +% +% \begin{routine}{ct} +% The `ct' ligature. +% \begin{macrocode} + +cmchar "EGOTH ct ligature"; +beginchar(oct"014", 2sb#+hstretch*(6/4x_height#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair vc[]; +pickup quill; +%%%%%%%%%%% C + +n1:=1/2(w-2pcshiftx); % actual letter width +n2 := h/ascratio; % x-height +x1=pcshiftx + 1/2n1; top y1 = n2; +lft x2 = pcshiftx; y2 = 1/2n2; +x3 = x1; bot y3 = 0; +rt x4 = n1; y4 = 1/4n2; +x6 = x4; +%%y6 = 3/4n2; +top y6 = y1; +pth1 := z6..z1{left}..z2{down}..z3{right}..z4{pdir}; +%%%%%%%%%%%%% T + +%% bar +top y33=n2; n3 := n2 - top y33; +%%lft x31 = n1+pcshiftx; +lft x31 = n1; +rt x32=w-pcshiftx; +%%top y31 = y33-n3; bot y32=y33+n3; +top y31 = y33-n3; y32=y33; +x33=1/2[x31,x32]; +pth2 := z31{pdir}..z33..z32{pdir}; % T bar +n31 := n1; % width of bowl +%%lft x34 = pcshiftx + n1 + 1/8n31; +lft x34 = n1 + 1/8n31; +y34 = 1/2n2; +x35=x33; bot y35 = 0; +rt x36 = pcshiftx + n1 + 3/4n31; top y36 = 1/4n2; +pth3 := z33..z34{down}..z35{right}..z36{pdir}; % T bowl + +%%%%%%%%%%%%%%%%% Ligature + +z51=z6; +z55=z33; +x53 = 1/2[x51,x55]; +top y53 = h; +vc51 := direction 0 of pth1; +vc55 := direction 0 of pth3; +pth4 := z51{vc51}..z53{right}..z55{vc55}; % loop +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; % C +draw pth2; % T bar +draw pth3; % T bowl +draw pth4; % ligature loop +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,31,32,33,34,35,36,100); +endchar; % end of "ct" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{st} +% The `st' ligature. +% \begin{macrocode} + +cmchar "EGOTH st ligature"; +beginchar(oct"015", 2sb#+hstretch*(9/8x_height#+clubjut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair vc[]; +pickup quill; +%%%%%%%%%%% S + +n1:=3/7(w-2pcshiftx-clubjut); % actual letter width +n2 := h/ascratio; % x-height + +%% stem +lft x1=lft x2=pcshiftx+clubjut; top y1=n2; bot y2=0; +%% flick +x4=x2; y4 = 1/2n1; +%%%%%%%%%%%%% T + +%% bar +top y33=n2; n3 := n2 - top y33; +%%lft x31 = n1+pcshiftx; +lft x31 = n1; +rt x32=w-pcshiftx; +%%top y31 = y33-n3; bot y32=y33+n3; +top y31 = y33-n3; y32=y33; +x33=1/2[x31,x32]; +pth2 := z31{pdir}..z33..z32{pdir}; % T bar +n31 := n1; % width of bowl +%%lft x34 = pcshiftx + n1 + 1/8n31; +lft x34 = n1 + 1/8n31; +y34 = 1/2n2; +x35=x33; bot y35 = 0; +rt x36 = pcshiftx + n1 + 3/4n31; top y36 = 1/4n2; +pth3 := z33..z34{down}..z35{right}..z36{pdir}; % T bowl + +%%%%%%%%%%%%%%%%% Ligature + +z51=z4; +z55=z33; +x53 = 5/8[x51,x55]; +top y53 = h; +vc51 := up; +vc55 := direction 0 of pth3; +pth4 := z51{vc51}...z53{right}..z55{vc55}; % loop +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % S stem +draw_clubserif(1,2,0.5); +draw_roundserif(2,1,srad); +draw pth2; % T bar +draw pth3; % T bowl +draw pth4; % ligature loop +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,31,32,33,34,35,36,100); +endchar; % end of "st" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{''} +% The `''' ligature. +% \begin{macrocode} + +cmchar "Closing quotes"; +beginchar(oct"042",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h; +x2=x1-(2hstretch*dot_size); +draw_pcomma(1,dot_size,comma_width); % right +draw_pcomma(2,dot_size,comma_width); % left +penlabels(1,2); +endchar; % end of "''" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{``} +% The ```' ligature. +% \begin{macrocode} + +cmchar "Opening quotes"; +beginchar(oct"134",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h; +x2=x1+(2hstretch*dot_size); +draw_plq(1,dot_size,comma_width); % left +draw_plq(2,dot_size,comma_width); % right +penlabels(1,2); +endchar; % end of "``" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{-} +% The `-' (hyphen) character. +% \begin{macrocode} + +cmchar "Hyphen"; +beginchar("-",sb#+hstretch*(0.8x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +%%numeric alpha; alpha:=w/8; +%%pickup quill; +%%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +%%x11=lft x1+alpha/2; y11=top y1-0.5thin; +%%x12=rt x2; y12=bot y1+0.5thin; +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +pickup halfquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +draw z21--z22; +draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "-" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{--} +% The `--' (en-dash) ligature. +% \begin{macrocode} + +cmchar "En dash"; +beginchar(oct"173",sb#+hstretch*(x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +%%numeric alpha; alpha:=w/8; +%%pickup quill; +%%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +%%x11=lft x1+alpha/2; y11=top y1-0.5thin; +%%x12=rt x2; y12=bot y1+0.5thin; +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +pickup halfquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +draw z21--z22; +draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "--" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{---} +% The `---' (em dash) ligature. The em dash is twice the width of the en dash. +% \begin{macrocode} + +cmchar "Em dash"; +beginchar(oct"174",sb#+hstretch*(2x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +%%numeric alpha; alpha:=w/8; +%%pickup quill; +%%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +%%x11=lft x1+alpha/2; y11=top y1-0.5thin; +%%x12=rt x2; y12=bot y1+0.5thin; +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +pickup halfquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +draw z21--z22; +draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "---" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{&} +% The ampersand (which is really an `et' ligature). +% \begin{macrocode} + +cmchar "EGOTH ampersand"; +beginchar("&", 2sb#+hstretch*(5/4x_height#+2jut#), asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx:=sb; +pickup quill; +%% alpha looking part +n1 := w-2pcshiftx-jut; % actual letter width +n2 := h/ascratio; % x-height +n3 := 16/16n2; % height of alpha +x1 = w-pcshiftx; bot y1 = 0; +x3 = pcshiftx + 12/16n1; y3 = 1/2n3; +lft x5 = pcshiftx; y5 = y3; +x4 = x6 = 1/2[x5,x3]; +top y4 = n3; bot y6 = 0; +%rt x8 = w-pcshiftx-jut; top y8=h; +rt x8 = w-pcshiftx; top y8=h; +x9 = x8-2jut; x10-x8 = x8-x9; +y9=y10=y8; +pth1 := z1{left}..z3..z4{left}..z5{down}..z6{right}..z3..z8{up}; +%% loop +z21 = z5; +z25 = point 1.5 of pth1; +x23 = 1/2[x21,x25]; +y23 = 6/8[y4,y8]; +pth2 := z21{up}..z23{right}..z25{down}; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw z9--z8; % alpha +draw pth2; % loop +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,16,17,18,19,21,22,23,24,25); +endchar; % end of "&" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</lig> +% \end{macrocode} +% +% \subsection{The digits file} +% +% These are arabic digits in the style of the book-hand. They are a +% modern invention. +% +% \begin{macrocode} +%<*dig> +% EGOTHDIG.MF Program file for Early Gothic digits +% + +% \end{macrocode} +% +% +% +% \begin{routine}{1} +% The digit `1'. +% \begin{macrocode} +cmchar "EGOTH digit 1"; +beginchar("1", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=x2=w/2; +y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +%draw_roundserif(2,1,srad); +draw_flatserif(2,1,srad); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,100); +endchar; % end "1" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{2} +% The digit `2'. +% \begin{macrocode} +cmchar "EGOTH digit 2"; +beginchar("2", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=pcshiftx+o; top y1=h-2thin; +x2=1/2w; top y2= h+o; +rt x3=w-pcshiftx-o; y3=3/4h; +% foot +lft x5=pcshiftx; bot y5=0; +rt x6=w-pcshiftx; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(5,6,thin); % foot +%draw z1..z2{right}..z3{down}..{-pdir}z5wl; % curve +draw z1..z2{right}.. tension 0.75 ..z3{down}..{-pdir}z5wl; % curve +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "2" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{3} +% The digit `3'. +% \begin{macrocode} +cmchar "EGOTH digit 3"; +beginchar("3", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% x values +lft x3=pcshiftx; x10=x3; +rt x5=w-pcshiftx; x8=x5-3thin; +x4=0.5[x3,x5]; +x9=0.5[x10,x8]; +%%lft x6=pcshiftx+3thin; x7=x6; +x6=1/2[x3,x9]; x7=x6; +% y values +bot y3=thin; top y10=h-2thin; +y6=0.5[y3,y10]; y7=y6; +bot y4=-thin; top y9=h+thin; +y5=0.5[y3,y6]; +y8=11/12[y7,y10]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw z3..z4{right}..z5{up}...{-pdir}z6; % bottom bowl +%%draw z7{pdir}..z8{up}..z9{left}..z10; % top bowl +draw z3..z4{right}..z5{up}...{left}z6; % bottom bowl +draw z7{right}..z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "3" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{4} +% The digit `4'. +% \begin{macrocode} +cmchar "EGOTH digit 4"; +beginchar("4", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the stem +x1=x2=w-pcshiftx-jut; +y1=h; bot y2=0; +% the crossbar +lft x3=pcshiftx; y3=0.33h; +rt x4=w-pcshiftx; y4=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % main stem +draw_wave(3,4,thin); % crossbar +draw z3wl--z1; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "4" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{5} +% The digit `5'. +% \begin{macrocode} +cmchar "EGOTH digit 5"; +beginchar("5", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% for the top +rt x1=w-pcshiftx; top y1=h; +lft x2=pcshiftx; y2=y1; +% the S curve +x3=x2; y3=0.5h+thin; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +rt x5=w-pcshiftx; y5=0.3h; +x6=w/2; bot y6=0; +lft x7=pcshiftx; bot y7=2thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(2,1,thin); % top squiggle +draw z3{pdir}..z5{down}..z6{left}..z7; % curve +draw z2wl--z3; % vertical +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "5" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{6} +% The digit `6'. +% \begin{macrocode} +cmchar "EGOTH digit 6"; +beginchar("6", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx; top y1=h-2thin; +x2=1/2w; top y2= h; +lft x3=pcshiftx; y3=1/2h; +x4=x2; bot y4=0; +rt x5=w-pcshiftx; y5=1/4h; +lft x6=rt x3; bot y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%draw z1..z2{left}..z3{down}..z4{right}..z5{up}..{-pdir}z6; +draw z1..z2{left}.. tension 0.8 ..z3{down}.. tension 0.8 ..z4{right}..z5{up}.. tension 0.8 ..{-pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "6" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{7} +% The digit `7'. +% \begin{macrocode} +cmchar "EGOTH digit 7"; +beginchar("7", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% top bar +lft x1=pcshiftx; +rt x2=w-pcshiftx; +top y1=top y2=h; +% bowed leg +x4=w/2; bot y4=0; +x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(1,2,thin); % top bar +draw z1wr..z3..z4; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "7" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{8} +% The digit `8'. +% \begin{macrocode} +cmchar "EGOTH digit 8"; +beginchar("8", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=1; +pickup quill; +lft x1=alpha*pcshiftx+o; rt x3=w-alpha*pcshiftx-o; y1=y3=3/4h; +x2=x4=w/2; top y2=h+o; bot y4=-o; +x5=x2; y5=h/2+2o; +lft x11=pcshiftx; rt x13=w-pcshiftx; y11=y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%draw z1..z2..z3..z5..z11..z4..z13..z5..cycle; +draw z1.. tension 0.8 ..z2.. tension 0.8 ..z3..z5.. + z11.. tension 0.8 ..z4.. tension 0.8 ..z13..z5..cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,100); +endchar; % end "8" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{9} +% The digit `9'. +% \begin{macrocode} +cmchar "EGOTH digit 9"; +beginchar("9", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; bot y1=2thin; +x2=1/2w; bot y2= 0; +rt x3=w-pcshiftx; y3=1/2h; +x4=x2; top y4=h; +lft x5=pcshiftx; y5=3/4h; +rt x6=lft x3; top y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%draw z1..z2{right}..z3{up}..z4{left}..z5{down}..{pdir}z6; +draw z1..z2{right}.. tension 0.8 ..z3{up}.. tension 0.8 ..z4{left}..z5{down}..{pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "9" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{0} +% The digit `0'. +% \begin{macrocode} +cmchar "EGOTHIC digit 0"; +beginchar("0", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%draw z1..z2..z3..z4..cycle; +draw z1.. tension 0.8 ..z2.. tension 0.8 ..z3.. tension 0.8 ..z4.. tension 0.8 ..cycle; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "0" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</dig> +% \end{macrocode} +% +% +% \section{The font definition files} \label{sec:fd} +% +% The font comes in normal and bold weights only. +% +% \begin{macrocode} +%<*fdot1> +\DeclareFontFamily{OT1}{egoth}{} + \DeclareFontShape{OT1}{egoth}{m}{n}{ <-8.5> egoth7 <8.5-15> egoth10 <15-> egoth17 }{} + \DeclareFontShape{OT1}{egoth}{m}{sl}{ <-> sub * egoth/m/n }{} + \DeclareFontShape{OT1}{egoth}{m}{it}{ <-> sub * egoth/m/n }{} + \DeclareFontShape{OT1}{egoth}{m}{sc}{ <-> sub * egoth/m/n }{} + \DeclareFontShape{OT1}{egoth}{m}{u}{ <-> sub * egoth/m/n }{} + \DeclareFontShape{OT1}{egoth}{bx}{n}{ <-8.5> egothb7 <8.5-15> egothb10 <15-> egothb17 }{} + \DeclareFontShape{OT1}{egoth}{bx}{it}{ <-> sub * egoth/bx/n }{} + \DeclareFontShape{OT1}{egoth}{bx}{sl}{ <-> sub * egoth/bx/n }{} + \DeclareFontShape{OT1}{egoth}{b}{n}{ <-> sub * egoth/bx/n }{} +%</fdot1> +% \end{macrocode} +% +% +% \begin{macrocode} +%<*fdt1> +\DeclareFontFamily{T1}{egoth}{} + \DeclareFontShape{T1}{egoth}{m}{n}{ <-8.5> egoth7 <8.5-15> egoth10 <15-> egoth17 }{} + \DeclareFontShape{T1}{egoth}{m}{sl}{ <-> sub * egoth/m/n }{} + \DeclareFontShape{T1}{egoth}{m}{it}{ <-> sub * egoth/m/n }{} + \DeclareFontShape{T1}{egoth}{m}{sc}{ <-> sub * egoth/m/n }{} + \DeclareFontShape{T1}{egoth}{m}{u}{ <-> sub * egoth/m/n }{} + \DeclareFontShape{T1}{egoth}{bx}{n}{ <-8.5> egothb7 <8.5-15> egothb10 <15-> egothb17 }{} + \DeclareFontShape{T1}{egoth}{bx}{it}{ <-> sub * egoth/bx/n }{} + \DeclareFontShape{T1}{egoth}{bx}{sl}{ <-> sub * egoth/bx/n }{} + \DeclareFontShape{T1}{egoth}{b}{n}{ <-> sub * egoth/bx/n }{} +%</fdt1> +% \end{macrocode} +% +% \section{The package code} \label{sec:code} +% +% \subsection{The \Lpack{egothic} package} +% +% The \Lpack{egothic} package is for typesetting short pieces of text +% in the \thisfont{} fonts. +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. +% \begin{macrocode} +%<*usc> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{egothic}[2002/12/30 v1.0 package for Early Gothic fonts] +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\egothfamily} +% Selects the \thisfont{} font family in the OT1 or T1 encoding. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \newcommand{\egothfamily}{\usefont{T1}{egoth}{m}{n}} +\else + \newcommand{\egothfamily}{\usefont{OT1}{egoth}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textegoth} +% Text command for the \thisfont{} font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textegoth}{\egothfamily} +% \end{macrocode} +% \end{macro} +% +% The end of this package. +% \begin{macrocode} +%</usc> +% \end{macrocode} +% +% \subsection{The \Lpack{allegoth} package} +% +% The \Lpack{allegoth} package is intended for use when the entire document +% will be typeset in the book-hand. This is a minimal package. Because the +% book-hand should not contain arabic digits a fuller package would redefine +% anything numbered in \LaTeX{} to use roman instead of arabic numbering. +% Also, because of the large |\baselineskip| many other aspects of \LaTeX{} +% to do with vertical positioning should also be redefined. +% +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. It also uses the \Lpack{egothic} package. +% \begin{macrocode} +%<*uscall> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{allegoth}[2002/12/30 v1.0 package for all Early Gothic fonts] +\RequirePackage{egothic} +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% Redefine the default fonts to be \thisfont, which has only one family +% member. +% \begin{macro}{\rmdefault} +% \begin{macro}{\sfdefault} +% \begin{macro}{\ttdefault} +% \begin{macrocode} +\renewcommand{\rmdefault}{egoth} +\renewcommand{\sfdefault}{egoth} +\renewcommand{\ttdefault}{egoth} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The `leading' in the book-hands is a function of the |x-height|, which is +% normally much +% greater than for the CMR fonts. I have borrowed code from Frank Jensen's +% \Lpack{beton} package~\cite{BETON} to do this. The |x-height| (in points) +% for the CMR +% fonts is given in Table~\ref{tab:cmrx}. Note that the CMR design sizes are +% 5--10, 12, and 17.28 points. The other values given are scaled from these +% figures. +% +% \begin{table} +% \centering +% \caption{The x heights of the CMR and \thisfont{} fonts} \label{tab:cmrx} +% \begin{tabular}{ccc} \hline +% Design & CMR & \thisfont \\ +% Size & X Height & X Height \\ \hline +% 5 & 2.14 & 3.00 \\ ^^A CMR skip = 6pt = 2.8 times +% 6 & 2.58 & 3.61 \\ ^^A CMR skip = 7pt = 2.7 times +% 7 & 3.00 & 4.20 \\ ^^A CMR skip = 8pt = 2.7 times +% 8 & 3.44 & 4.81 \\ ^^A CMR skip = 9.5pt = 2.8 times +% 9 & 3.86 & 5.40 \\ ^^A CMR skip = 11pt = 2.8 times +% 10 & 4.31 & 6.03 \\ ^^A CMR skip = 12pt = 2.8 times +% 11 & 4.74 & 6.64 \\ ^^A CMR skip = 13.6pt = 2.8 times +% 12 & 5.17 & 7.24 \\ ^^A CMR skip = 14.5pt = 2.8 times +% 14 & 6.03 & 8.44 \\ ^^A CMR skip = 18pt = 3.0 times +% 17 & 7.44 & 10.41 \\ ^^A CMR skip = 22pt = 3.0 times +% 20 & 8.75 & 12.25 \\ ^^A CMR skip = 25pt = 2.9 times +% 25 & 10.94 & 15.32 \\ ^^A CMR skip = 30pt = 2.7 times +% \hline +% \end{tabular} +% \end{table} +% +% \begin{macro}{\egoth@baselineskip@table} +% A table of the normal font sizes and the corresponding baselineskip. +% The distance between baselines for \thisfont{} is over twice +% the |x-height|. ^^A actually 2.5 times to nearest half point +% +% \begin{macrocode} +\newcommand{\egoth@baselineskip@table}{% + <\@vpt>7.5% + <\@vipt>9.0% + <\@viipt>10.5% + <\@viiipt>12.0% + <\@ixpt>13.5% + <\@xpt>15.0% + <\@xipt>16.5% + <\@xiipt>18.0% + <\@xivpt>21.0% + <\@xviipt>26.0% + <\@xxpt>30.5% + <\@xxvpt>38.5} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\egoth@new@setfontsize} +% This is a macro that replaces the |\@setfontsize| macro which is called by +% the font size changing commands. +% \begin{macrocode} +\newcommand{\egoth@new@setfontsize}[3]{% + \edef\@tempa{\def\noexpand\@tempb####1<#2}% + \@tempa>##2<##3\@nil{\def\egoth@baselineskip@value{##2}}% + \edef\@tempa{\noexpand\@tempb\egoth@baselineskip@table<#2}% + \@tempa><\@nil + \ifx\egoth@baselineskip@value\@empty + \def\egoth@baselineskip@value{#3}% + \fi + \egoth@old@setfontsize{#1}{#2}\egoth@baselineskip@value} +% \end{macrocode} +% \end{macro} +% +% We had better give an author a means of using The Computer Modern fonts +% if necessary. +% +% \begin{macro}{\cmrfamily} +% \begin{macro}{\cmssfamily} +% \begin{macro}{\cmttfamily} +% These macros select the Computer Modern Roman, Sans, and Typewriter +% font families in either the T1 or OT1 encodings. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}} +\else + \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcmr} +% Text command for the Computer Modern Roman font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmr}{\cmrfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmss} +% Text command for the Computer Modern Sans font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmss}{\cmssfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmtt} +% Text command for the Computer Modern Typewriter font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmtt}{\cmttfamily} +% \end{macrocode} +% \end{macro} +% +% +% At the start of the document, change the |\@setfontsize| macro and call +% the normal font to implement the change. +% \begin{macrocode} +\AtBeginDocument{% + \let\egoth@old@setfontsize=\@setfontsize + \let\@setfontsize=\egoth@new@setfontsize} +\AtBeginDocument{\normalsize} +% \end{macrocode} +% +% +% The end of this package. +% \begin{macrocode} +%</uscall> +% \end{macrocode} +% +% +% +% +% +% \Finale +% \PrintIndex +% +\endinput + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + diff --git a/Master/texmf-dist/source/latex/bookhands/egothic/egothic.ins b/Master/texmf-dist/source/latex/bookhands/egothic/egothic.ins new file mode 100644 index 00000000000..132c384137a --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/egothic/egothic.ins @@ -0,0 +1,101 @@ +%% +%% egothic.ins +%% Copyright 1999 Peter R. Wilson +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Peter Wilson (CUA) +%% now at: peter.r.wilson@boeing.com +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{egothic.ins} +\input docstrip.tex +\preamble + + Copyright 1999 Peter R. Wilson + + This program is provided under the terms of the + LaTeX Project Public License distributed from CTAN + archives in directory macros/latex/base/lppl.txt. + +Author: Peter Wilson (CUA) + now at: peter.r.wilson@boeing.com + +\endpreamble + +\keepsilent + +%%% \Msg{*** Generating the driver file ***} +%%% \generateFile{egothic.drv}{t}{\from{egothic.dtx}{driver}} + +\Msg{*** Generating the Metafont files ***} + +\usepostamble\empty +\generateFile{egoth7.mf}{t}{\from{egothic.dtx}{base7}} +\generateFile{egoth10.mf}{t}{\from{egothic.dtx}{base10}} +\generateFile{egoth17.mf}{t}{\from{egothic.dtx}{base17}} +\generateFile{egothb7.mf}{t}{\from{egothic.dtx}{base7b}} +\generateFile{egothb10.mf}{t}{\from{egothic.dtx}{base10b}} +\generateFile{egothb17.mf}{t}{\from{egothic.dtx}{base17b}} +\generateFile{egothl.mf}{t}{\from{egothic.dtx}{min}} +\generateFile{egothu.mf}{t}{\from{egothic.dtx}{maj}} +\generateFile{egothtitle.mf}{t}{\from{egothic.dtx}{mfd}} +\generateFile{egothpunct.mf}{t}{\from{egothic.dtx}{punct}} +\generateFile{egothlig.mf}{t}{\from{egothic.dtx}{lig}} +\generateFile{egothdig.mf}{t}{\from{egothic.dtx}{dig}} + +\Msg{*** Generating the Font Definition files ***} +\usepostamble\defaultpostamble + +\generateFile{ot1egoth.fd}{t}{\from{egothic.dtx}{fdot1}} +\generateFile{t1egoth.fd}{t}{\from{egothic.dtx}{fdt1}} + +\Msg{*** Generating the LaTeX2e package files ***} + +\generateFile{egothic.sty}{t}{\from{egothic.dtx}{usc}} +\generateFile{allegoth.sty}{t}{\from{egothic.dtx}{uscall}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into directories searched by TeX:} +\Msg{*} +\Msg{* Move these into the font source area:} +\Msg{* \space\space egoth7.mf} +\Msg{* \space\space egoth10.mf} +\Msg{* \space\space egoth17.mf} +\Msg{* \space\space egothb7.mf} +\Msg{* \space\space egothb10.mf} +\Msg{* \space\space egothb17.mf} +\Msg{* \space\space egothl.mf} +\Msg{* \space\space egothu.mf} +\Msg{* \space\space egothtitle.mf} +\Msg{* \space\space egothpunct.mf} +\Msg{* \space\space egothlig.mf} +\Msg{* \space\space egothdig.mf} +\Msg{*} +\Msg{* Move these into the LaTeX macro area:} +\Msg{* \space\space ot1egoth.fd} +\Msg{* \space\space t1egoth.fd} +\Msg{* \space\space egothic.sty} +\Msg{* \space\space allegoth.sty} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{* Process any name.idx file by:} +\Msg{* \space\space\space\space makeindex -s gind.ist name} +\Msg{* Process any name.glo file by:} +\Msg{* \space\space\space\space makeindex -s gglo.ist -o name.gls name.glo} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/bookhands/humanist/humanist.dtx b/Master/texmf-dist/source/latex/bookhands/humanist/humanist.dtx new file mode 100644 index 00000000000..6c61aeff77d --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/humanist/humanist.dtx @@ -0,0 +1,5019 @@ +% \iffalse meta-comment +% +% humanist.dtx +% Author: Peter Wilson (CUA) now at peter.r.wilson@boeing.com +% (or pandgwilson@earthlink.net) +% Copyright 2002, 2003 Peter R. Wilson +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3 of this license or (at your option) any +% later version. +% The latest version of the license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of +% LaTeX version 2003/06/01 or later. +% +% This work has the LPPL maintenance status "author-maintained". +% +% This work consists of the files listed in the README file. +% +% +% If you do not have the docmfp package (available from CTAN in +% tex-archive/macros/latex/contrib/supported), comment out the +% \usepackage{docmfp} line below and uncomment the line following it. +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{docmfp} +%%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{} +\EnableCrossrefs +\CodelineIndex +%% comment out next line to show the code +\OnlyDescription +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{humanist.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{134} +% +% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} +% \DoNotIndex{\@centercr,\@cite} +% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} +% \DoNotIndex{\@input,\@ixpt,\@m} +% \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} +% \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} +% \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} +% \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} +% \DoNotIndex{\advance,\Alph,\alph} +% \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\bullet} +% \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} +% \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} +% \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} +% \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +% \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} +% \DoNotIndex{\fbox} +% \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} +% \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +% \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} +% \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} +% \DoNotIndex{\input} +% \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} +% \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} +% \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +% \DoNotIndex{\NeedsTeXFormat,\newdimen} +% \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} +% \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} +% \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} +% \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +% \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +% \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +% \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} +% \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} +% \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} +% \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} +% \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} +% \DoNotIndex{\viipt,\vipt,\vskip,\vspace} +% \DoNotIndex{\wd,\xiipt,\year,\z@} +% +% \changes{v1.0}{2002/12/30}{First public release} +% \changes{v1.1}{2003/06/20}{Added `ae' and `AE' conjoins} +% +% \def\dtxfilename{\texttt{humanist.dtx}} +% \def\fileversion{v1.1} +% \def\filedate{2003/06/20} +% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package +% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option +% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file +% \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter +% \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle +% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment +% \newcommand*{\AD}{\textsc{ad}} +% \newcommand*{\thisfont}{Humanist} +% +% \title{The \Lpack{Humanist} fonts\thanks{This file (\dtxfilename) +% has version number \fileversion, last revised +% \filedate.}} +% +% \author{% +% Peter Wilson\\ +% Catholic University of America \\ +% Now at \texttt{peter.r.wilson@boeing.com} +% } +% \date{\filedate} +% \maketitle +% \begin{abstract} +% The \Lpack{humanist} and \Lpack{allhmin} packages provide a set of +% Metafont \thisfont{} book-hands +% as used +% for manuscripts in the 14th century onwards. This is one in a series +% of manuscript fonts. +% \end{abstract} +% \tableofcontents +% \listoftables +% +% +% +% +% \section{Introduction} +% +% The \Lpack{humanist} and \Lpack{allhmin} packages provide a Metafont~\cite{METAFONT} version +% of the \thisfont{} manuscript book-hand that was in use from about the +% fourteenth century~\AD{} onwards. It is part of a project to provide fonts +% covering the major manuscript hands between the first century~\AD{} and +% the invention of printing. The principal resources used in this project +% are listed in the Bibliography. +% +% This manual is typeset according to the conventions of the +% \LaTeX{} \textsc{docstrip} utility which enables the automatic +% extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. +% The \Lpack{docmfp} package is used for documenting the Metafont portions +% of the distribution~\cite{DOCMFP}. +% +% Section~\ref{sec:usc} describes the usage of the package. +% Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} +% and source code for the package is in Section~\ref{sec:code}. +% +% \subsection{Manuscript book-hands} +% +% Before the invention of printing all books were written by hand. The book-hands +% used by the scribes and copyists for the manuscripts changed as time +% went on. Table~\ref{tab:1} lists some of the common book-hands which were used +% between the 1st and 15th centuries. The later book-hands formed the basis of the +% fonts used by the early printers, which in turn form the basis of the printing +% fonts in use today. +% +% The manuscript book-hands were written with a broad nibbed reed or quill +% pen. Among the distinguishing characteristics of a hand, apart from the +% actual shape of the letters, are the angle of the pen (which controls the +% variation between thick and thin strokes) and the height of a letter compared +% to the width of the nib. The lower the ratio of the letter height to nib +% width, the more condensed is the script. The scripts also varied in their +% typical height. +% +% Table~\ref{tab:1} gives an `average' x-height for each +% script, which I obtained by measuring a sample of photographs of +% manuscripts written in the various hands. About a dozen examples +% of each book-hand were measured. This figure should not be taken too +% seriously. +% +% There was not a sharp division between the use of one hand and another. +% Many manuscripts exhibit a variety of hands in the same document. For example, +% the scribe writing in an Uncial hand may have used Roman Rustic letters +% for capitals. Usually the same pen was used for the two different scripts. +% +% Generally speaking, as a hand got older it became more embelished, and +% therefore took longer to write. As this happened a new hand would appear that +% was faster, and which would eventually make the earlier one obsolete. +% +% Many of the book-hands were single-cased; that is, they did not have an +% upper- and lower-case as we do nowadays in Western scripts. On the other +% hand, a script might be majuscule or minuscule. A \textit{majuscule} script +% is one, like our upper-case, where the letters are drawn between two lines +% and are of a uniform height with no ascenders or descenders. +% A \textit{minuscule} script, like our lower-case, is drawn between four lines +% and has ascenders and descenders. +% +% \begin{table} +% \centering +% \caption{The main manuscript book-hands} \label{tab:1} +% \begin{tabular}{lccccc} \hline +% Name & Century & x-height & Height & Pen & Normalised \\ +% & & (mm) & (nib widths) & angle & height \\ \hline +% Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\ +% Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\ +% Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\ +% Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\ +% Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\ +% Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\ +% Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\ +% Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\ +% Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\ +% Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\ +% Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\ +% Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline +% \end{tabular} +% \end{table} +% +% During the period under consideration arabic numerals were effectively +% not used. At the beginning they were unknown and even though some knew +% of them towards the end, the glyphs used for them are not recognisable --- +% to me they look somewhat like cryllic letters --- and each locality +% and time had its own highly individualistic rendering. The general rule +% when using one of these book-hands is to write all numbers using +% roman numerals. +% +% The Roman alphabet consisted of 23 capital letters --- the J, U and W +% were absent. The book-hands initially used both a `u' and a `v' interchangeably +% but by the 10th century the practice had become to use the `v' before a vowel +% and the `u' otherwise. The letter corresponding to the W sound appeared +% in England around the 7th century in +% the form of the runic \textit{wen} character and by about the 11th century +% the `w' chacter was generally used. The `J' is the newest letter of all, not +% appearing until about the mid 16th century. +% +% In the first century punctuation was virtually unknown, and typically +% would not even be any additional space between individual words, never +% mind denoting ends of sentences. Sometimes a dot at mid-height would be +% used as a word seperator, or to mark off the end of a paragraph. Effectively +% a text was a continuous stream of letters. By the time that printing was +% invented, though, all of our modern punctuation marks were being used. +% +% Among all these manuscript hands, the Carolingian minuscule is the +% most important as our modern fonts are based on its letter shapes, and it is +% also at this point in time where the division occured between the black letter +% scripts as used even today in Germany, and the lighter fonts used elesewhere. +% The Rotunda and Humanist minuscule hands were developed in Italy and were +% essentially a rediscovery of the Carolingian minusucle. Guthenberg took the +% Gothic scripts as the model for his types. Later printers, +% such as Nicholas Jenson of Venice, +% took the Humanist scripts as their models. +% +% +% \subsection{The \thisfont{} script} +% +% The Italians were never in favour of the excesses of the Gothic hands +% as they evolved from the Early Gothic. At sometime in the fourteenth +% or fifteenth century, under the influence of writing masters like +% Poggio Bracciolini (1380--1459) and Niccol\`{o} Niccoli (1363--1437), +% the \thisfont{} minuscule became popular in Italy. It is basically a +% return to the Carolingian Minuscule with capital letters based on the +% Square Capitals. Ligatures included ct and st as well as the ampersand. +% The conjunctions \ae{} and \AE{} were sometimes used (accessed by the +% usual macros \verb?\ae? and \verb?\AE? respectively). +% +% It is this hand that forms the basis for our modern roman and italic types. +% +% +% +% \section{The \Lpack{humanist} and \Lpack{allhmin} packages} \label{sec:usc} +% +% The \thisfont{} font family is called |hmin|. The font is supplied in both +% OT1 and T1 encodings. +% +% \subsection{The \Lpack{humanist} package} +% +% This is intended for the occasions when some short pieces of text have +% to be written in \thisfont{} while the majority of the document is in another +% font. The normal baselineskips are used. +% +% \DescribeMacro{\hminfamily} +% The |\hminfamily| declaration starts typesetting with the \thisfont{} fonts. +% Use of the \thisfont{} font will continue until either there is another |\...family| +% declaration or the current group (e.g., environment) is closed. +% +% \DescribeMacro{\texthmin} +% The command |\texthmin{|\meta{text}|}| will typeset \meta{text} using the +% \thisfont{} fonts. +% +% \subsection{The \Lpack{allhmin} package} +% +% +% This package is for when the entire document will be typeset with the +% \thisfont{} font. The baselineskips are set to those appropriate to the +% book-hand. +% +% This is a minimalist package. Apart from declaring \thisfont{} to be the +% default font and setting the baselineskips appropriately, it makes no other +% alterations. +% Vertical spacing +% before and after section titles and before and after lists, etc., will be +% too small as the \LaTeX{} design assumes a font comparable in size to +% normal printing fonts, and the book-hand is much taller. +% To capture more of the flavour of the time, all numbers +% should be written using roman numerals. +% The \Lpack{romannum} package~\cite{ROMANNUM} +% can be used so that \LaTeX{} will typeset the numbers that it generates, +% like sectioning or caption numbers, using roman numerals instead of arabic +% digits. +% +% \DescribeMacro{\cmrfamily} +% \DescribeMacro{\textcmr} +% \DescribeMacro{\cmssfamily} +% \DescribeMacro{\textcmss} +% \DescribeMacro{\cmttfamily} +% \DescribeMacro{\textcmtt} +% The |...family| declarations start typesetting with the Computer Modern Roman +% (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer +% Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}| +% commands will typeset \meta{text} in the corresponding Computer Modern font. +% +% The \Lpack{allhmin} package automatically loads the \Lpack{humanist} package, +% so its font commands are available if necessary. +% +% \StopEventually{ +% \bibliographystyle{alpha} +% \renewcommand{\refname}{Bibliography} +% \begin{thebibliography}{GMS94} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem[And69]{ANDERSON69} +% Donald M.~Anderson. +% \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}. +% \newblock Holt, Rinehart and Winston, 1969. +% +% \bibitem[Bol95]{BOLOGNA95} +% Giulia Bologna. +% \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}. +% \newblock Crescent Books, 1995. +% +% \bibitem[Day95]{DAY95} +% Lewis F.~Day. +% \newblock {\em Alphabets Old \& New}. +% \newblock (3rd edition originally published by B.~T.~Batsford, 1910) +% \newblock Senate, 1995. +% +% \bibitem[Dro80]{DROGIN80} +% Marc Drogin. +% \newblock {\em Medieval Calligraphy: Its History and Technique}. +% \newblock Allenheld, Osmun \& Co., 1980. +% +% \bibitem[Dru95]{DRUCKER95} +% Johanna Drucker. +% \newblock {\em The Alphabetic Labyrinth}. +% \newblock Thames \& Hudson, 1995. +% +% \bibitem[Fir93]{FIRMAGE93} +% Richard A.~Firmage. +% \newblock {\em The Alphabet Abecedarium}. +% \newblock David R~Goodine, 1993. +% +% \bibitem[Fli98]{LETTRINE} +% Daniel Flipo. +% \newblock {\em The LETTRINE package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1998. +% +% \bibitem[Har95]{HARRIS95} +% David Harris. +% \newblock {\em The Art of Calligraphy}. +% \newblock DK Publishing, 1995. +% +% \bibitem[Jen95]{BETON} +% Frank Jensen. +% \newblock {\em The BETON package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1995. +% +% \bibitem[Joh71]{JOHNSTON75} +% Edward Johnston (ed. Heather Child). +% \newblock {\em Formal Penship and Other Papers}. +% \newblock Penthalic, 1971. +% +% \bibitem[Knu87]{CM} +% Donald E.~Knuth. +% \newblock {\em Computer Modern Typefaces}. +% \newblock Addison-Wesley, 1987. +% +% \bibitem[Knu92]{METAFONT} +% Donald E.~Knuth. +% \newblock {\em The METAFONTbook}. +% \newblock Addison-Wesley, 1992. +% +% \bibitem[GMS94]{GOOSSENS94} +% Michel Goossens, Frank Mittelbach, and Alexander Samarin. +% \newblock {\em The LaTeX Companion}. +% \newblock Addison-Wesley Publishing Company, 1994. +% +% \bibitem[Tho75]{THOMAS75} +% Alan G.~Thomas. +% \newblock {\em Great Books and Book Collectors}. +% \newblock Weidenfield and Nichoson, 1975. +% +% \bibitem[Wil99]{DOCMFP} +% Peter R.~Wilson. +% \newblock {\em The DOCMFP Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \bibitem[Wil99b]{ROMANNUM} +% Peter R.~Wilson. +% \newblock {\em The ROMANNUM Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \end{thebibliography} +% } +% +% \section{The Metafont code} \label{sec:mf} +% +% +% As previously noted, this work is part of a larger project to provide +% fonts covering the main manuscript book-hands. As such, one of the +% aims is to produce a coordinated set of fonts, especially as multiple +% hands might be used in a single document. +% +% Noting that the hands tend to be somewhat larger than the typical 10pt +% size (where the x-height is approximately 1.5mm) used for modern books, +% I have also designed the fonts +% at a larger than normal size, then applied some non-linear factors when reducing +% them down to a 10pt size. +% Further, I have used the height of the Carolingian minuscule as a +% normalising factor when deciding on the absolute height of any particular +% script. The x-height of the Carolingian font is made equal to the +% x-height of the Computer Modern Roman (CMR) font. +% +% Modern fonts are effectively drawn. That is, the outline of the letter is +% drawn carefully and the center is filled with ink. This is shown to good +% effect in the Metafont code for the Computer Modern fonts~\cite{CM}. +% In contrast, the manuscript letters were inked by single pen strokes in +% a calligraphic manner. I have tried to repeat this calligraphic style +% in the Metafont code. +% +% As much as possible I have tried to use parameter values from the +% Computer Modern Roman (CMR) fonts in order to reduce possible +% infelicities if the CM and manuscript fonts are used together. However, +% few of the CMR parameters are applicable to the calligraphic style. +% +% +% \subsection{The parameter file} +% +% We deal with the parameter files first, and start by announcing +% what they are for. The \thisfont{} font comes in three sizes and also as a normal +% and a bold font. +% \begin{macrocode} +%<*base7|base10|base17|base7b|base10b|base17b> +%<base7>%%% HMIN7.MF Humanist Miniscule at 7 point design size. +%<base10>%%% HMIN10.MF Humanist Miniscule at 10 point design size. +%<base17>%%% HMIN17.MF Humanist Miniscule at 17 point design size. +%<base7b>%%% HMINB7.MF Humanist Miniscule Bold at 7 point design size. +%<base10b>%%% HMINB10.MF Humanist Miniscule Bold at 10 point design size. +%<base17b>%%% HMINB17.MF Humanist Miniscule Bold at 17 point design size. +% +% \end{macrocode} +% Parameters from CMR are used as much as possible. We also +% make sure that \Lpack{cmbase} is loaded as well as plain Metafont. +% \begin{macrocode} +if unknown cmbase: input cmbase fi + +%<base7>font_identifier:="HMIN"; font_size 7pt#; +%<base10>font_identifier:="HMIN"; font_size 10pt#; +%<base17>font_identifier:="HMIN"; font_size 17.28pt#; +%<base7b>font_identifier:="HMINB"; font_size 7pt#; +%<base10b>font_identifier:="HMINB"; font_size 10pt#; +%<base17b>font_identifier:="HMINB"; font_size 17.28pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutstretch} +% The CMR scaling for lowercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> jutstretch:=1.19; +%<base10|base10b> jutstretch:=1.152; +%<base17|base17b> jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{stemstretch} +% The CMR scaling for lowercase stem widths wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> stemstretch:=1.50; +%<base10|base10b> stemstretch:=1.31; +%<base17|base17b> stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{caprat} +% The scaling for `capitals' wrt `lowercase'. This is pretty much a guess +% (the ratio for CMR10 is 1.59). +% \begin{macrocode} + caprat:=1.5; % ratio of capital height to minuscule height +% \end{macrocode} +% +% \DescribeVariable{cap_jutstretch} +% The CMR scaling for uppercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_jutstretch:=1.3; +%<base10|base10b> cap_jutstretch:=1.2; +%<base17|base17b> cap_jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{cap_stemstretch} +% The CMR scaling for uppercase stem width wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_stemstretch:=1.45; +%<base10|base10b> cap_stemstretch:=1.31; +%<base17|base17b> cap_stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{bfudge} +% Letter width scaling for bold font wrt normal font. +% \begin{macrocode} +%<base7|base10|base17> bfudge:=1.0; +%<base7b|base10b|base17b> bfudge:=1.2; +% \end{macrocode} +% +% \DescribeVariable{szfudge} +% Width scaling wrt 17pt letter width. +% \begin{macrocode} +%<base7|base7b> szfudge:=1.18; +%<base10|base10b> szfudge:=1.0; +%<base17|base17b> szfudge:=1.0; +% \end{macrocode} +% +% \DescribeVariable{hstretch} +% Horizontal stretching factor wrt 17pt size letter width. +% \begin{macrocode} + hstretch:=szfudge*bfudge; +% \end{macrocode} +% +% \DescribeVariable{carol_height} +% The x-height of the Carolingian minuscule font. +% \begin{macrocode} +%<base7|base7b> carol_height#:=108.5/36pt#; +%<base10|base10b> carol_height#:=155/36pt#; +%<base17|base17b> carol_height#:=268/36pt#; +% \end{macrocode} +% +% \DescribeVariable{vstretch} +% The height of this font wrt the Carolingian font. +% \begin{macrocode} + vstretch:=1.00; + +% \end{macrocode} +% +% \DescribeVariable{x_height} +% The x-height of lower case letters. Scaled from the Carolingian font. +% \begin{macrocode} + x_height#:=vstretch*carol_height#; +% \end{macrocode} +% +% \DescribeVariable{u} +% The unit width. The CMR values are used. +% \begin{macrocode} +%<base7> u#:=15.5/36pt#; +%<base10> u#:=20/36pt#; +%<base17> u#:=32.5/36pt#; +%<base7b> u#:=17.9/36pt#; +%<base10b> u#:=23/36pt#; +%<base17b> u#:=37/36pt#; +% \end{macrocode} +% +% \DescribeVariable{width_adj} +% \DescribeVariable{serif_fit} +% \DescribeVariable{cap_serif_fit} +% \DescribeVariable{letter_fit} +% The majority of these parameters and values are constant. +% They are for fine adjustements of characters. The CM values are used. +% \begin{macrocode} + width_adj#:=0pt#; % width adjustment for certain characters + serif_fit#:=0pt#; % extra sidebar near lowercase serifs +%<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs +%<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +%<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs +%<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars +% \end{macrocode} +% +% \DescribeVariable{sb} +% A length used for adjusting the side bearings of characters. +% \begin{macrocode} +%<base7|base7b> sb#:=1/2u#; % unit for side bearings +%<base10|base10b> sb#:=1/2u#; % unit for side bearings +%<base17|base17b> sb#:=1/2u#; % unit for side bearings + +% \end{macrocode} +% +% \DescribeVariable{cap_height} +% The height of capital letters. +% \begin{macrocode} +%<base7|base7b> cap_height#:=172.2/36pt#; % height of caps +%<base10|base10b> cap_height#:=246/36pt#; % height of caps +%<base17|base17b> cap_height#:=425/36pt#; % height of caps +% \end{macrocode} +% +% \DescribeVariable{thickfudge} +% The reciprocal of the font height in nib widths. Normal font height +% is 5 nib widths and the bold font height is 4 nib widths. +% \begin{macrocode} +%<base7|base10|base17> thickfudge:=1/5; +%<base7b|base10b|base17b> thickfudge:=1/4; +% \end{macrocode} +% +% \DescribeVariable{thinfudge} +% The nib sharpness. +% \begin{macrocode} +thinfudge:=1/6; +% \end{macrocode} +% +% \DescribeVariable{thick} +% The maximum nib width. +% That is, the width of the thickest line that can be penned. +% \begin{macrocode} +thick#:=stemstretch*thickfudge*x_height#; % max pen breadth +% \end{macrocode} +% +% \DescribeVariable{thin} +% The nib thinness. +% That is, the width of the thinnest line that can be penned. +% \begin{macrocode} +thin#:=thinfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{pangle} +% The pen angle (in degrees). +% \begin{macrocode} +pangle:=25; % pen angle +% \end{macrocode} +% +% \DescribeVariable{ascratio} +% The height of lower case ascenders wrt |x_height|. +% \begin{macrocode} + ascratio:=7/4; +% \end{macrocode} +% +% \DescribeVariable{asc_height} +% The height of lower case ascenders. +% \begin{macrocode} + asc_height#:=ascratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{descratio} +% The depth of lower case descenders wrt |x_height|. +% \begin{macrocode} + descratio:=2/4; +% \end{macrocode} +% +% \DescribeVariable{desc_depth} +% The depth of lower case descenders. +% \begin{macrocode} + desc_depth#:=descratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_height} +% The height of numerals. Make these midway between normal and capital +% letters. +% \begin{macrocode} + fig_height#:=(0.5[1,caprat])*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_width} +% The width of numerals. All numerals are the same width (roughly, an `o'). +% \begin{macrocode} + fig_width#:=hstretch*(x_height#); +% \end{macrocode} +% +% \DescribeVariable{body_height} +% The height of the tallest character. +% \begin{macrocode} + body_height#:=caprat*asc_height#; +% \end{macrocode} +% +% \DescribeVariable{body_depth} +% The depth of the lowest character. +% \begin{macrocode} + body_depth#:=caprat*desc_depth#; +% \end{macrocode} +% +% \DescribeVariable{half_height} +% Half the normal letter height. +% \begin{macrocode} + half_height#:=1/2x_height#; % half the height of x height letters + +% \end{macrocode} +% +% \DescribeVariable{side} +% We might be using a square for the character design. +% \begin{macrocode} +side#:=x_height#; +% \end{macrocode} +% +% \DescribeVariable{rule_thickness} +% Thickness of rules (in math symbols). The CMR values are used. +% \begin{macrocode} +%<base7|base7b> rule_thickness#:=.34pt#; +%<base10|base10b> rule_thickness#:=.4pt#; +%<base17|base17b> rule_thickness#:=.6pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutfudge} +% Controls the protrusion of serifs. +% \begin{macrocode} +%%%jutfudge:= 3/4; +jutfudge:= 1/2; +% \end{macrocode} +% +% \DescribeVariable{jut} +% The lowercase serif protrusion. +% \begin{macrocode} +jut#:=jutstretch*jutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{srad} +% |srad| with |0 < srad < 1| controls the serif radius. +% \begin{macrocode} +srad:=0.8; % was 0.5 +% \end{macrocode} +% +% \DescribeVariable{trijut} +% The lowercase triangular serif protrusion. +% \begin{macrocode} +trijut#:=0.75jutstretch*thick#; +% \end{macrocode} +% +% \DescribeVariable{clubjutfudge} +% The fractional protusion of a club serif. +% \begin{macrocode} +clubjutfudge:=1/2; +% \end{macrocode} +% +% \DescribeVariable{clubjut} +% The lowercase club serif protrusion. +% \begin{macrocode} +clubjut#:=jutstretch*clubjutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{o} +% Amount of overshoot for curves (as in an `o'). Use CMR values. +% \begin{macrocode} +%<base7|base7b> o#:=5/36pt#; +%<base10|base10b> o#:=8/36pt#; +%<base17|base17b> o#:=10/36pt#; + +% \end{macrocode} +% +% \DescribeVariable{slant} +% |slant| is the amount the font slopes to the right. \\ +% 5 degrees = 9/100; 10 degrees = 11/50. +% \begin{macrocode} +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +%%%%%%slant:= sind 10/cosd 10; %% 10 degree slant + +% \end{macrocode} +% +% \DescribeVariable{monospace} +% We are generating a variable-width font. +% \begin{macrocode} +monospace:=false; % should all characters have the same width? + +% \end{macrocode} +% +% \DescribeVariable{dot_size} +% The size of (punctuation) dots. +% \begin{macrocode} +dot_size#:=5thin#; % size of dots +% \end{macrocode} +% +% \DescribeVariable{comma_width} +% The horizontal width of a comma. +% \begin{macrocode} +%%comma_width#:=5/4dot_size#; +comma_width#:=4/4dot_size#; + +% \end{macrocode} +% +% Finally, call the driver file for the font. +% \begin{macrocode} +generate hmintitle %% switch to the driver file + +% \end{macrocode} +% +% The end of this code section. +% \begin{macrocode} +%</base7|base10|base17|base7b|base10b|base17b> +% \end{macrocode} +% +% +% \subsection{The driver file} +% +% The driver file sets up the font parameters and also contains +% the macros used in the definition of the characters. +% +% \begin{macrocode} +%<*mfd> +% This is HMINTITLE.MF for the Humanist Miniscule font. +% This makes a short font. +% This file also contains special macros universally needed in the +% font but either not in the cmbase.mf file or modifications of these. +% +% \end{macrocode} +% +% \begin{routine}{makebox} +% This is a new version of the \Lpack{cmbase.mf} |makebox| macro. +% Essentially, as we are only generating a single case font, we don't +% need all the horizontals for the CMR characters. +% +% \begin{macrocode} +% A new version of cmbase.mf makebox macro +def makebox(text rule) = + for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth: + rule((l,y)t_,(r,y)t_); endfor % horizontals + for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals + for x=u*(1+floor(1/u)) step u until r-1: + rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals + if charic<>0: + rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{proofpcbb} +% The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the +% square, and at the bottom and top midpoints, where the point |zS| is at +% position |(xoff,yoff)| in the square. +% \begin{macrocode} + +% A macro to delineate a letter's bounding square in proof mode. +% Point z$ is at (xoff,yoff) in the bounding square. +def proofpcbb(suffix $)(expr xoff, yoff) = +if proofing > 0: + x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner + z$br = (x$bl+side, y$bl); % BRHC + z$tr = (x$bl+side, y$bl+side); % TRHC + z$tl = (x$bl, y$bl+side); % TLHC + z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points + pair hc, vc; + hc = (2u,0); vc = (0,2u); + pickup pensquare scaled 2; + for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc: + draw s-hc--s+hc; + draw s-vc--s+vc; + endfor +fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{humanist_font_setup} +% This macro contains the set up for the \thisfont{} fonts. +% \begin{macrocode} + +def humanist_font_setup= % contains special stuff for humanist fonts + define_pixels(side,half_height,carol_height,comma_width); + define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit, + cap_serif_fit,jut,clubjut,cap_jut,trijut); + define_pixels(fig_width); + define_whole_pixels(letter_fit,sb); + define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height, + desc_depth,body_depth,fig_height); + define_corrected_pixels(o); + define_blacker_pixels(thick,thin); + let adjust_fit = normal_adjust_fit; +% \end{macrocode} +% \DescribeVariable{stylus} +% The pen for drawing the thinnest lines is |stylus|. +% \begin{macrocode} + pickup pencircle scaled thin; + stylus:=savepen; +% \end{macrocode} +% \DescribeVariable{thickstylus} +% The pen for drawing lines a bit thicker than the thinnest is |thickstylus|. +% \begin{macrocode} + pickup pencircle scaled (1.5thin); + thickstylus:=savepen; +% \end{macrocode} +% \DescribeVariable{quill} +% The normal calligraphic pen is |quill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated pangle; + quill:=savepen; + +% \end{macrocode} +% +% \DescribeVariable{threequarterquill} +% A pen with 3/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 3/4thick yscaled thin rotated pangle; + threequarterquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{halfquill} +% A pen with 1/2 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/2thick yscaled thin rotated pangle; + halfquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{quarterquill} +% A pen with 1/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/4thick yscaled thin rotated pangle; + quarterquill := savepen; + +% \end{macrocode} +% +% +% \begin{macrocode} + numeric pcshiftx#; % x value of LHS of box wrt origin of char box + define_pixels(pcshiftx); + numeric sqxside#; % x size of the square + numeric sqyside#; % y size of the square + define_pixels(sqxside,sqyside); + +enddef; % end of humanist_font_setup + +% \end{macrocode} +% \end{routine} +% +% +% \DescribeVariable{ductus} +% A boolean to control drawing the ductus (TRUE) or the full letter (FALSE). +% \begin{macrocode} +boolean ductus; +ductus:=false; +% \end{macrocode} +% +% \DescribeVariable{qhor} +% \DescribeVariable{qvert} +% The cosine and sine of the pen angle. +% \begin{macrocode} +numeric qhor, qvert; +qhor:=cosd(pangle); qvert:=sind(pangle); +% \end{macrocode} +% +% \DescribeVariable{pdir} +% The vector corresponding to the pen angle. +% \begin{macrocode} +pair pdir; pdir=dir(pangle); +% \end{macrocode} +% +% \DescribeVariable{ppdir} +% The vector that is perpendicular (anticlockwise) to the pen angle. +% \begin{macrocode} +pair ppdir; ppdir=dir(pangle+90); +% \end{macrocode} +% +% \begin{routine}{draw_serif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_serif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; + z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + top_serif:=false; + z$c=z$b shifted (bjut*pdir); + fi +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_serif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_roundserif} +% The |draw_serif| routine can leave a bump at the end of the stem. +% The |draw_roundserif| routine, which takes the same arguments, +% is meant to eliminate the bump. +% \begin{macrocode} + +def draw_roundserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); + undraw z$--z$a; +enddef; % end of draw_roundserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flatserif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. This produces a serif like |draw_serif| except +% that one side of the seerif is flat. +% \begin{macrocode} + +def draw_flatserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; +%%% z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-jut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (jut*pdir); + fi + z$b = fr[z$,z$c]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$a--z$; + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_flatserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_clubserif} +% A macro to draw a clubbed serif. |draw_clubserif(1,2,f)| uses the current +% pen to +% draw a clubbed serif of extent |clubjut| at |z1| to the left of the line +% from |z2| +% to |z1|. The serif matches |z1| like the flatserif does and ends at the +% point |f[z1,z2]|. +% \begin{macrocode} + +def draw_clubserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| controls the length of the serif. +% \begin{macrocode} +%% beta=1-fr; + ajut=clubjut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem, |fr| between |$| and |$$|. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); +%% vec2=ajut*vec1; +%% z$a=z$ shifted vec2; + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-clubjut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (clubjut*pdir); + fi + z$a = fr[z$,z$$]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$c..z$a{vec1}; + labels($a,$b,$c); +enddef; % end of draw_clubserif + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{draw_triserif} +% A macro to draw a triangular top left serif. +% |draw_triserif(1,tj)| draws a serif at |z1| with its leftmost x +% value at |x1-tj|, where it is assumed that the +% top point on the stem is at |z1| and the stem was drawn with |quill|. +% \begin{macrocode} + +def draw_triserif(suffix $)(expr tj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$ts1'=lft x$; y$ts1'=bot y$; + pickup stylus; + lft x$ts1=x$ts1'; bot y$ts1=y$ts1'; + x$ts2=x$ts1-tj; z$ts2=whatever[z$,z$ts1]; + x$ts3=x$ts1; y$ts3=y$ts2-tj; + pickup stylus; +%% filldraw z$ts1--z$ts2--z$ts3--cycle; + filldraw z$--z$ts2--z$ts3--cycle; + pickup oldpen; + labels($ts1,$ts2,$ts3); +enddef; % end of draw_triserif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_istem} +% A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs +% are of extent |jut|. There is a top left and bottom right serif. +% The serif radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_istem(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % top serif + draw_serif($$, $, fr); % bottom serif + draw z$a--z$$a; % the stem +enddef; % end of draw_istem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tstem} +% A macro to draw the shape of the stem of a `t'. |draw_tstem(1,2,f)| draws a +% stem whose +% top is at |z1| and bottom at |z2| with a right serif at |z2|. The radius +% is controlled by |f|, with $0 < f < 1$. +% It draws with the current pen and the serif is of extent |jut|. +% NOTE: for the HMIN font, just the stem is drawn --- no serif! +% \begin{macrocode} + +def draw_tstem(suffix $, $$)(expr fr)= +%% draw_serif($$, $, fr); % the serif +%% draw z$--z$$a; % the stem + draw z$--z$$; +enddef; % end of draw_tstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tlserif} +% A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serif +% is of extent |jut|. It also draws the stem to the point |z2|. The serif +% radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_tlserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % the serif + draw z$a--z$$; % the stem +enddef; % end of draw_tlserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flick} +% A macro to draw a flick (like an eyebrow). +% |draw_flick(1,rise,fall,fjut)| draws a stroke starting at |z1| rising up by +% |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is +% |fjut| to the right of |z1|. It is drawn with the current pen. +% \begin{macrocode} + +def draw_flick(suffix $)(expr rise, fall, fjut)= +% \end{macrocode} +% The points |z$a| and |z$b|, together with |z$| make up three points on the +% ductus. +% \begin{macrocode} + rt x$b = x1+fjut; top y$b=y$-fall; + x$a=0.5[x$,x$b]; top y$a=y$+rise; +% \end{macrocode} +% Draw the part, and finish off. +% \begin{macrocode} + draw z$..z$a..z$b; + labels($a,$b); +enddef; % end of draw_flick + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_wave} +% A macro to draw a (horizontal) stroke with a flick at each end +% (down at the left and up at the right). |draw_wave(1,2,f)| uses the current +% pen to draw from |z1wl| to |z1wr|, where |x1wl=x1|, |y1wl=y1-f|, and +% |x1wr=x2|, |y1wr=y2+f|, with |z1| assumed to be at the left of |z2|. +% \begin{macrocode} + +def draw_wave(suffix $,$$)(expr f)= + x$wl=x$; y$wl=y$-f; + x$wr=x$$; y$wr=y$$+f; + z$wc=0.5[z$wl,z$wr]; + draw z$wl{pdir}..z$wc{right}..{pdir}z$wr; + labels($wl,$wc,$wr); +enddef; % end of draw_wave +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tail} +% A macro to draw a tail at the bottom of a (vertical) stem. +% |draw_tail(1,fjut)| draws a tail at the bottom of the stem which ends at |z1|. +% The depth is controlled by the |desc_depth| value and the jut by |fjut|. +% \begin{macrocode} + +def draw_tail(suffix $)(expr fj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$tl' = lft x$; y$tl=bot y$; + pickup stylus; + lft x$tl=x$tl'; + x$tb=x$tl-fj; bot y$tb=y$tl-1/2desc_depth; + filldraw z${down}..{-pdir}z$tb & z$tb{pdir}..{up}z$tl--cycle; + pickup oldpen; + labels($tb,$tl); +enddef; % end of draw_tail +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_triangle} +% A macro to draw a downward pointing equilateral triangle. +% |draw_triangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_triangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$-0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_triangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_utriangle} +% A macro to draw an upward pointing equilateral triangle. +% |draw_utriangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_utriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$+0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_utriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rtriangle} +% A macro to draw a downward pointing right angled triangle. +% |draw_rtriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rtriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$-sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rtriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rutriangle} +% A macro to draw an upward pointing right angled triangle. +% |draw_rutriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rutriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$+sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rutriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_fork} +% A macro to draw a forked line. +% |draw_fork(1,2,sz)| draws a graduated line from |z1| to |z2| with a forked +% end of size |sz|. +% \begin{macrocode} + +def draw_fork(suffix $, $$)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$f1'=lft x$; y$f1'=bot y$; + x$f3'=rt x$; y$f3'=top y$; + pickup stylus; + lft x$f1=x$f1'; bot y$f1=y$f1'; + rt x$f3=x$f3'; y$f3-y$=2*(y$-y$f1); + rt x$f2=x$$-sz; bot y$f2=y$$; + rt x$f4= rt x$f5=x$$; + bot y$f5=y$$-sz; top y$f4=y$$+1/2sz; + filldraw z$f1--z$f2--z$f3--cycle; % the line + draw z$f2{right}..z$f4; % upper fork + draw z$f2{right}..z$f5; % lower fork + pickup oldpen; + labels($f1,$f2,$f3,$f4,$f5); +enddef; % end of draw_fork +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_urswish} +% A macro to draw a line up and to the right with an under curl at the end. +% |draw_urswish(1,2)| draws from |z1| towards |z2|, which is the max upper right +% of a bounding box, where the curl is. +% \begin{macrocode} + +def draw_urswish(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + pickup quill; + rt x$$s1=x$$-thick; top y$$s1=y$$; + rt x$$s2=x$$; +%% x$$s3=x$$-thick; + lft x$$s3=x$$s1; + bot y$$s3=y$$-thick; y$$s2=0.5[y$$s1,y$$s3]; +%% draw z$---z$$s1{right}..z$$s2{down}..{-pdir}z$$s3; + draw z$..z$$s1{pdir}..z$$s2{down}; + labels($$s1,$$s2,$$s3); +enddef; % end of draw_urswish +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{bowl_stem} +% Calculate where a bowl should meet a stem so that the pen is moving in the +% pen direction. +% |bowl_stem(1,2)| calculates the point |z1i|, where |z1| is on the bowl and +% there is a vertical line at |x2|. +% +% \begin{macrocode} + +def bowl_stem(suffix $, $$)= + x$'=0.5[x$,x$$]; y$'=y$; % the mid-point + z$''=z$' shifted (thick*pdir); + x$i=x$$; z$i=whatever[z$',z$'']; + labels($',$i); +enddef; % end of bowl_stem +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_clubbase} +% Draw a clubbed bottom of a vertical stem for the HMIN font. +% |draw_clubbase(1, 2, st, left, right)| draws from |st[z2,z1]| to |z2|. +% At |z2| the pen +% is shifted |left| fraction of the pen width and |right| fraction of the +% pen width, both in the direction of the pen angle. Pen draws smoothly the +% path |z1|, |left|, |right|, |z1|. +% \begin{macrocode} + +% draw clubbed bottom of vertical stem for HMIN font. +def draw_clubbase(suffix $, $$)(expr st, lft, rt)= + z$$l = z$$ shifted (lft*thick*(-pdir)); + z$$r = z$$ shifted (rt*thick*(pdir)); + z$$t = st[z$$,z$]; + draw z$$t{z$$-z$}..z$$l--z$$r..{z$-z$$}z$$t; + labels($$t,$$l,$$r); +enddef; % end of draw_clubbase + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pdot} +% A macro to draw a period dot. +% |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|. +% \begin{macrocode} + +def draw_pdot(suffix $)(expr sz)= +% \end{macrocode} +% Draw a square rotated 45 degrees. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$ shifted (0.5sz*up); + z$u = z$s shifted (sz*right); + z$v = z$t shifted (sz*down); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pdot + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pcomma} +% A macro to draw a period comma. +% |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. The pen is |stylus|. +% \begin{macrocode} + +def draw_pcomma(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping back and down +% for a total width of |ar| and depth |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s-ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu{down}..{left}z$uv--z$vu{right}..{up}z$sv--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pcomma + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_plq} +% A macro to draw a period left quote. +% |draw_plq(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. +% \begin{macrocode} + +def draw_plq(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping forward and down +% for a total width of |ar| and depth |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s+ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu{down}..{right}z$uv--z$vu{left}..{up}z$sv--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_plq + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{offsetbowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for a non-centered letter `o'. |offsetbowl($, sx, sy, fx, fy)| +% calculates the paths for an `o' +% enclosed in a rectangle size |sx| by |sy| with its bottom lefthand corner +% located at |z$|, where the center of the o is at |(fx*sx, fy*sy)| in the +% bounding rectangle. +% +% Two construction paths, namely |obfirst| and |obsecond| are also +% available. They should be identical. +% +% All paths have points listed in a clockwise direction, starting with +% |z$nh| or |z$minl| as appropriate. +% +% |offsetbowl($, sx, sy, 1/2, 1/2)| gives the same results as |obowl($, sx, sy)|. +% \begin{macrocode} + +path obouter, obinner, obfirst, obsecond; +def offsetbowl(suffix $)(expr sx, sy, fx, fy)= + numeric inx, iny, cx, cy; + pair pt[]; + path pth[]; + inx := 1/2thick*cosd(pangle); iny := 1/2thick*sind(pangle); + cx := x$+fx*sx; cy := y$+fy*sy; + z$obc = (cx,cy); +% \end{macrocode} +% Calulate points on the centre path of the pen. These are offset by |inx| +% from the rectangles vertical sides and by |iny| from the horizontal sides. +% If the pen is parallel to a side, offset the point by half the pen's +% dimension. First do the West, East, North and South points. +% \begin{macrocode} + if pangle = 90: + z$wt=(x$+1/2thin, cy); + z$et=(x$+sx-1/2thin, cy); + else: + z$wt=(x$+inx, cy); + z$et=(x$+sx-inx, cy); + penpos$wt(thick,pangle); + penpos$et(thick,pangle); + fi + if pangle = 0: + z$nh=(cx, y$+sy-1/2thin); + z$sh=(cx, y$+1/2thin); + else: + z$nh=(cx, y$+sy-iny); + z$sh=(cx, y$+iny); + penpos$nh(thick,pangle); + penpos$sh(thick,pangle); + fi + obfirst := z$nh{right}..z$et{down}..z$sh{left}..z$wt{up}..cycle; +% \end{macrocode} +% Now calculate the points on the path |obfirst| where the pen will +% draw the min width lines (i.e., the points where the pen will be +% moving parallel to |pangle|). +% \begin{macrocode} + if pangle = 90: + z$minl = z$wt; z$maxr = z$nh; z$minr = z$et; z$maxl = z$sh; + else: + if pangle = 0: + z$minl = z$nh; z$maxr = z$et; z$minr = z$sh; z$maxl = z$wt; + else: + z$minl = directionpoint dir(pangle) of obfirst; + z$minr = directionpoint -dir(pangle) of obfirst; +% \end{macrocode} +% The max points are roughly where the inner and outer diverge +% the most. These are simple for 0 and 90 degree pens and have +% been calculated above. It's not so simple for intermediate +% angles. For a reasonable looking result, we pick the max +% points to be halfway between the min points. This involves +% calculating some angles, paths and intersections. +% \begin{macrocode} + pt1 := z$minr - z$minl; % direction + pt2 := (- ypart pt1, xpart pt1); % perpendicular + pt3 := 1/2[z$minl, z$minr]; + pt4 := pt3 shifted pt2; + pt5 := pt3 shifted -pt2; + pth1 := pt3--pt4; + pth2 := pt3--pt5; + z$maxr = pth1 intersectionpoint obfirst; + z$maxl = pth2 intersectionpoint obfirst; + \fi + \fi +% \end{macrocode} +% Place the pen at each of these points to get the outer and inner points. +% \begin{macrocode} + penpos$minl(thin,pangle+90); + penpos$maxr(thick,pangle); + penpos$minr(thin,pangle+90); + penpos$maxl(thick,pangle); +% \end{macrocode} +% Finally, the outer and inner paths. +% \begin{macrocode} + obsecond := z$minl..z$maxr..z$minr..z$maxl..cycle; + z$minlo = z$minl.r; z$maxro = z$maxr.r; + z$minro = z$minr.l; z$maxlo = z$maxl.l; + obouter := z$minlo{dir(pangle)}...z$maxro...z$minro{-dir(pangle)}...z$maxlo...cycle; + z$minli = z$minl.l; z$maxri = z$maxr.l; + z$minri = z$minr.r; z$maxli = z$maxl.r; + obinner := z$minli...z$maxri...z$minri...z$maxli...cycle; + labels($obc, $nh, $et, $sh, $wt); + labels($minl, $maxr, $minr, $maxl); + labels($minlo, $maxro, $minro, $maxlo); + labels($minli, $maxri, $minri, $maxli); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{obowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for the letter `o'. |obowl($, sx, sy)| calculates the paths for an `o' +% centered and enclosed in a rectangle size |sx| by |sy| with its bottom +% lefthand corner located at |z$|. +% \begin{macrocode} + +def obowl(suffix $)(expr sx, sy)= + offsetbowl($, sx, sy, 1/2, 1/2); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{scalarprod} +% |v scalarprod w| calulates the scalar product between the +% two vectors |v| and |w|. +% \begin{macrocode} + +primarydef v scalarprod w = + (xpart v * ypart w - ypart v * xpart w) +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{tangentpoint} +% |tangentpoint($, path)| calculates the point |z$tan| on the |path| +% so that |z$tan--z$| is tangent to the path. It uses a binary search +% to find a point on the path such that the path direction is +% (anti-) parallel to the dirction from that point to the given point. +% \begin{macrocode} + +def tangentpoint(suffix $)(expr pth)= + pair vecll, veclr, veclm; % "tangent" line directions + numeric pl, pr, pm; % path parameter values + pair vecpl, vecpr, vecpm; % path directions + pair ptl, ptr, ptm; % path points + numeric sl, sr, sm; % scalar products of path/line directions + numeric stpsize; % size of current binary step + numeric tantol; % tolerance + boolean wtest; % a boolean + + tantol := eps; +% \end{macrocode} +% Initialise using the left right and middle points on the path. +% \begin{macrocode} + pl:=0; pr:=length pth; pm:=0.5(pl+pr); stpsize:=pr-pl; + ptl := point pl of pth; + ptm := point pm of pth; + ptr := point pr of pth; +% \end{macrocode} +% Now the various vectors, and make sure they are unit vectors to +% have a consistent measure scale when we take the scalar products. +% \begin{macrocode} + vecll := unitvector (z$-ptl); + veclm := unitvector (z$-ptm); + veclr := unitvector (z$-ptr); + vecpl := unitvector (direction pl of pth); + vecpm := unitvector (direction pm of pth); + vecpr := unitvector (direction pr of pth); + sl := vecll scalarprod vecpl; + sm := veclm scalarprod vecpm; + sr := veclr scalarprod vecpr; +% \end{macrocode} +% We stop if any of the points is the tangent point, or if the step +% size is too small, or if the signs of the left and right scalar +% products are the same. +% \begin{macrocode} + wtest := (stpsize < tantol) or (sl*sr > 0) or + (abs sl < tantol) or (abs sm < tantol) or (abs sr < tantol); + if wtest: + if (stpsize < tantol): + z$tan=(0,0); + errmessage("No tangent; path too short"); + else: + if (sl*sr > 0): + z$tan=(0,0); + errmessage("No tangent; end products have the same sign"); + else: + if (abs sl < tantol): + z$tan=ptl; + else: + if (abs sm < tantol): + z$tan=ptm; + else: + z$tan=ptr; + fi + fi + fi + fi + else: +% \end{macrocode} +% There should be a tangent and we iterate to find it, using +% bisection. If there is one to be found it will be at the +% current middle point. The tangent point will be somewhere +% between the two points that lead to opposite signed scalar +% products. +% \begin{macrocode} + forever: + if (sl*sm < 0): % opposite signs, look between pl & pm + pr:=pm; pm:=0.5(pr+pl); + vecpr := vecpm; veclr := veclm; sr:=sm; + else: + pl:=pm; pm:=0.5(pr+pl); + vecpl:=vecpm; vecll:=veclm; sl:=sm; + fi + stpsize:=pr-pl; + ptm := point pm of pth; + veclm := unitvector (z$-ptm); + vecpm := unitvector (direction pm of pth); + sm := veclm scalarprod vecpm; +% \end{macrocode} +% We stop the iteration if the step size is too small or the +% middle point is the tangent point. In either case, the +% middle point is the best guess that can be made. +% \begin{macrocode} + wtest := (stpsize < tantol) or (abs sm < tantol); + if wtest: + if (abs sm < tantol): + z$tan = ptm; + else: + z$tan = ptm; +%%%%%% errmessage("Warning: tangent approximated"); + fi + fi + exitif wtest; + endfor + fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% Set the mode and font setup. +% \begin{macrocode} + +font_coding_scheme:="ASCII minuscules and punctuation"; +mode_setup; +humanist_font_setup; + +% \end{macrocode} +% +% +% We generate letters, together with some punctuation and +% analphabetics. +% \begin{macrocode} + +input hminl; % lower case +input hminu; % capitals +input hminpunct; % punctuation +input hminlig; % the several dashes +input hmindig; % arabic digits + +% \end{macrocode} +% +% Set up the spacings, stretches and shrinks. +% +% \begin{macrocode} + +font_slant slant; font_x_height x_height#; +if monospace: + font_normal_space vstretch*9u#; % no stretching or shrinking + font_quad vstretch*18u#; + font_extra_space vstretch*9u#; +else: + font_normal_space vstretch*6u#+2letter_fit#; + font_normal_stretch vstretch*3u#; font_normal_shrink vstretch*2u#; + font_quad vstretch*18u#+4letter_fit#; + font_extra_space vstretch*2u#; + +% \end{macrocode} +% +% Finally, do the ligtables, but I don't think they are needed (yet?). +% +% \begin{macrocode} + +fi + +bye. + + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + kks#:=-4u#; kkx#:=-1.5u#; kkj#:=-2u#; kkr#:=-5u#; kkrs#:=-2u#; kkrl#:=-8u#; + ligtable "s": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "S": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "x": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "X": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "a": "A": + "b": "B": + "c": "C": + "d": "D": + "e": "E": + "h": "H": + "i": "I": + "k": "K": + "l": "L": + "m": "M": + "n": "N": + "o": "O": + "p": "P": + "t": "T": + "u": "U": + "v": "V": + "w": "W": + "z": "Z": + "j" kern kkj#, "J" kern kkj#; + + ligtable "r": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + ligtable "R": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + +fi + +bye. + +%</mfd> +% \end{macrocode} +% +% \subsection{The code for normal letters} +% +% The following code is for the lower case characters. +% +% \begin{macrocode} +%<*min> +% HMINL.MF Program file for Humanist Miniscule lower case +% + +% \end{macrocode} +% +% +% \begin{routine}{a} +% The letter `a'. +% \begin{macrocode} +cmchar "HMIN letter a"; +beginchar("a", 2sb#+hstretch*(11/11x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup quill; +n1 := w - 2pcshiftx -jut; % effective letter width +% "stem" +rt x1 = w-pcshiftx-jut; top y1=h; +x2 = x1; bot y2=0; +z16 = 1/6[z2,z1]; +rt x6 = x16; y6=y16; +lft x4 = pcshiftx; y4 = 1/2h; +% stem path +pth1 := z1{down}..z2; +pr1 := direction 1 of pth1; +z20 = z2 shifted -10pr1; + +z11 = point 3/13 of pth1; z15 = point 10/13 of pth1; +lft x13 = pcshiftx; y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +else: + % draw stem + draw pth1; + draw_roundserif(1,2,srad); + draw_roundserif(2,20,srad); + % draw bowl +%% draw z1{-pdir}..z4{down}..z6{pdir}; + draw z11{-pdir}..z13{down}..z15{pdir}; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +endchar; % end "a" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{b} +% The letter `b'. +% \begin{macrocode} +cmchar "HMIN letter b"; +beginchar("b", 2sb#+hstretch*(13/11x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=h/ascratio; % top of bowl +%%ductus:=true; +lft x1 = pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +x12=x2; bot y12=y2; +x3 = x1; y3=1/2n2; +rt x5 = w-pcshiftx; y5=y3; +x4 = 1/2[x3,x5]; bot y4=0; +x6=x4; top y6=n2; +pth1 := z1..z3{down}..z4{right}.. z5{up}; +z98=(0,3/4n2); z99=(w,y98); +pth2 := z98--z99; +z7 = pth1 intersectionpoint pth2; +if ductus: + pickup stylus; +fi +%%draw z1..z3{down}..z4{right}..z5{up}..z6{left}..z7{-pdir}; +draw z1--z2; +draw_flatserif(1,2,srad); +draw z12..z4{right}..z5{up}..z6{left}..z7{-pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "b" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{c} +% The letter `c'. +% \begin{macrocode} +cmchar "HMIN letter c"; +beginchar("c", 2sb#+hstretch*(11/11x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z24..z1{left}..z2{down}..z3{right}..z4{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "c" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{d} +% The letter `d'. +% \begin{macrocode} +cmchar "HMIN letter d"; +beginchar("d", 2sb#+hstretch*(13/11x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1 = h/ascratio; % x-height +rt x1=w-pcshiftx-jut; top y1=h; +x2 = x1; bot y2=0; +x3 = x1; y3 = 1/4n1; +lft x5 = pcshiftx; y5=1/2n1; +x4 = 1/2[x3,x5]; bot y4 = 0; +x6=x4; top y6 = n1; +x7=x3; y7=3/4n1; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3..z4{left}..z5{up}..z6{right}..z7; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "d" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{e} +% The letter `e'. +% \begin{macrocode} +cmchar "CMIN letter e"; +beginchar("e", sb#+hstretch*(12/11x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-pcshiftx; % actual letter width +n2 := 7/8n1; % width of bowl +x1 = pcshiftx + 5/8n2; top y1=h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = pcshiftx + 1/2n2; bot y3 = 0; +rt x4 = pcshiftx + n2; y4 = 1/4h; +z98=(0,5/8h); z99=(2w,y98); +pth1 := z98--z99; +pth2 := z1{left}..z2{down}..z3{right}; +z7 = pth1 intersectionpoint pth2; +rt x17 = w; y17=y7; +rt x8 =pcshiftx+n2; y8=y2; +pth3 := z1{right}..z8{down}..z3{left}; +z9 = pth1 intersectionpoint pth3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z9{up}..z1{left}..z2{down}..z3{right}..z4{pdir}; +draw z7--z17; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,17,70,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{f} +% The letter `f'. +% \begin{macrocode} +cmchar "HMIN letter f"; +beginchar("f", 2sb#+hstretch*(11/11x_height#+jut#), + (asc_height#), 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := h/ascratio; % x-height +%% stem +lft x1=lft x2=pcshiftx+jut; top y1=n1; bot y2=0; +%% flick +x4=x2; y4 = 1/2n1; +rt x6=w-pcshiftx; y6 = 2/3h; +x5 = 2/3[x4,x6]; top y5=h; +%% bar +x14=pcshiftx; top y14=n1; +rt x16 = w -pcshiftx; y16 = y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_roundserif(2,1,srad); +draw z1{up}...z5{right}...z6; % top +draw z14--z16; % bar +ductus:=false; +ductus:=false; +penlabels(1,2,3,4,5,6,7,14,15,16,100); +endchar; % end "f" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{g} +% The letter `g'. +% \begin{macrocode} +cmchar "CMIN letter g"; +beginchar("g", 2sb#+hstretch*(16/11x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +path pth[]; +pair vec[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := 4/5w - 2pcshiftx; % width of top o +%% top O +x1 = x3 = pcshiftx + 1/2n1; top y1=h; bot y3=1/8h; +lft x4 = pcshiftx; rt x2 = pcshiftx+n1; y2 = y4 = 1/2[y1,y3]; + +%% top flick +lft x11 = rt x1; y11=y1; +rt x13 = w-pcshiftx; y13 = h; + +%% bottom O +x31=x3; top y31= -1/8d; +x33=x31; top y33 = -d; +%rt x32 = w-pcshiftx; y32 = 1/2[y31,y33]; +lft x32 = x2; y32 = 1/2[y31,y33]; +lft x34 = pcshiftx; y34=y32; + +%% link +x44=1/2[x34,x31]; y44=1/2[y3,y31]; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; % top O +draw z11{right}..z13{pdir}; % flick +%draw z31..z32..z33..z34..cycle; % bottom O +draw z31{right}..z32{down}..z33{left}..{up}z34..cycle; % bottom O +draw z3{left}..z44{down}..z31{right}; % link +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,12,13,31,32,33,34,35,36,100); +endchar; % end "g" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{h} +% The letter `h'. +% \begin{macrocode} +cmchar "HMIN letter h"; +beginchar("h", 2sb#+hstretch*(13/11x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% bowl +n1 := h/ascratio; % x-height +z3=(x1,6/8n1); +rt x5 = w-pcshiftx; y5=1/2n1; +x4=1/2[x3,x5]; top y4 = n1; +%%lft x6=x4; bot y6=0; +x6=1/2[x4,x5]; +bot y6=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3..z4{right}..z5{down}..z6{-pdir}; + +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "h" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{i} +% The letter `i'. +% \begin{macrocode} +cmchar "CMIN letter i"; +beginchar("i", 2sb#+hstretch*(thick#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% dot +x22 = x21=x1; +bot y22 = 2h - bot y1; +bot y21 = top y22; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z21--z22; %% dot +ductus:=false; +penlabels(1,2,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{j} +% The letter `j'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "CMIN letter j"; +beginchar("j", sb#+hstretch*(3/8x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +rt x1 = w-pcshiftx; top y1 = h; +x2=x1; y2=-1/2d; +%% dot +x22 = x21=x1; +bot y22 = 2h - bot y1; +bot y21 = top y22; +%% bottom hook +lft x3 = 0; bot y3 = -d; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw_flatserif(1,2,srad); +draw z21--z22; % dot +draw z2{down}..z3{-pdir}; % hook +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "j" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{k} +% The letter `k'. +% \begin{macrocode} +cmchar "HMIN letter k"; +beginchar("k", 2sb#+hstretch*(14/11x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +%% stem +n1 = h/ascratio; % x-height +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% top arm +%%z3=(x1,1/2n1); +x3 = x1; top y3 = 1/2n1; +rt x5=5/8[x1,w-pcshiftx]; top y5=n1; +x4=1/2[x3,x5]; top y4=n1; +pth1 := z3{pdir}..z5{up}; + +x29=x1; top y29 = 7/8n1; +rt x25=5/8[x1,w-pcshiftx]; y25=6/8[y3,y29]; +x27=1/2[x29,x25]; top y27=n1; +pth1 := z3{pdir}..z25{up}..z27{left}..z29; +pth1 := z3{pdir}..z25..z27{left}..z29; + + +%% lower arm +pth2 := (rt x1,0)--(rt x1,h); +z13 = pth1 intersectionpoint pth2; +pickup threequarterquill; +lft x14 = x13; bot y14 = y13; +rt x7=w-pcshiftx; bot y7=0; + +pth3 := z14{pdir}..z25..z27{left}..z29; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +%%draw pth1; % upper arm +draw pth3; % upper arm +pickup threequarterquill; +%%draw z14{down}..z7{-ppdir}; % lower arm +%%draw z14{down}..z7; % lower arm +draw z14{-ppdir}..z7{right}; % lower arm +pickup quill; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,100); +endchar; % end "k" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{l} +% The letter `l'. +% \begin{macrocode} +cmchar "HMIN letter l"; +beginchar("l", 2sb#+hstretch*(9/11x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +lft x1=pcshiftx+jut; top y1=h; +n1 := top y1 - y1; +x2=x1; bot y2 =3n1; +rt x4 = w-pcshiftx; bot y4=n1; +x3=1/2[x2,x4]; bot y3=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2..z3{right}..z4; +draw_flatserif(1,2,srad); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "l" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{m} +% The letter `m'. +% \begin{macrocode} +cmchar "HMIN letter m"; +beginchar("m", 2sb#+hstretch*(19/11x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +%% start of bowl +x13=x1; y13=3/4h; +%% bottom of right and middle stems +rt x6 = w -pcshiftx - jut; y6=y2; +z4 = 1/2[z2,z6]; +%% top of middle and right stems +x3=x4; y3=y1; +x5=x6; y5=y13; +%% top of bowls +x14=2/3[x13,x3]; top y14 = h; +x33=x4; y33=y13; +x34=2/3[x33,x5]; y34 = y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left half +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z13{pdir}..z14{right}..z33{down}--z4; +draw_roundserif(4,3,srad); +draw z33{pdir}..z34{right}..z5{down}--z6; +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100); +endchar; % end "m" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{n} +% The letter `n'. +% \begin{macrocode} +cmchar "HMIN letter n"; +beginchar("n", 2sb#+hstretch*(12/11x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +% start of bowl +x13=x1; y13=3/4h; +%% right stem +rt x4 = w-pcshiftx-jut; y4=y2; +x3 = x4; y3 = y13; +% top of bowl +x14 = 2/3[x13,x3]; top y14 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z13{pdir}..z14{right}..z3{down}--z4; +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "n" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{o} +% The letter `o'. +% \begin{macrocode} +cmchar "CMIN letter o"; +beginchar("o", 2sb#+hstretch*(15/11x_height#), % could be 15/11 + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +draw z1..z2..z3..z4..cycle; +z5=(pcshiftx,-o); +obowl(5, w-2pcshiftx, h+2o); +%%ductus:=true; +if ductus: + pickup stylus; + draw obfirst; draw obsecond; draw obouter; draw obinner; +else: +%% fill obouter; unfill obinner; +fi +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "o" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{p} +% The letter `p'. +% \begin{macrocode} +cmchar "CMIN letter p"; +beginchar("p", 2sb#+hstretch*(13/11x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=-d; +%% bowl % from "d" +z3=3/4[(x1,0),z1]; +rt x5 = w-pcshiftx; y5=1/2h; +x4=1/2[x3,x5]; top y4 = h; +x6=x4; bot y6=0; +z7=1/4[(x1,0),z1]; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad) +draw z3{pdir}..z4{right}..z5{down}..z6{left}..z7; % bowl (from d) +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "p" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{q} +% The letter `q'. +% \begin{macrocode} +cmchar "CMIN letter q"; +beginchar("q", 2sb#+hstretch*(13/11x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% right stem +rt x1=w-pcshiftx-jut; top y1=h; +x2=x1; bot y2=-d; +%% bowl +z3=1/4[(x1,0),z1]; +lft x5=pcshiftx; y5=1/2h; +x4=1/2[x3,x5]; bot y4=0; +x6=x4; top y6=h; +z7=3/4[(x1,0),z1]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +%%draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3{-pdir}..z4{left}..z5{up}..z6{right}..z7; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{r} +% The letter `r'. +% \begin{macrocode} +cmchar "CMIN letter r"; +beginchar("r", 2sb#+hstretch*(10/11x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% bowl +z3=3/4[z2,z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3{pdir}..z4{right}..z5{down}; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "r" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{s} +% The letter `s'. This is a `short' S. +% \begin{macrocode} +cmchar "HMIN letter s"; +beginchar("s", 2sb#+hstretch*(11/11x_height#+jut#), % 13/11 seems too wide + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +x2=x4=x6=1/2w; +rt x1 = rt x5 = w-pcshiftx; +lft x3 = lft x7 = pcshiftx; +top y2=h; bot y6=0; +y4 = 7/16[y6,y2]; +n1 := top y2 - y2; +y3 = 1/2[y4,y2]; y5 = 1/2[y4,y6]; +y1 = y2-n1; +y7 = y6+n1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{left}..z3{down}..z4..z5{down}..z6{left}..z7; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100); +endchar; % end "s" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{t} +% The letter `t'. +% \begin{macrocode} +cmchar "CMIN letter t"; +beginchar("t", 2sb#+hstretch*(8/11x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% bar +lft x11 = pcshiftx; rt x12=w-pcshiftx; +top y11= top y12=h; +n1 := top y11 - y11; +%% stem +lft x1=pcshiftx+jut; bot y1=h+n1; +x2=x1; bot y2 = 2n1; +rt x4 = w-pcshiftx; bot y4 = n1; +x3 = 1/2[x2,x4]; bot y3=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z11--z12; % bar +draw z1--z2..z3..z4; % stem +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "t" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{u} +% The letter `u'. +% \begin{macrocode} +cmchar "CMIN letter u"; +beginchar("u", 2sb#+hstretch*(11/11x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-jut; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; +draw_flatserif(1,13,srad); +draw_tstem(3,4,srad); % right stem +draw_flatserif(3,4,srad); +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "u" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{v} +% The letter `v'. +% \begin{macrocode} +cmchar "CMIN letter v"; +beginchar("v", 2sb#+hstretch*(13/11x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +%% left stem top +lft x1 = pcshiftx + jut; top y1 = h; +bot y3 = 0; +%% right stem +rt x5=w-pcshiftx; top y5 = h; +x3=5/8[x1,x5]; + +z11=(x1,0); z15=(x5,0); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}..z3; % left stem +draw_flatserif(1,11,srad); +draw z5{down}..z3; % right stem +draw_flatserif(5,15,srad); +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "v" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{w} +% The letter `w'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "CMIN letter w"; +beginchar("w", 2sb#+hstretch*(21/11x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x5=w-pcshiftx-jut; y5=y1; +x6=x5; bot y6=0; +z53=1/4[z6,z5]; % start of bowl +% middle stem +z3 = 1/2[z1,z5]; +z33=(x3,y13); +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +% middle of right bowl +x34=1/3[x3,x5]; y34=y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; % left +draw_flatserif(1,13,srad); +draw z3--z33{down}..z34{right}..z53{pdir}; % middle +draw_flatserif(3,33,srad); +draw_tstem(5,6,srad); % right stem +draw_flatserif(5,6,srad); +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "w" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{x} +% The letter `x'. +% \begin{macrocode} +cmchar "CMIN letter x"; +beginchar("x", 2sb#+hstretch*(13/11x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +path pth[]; +numeric n[]; +pcshiftx := sb; +pickup quill; + +% top left to bottom right +lft x1 = pcshiftx + jut; y1=h; +rt x2 = w - pcshiftx - jut; y2 =0; + +% bottom left to top right +lft x21=pcshiftx; bot y21=0; +rt x22=w-pcshiftx; top y22=h; +z12=14/24[z1,z2]; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw_roundserif(1,2,srad); +draw_roundserif(2,1,srad); + +draw z21..z12..z22{up}; + +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,150,60,160,100); +endchar; % end "x" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{y} +% The letter `y'. +% \begin{macrocode} +cmchar "CMIN letter y"; +beginchar("y", 2sb#+hstretch*(14/11x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +%% left stem top +lft x1 = pcshiftx + jut; top y1 = h; +bot y3 = 0; +%% right stem +rt x5=w-pcshiftx; top y5 = h; +lft x9=-1/2w; bot y9 = -d; +pth1 := z9{right}..z5{up}; +pth2 := (0,y3)--(w,y3); +z99 = pth1 intersectionpoint pth2; +x3 = x99; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}..z3; % left stem +draw_flatserif(1,3,srad); +draw pth1; % right stem +draw_flatserif(5,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{z} +% The letter `z'. +% \begin{macrocode} +cmchar "CMIN letter z"; +beginchar("z", 2sb#+hstretch*(12/11x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +%% top bar ends +lft x1 = pcshiftx; rt x2 = w-pcshiftx; +top y1 = top y2 = h; +%% bottom bar +x3=x1; x5=x2; x4=1/2[x3,x5]; +bot y3 = bot y4 = 0; +bot y5 = y4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % top bar +draw z3--z4..z5; % bottom bar +draw z2--z3; % diagonal +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "z" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file +% \begin{macrocode} +%</min> +% \end{macrocode} +% +% +% \subsection{The code for capital letters} +% +% \thisfont{} `capitals' were drawn with the same pen as for the minuscules, +% and the letters were merely larger versions of the minuscules. +% +% \begin{macrocode} +%<*maj> +% HMINU.MF Program file for Humanist Miniscule `capitals' +% + +% \end{macrocode} +% +% +% \begin{routine}{A} +% The letter `A'. +% \begin{macrocode} +cmchar "HMIN letter A"; +beginchar("A", 2sb#+caprat*hstretch*(20/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup quill; +x100 = 0; +n2 := rt x100 - lft x100; +n1 := w - 2pcshiftx - n2; % effective letter width +%% legs +x1 = pcshiftx + n1/2; top y1=h; +lft x2 = pcshiftx; bot y2 = 0; +rt x3 = pcshiftx + n1; y3=y2; +rt x4 = w-pcshiftx; y4=y3; +%% bar +z12=10/16[z1,z2]; z83=10/16[z1,z3]; +z13 = (x83 - n2,y83); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z1--z3; draw z12--z13; %% legs and bar +draw z3--z4; draw z2--(x2+n2,y2); draw (x1-n2,y1)--z1; %% serifs +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +endchar; % end "A" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{B} +% The letter `B'. +% \begin{macrocode} +cmchar "HMIN letter B"; +beginchar("B", 2sb#+caprat*hstretch*(14/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% stem +lft x1 = pcshiftx + n1; top y1 = h; +x2 = x1; bot y2 = 0; +z12 = 1/2[z1,z2]; +%% bottom bowl +lft x21 = pcshiftx; bot y21 = 0; +z22=z2; +lft x27 = rt x12; y27 = y12; +rt x25 = w-pcshiftx; y25 = 1/2[y22,y27]; +pth1 := z21--z22{right}..z25{up}..{left}z27; +%% top bowl +z32 = z27; z37 = z1; +x38 = x21; y38 = y37; +rt x35 = x25; y35 = 1/2[y32,y37]; +pth2 := z38--z37{right}..z35{down}..{left}z27; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw pth1; draw pth2; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "B" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{C} +% The letter `C'. +% \begin{macrocode} +cmchar "HMIN letter C"; +beginchar("C", 2sb#+caprat*hstretch*(16/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z24..z1{left}..z2{down}..z3{right}..z4{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "C" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{D} +% The letter `D'. +% \begin{macrocode} +cmchar "HMIN letter D"; +beginchar("D", 2sb#+caprat*hstretch*(18/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +x100 = 0; n1 := rt x100 - lft x100; +%% stem +lft x1 = pcshiftx+n1; top y1=h; +x2 = x1; bot y2 = 0; +%% bowl +lft x3 = pcshiftx; y3=y1; +x7 = x3; y7=y2; +rt x5 = w-pcshiftx; y5 = 1/2[y3,y7]; +pth1 := z3--z1{right}..{down}z5..{left}z2--z7; +if ductus: + pickup stylus; +fi +draw z1--z2; %% stem +draw pth1; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "D" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{E} +% The letter `E'. +% \begin{macrocode} +cmchar "HMIN letter E"; +beginchar("E", sb#+caprat*hstretch*(14/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 = rt x100 - lft x100; +%% stem +lft x1 = pcshiftx+n1; top y1 = h; +x2 = x1; bot y2=0; +%% bars +lft x3 = pcshiftx; y3 = y1; rt x4 = w-pcshiftx; y4=y3; +x5=x1; y5 = 1/2[y1,y2]; x6 = x4; y6 = y5; +x7 = x3; y7 = y2; x8 = x4; y8=y7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw z3--z4; draw z5--z6; draw z7--z8; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,17,70,100); +endchar; % end "E" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{F} +% The letter `F'. +% \begin{macrocode} +cmchar "HMIN letter F"; +beginchar("F", 2sb#+caprat*hstretch*(14/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% stem +lft x1=lft x2=pcshiftx+n1; top y1=h; bot y2=0; +%% bars +lft x3 = pcshiftx; y3 = y1; rt x4 = w-pcshiftx; y4 = y3; +x5=x1; y5 = 1/2[y1,y2]; x6 = x4; y6 = y5; +%% serif +x211 = x2 - n1; y211 = y2; +x212 = x2 + n1; y212 = y2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw z3--z4; draw z5--z6; +draw z211--z212; +ductus:=false; +penlabels(1,2,3,4,5,6,7,14,15,16,100); +endchar; % end "F" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{G} +% The letter `G'. +% \begin{macrocode} +cmchar "HMIN letter G"; +beginchar("G", 2sb#+caprat*hstretch*(19/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +path pth[]; +pair vec[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% bar +rt x52 = w - pcshiftx; y52 = 1/2h; +x51 = x52 - 2n1; y51 = y52; +z512 = 1/2[z51,z52]; +%% bowl +lft x2 = pcshiftx; y2 = 1/2h; +x4 = x512; y4 = 1/4h; +x3 = x1 = 1/2[x2,x4]; bot y3 = 0; top y1 = h; +x24 = x512; y24 = 3/4h; +pth1 := z24..z1{left}..z2{down}..z3{right}..z4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +draw z4--z512; draw z51--z52; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,12,13,31,32,33,34,35,36,100); +endchar; % end "G" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{H} +% The letter `H'. +% \begin{macrocode} +cmchar "HMIN letter H"; +beginchar("H", 2sb#+caprat*hstretch*(18/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +x100 = 0; +n1 := rt x100 - lft x100; +%% stems +lft x1=lft x2=pcshiftx+n1; +top y1=h; bot y2=0; +rt x3 = w - pcshiftx - n1; x4 = x3; y3 = y1; y4 = y2; +%% bar +z12 = 1/2[z1,z2]; z34 = 1/2[z3,z4]; +%% serifs +rt x111 = lft x1; y111 = y1; lft x112 = rt x1; y112 = y111; % TL +x211 = x111; x212 = x112; y211 = y212 = y2; % BL +rt x311 = lft x3; y311 = y3; lft x312 = rt x3; y312 = y311; % TR +x411 = x311; x412 = x4+n1; y411 = y412 = y4; % BR +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; draw z12--z34; +draw (x1-n1,y1)--(x1+n1,y1); draw (x2-n1,y2)--(x2+n1,y2); +draw (x3-n1,y3)--(x3+n1,y3); draw (x4-n1,y4)--(x4+n1,y4); +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "H" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{I} +% The letter `I'. +% \begin{macrocode} +cmchar "HMIN letter I"; +beginchar("I", 2sb#+caprat*hstretch*(thick#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +x1 = x2 = 1/2w; +top y1=h; bot y2=0; +%% serifs +rt x111 = lft x1; lft x112 = rt x1; y111 = y112 = y1; +x211 = x111; x212 = x112; y211 = y212 = y2; +%%ductus:=true; +draw z1--z2; +draw z111--z112; draw z211--z212; +ductus:=false; +penlabels(1,2,100); +endchar; % end "I" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{J} +% The letter `J'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "HMIN letter J"; +beginchar("J", 2sb#+caprat*hstretch*(10/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% stem serif +rt x112 = w - pcshiftx; top y112 = h; +x111 = x112 - n1; y111 = y112; +%% stem +z1 = 1/2[z111,z112]; +x2 = x1; y2 = 1/4h; +%% hook +lft x4 = pcshiftx; y4 = 1/2y2; +x3 = 1/2[x2,x4]; bot y3 = 0; +pth1 := z2{down}..z3{left}..z4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw z111--z112; +draw pth1; +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "J" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{K} +% The letter `K'. +% \begin{macrocode} +cmchar "HMIN letter K"; +beginchar("K", 2sb#+caprat*hstretch*(17/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% stem +lft x1 = pcshiftx+n1; top y1 = h; +x2 = x1; bot y2 = 0; +z12 = 1/2[z1,z2]; +%% top arm +x3 = rt x12; y3 = y12; +rt x5 = w - pcshiftx - n1; y5 = y1; +%%pth1 := z3{pdir}..{up}z5; +pth1 := z3--z5; +%% lower arm +z7 = z3; +rt x9 = w-pcshiftx; bot y9 = 0; +pth2 := z7{-ppdir}..{right}z9; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw pth1; draw pth2; +draw (x1-n1,y1)--(x1+n1,y1); +draw (x2-n1,y2)--(x2+n1,y2); +draw (x5,y5)--(x5+n1,y5); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,100); +endchar; % end "K" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{L} +% The letter `L'. +% \begin{macrocode} +cmchar "HMIN letter L"; +beginchar("L", 2sb#+caprat*hstretch*(12/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +x100 = 0; n1 := rt x100 - lft x100; +lft x1=pcshiftx+n1; top y1=h; +x2=x1; bot y2 =0; +lft x3 = pcshiftx; rt x4 = w-pcshiftx; y3 = y4 = y2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; +draw (x1-n1,y1)--(x1+n1,y1); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "L" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{M} +% The letter `M'. +% \begin{macrocode} +cmchar "HMIN letter M"; +beginchar("M", 2sb#+caprat*hstretch*(25/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% left stem +lft x1=pcshiftx+n1; top y1=h; +lft x2=pcshiftx; bot y2=0; +%% right stem +rt x4 = w - pcshiftx - n1; y4 = y2; +x3 = x4 - n1; y3 = y1; +%% the V +z24 = 1/2[z2,z4]; +pth1 := z1{-ppdir}..{down}z24; +pth2 := z3{down}..{down}z24; +%% serifs +x111 = x1 - n1; y111 = y1; % TL +x212 = x2+n1; y212 = y2; % BL +x311 = x3-n1; y311 = y3; % TR +x412 = x4+n1; y412 = y4; % BR +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; draw pth1; draw pth2; +draw z111--z1; draw z2--z212; +draw z311--z3; draw z4--z412; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100); +endchar; % end "M" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{N} +% The letter `N'. +% \begin{macrocode} +cmchar "HMIN letter N"; +beginchar("N", 2sb#+caprat*hstretch*(22/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% stems +lft x1=pcshiftx+n1; top y1=h; x2=x1; bot y2=0; +rt x3 = w - pcshiftx - n1; x4 = x3; y3 = y1; y4 = y2; +pth1 := z1{-ppdir}..{-ppdir}z4; +%% serifs +x111 = x1 - n1; x112 = x1 + n1; y111 = y112 = y1; % TL +x211 = x111; x212 = x112; y211 = y212 = y2; % BL +x311 = x3 - n1; x312 = x3 + n1; y311 = y312 = y3; % TR +x411 = x311; x412 = x312; y411 = y412 = y4; % BR +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; draw pth1; +draw z111--z112; draw z211--z212; +draw z311--z312; draw z411--z412; +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "N" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{O} +% The letter `O'. +% \begin{macrocode} +cmchar "HMIN letter O"; +beginchar("O", 2sb#+caprat*hstretch*(18/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "O" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{P} +% The letter `P'. +% \begin{macrocode} +cmchar "HMIN letter P"; +beginchar("P", 2sb#+caprat*hstretch*(14/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1:= rt x100 - lft x100; +%% stem +lft x1=lft x2=pcshiftx+n1; +top y1=h; bot y2=0; +z12 = 1/2[z1,z2]; +%% bowl +z3 = (pcshiftx,y1); +x7 = x12; top y7 = y12; +rt x5 = w-pcshiftx; y5 = 1/2[y3,y7]; +pth1 := z3--z1{right}..z5{down}..{left}z7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw pth1; +draw (x2-n1,y2)--(x2+n1,y2); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "P" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Q} +% The letter `Q'. +% \begin{macrocode} +cmchar "HMIN letter Q"; +beginchar("Q", 2sb#+caprat*hstretch*(18/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% bowl +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +pth1 := z1..z4..z3..z2..cycle; +%% tail +n1 := rt x1 - lft x1; +pth2 := z1..z2..z3..z4; +z5 = directionpoint pdir of pth1; +x7 = x3 + 2n1; top y7 = -n1; +pth3 := z5{-ppdir}..{pdir}z7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +draw pth3; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "Q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{R} +% The letter `R'. +% \begin{macrocode} +cmchar "HMIN letter R"; +beginchar("R", 2sb#+caprat*hstretch*(18/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1:= rt x100 - lft x100; +n2 := 14/18; %% P/R width ratio +%% stem +lft x1=lft x2=pcshiftx+n1; +top y1=h; bot y2=0; +z12 = 1/2[z1,z2]; +%% bowl +z3 = (pcshiftx,y1); +x7 = x12; top y7 = y12; +rt x5 = w*n2 - pcshiftx; y5 = 1/2[y3,y7]; +pth1 := z3--z1{right}..z5{down}..{left}z7; +%% leg +z21 = z7; +x23 = w-pcshiftx; bot y23 = 0; +pth2 := z21{-ppdir}..{right}z23; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw pth1; draw pth2; +draw (x2-n1,y2)--(x2+n1,y2); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "R" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{S} +% The letter `S'. +% \begin{macrocode} +cmchar "HMIN letter S"; +beginchar("S", 2sb#+caprat*hstretch*(15/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +x1 = x3 = x5 = 1/2w; +top y1 = h; bot y5 = 0; y3 = 1/2[y1,y5]; +lft x2 = pcshiftx; rt x4 = w-pcshiftx; +y2 = 1/2[y1,y3]; y4 = 1/2[y3,y5]; +rt x101 = w-pcshiftx; top y101 = y1; +lft x102 = pcshiftx; bot y102 = y5; +pth1 := z101..z1..z2..z3..z4..z5..z102; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100); +endchar; % end "S" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{T} +% The letter `T'. +% \begin{macrocode} +cmchar "HMIN letter T"; +beginchar("T", 2sb#+caprat*hstretch*(16/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% bar +lft x1 = pcshiftx; rt x2=w-pcshiftx; +top y1 = top y2 = h; +%% stem +z3 = 1/2[z1,z2]; +x4 = x3; bot y4 = 0; +%% foot +n1 := rt x4 - lft x4; +rt x5 = lft x4; x6 = x4 + n1; y5 = y6 = y4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % bar +draw z3--z4; % stem +draw z5--z6; % foot +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "T" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{U} +% The letter `U'. +% \begin{macrocode} +cmchar "HMIN letter U"; +beginchar("U", 2sb#+caprat*hstretch*(20/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% left stem +lft x1 = pcshiftx + n1; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-n1; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +pth1 := z1--z13{down}..z14{right}..{pdir}z33; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z3--z4; draw pth1; +draw (x1-n1,y1)--(x1+n1,y1); +draw (x3-n1,y3)--(x3+n1,y3); +draw (x4,y4)--(x4+n1,y4); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "U" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{V} +% The letter `V'. +% \begin{macrocode} +cmchar "HMIN letter V"; +beginchar("V", 2sb#+caprat*hstretch*(20/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% stem tops +lft x1 = pcshiftx + 2n1; top y1 = h; +rt x3 = w - pcshiftx - 2n1; top y3 = h; +%% bottom +x13 = 1/2[x1,x3]; bot y13 = 0; +pth1 := z1{-pdir}..{-ppdir}z13; +pth2 := z13{pdir}..z3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw pth2; +draw (x1-2n1,y1)--(x1,y1); +draw (x3,y3)--(x3+2n1,y3); +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "V" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{W} +% The letter `W'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "HMIN letter W"; +beginchar("W", 2sb#+caprat*hstretch*(26/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% stem tops +lft x1 = pcshiftx + 2n1; top y1 = h; +rt x5 = w - pcshiftx - 2n1; top y5 = h; +z93 = 1/2[z1,z5]; +x3 = rt x93; y3 = y93; +%% V bottoms +x13 = 1/2[x1,x3]; bot y13 = 0; +x35 = 1/2[x3,x5]; bot y35 = 0; +pth1 := z1{-pdir}..{-ppdir}z13; +%%pth2 := z13{pdir}..z3; +pth3 := z3{-pdir}..{-ppdir}z35; +z335 = directionpoint down of pth3; +%%pth2 := z13..{up}z3; +%%pth3 := z3{down}..z35; +pth2 := z13..{up}z335; +pth4 := z35{pdir}..z5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw (x1-2n1,y1)--(x1,y1); +draw pth2; +draw (x3-n1,y3)--(x3,y3); +draw pth3; +draw pth4; draw (x5,y5)--(x5+2n1,y5); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "W" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{X} +% The letter `X'. +% \begin{macrocode} +cmchar "HMIN letter X"; +beginchar("X", 2sb#+caprat*hstretch*(18/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +path pth[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% diag top left to bottom right +lft x1=pcshiftx+n1; top y1 = h; +rt x2 = w - pcshiftx - n1; bot y2 = 0; +%% diag top right to bottom left +rt x3 = w - pcshiftx - n1; top y3 = h; +lft x4 = pcshiftx; bot y4 = 0; +pth1 := z4{pdir}..z3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw pth1; +draw (x1-n1,y1)--(x1+n1,y1); +draw (x2-n1,y2)--(x2+n1,y2); +draw (x3-n1,y3)--(x3+n1,y3); +draw (x4,y4)--(x4+n1,y4); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,150,60,160,100); +endchar; % end "X" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Y} +% The letter `Y'. +% \begin{macrocode} +cmchar "HMIN letter Y"; +beginchar("Y", 2sb#+caprat*hstretch*(15/18x_height#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% left stem top +lft x1 = pcshiftx + n1; top y1 = h; +%% upright +x5 = 1/2w; y5 = 1/2y1; +x6 = x5; bot y6 = 0; +%% right stem +rt x3=w-pcshiftx-n1; top y3 = h; +pth1 := z5{ppdir}..{pdir}z1; % left +pth2 := z5{pdir}..{left}z3; % right +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5--z6; draw (x6-n1,y6)--(x6+n1,y6); % stem +draw pth1; draw (x1-n1,y1)--(x1,y1); +draw pth2; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "Y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{Z} +% The letter `Z'. +% \begin{macrocode} +cmchar "HMIN letter Z"; +beginchar("Z", 2sb#+caprat*hstretch*(14/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +%% top bar ends +lft x1 = pcshiftx; rt x2 = w -pcshiftx; top y1 = top y2 = h; +%% bottom bar ends +lft x3 = pcshiftx; rt x4 = w -pcshiftx; bot y3 = bot y4 = 0; +%% middle bar +lft x5 = x1; rt x6 = x2; y5 = y6 = 1/2h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; draw z5--z6; +draw z2--z3; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "Z" + +% \end{macrocode} +% \end{routine} +% +% +% +% The end of this file +% \begin{macrocode} +%</maj> +% \end{macrocode} +% +% +% +% \subsection{The punctuation file} +% +% The main punctuation marks are defined in this file. +% +% \begin{macrocode} +%<*punct> +% IMINPUNCT.MF This file contains punctuation marks + +% \end{macrocode} +% +% +% \begin{routine}{!} +% The `!' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Exclamation mark"; +beginchar("!", 2sb#+hstretch*(thick#+trijut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +x1=w/2; top y1 = h; +z3=(x1, 1/2dot_size); +z2=(x1, y3+3/2dot_size); +draw z1--z2; +draw_pdot(3,dot_size); +penlabels(1,2,3); + +endchar; % end of "!" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{?} +% The `?' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Question mark"; +beginchar("?", 2sb#+hstretch*(11/11x_height#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-2pcshiftx; % actual character width +n2 := 1/3h; % height of top bowl +n3 := n2; % height of bottom bowl +z5=(1/2w,1/2dot_size); +x4 = x5; y4=y5+3/2dot_size; +lft x1 = pcshiftx; y1 = 3/4h; +x2 = 1/2w; top y2 = h; +rt x3 = w-pcshiftx; y3 = 2/3h; + +%%ductus:= true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{down}..z4{down}; +draw_pdot(5, dot_size); +penlabels(1,2,3,4,5); +endchar; % end of "?" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{,} +% The `,' character. +% \begin{macrocode} + +cmchar "Comma"; +beginchar(",",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=1/2dot_size; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "," + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{.} +% The `.' character. +% \begin{macrocode} + +cmchar "Period"; +beginchar(".",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +z1=(w/2, 1/2dot_size); +draw_pdot(1,dot_size); +penlabels(1); +endchar; % end of "." + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{:} +% The `:' character. +% \begin{macrocode} + +cmchar "Colon"; +beginchar(":",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +x1=x2=w/2; y1=2/3h; y2=1/2dot_size; +draw_pdot(1,dot_size); +draw_pdot(2,dot_size); +penlabels(1,2); +endchar; % end ":" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{;} +% The `;' character. +% \begin{macrocode} + +cmchar "Semicolon"; +beginchar(";",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=2/3h; y2=1/2dot_size; +draw_pdot(1,dot_size); +draw_pcomma(2,dot_size,comma_width); +penlabels(1,2); +endchar; % end of ";" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{'} +% The `'' character. +% \begin{macrocode} + +cmchar "Apostrophe"; +beginchar("'",2sb#+hstretch*(comma_width#+dot_size#),7/8asc_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "'" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{`} +% The ``' character. +% \begin{macrocode} + +cmchar "Reverse apostrophe"; +beginchar("`",2sb#+hstretch*(comma_width#+dot_size#),7/8asc_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=h; +draw_plq(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "`" + +% \end{macrocode} +% \end{routine} +% +% The end of this file. +% \begin{macrocode} +%</punct> +% \end{macrocode} +% +% +% \subsection{The ligatures and dashes file} +% +% The ligatured letters, punctuation marks and dashes are defined in this file. +% \begin{macrocode} +%<*lig> +% HMINLIG.MF Uncial ligatured letters, punctation and dashes + +% \end{macrocode} +% First the ligtables. +% \begin{macrocode} + +ligtable "`": "`"=:oct"134"; +ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#; + +ligtable "-": "-"=:oct"173"; +ligtable oct"173": "-"=:oct"174"; + +ligtable "c": "t"=:oct"014"; +ligtable "s": "t"=:oct"015"; + +% \end{macrocode} +% +% \begin{routine}{ae} +% The `\ae' conjoined characters. +% \begin{macrocode} +cmchar "HMIN ae conjunction"; +beginchar(oct "032", + 2sb#+hstretch*(18/11x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair pr[]; +numeric rta, lfte; % right and left limits of a & e respectively +pickup quill; + +z999=(0,0); n999 = rt x999 - lft x999; % width of vertical stroke +rta := 1/2w + n999 + pcshiftx; + +%%% The "a" +n1 := rta - 2pcshiftx -jut; % effective letter width +%% "stem" +rt x1 = rta - pcshiftx-jut; top y1=h; +x2 = x1; bot y2=0; +z16 = 1/6[z2,z1]; +rt x6 = x16; y6=y16; +lft x4 = pcshiftx; y4 = 1/2h; +%% stem path +pth1 := z1{down}..z2; +pr1 := direction 1 of pth1; +z20 = z2 shifted -10pr1; + +z11 = point 3/13 of pth1; z15 = point 11/13 of pth1; +lft x13 = pcshiftx; y13=1/4h; + +%%% The "e" + +lfte = lft x11 - pcshiftx; + +n51 := w-pcshiftx - lfte; % actual letter width +n52 := 7/8n51; % width of bowl +x51 = lfte + pcshiftx + 5/8n52; top y51=h; +lft x52 = lfte + pcshiftx; y52 = 1/2h; +x53 = lfte + pcshiftx + 1/2n52; bot y53 = 0; +rt x54 = lfte + pcshiftx + n52; y54 = 1/4h; +z98=(lfte,5/8h); z99=(2w,y98); +pth51 := z98--z99; +pth52 := z51{left}..z52{down}..z53{right}; +z57 = pth51 intersectionpoint pth52; +rt x67 = w; y67=y57; +rt x58 =lfte + pcshiftx+n52; y58=y52; +pth53 := z51{right}..z58{down}..z53{left}; +z59 = pth51 intersectionpoint pth53; + +%%ductus:=true; +if ductus: + pickup stylus; +else: + % draw the a stem + draw pth1; + draw_roundserif(1,2,srad); +%% draw_roundserif(2,20,srad); + % draw the a bowl + draw z15{-pdir}..z13{up}..z57{right}; + % draw the e + draw z59{up}..z51{left}..z52{down}..z53{right}..z54{pdir}; + draw z57--z67; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +penlabels(51,52,53,54,55,56,57,58,59,67,70,98,99,100); +endchar; % end "ae" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{AE} +% The `\AE' conjoined characters. +% \begin{macrocode} +cmchar "HMIN AE conjunction"; +beginchar(oct "035", +%% sb#+caprat*hstretch*(14/18x_height#), + sb#+caprat*hstretch*(22/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric pcshifte; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 = rt x100 - lft x100; + +%% the E +%% stem +pcshifte = 7/16w; +lft x1 = pcshifte+n1; top y1 = h; +x2 = x1; bot y2=0; +%% bars +lft x3 = pcshifte; y3 = y1; rt x4 = w-pcshiftx; y4=y3; +x5=x1; y5 = 1/2[y1,y2]; x6 = x4; y6 = y5; +x7 = x3; y7 = y2; x8 = x4; y8=y7; + +%% bottom left A leg +lft x52 = pcshiftx; bot y52=0; +z62 = whatever[z52,z1]; y62=y5; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw z3--z4; draw z5--z6; draw z7--z8; +draw z52--z1; draw z62--z5; % the A +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,17,70,100); +endchar; % end "AE" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{ct} +% The `ct' ligature. +% \begin{macrocode} + +cmchar "The ct ligature"; +beginchar(oct"014", 2sb#+hstretch*(20/11x_height#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair vc[]; +pickup quill; + +%%%%%%%%%%% C + +n1:=1/2(w-2pcshiftx); % actual letter width +n2 := h/ascratio; % x-height +x1=pcshiftx + 1/2n1; top y1 = n2; +lft x2 = pcshiftx; y2 = 1/2n2; +x3 = x1; bot y3 = 0; +rt x4 = n1; y4 = 1/4n2; +x6 = x4; +%%y6 = 3/4n2; +top y6 = y1; +pth1 := z6..z1{left}..z2{down}..z3{right}..z4{pdir}; + +%%%%%%%%%%%%% T + +%% bar +top y33=n2; n3 := n2 - top y33; +%%lft x31 = n1+pcshiftx; +lft x31 = n1; +rt x32=w-pcshiftx; +%%top y31 = y33-n3; bot y32=y33+n3; +%%top y31 = y33-n3; y32=y33; +y31 = y32 = y33; +x33=1/2[x31,x32]; +pth2 := z31--z32; % T bar + +n4 := top y33 - y33; +x34 = x33; bot y34 = 2n4; +rt x36 = w - pcshiftx; bot y36 = n4; +x35 = 1/2[x34,x36]; bot y35 = 0; +pth3 := z33--z34..z35..z36; % T stem + + +%%%%%%%%%%%%%%%%% Ligature + +z51=z6; +z55=z33; +x53 = 1/2[x51,x55]; +top y53 = h; +vc51 := direction 0 of pth1; +vc55 := direction 0 of pth3; +pth4 := z51{vc51}..z53{right}..z55{vc55}; % loop +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; % C +draw pth2; % T bar +draw pth3; % T bowl +draw pth4; % ligature loop +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,31,32,33,34,35,36,100); +endchar; % end of "ct" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{st} +% The `st' ligature. +% \begin{macrocode} + +cmchar "The st ligature"; +beginchar(oct"015", 2sb#+hstretch*(15/11x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair vc[]; +pickup quill; +%%%%%%%%%%% S + +n1:=3/7(w-2pcshiftx-jut); % actual letter width +n2 := h/ascratio; % x-height + +%% stem +lft x1=lft x2=pcshiftx+jut; top y1=n2; bot y2=0; +%% flick +x4=x2; y4 = 1/2n1; +%%%%%%%%%%%%% T + + +%% bar +top y33=n2; n3 := n2 - top y33; +%%lft x31 = n1+pcshiftx; +lft x31 = n1; +rt x32=w-pcshiftx; +%%top y31 = y33-n3; bot y32=y33+n3; +%%top y31 = y33-n3; y32=y33; +y31 = y32 = y33; +x33=1/2[x31,x32]; +pth2 := z31--z32; % T bar + +n4 := top y33 - y33; +x34 = x33; bot y34 = 2n4; +rt x36 = w - pcshiftx; bot y36 = n4; +x35 = 1/2[x34,x36]; bot y35 = 0; +pth3 := z33--z34..z35..z36; % T stem + + + +%%%%%%%%%%%%%%%%% Ligature + +z51=z4; +z55=z33; +x53 = 5/8[x51,x55]; +top y53 = h; +vc51 := up; +vc55 := direction 0 of pth3; +pth4 := z51{vc51}...z53{right}..z55{vc55}; % loop +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % S stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw pth2; % T bar +draw pth3; % T bowl +draw pth4; % ligature loop +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,31,32,33,34,35,36,100); +endchar; % end of "st" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{''} +% The `''' ligature. +% \begin{macrocode} + +cmchar "Closing quotes"; +beginchar(oct"042",2sb#+hstretch*(comma_width#+3dot_size#),7/8asc_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h; +x2=x1-(2hstretch*dot_size); +draw_pcomma(1,dot_size,comma_width); % right +draw_pcomma(2,dot_size,comma_width); % left +penlabels(1,2); +endchar; % end of "''" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{``} +% The ```' ligature. +% \begin{macrocode} + +cmchar "Opening quotes"; +beginchar(oct"134",2sb#+hstretch*(comma_width#+3dot_size#),7/8asc_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h; +x2=x1+(2hstretch*dot_size); +draw_plq(1,dot_size,comma_width); % left +draw_plq(2,dot_size,comma_width); % right +penlabels(1,2); +endchar; % end of "``" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{-} +% The `-' (hyphen) character. +% \begin{macrocode} + +cmchar "Hyphen"; +beginchar("-",sb#+hstretch*(0.8x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +pickup threequarterquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +z31 = z21 shifted (-jut*pdir); +draw z21--z22; +%draw_flatserif(21,22,srad); +draw z31--z21; +draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "-" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{--} +% The `--' (en-dash) ligature. +% \begin{macrocode} + +cmchar "En dash"; +beginchar(oct"173",sb#+hstretch*(x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +pickup threequarterquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +z31 = z21 shifted (-jut*pdir); +draw z21--z22; +%%draw_roundserif(21,22,srad); +draw z31--z21; +draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "--" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{---} +% The `---' (em dash) ligature. The em dash is twice the width of the en dash. +% \begin{macrocode} + +cmchar "Em dash"; +beginchar(oct"174",sb#+hstretch*(2x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +pickup threequarterquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +z31 = z21 shifted (-jut*pdir); +draw z21--z22; +%%draw_roundserif(21,22,srad); +draw z31--z21; +draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "---" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{&} +% The ampersand (which is really an `et' ligature). +% \begin{macrocode} + +cmchar "HMIN ampersand"; +beginchar("&", 2sb#+hstretch*(15/11x_height#+2jut#), asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx:=sb; +pickup quill; +%% alpha looking part +n1 := w-2pcshiftx-jut; % actual letter width +n2 := h/ascratio; % x-height +n3 := 16/16n2; % height of alpha +rt x1 = w-pcshiftx; bot y1=0; + +x3 = pcshiftx + 12/16n1; y3 = 1/2n2; + +lft x5 = pcshiftx + thick; y5 = 1/2[n2,h]; +rt x7 = lft x5 + 1/2n1; y7 = y5; +x6 = 1/2[x5,x7]; top y6 = h; + +lft x9 = pcshiftx; y9 = 1/2n2; +rt x10 = pcshiftx + 1/2n1; bot y10 = 0; + +rt x12 = w - pcshiftx; y12 = y7; + +x4 = x6; y4 = 1/2[y9,y5]; + +pth1 = z1..z4..z5{up}..z6{right}..z7{down}..z9{down}..z10{right}..{up}z12; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,16,17,18,19,21,22,23,24,25); +endchar; % end of "&" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</lig> +% \end{macrocode} +% +% \subsection{The digits file} +% +% These are arabic digits in the style of the book-hand. They are a +% modern invention. +% +% \begin{macrocode} +%<*dig> +% HMINDIG.MF Program file for Humanist Miniscule digits +% + +% \end{macrocode} +% +% +% +% \begin{routine}{1} +% The digit `1'. +% \begin{macrocode} +cmchar "Uncial digit 1"; +beginchar("1", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=x2=w/2; +y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,100); +endchar; % end "1" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{2} +% The digit `2'. +% \begin{macrocode} +cmchar "Uncial digit 2"; +beginchar("2", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=pcshiftx+o; top y1=h-2thin; +x2=1/2w; top y2= h+o; +rt x3=w-pcshiftx-o; y3=3/4h; +% foot +lft x5=pcshiftx; bot y5=0; +rt x6=w-pcshiftx; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(5,6,thin); % foot +draw z1..z2{right}..z3{down}..{-pdir}z5wl; % curve +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "2" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{3} +% The digit `3'. +% \begin{macrocode} +cmchar "Uncial digit 3"; +beginchar("3", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% x values +lft x3=pcshiftx; x10=x3; +rt x5=w-pcshiftx; x8=x5-3thin; +x4=0.5[x3,x5]; +x9=0.5[x10,x8]; +%%lft x6=pcshiftx+3thin; x7=x6; +x6=1/2[x3,x9]; x7=x6; +% y values +bot y3=thin; top y10=h-2thin; +y6=0.5[y3,y10]; y7=y6; +bot y4=-thin; top y9=h+thin; +y5=0.5[y3,y6]; +y8=11/12[y7,y10]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw z3..z4{right}..z5{up}...{-pdir}z6; % bottom bowl +%%draw z7{pdir}..z8{up}..z9{left}..z10; % top bowl +draw z3..z4{right}..z5{up}...{left}z6; % bottom bowl +draw z7{right}..z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "3" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{4} +% The digit `4'. +% \begin{macrocode} +cmchar "Uncial digit 4"; +beginchar("4", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the stem +x1=x2=w-pcshiftx-jut; +y1=h; bot y2=0; +% the crossbar +lft x3=pcshiftx; y3=0.33h; +rt x4=w-pcshiftx; y4=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % main stem +draw_wave(3,4,thin); % crossbar +draw z3wl--z1; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "4" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{5} +% The digit `5'. +% \begin{macrocode} +cmchar "Uncial digit 5"; +beginchar("5", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% for the top +rt x1=w-pcshiftx; top y1=h; +lft x2=pcshiftx; y2=y1; +% the S curve +x3=x2; y3=0.5h+thin; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +rt x5=w-pcshiftx; y5=0.3h; +x6=w/2; bot y6=0; +lft x7=pcshiftx; bot y7=2thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(2,1,thin); % top squiggle +draw z3{pdir}..z5{down}..z6{left}..z7; % curve +draw z2wl--z3; % vertical +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "5" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{6} +% The digit `6'. +% \begin{macrocode} +cmchar "Uncial digit 6"; +beginchar("6", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx; top y1=h-2thin; +x2=1/2w; top y2= h; +lft x3=pcshiftx; y3=1/2h; +x4=x2; bot y4=0; +rt x5=w-pcshiftx; y5=1/4h; +lft x6=rt x3; bot y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{left}..z3{down}..z4{right}..z5{up}..{-pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "6" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{7} +% The digit `7'. +% \begin{macrocode} +cmchar "Uncial digit 7"; +beginchar("7", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% top bar +lft x1=pcshiftx; +rt x2=w-pcshiftx; +top y1=top y2=h; +% bowed leg +x4=w/2; bot y4=0; +x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(1,2,thin); % top bar +draw z1wr..z3..z4; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "7" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{8} +% The digit `8'. +% \begin{macrocode} +cmchar "Uncial digit 8"; +beginchar("8", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=1; +pickup quill; +lft x1=alpha*pcshiftx+o; rt x3=w-alpha*pcshiftx-o; y1=y3=3/4h; +x2=x4=w/2; top y2=h+o; bot y4=-o; +x5=x2; y5=h/2+2o; +lft x11=pcshiftx; rt x13=w-pcshiftx; y11=y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z5..z11..z4..z13..z5..cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,100); +endchar; % end "8" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{9} +% The digit `9'. +% \begin{macrocode} +cmchar "Uncial digit 9"; +beginchar("9", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; bot y1=2thin; +x2=1/2w; bot y2= 0; +rt x3=w-pcshiftx; y3=1/2h; +x4=x2; top y4=h; +lft x5=pcshiftx; y5=3/4h; +rt x6=lft x3; top y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{up}..z4{left}..z5{down}..{pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "9" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{0} +% The digit `0'. +% \begin{macrocode} +cmchar "Uncial digit 0"; +beginchar("0", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "0" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</dig> +% \end{macrocode} +% +% +% \section{The font definition files} \label{sec:fd} +% +% The font comes in normal and bold weights only. +% +% \begin{macrocode} +%<*fdot1> +\DeclareFontFamily{OT1}{hmin}{} + \DeclareFontShape{OT1}{hmin}{m}{n}{ <-8.5> hmin7 <8.5-15> hmin10 <15-> hmin17 }{} + \DeclareFontShape{OT1}{hmin}{m}{sl}{ <-> sub * hmin/m/n }{} + \DeclareFontShape{OT1}{hmin}{m}{it}{ <-> sub * hmin/m/n }{} + \DeclareFontShape{OT1}{hmin}{m}{sc}{ <-> sub * hmin/m/n }{} + \DeclareFontShape{OT1}{hmin}{m}{u}{ <-> sub * hmin/m/n }{} + \DeclareFontShape{OT1}{hmin}{bx}{n}{ <-8.5> hminb7 <8.5-15> hminb10 <15-> hminb17 }{} + \DeclareFontShape{OT1}{hmin}{bx}{it}{ <-> sub * hmin/bx/n }{} + \DeclareFontShape{OT1}{hmin}{bx}{sl}{ <-> sub * hmin/bx/n }{} + \DeclareFontShape{OT1}{hmin}{b}{n}{ <-> sub * hmin/bx/n }{} +%</fdot1> +% \end{macrocode} +% +% +% \begin{macrocode} +%<*fdt1> +\DeclareFontFamily{T1}{hmin}{} + \DeclareFontShape{T1}{hmin}{m}{n}{ <-8.5> hmin7 <8.5-15> hmin10 <15-> hmin17 }{} + \DeclareFontShape{T1}{hmin}{m}{sl}{ <-> sub * hmin/m/n }{} + \DeclareFontShape{T1}{hmin}{m}{it}{ <-> sub * hmin/m/n }{} + \DeclareFontShape{T1}{hmin}{m}{sc}{ <-> sub * hmin/m/n }{} + \DeclareFontShape{T1}{hmin}{m}{u}{ <-> sub * hmin/m/n }{} + \DeclareFontShape{T1}{hmin}{bx}{n}{ <-8.5> hminb7 <8.5-15> hminb10 <15-> hminb17 }{} + \DeclareFontShape{T1}{hmin}{bx}{it}{ <-> sub * hmin/bx/n }{} + \DeclareFontShape{T1}{hmin}{bx}{sl}{ <-> sub * hmin/bx/n }{} + \DeclareFontShape{T1}{hmin}{b}{n}{ <-> sub * hmin/bx/n }{} +%</fdt1> +% \end{macrocode} +% +% \section{The package code} \label{sec:code} +% +% \subsection{The \Lpack{humanist} package} +% +% The \Lpack{humanist} package is for typesetting short pieces of text +% in the \thisfont{} fonts. +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. +% \begin{macrocode} +%<*usc> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{humanist}[2002/12/30 v1.0 package for Humanist fonts] +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\hminfamily} +% Selects the \thisfont{} font family in the OT1 or T1 encoding. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \newcommand{\hminfamily}{\usefont{T1}{hmin}{m}{n}} +\else + \newcommand{\hminfamily}{\usefont{OT1}{hmin}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\texthmin} +% Text command for the \thisfont{} font family. +% \begin{macrocode} +\DeclareTextFontCommand{\texthmin}{\hminfamily} +% \end{macrocode} +% \end{macro} +% +% The end of this package. +% \begin{macrocode} +%</usc> +% \end{macrocode} +% +% \subsection{The \Lpack{allhmin} package} +% +% The \Lpack{allhmin} package is intended for use when the entire document +% will be typeset in the book-hand. This is a minimal package. Because the +% book-hand should not contain arabic digits a fuller package would redefine +% anything numbered in \LaTeX{} to use roman instead of arabic numbering. +% Also, because of the large |\baselineskip| many other aspects of \LaTeX{} +% to do with vertical positioning should also be redefined. +% +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. It also uses the \Lpack{humanist} package. +% \begin{macrocode} +%<*uscall> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{allhmin}[2002/12/30 v1.0 package for all Humanist fonts] +\RequirePackage{humanist} +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% Redefine the default fonts to be \thisfont, which has only one family +% member. +% \begin{macro}{\rmdefault} +% \begin{macro}{\sfdefault} +% \begin{macro}{\ttdefault} +% \begin{macrocode} +\renewcommand{\rmdefault}{hmin} +\renewcommand{\sfdefault}{hmin} +\renewcommand{\ttdefault}{hmin} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The `leading' in the book-hands is a function of the |x-height|, which is +% normally much +% greater than for the CMR fonts. I have borrowed code from Frank Jensen's +% \Lpack{beton} package~\cite{BETON} to do this. The |x-height| (in points) +% for the CMR +% fonts is given in Table~\ref{tab:cmrx}. Note that the CMR design sizes are +% 5--10, 12, and 17.28 points. The other values given are scaled from these +% figures. +% +% \begin{table} +% \centering +% \caption{The x heights of the CMR and \thisfont{} fonts} \label{tab:cmrx} +% \begin{tabular}{ccc} \hline +% Design & CMR & \thisfont \\ +% Size & X Height & X Height \\ \hline +% 5 & 2.14 & 3.00 \\ ^^A CMR skip = 6pt = 2.8 times +% 6 & 2.58 & 3.61 \\ ^^A CMR skip = 7pt = 2.7 times +% 7 & 3.00 & 4.20 \\ ^^A CMR skip = 8pt = 2.7 times +% 8 & 3.44 & 4.81 \\ ^^A CMR skip = 9.5pt = 2.8 times +% 9 & 3.86 & 5.40 \\ ^^A CMR skip = 11pt = 2.8 times +% 10 & 4.31 & 6.03 \\ ^^A CMR skip = 12pt = 2.8 times +% 11 & 4.74 & 6.64 \\ ^^A CMR skip = 13.6pt = 2.8 times +% 12 & 5.17 & 7.24 \\ ^^A CMR skip = 14.5pt = 2.8 times +% 14 & 6.03 & 8.44 \\ ^^A CMR skip = 18pt = 3.0 times +% 17 & 7.44 & 10.41 \\ ^^A CMR skip = 22pt = 3.0 times +% 20 & 8.75 & 12.25 \\ ^^A CMR skip = 25pt = 2.9 times +% 25 & 10.94 & 15.32 \\ ^^A CMR skip = 30pt = 2.7 times +% \hline +% \end{tabular} +% \end{table} +% +% \begin{macro}{\hmin@baselineskip@table} +% A table of the normal font sizes and the corresponding baselineskip. +% The distance between baselines for \thisfont{} is over twice +% the |x-height|. ^^A actually 2.5 times to nearest half point +% +% \begin{macrocode} +\newcommand{\hmin@baselineskip@table}{% + <\@vpt>7.5% + <\@vipt>9.0% + <\@viipt>10.5% + <\@viiipt>12.0% + <\@ixpt>13.5% + <\@xpt>15.0% + <\@xipt>16.5% + <\@xiipt>18.0% + <\@xivpt>21.0% + <\@xviipt>26.0% + <\@xxpt>30.5% + <\@xxvpt>38.5} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hmin@new@setfontsize} +% This is a macro that replaces the |\@setfontsize| macro which is called by +% the font size changing commands. +% \begin{macrocode} +\newcommand{\hmin@new@setfontsize}[3]{% + \edef\@tempa{\def\noexpand\@tempb####1<#2}% + \@tempa>##2<##3\@nil{\def\hmin@baselineskip@value{##2}}% + \edef\@tempa{\noexpand\@tempb\hmin@baselineskip@table<#2}% + \@tempa><\@nil + \ifx\hmin@baselineskip@value\@empty + \def\hmin@baselineskip@value{#3}% + \fi + \hmin@old@setfontsize{#1}{#2}\hmin@baselineskip@value} +% \end{macrocode} +% \end{macro} +% +% We had better give an author a means of using The Computer Modern fonts +% if necessary. +% +% \begin{macro}{\cmrfamily} +% \begin{macro}{\cmssfamily} +% \begin{macro}{\cmttfamily} +% These macros select the Computer Modern Roman, Sans, and Typewriter +% font families in either the T1 or OT1 encodings. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}} +\else + \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcmr} +% Text command for the Computer Modern Roman font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmr}{\cmrfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmss} +% Text command for the Computer Modern Sans font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmss}{\cmssfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmtt} +% Text command for the Computer Modern Typewriter font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmtt}{\cmttfamily} +% \end{macrocode} +% \end{macro} +% +% +% At the start of the document, change the |\@setfontsize| macro and call +% the normal font to implement the change. +% \begin{macrocode} +\AtBeginDocument{% + \let\hmin@old@setfontsize=\@setfontsize + \let\@setfontsize=\hmin@new@setfontsize} +\AtBeginDocument{\normalsize} +% \end{macrocode} +% +% +% The end of this package. +% \begin{macrocode} +%</uscall> +% \end{macrocode} +% +% +% +% +% +% \Finale +% \PrintIndex +% +\endinput + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + diff --git a/Master/texmf-dist/source/latex/bookhands/humanist/humanist.ins b/Master/texmf-dist/source/latex/bookhands/humanist/humanist.ins new file mode 100644 index 00000000000..4011e3d5bf1 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/humanist/humanist.ins @@ -0,0 +1,118 @@ +%% humanist.ins +%% Author: Peter Wilson (CUA) now at peter.r.wilson@boeing.com +%% (or pandgwilson@earthlink.net) +%% Copyright 2002, 2003 Peter R. Wilson +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any +%% later version. +%% The latest version of the license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of +%% LaTeX version 2003/06/01 or later. +%% +%% This work has the LPPL maintenance status "author-maintained". +%% +%% This work consists of the files listed in the README file. +%% +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this work when run through +%% LaTeX. +%% +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{humanist.ins} +\input docstrip.tex +\preamble + + Author: Peter Wilson (CUA) now at peter.r.wilson@boeing.com + (or pandgwilson@earthlink.net) + Copyright 2002, 2003 Peter R. Wilson + + This work may be distributed and/or modified under the + conditions of the LaTeX Project Public License, either + version 1.3 of this license or (at your option) any + later version. + The latest version of the license is in + http://www.latex-project.org/lppl.txt + and version 1.3 or later is part of all distributions of + LaTeX version 2003/06/01 or later. + + This work has the LPPL maintenance status "author-maintained". + + This work consists of the files listed in the README file. + +\endpreamble + +\keepsilent + +%%% \Msg{*** Generating the driver file ***} +%%% \generateFile{humanist.drv}{t}{\from{humanist.dtx}{driver}} + +\Msg{*** Generating the Metafont files ***} + +\usepostamble\empty +\generateFile{hmin7.mf}{t}{\from{humanist.dtx}{base7}} +\generateFile{hmin10.mf}{t}{\from{humanist.dtx}{base10}} +\generateFile{hmin17.mf}{t}{\from{humanist.dtx}{base17}} +\generateFile{hminb7.mf}{t}{\from{humanist.dtx}{base7b}} +\generateFile{hminb10.mf}{t}{\from{humanist.dtx}{base10b}} +\generateFile{hminb17.mf}{t}{\from{humanist.dtx}{base17b}} +\generateFile{hminl.mf}{t}{\from{humanist.dtx}{min}} +\generateFile{hminu.mf}{t}{\from{humanist.dtx}{maj}} +\generateFile{hmintitle.mf}{t}{\from{humanist.dtx}{mfd}} +\generateFile{hminpunct.mf}{t}{\from{humanist.dtx}{punct}} +\generateFile{hminlig.mf}{t}{\from{humanist.dtx}{lig}} +\generateFile{hmindig.mf}{t}{\from{humanist.dtx}{dig}} + +\Msg{*** Generating the Font Definition files ***} +\usepostamble\defaultpostamble + +\generateFile{ot1hmin.fd}{t}{\from{humanist.dtx}{fdot1}} +\generateFile{t1hmin.fd}{t}{\from{humanist.dtx}{fdt1}} + +\Msg{*** Generating the LaTeX2e package files ***} + +\generateFile{humanist.sty}{t}{\from{humanist.dtx}{usc}} +\generateFile{allhmin.sty}{t}{\from{humanist.dtx}{uscall}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into directories searched by TeX:} +\Msg{*} +\Msg{* Move these into the font source area:} +\Msg{* \space\space hmin7.mf} +\Msg{* \space\space hmin10.mf} +\Msg{* \space\space hmin17.mf} +\Msg{* \space\space hminb7.mf} +\Msg{* \space\space hminb10.mf} +\Msg{* \space\space hminb17.mf} +\Msg{* \space\space hminl.mf} +\Msg{* \space\space hminu.mf} +\Msg{* \space\space hmintitle.mf} +\Msg{* \space\space hminpunct.mf} +\Msg{* \space\space hminlig.mf} +\Msg{* \space\space hmindig.mf} +\Msg{*} +\Msg{* Move these into the LaTeX macro area:} +\Msg{* \space\space ot1hmin.fd} +\Msg{* \space\space t1hmin.fd} +\Msg{* \space\space humanist.sty} +\Msg{* \space\space allhmin.sty} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{* Process any name.idx file by:} +\Msg{* \space\space\space\space makeindex -s gind.ist name} +\Msg{* Process any name.glo file by:} +\Msg{* \space\space\space\space makeindex -s gglo.ist -o name.gls name.glo} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/bookhands/huncial/huncial.dtx b/Master/texmf-dist/source/latex/bookhands/huncial/huncial.dtx new file mode 100644 index 00000000000..66dc25a3240 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/huncial/huncial.dtx @@ -0,0 +1,3877 @@ +% \iffalse meta-comment +% +% huncial.dtx +% Copyright 1999 Peter R. Wilson +% +% This program is provided under the terms of the +% LaTeX Project Public License distributed from CTAN +% archives in directory macros/latex/base/lppl.txt. +% +% Author: Peter Wilson (CUA) (now at: peter.r.wilson@boeing.com) +% +% If you do not have the docmfp package (available from CTAN in +% tex-archive/macros/latex/contrib/supported), comment out the +% \usepackage{docmfp} line below and uncomment the line following it. +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{docmfp} +%%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{} +\EnableCrossrefs +\CodelineIndex +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{huncial.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{132} +% +% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} +% \DoNotIndex{\@centercr,\@cite} +% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} +% \DoNotIndex{\@input,\@ixpt,\@m} +% \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} +% \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} +% \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} +% \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} +% \DoNotIndex{\advance,\Alph,\alph} +% \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\bullet} +% \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} +% \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} +% \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} +% \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +% \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} +% \DoNotIndex{\fbox} +% \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} +% \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +% \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} +% \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} +% \DoNotIndex{\input} +% \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} +% \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} +% \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +% \DoNotIndex{\NeedsTeXFormat,\newdimen} +% \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} +% \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} +% \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} +% \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +% \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +% \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +% \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} +% \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} +% \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} +% \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} +% \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} +% \DoNotIndex{\viipt,\vipt,\vskip,\vspace} +% \DoNotIndex{\wd,\xiipt,\year,\z@} +% +% \changes{v1.0}{1999/05/22}{First public release} +% \changes{v1.0a}{2001/01/02}{Fixed missing * in fd files} +% +% ^^A \def\fileversion{v1.0} +% ^^A \def\filedate{1999/05/22} +% \def\fileversion{v1.0a} +% \def\filedate{2001/01/02} +% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package +% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option +% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file +% \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter +% \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle +% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment +% \newcommand*{\AD}{\textsc{ad}} +% \newcommand*{\thisfont}{Half Uncial} +% +% \title{The \Lpack{Half Uncial} fonts\thanks{This +% file has version number \fileversion, last revised +% \filedate.}} +% +% \author{% +% Peter Wilson\\ +% Catholic University of America \\ +% Now at \texttt{peter.r.wilson@boeing.com} +% } +% \date{\filedate} +% \maketitle +% \begin{abstract} +% The \Lpack{huncial} and \Lpack{allhuncl} packages provide a set of +% Metafont \thisfont{} book-hands +% as used +% for manuscripts in the 3rd to the 9th century. This is one in a series +% of manuscript fonts. +% \end{abstract} +% \tableofcontents +% \listoftables +% +% \StopEventually{} +% +% +% +% \section{Introduction} +% +% The \Lpack{huncial} and \Lpack{allhuncl} packages provide a Metafont~\cite{METAFONT} version +% of the \thisfont{} manuscript book-hand that was in use between about the +% third and ninth centuries~\AD. It is part of a project to provide fonts +% covering the major manuscript hands between the first century~\AD{} and +% the invention of printing. The principal resources used in this project +% are listed in the Bibliography. +% +% This manual is typeset according to the conventions of the +% \LaTeX{} \textsc{docstrip} utility which enables the automatic +% extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. +% The \Lpack{docmfp} package is used for documenting the Metafont portions +% of the distribution~\cite{DOCMFP}. +% +% Section~\ref{sec:usc} describes the usage of the package. +% Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} +% and source code for the package is in Section~\ref{sec:code}. +% +% \subsection{Manuscript book-hands} +% +% Before the invention of printing all books were written by hand. The book-hands +% used by the scribes and copyists for the manuscripts changed as time +% went on. Table~\ref{tab:1} lists some of the common book-hands which were used +% between the 1st and 15th centuries. The later book-hands formed the basis of the +% fonts used by the early printers, which in turn form the basis of the printing +% fonts in use today. +% +% The manuscript book-hands were written with a broad nibbed reed or quill +% pen. Among the distinguishing characteristics of a hand, apart from the +% actual shape of the letters, are the angle of the pen (which controls the +% variation between thick and thin strokes) and the height of a letter compared +% to the width of the nib. The lower the ratio of the letter height to nib +% width, the more condensed is the script. The scripts also varied in their +% typical height. +% +% Table~\ref{tab:1} gives an `average' x-height for each +% script, which I obtained by measuring a sample of photographs of +% manuscripts written in the various hands. About a dozen examples +% of each book-hand were measured. This figure should not be taken too +% seriously. +% +% There was not a sharp division between the use of one hand and another. +% Many manuscripts exhibit a variety of hands in the same document. For example, +% the scribe writing in an Uncial hand may have used Roman Rustic letters +% for capitals. Usually the same pen was used for the two different scripts. +% +% Generally speaking, as a hand got older it became more embelished, and +% therefore took longer to write. As this happened a new hand would appear that +% was faster, and which would eventually make the earlier one obsolete. +% +% Many of the book-hands were single-cased; that is, they did not have an +% upper- and lower-case as we do nowadays in Western scripts. On the other +% hand, a script might be majuscule or minuscule. A \textit{majuscule} script +% is one, like our upper-case, where the letters are drawn between two lines +% and are of a uniform height with no ascenders or descenders. +% A \textit{minuscule} script, like our lower-case, is drawn between four lines +% and has ascenders and descenders. +% +% \begin{table} +% \centering +% \caption{The main manuscript book-hands} \label{tab:1} +% \begin{tabular}{lccccc} \hline +% Name & Century & x-height & Height & Pen & Normalised \\ +% & & (mm) & (nib widths) & angle & height \\ \hline +% Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\ +% Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\ +% Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\ +% Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\ +% Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\ +% Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\ +% Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\ +% Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\ +% Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\ +% Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\ +% Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\ +% Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline +% \end{tabular} +% \end{table} +% +% During the period under consideration arabic numerals were effectively +% not used. At the beginning they were unknown and even though some knew +% of them towards the end, the glyphs used for them are not recognisable --- +% to me they look somewhat like cryllic letters --- and each locality +% and time had its own highly individualistic rendering. The general rule +% when using one of these book-hands is to write all numbers using +% roman numerals. +% +% The Roman alphabet consisted of 23 capital letters --- the J, U and W +% were absent. The book-hands initially used both a `u' and a `v' interchangeably +% but by the 10th century the practice had become to use the `v' before a vowel +% and the `u' otherwise. The letter corresponding to the W sound appeared +% in England around the 7th century in +% the form of the runic \textit{wen} character and by about the 11th century +% the `w' chacter was generally used. The `J' is the newest letter of all, not +% appearing until about the mid 16th century. +% +% In the first century punctuation was virtually unknown, and typically +% would not even be any additional space between individual words, never +% mind denoting ends of sentences. Sometimes a dot at mid-height would be +% used as a word seperator, or to mark off the end of a paragraph. Effectively +% a text was a continuous stream of letters. By the time that printing was +% invented, though, all of our modern punctuation marks were being used. +% +% Among all these manuscript hands, the Carolingian minuscule is the +% most important as our modern fonts are based on its letter shapes, and it is +% also at this point in time where the division occured between the black letter +% scripts as used even today in Germany, and the lighter fonts used elesewhere. +% The Rotunda and Humanist minuscule hands were developed in Italy and were +% essentially a rediscovery of the Carolingian minusucle. Guthenberg took the +% Gothic scripts as the model for his types. Later printers, +% such as Nicholas Jenson of Venice, +% took the Humanist scripts as their models. +% +% +% \subsection{The \thisfont{} script} +% +% The \thisfont{} hand, which is a minuscule script, was in use for some seven +% centuries and was, in a sense, an intermediate script between the Uncial +% and Artificial Uncial book-hands. It was less formal than these and was +% also faster to write as fewer pen movements were required. It was +% derived from cursive hands that were not used in formal manuscripts. +% +% This is the first book-hand that shows some of the more characteristic +% letter shapes that we associate with the lower-case letters. For example, +% the `b' lettter has lost its upper bowl, and the `d' has acquired an ascender. +% The `f' is in an intermediate form between the modern `F' and `f'. +% The \thisfont{} also introduces the long `s' letter shape. +% +% Stemming from its cursive roots, ligatured letter pairs make an +% appearance. These typically were only +% used at the end of a line if it was going to be too long, and were rarely +% used in the middle of a line. The most common ligatures were of the +% form `e*', where the bar of the `e' was joined to the following letter +% (donoted here as *). Sometimes the e was made taller so its bar would be +% a convenient height for joing to an `m', say. The ampersand, `\&', also +% makes a first appearance as a ligatured `et' which is the Latin for `and'. +% This would be used anywhere in the text. I have provided the ampersand +% and just the `fi' ligature. +% +% Usually the +% lettering in a manuscript was all one size. If the scribe felt the need +% for `capital' letters then, using the same pen, would either write a larger +% \thisfont{} letter or a letter from one of the more formal book-hands. +% I have provided a set of `capital' letters that are only a little larger +% than the normal letters for use in running text. +% During the time the \thisfont{} script was used the alphabet only had 24 +% letters. I have included the missing J. +% +% Arabic numerals were unknown at this time, so all numbers were written +% using the roman numbering system. I have provided \thisfont{} versions of +% the arabic digits. +% +% Punctuation was used, but not with the frequency of today. +% A sentence might be ended with +% a dot at mid-height or a paragraph ended with a colon, also at mid-height. +% The comma was was a small +% slash; the semi-colon was known, as was the single quotation +% mark which was represented by a raised comma. +% +% +% \section{The \Lpack{huncial} and \Lpack{allhuncl} packages} \label{sec:usc} +% +% The \thisfont{} font family is called |huncl|. The font is supplied in both +% OT1 and T1 encodings. +% +% \subsection{The \Lpack{huncial} package} +% +% This is intended for the occasions when some short pieces of text have +% to be written in \thisfont{} while the majority of the document is in another +% font. The normal baselineskips are used. +% +% \DescribeMacro{\hunclfamily} +% The |\hunclfamily| declaration starts typesetting with the \thisfont{} fonts. +% Use of the \thisfont{} font will continue until either there is another |\...family| +% declaration or the current group (e.g., environment) is closed. +% +% \DescribeMacro{\texthuncl} +% The command |\texthuncl{|\meta{text}|}| will typeset \meta{text} using the +% \thisfont{} fonts. +% +% \subsection{The \Lpack{allhuncl} package} +% +% +% This package is for when the entire document will be typeset with the +% \thisfont font. The baselineskips are set to those appropriate to the +% book-hand. +% +% This is a minimalist package. Apart from declaring \thisfont{} to be the +% default font and setting the baselineskips appropriately, it makes no other +% alterations. +% Vertical spacing +% before and after section titles and before and after lists, etc., will be +% too small as the \LaTeX{} design assumes a font comparable in size to +% normal printing fonts, and the book-hand is much taller. +% To capture more of the flavour of the time, all numbers +% should be written using roman numerals. +% The \Lpack{romannum} package~\cite{ROMANNUM} +% can be used so that \LaTeX{} will typeset the numbers that it generates, +% like sectioning or caption numbers, using roman numerals instead of arabic +% digits. +% +% \DescribeMacro{\cmrfamily} +% \DescribeMacro{\textcmr} +% \DescribeMacro{\cmssfamily} +% \DescribeMacro{\textcmss} +% \DescribeMacro{\cmttfamily} +% \DescribeMacro{\textcmtt} +% The |...family| declarations start typesetting with the Computer Modern Roman +% (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer +% Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}| +% commands will typeset \meta{text} in the corresponding Computer Modern font. +% +% The \Lpack{allhuncl} package automatically loads the \Lpack{huncial} package, +% so its font commands are available if necessary. +% +% +% +% \section{The Metafont code} \label{sec:mf} +% +% +% As previously noted, this work is part of a larger project to provide +% fonts covering the main manuscript book-hands. As such, one of the +% aims is to produce a coordinated set of fonts, especially as multiple +% hands might be used in a single document. +% +% Noting that the hands tend to be somewhat larger than the typical 10pt +% size (where the x-height is approximately 1.5mm) used for modern books, +% I have also designed the fonts +% at a larger than normal size, then applied some non-linear factors when reducing +% them down to a 10pt size. +% Further, I have used the height of the Carolingian minuscule as a +% normalising factor when deciding on the absolute height of any particular +% script. The x-height of the Carolingian font is made equal to the +% x-height of the Computer Modern Roman (CMR) font. +% +% Modern fonts are effectively drawn. That is, the outline of the letter is +% drawn carefully and the center is filled with ink. This is shown to good +% effect in the Metafont code for the Computer Modern fonts~\cite{CM}. +% In contrast, the manuscript letters were inked by single pen strokes in +% a calligraphic manner. I have tried to repeat this calligraphic style +% in the Metafont code. +% +% As much as possible I have tried to use parameter values from the +% Computer Modern Roman (CMR) fonts in order to reduce possible +% infelicities if the CM and manuscript fonts are used together. However, +% few of the CMR parameters are applicable to the calligraphic style. +% +% +% \subsection{The parameter file} +% +% We deal with the parameter files first, and start by announcing +% what they are for. The \thisfont{} font comes in three sizes and also as a normal +% and a bold font. +% \begin{macrocode} +%<*base7|base10|base17|base7b|base10b|base17b> +%<base7>%%% HUNCL7.MF Half Uncial at 7 point design size. +%<base10>%%% HUNCL10.MF Half Uncial at 10 point design size. +%<base17>%%% HUNCL17.MF Half Uncial at 17 point design size. +%<base7b>%%% HUNCLB7.MF Half Uncial Bold at 7 point design size. +%<base10b>%%% HUNCLB10.MF Half Uncial Bold at 10 point design size. +%<base17b>%%% HUNCLB17.MF Half Uncial Bold at 17 point design size. +% +% \end{macrocode} +% Parameters from CMR are used as much as possible. We also +% make sure that \Lpack{cmbase} is loaded as well as plain Metafont. +% \begin{macrocode} +if unknown cmbase: input cmbase fi + +%<base7>font_identifier:="HUNCL"; font_size 7pt#; +%<base10>font_identifier:="HUNCL"; font_size 10pt#; +%<base17>font_identifier:="HUNCL"; font_size 17.28pt#; +%<base7b>font_identifier:="HUNCLB"; font_size 7pt#; +%<base10b>font_identifier:="HUNCLB"; font_size 10pt#; +%<base17b>font_identifier:="HUNCLB"; font_size 17.28pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutstretch} +% The CMR scaling for lowercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> jutstretch:=1.19; +%<base10|base10b> jutstretch:=1.152; +%<base17|base17b> jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{stemstretch} +% The CMR scaling for lowercase stem widths wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> stemstretch:=1.50; +%<base10|base10b> stemstretch:=1.31; +%<base17|base17b> stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{caprat} +% The scaling for `capitals' wrt `lowercase'. This is pretty much a guess. +% \begin{macrocode} + caprat:=1.25; % ratio of capital height to minuscule height +% \end{macrocode} +% +% \DescribeVariable{cap_jutstretch} +% The CMR scaling for uppercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_jutstretch:=1.3; +%<base10|base10b> cap_jutstretch:=1.2; +%<base17|base17b> cap_jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{cap_stemstretch} +% The CMR scaling for uppercase stem width wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_stemstretch:=1.45; +%<base10|base10b> cap_stemstretch:=1.31; +%<base17|base17b> cap_stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{bfudge} +% Letter width scaling for bold font wrt normal font. +% \begin{macrocode} +%<base7|base10|base17> bfudge:=1.0; +%<base7b|base10b|base17b> bfudge:=1.2; +% \end{macrocode} +% +% \DescribeVariable{szfudge} +% Width scaling wrt 17pt letter width. +% \begin{macrocode} +%<base7|base7b> szfudge:=1.18; +%<base10|base10b> szfudge:=1.0; +%<base17|base17b> szfudge:=1.0; +% \end{macrocode} +% +% \DescribeVariable{hstretch} +% Horizontal stretching factor wrt 17pt size letter width. +% \begin{macrocode} + hstretch:=szfudge*bfudge; +% \end{macrocode} +% +% \DescribeVariable{carol_height} +% The x-height of the Carolingian minuscule font. +% \begin{macrocode} +%<base7|base7b> carol_height#:=108.5/36pt#; +%<base10|base10b> carol_height#:=155/36pt#; +%<base17|base17b> carol_height#:=268/36pt#; +% \end{macrocode} +% +% \DescribeVariable{vstretch} +% The height of this font wrt the Carolingian font. +% \begin{macrocode} + vstretch:=1.07; + +% \end{macrocode} +% +% \DescribeVariable{x_height} +% The x-height of lower case letters. Scaled from the Carolingian font. +% \begin{macrocode} + x_height#:=vstretch*carol_height#; +% \end{macrocode} +% +% \DescribeVariable{u} +% The unit width. The CMR values are used. +% \begin{macrocode} +%<base7> u#:=15.5/36pt#; +%<base10> u#:=20/36pt#; +%<base17> u#:=32.5/36pt#; +%<base7b> u#:=17.9/36pt#; +%<base10b> u#:=23/36pt#; +%<base17b> u#:=37/36pt#; +% \end{macrocode} +% +% \DescribeVariable{width_adj} +% \DescribeVariable{serif_fit} +% \DescribeVariable{cap_serif_fit} +% \DescribeVariable{letter_fit} +% The majority of these parameters and values are constant. +% They are for fine adjustements of characters. The CM values are used. +% \begin{macrocode} + width_adj#:=0pt#; % width adjustment for certain characters + serif_fit#:=0pt#; % extra sidebar near lowercase serifs +%<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs +%<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +%<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs +%<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars + +% \end{macrocode} +% +% \DescribeVariable{cap_height} +% The height of capital letters. +% \begin{macrocode} +%<base7|base7b> cap_height#:=172.2/36pt#; % height of caps +%<base10|base10b> cap_height#:=246/36pt#; % height of caps +%<base17|base17b> cap_height#:=425/36pt#; % height of caps +% \end{macrocode} +% +% \DescribeVariable{thickfudge} +% The reciprocal of the font height in nib widths. Normal font height +% is 5 nib widths and the bold font height is 3.5 nib widths. +% \begin{macrocode} +%<base7|base10|base17> thickfudge:=1/5; +%<base7b|base10b|base17b> thickfudge:=1/3.5; +% \end{macrocode} +% +% \DescribeVariable{thinfudge} +% The nib sharpness. +% \begin{macrocode} +thinfudge:=1/6; +% \end{macrocode} +% +% \DescribeVariable{thick} +% The maximum nib width. +% That is, the width of the thickest line that can be penned. +% \begin{macrocode} +thick#:=stemstretch*thickfudge*x_height#; % max pen breadth +% \end{macrocode} +% +% \DescribeVariable{thin} +% The nib thinness. +% That is, the width of the thinnest line that can be penned. +% \begin{macrocode} +thin#:=thinfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{pangle} +% The pen angle (in degrees). +% \begin{macrocode} +pangle:=20; % pen angle +% \end{macrocode} +% +% \DescribeVariable{ascratio} +% The height of lower case ascenders wrt |x_height|. +% \begin{macrocode} + ascratio:=5/3; +% \end{macrocode} +% +% \DescribeVariable{asc_height} +% The height of lower case ascenders. +% \begin{macrocode} + asc_height#:=ascratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{descratio} +% The depth of lower case descenders wrt |x_height|. +% \begin{macrocode} + descratio:=2/3; +% \end{macrocode} +% +% \DescribeVariable{desc_depth} +% The depth of lower case descenders. +% \begin{macrocode} + desc_depth#:=descratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_height} +% The height of numerals. Make these midway between normal and capital +% letters. +% \begin{macrocode} + fig_height#:=(0.5[1,caprat])*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_width} +% The width of numerals. All numerals are the same width (roughly, an `o'). +% \begin{macrocode} + fig_width#:=hstretch*(x_height#); +% \end{macrocode} +% +% \DescribeVariable{body_height} +% The height of the tallest character. +% \begin{macrocode} + body_height#:=caprat*asc_height#; +% \end{macrocode} +% +% \DescribeVariable{body_depth} +% The depth of the lowest character. +% \begin{macrocode} + body_depth#:=caprat*desc_depth#; +% \end{macrocode} +% +% \DescribeVariable{half_height} +% Half the normal letter height. +% \begin{macrocode} + half_height#:=1/2x_height#; % half the height of x height letters + +% \end{macrocode} +% +% \DescribeVariable{side} +% We might be using a square for the character design. +% \begin{macrocode} +side#:=x_height#; +% \end{macrocode} +% +% \DescribeVariable{rule_thickness} +% Thickness of rules (in math symbols). The CMR values are used. +% \begin{macrocode} +%<base7|base7b> rule_thickness#:=.34pt#; +%<base10|base10b> rule_thickness#:=.4pt#; +%<base17|base17b> rule_thickness#:=.6pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutfudge} +% Controls the protrusion of serifs. +% \begin{macrocode} +%%%%jutfudge:= 3/4; +jutfudge:= 1/2; +% \end{macrocode} +% +% \DescribeVariable{jut} +% The lowercase serif protrusion. +% \begin{macrocode} +jut#:=jutstretch*jutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{srad} +% |srad| with |0 < srad < 1| controls the serif radius. +% \begin{macrocode} +srad:=0.5; +% \end{macrocode} +% +% \DescribeVariable{trijut} +% The lowercase triangular serif protrusion. +% \begin{macrocode} +trijut#:=0.75jutstretch*thick#; +% \end{macrocode} +% +% \DescribeVariable{o} +% Amount of overshoot for curves (as in an `o'). Use CMR values. +% \begin{macrocode} +%<base7|base7b> o#:=5/36pt#; +%<base10|base10b> o#:=8/36pt#; +%<base17|base17b> o#:=10/36pt#; + +% \end{macrocode} +% +% \DescribeVariable{slant} +% |slant| is the amount the font slopes to the right. +% \begin{macrocode} +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ + +% \end{macrocode} +% +% \DescribeVariable{monospace} +% We are generating a variable-width font. +% \begin{macrocode} +monospace:=false; % should all characters have the same width? + +% \end{macrocode} +% +% \DescribeVariable{dot_size} +% The size of (punctuation) dots. +% \begin{macrocode} +dot_size#:=5thin#; % size of dots +% \end{macrocode} +% +% \DescribeVariable{comma_width} +% The horizontal width of a comma. +% \begin{macrocode} +comma_width#:=2.5dot_size#; + +% \end{macrocode} +% +% Finally, call the driver file for the font. +% \begin{macrocode} +generate huncltitle %% switch to the driver file + +% \end{macrocode} +% +% The end of this code section. +% \begin{macrocode} +%</base7|base10|base17|base7b|base10b|base17b> +% \end{macrocode} +% +% +% \subsection{The driver file} +% +% The driver file sets up the font parameters and also contains +% the macros used in the definition of the characters. +% +% \begin{macrocode} +%<*mfd> +% This is UNCLTITLE.MF for the Half Uncial font. +% This makes a short font. +% This file also contains special macros universally needed in the +% font but either not in the cmbase.mf file or modifications of these. +% +% \end{macrocode} +% +% \begin{routine}{makebox} +% This is a new version of the \Lpack{cmbase.mf} |makebox| macro. +% Essentially, as we are only generating a single case font, we don't +% need all the horizontals for the CMR characters. +% +% \begin{macrocode} +% A new version of cmbase.mf makebox macro +def makebox(text rule) = + for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth: + rule((l,y)t_,(r,y)t_); endfor % horizontals + for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals + for x=u*(1+floor(1/u)) step u until r-1: + rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals + if charic<>0: + rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{proofpcbb} +% The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the +% square, and at the bottom and top midpoints, where the point |zS| is at +% position |(xoff,yoff)| in the square. +% \begin{macrocode} + +% A macro to delineate a letter's bounding square in proof mode. +% Point z$ is at (xoff,yoff) in the bounding square. +def proofpcbb(suffix $)(expr xoff, yoff) = +if proofing > 0: + x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner + z$br = (x$bl+side, y$bl); % BRHC + z$tr = (x$bl+side, y$bl+side); % TRHC + z$tl = (x$bl, y$bl+side); % TLHC + z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points + pair hc, vc; + hc = (2u,0); vc = (0,2u); + pickup pensquare scaled 2; + for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc: + draw s-hc--s+hc; + draw s-vc--s+vc; + endfor +fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{huncial_font_setup} +% This macro contains the set up for the \thisfont{} fonts. +% \begin{macrocode} + +def huncial_font_setup= % contains special stuff for huncial fonts + define_pixels(side,half_height,carol_height,comma_width); + define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit, + cap_serif_fit,jut,cap_jut,trijut); + define_pixels(fig_width); + define_whole_pixels(letter_fit); + define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height, + desc_depth,body_depth,fig_height); + define_corrected_pixels(o); + define_blacker_pixels(thick,thin); + let adjust_fit = normal_adjust_fit; +% \end{macrocode} +% \DescribeVariable{stylus} +% The pen for drawing the thinnest lines is |stylus|. +% \begin{macrocode} + pickup pencircle scaled thin; + stylus:=savepen; +% \end{macrocode} +% \DescribeVariable{thickstylus} +% The pen for drawing lines a bit thicker than the thinnest is |thickstylus|. +% \begin{macrocode} + pickup pencircle scaled (1.5thin); + thickstylus:=savepen; +% \end{macrocode} +% \DescribeVariable{quill} +% The normal calligraphic pen is |quill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated pangle; + quill:=savepen; + numeric pcshiftx#; % x value of LHS of box wrt origin of char box + define_pixels(pcshiftx); + numeric sqxside#; % x size of the square + numeric sqyside#; % y size of the square + define_pixels(sqxside,sqyside); + +enddef; % end of huncial_font_setup + +% \end{macrocode} +% \end{routine} +% +% +% \DescribeVariable{ductus} +% A boolean to control drawing the ductus (TRUE) or the full letter (FALSE). +% \begin{macrocode} +boolean ductus; +ductus:=false; +% \end{macrocode} +% +% \DescribeVariable{qhor} +% \DescribeVariable{qvert} +% The cosine and sine of the pen angle. +% \begin{macrocode} +numeric qhor, qvert; +qhor:=cosd(pangle); qvert:=sind(pangle); +% \end{macrocode} +% +% \DescribeVariable{pdir} +% The vector corresponding to the pen angle. +% \begin{macrocode} +pair pdir; pdir=dir(pangle); +% \end{macrocode} +% +% \DescribeVariable{ppdir} +% The vector that is perpendicular (anticlockwise) to the pen angle. +% \begin{macrocode} +pair ppdir; ppdir=dir(pangle+90); +% \end{macrocode} +% +% \begin{routine}{draw_serif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_serif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; + z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + top_serif:=false; + z$c=z$b shifted (bjut*pdir); + fi +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_serif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_triserif} +% A macro to draw a triangular top left serif. +% |draw_triserif(1,tj)| draws a serif at |z1| with its leftmost x +% value at |x1-tj|, where it is assumed that the +% top point on the stem is at |z1| and the stem was drawn with |quill|. +% \begin{macrocode} + +def draw_triserif(suffix $)(expr tj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$ts1'=lft x$; y$ts1'=bot y$; + pickup stylus; + lft x$ts1=x$ts1'; bot y$ts1=y$ts1'; + x$ts2=x$ts1-tj; z$ts2=whatever[z$,z$ts1]; + x$ts3=x$ts1; y$ts3=y$ts2-tj; + pickup stylus; +%% filldraw z$ts1--z$ts2--z$ts3--cycle; + filldraw z$--z$ts2--z$ts3--cycle; + pickup oldpen; + labels($ts1,$ts2,$ts3); +enddef; % end of draw_triserif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_istem} +% A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs +% are of extent |jut|. There is a top left and bottom right serif. +% The serif radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_istem(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % top serif + draw_serif($$, $, fr); % bottom serif + draw z$a--z$$a; % the stem +enddef; % end of draw_istem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tstem} +% A macro to draw the shape of the stem of a `t'. |draw_tstem(1,2,f)| draws a +% stem whose +% top is at |z1| and bottom at |z2| with a right serif at |z2|. The radius +% is controlled by |f|, with $0 < f < 1$. +% It draws with the current pen and the serif is of extent |jut|. +% \begin{macrocode} + +def draw_tstem(suffix $, $$)(expr fr)= + draw_serif($$, $, fr); % the serif + draw z$--z$$a; % the stem +enddef; % end of draw_tstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tlserif} +% A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serif +% is of extent |jut|. It also draws the stem to the point |z2|. The serif +% radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_tlserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % the serif + draw z$a--z$$; % the stem +enddef; % end of draw_tlserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flick} +% A macro to draw a flick (like an eyebrow). +% |draw_flick(1,rise,fall,fjut)| draws a stroke starting at |z1| rising up by +% |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is +% |fjut| to the right of |z1|. It is drawn with the current pen. +% \begin{macrocode} + +def draw_flick(suffix $)(expr rise, fall, fjut)= +% \end{macrocode} +% The points |z$a| and |z$b|, together with |z$| make up three points on the +% ductus. +% \begin{macrocode} + rt x$b = x1+fjut; top y$b=y$-fall; + x$a=0.5[x$,x$b]; top y$a=y$+rise; +% \end{macrocode} +% Draw the part, and finish off. +% \begin{macrocode} + draw z$..z$a..z$b; + labels($a,$b); +enddef; % end of draw_flick + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_wave} +% A macro to draw a (horizontal) stroke with a flick at each end +% (down at the left and up at the right). |draw_wave(1,2,f)| uses the current +% pen to draw from |z1wl| to |z1wr|, where |x1wl=x1|, |y1wl=y1-f|, and +% |x1wr=x2|, |y1wr=y2+f|, with |z1| assumed to be at the left of |z2|. +% \begin{macrocode} + +def draw_wave(suffix $,$$)(expr f)= + x$wl=x$; y$wl=y$-f; + x$wr=x$$; y$wr=y$$+f; + z$wc=0.5[z$wl,z$wr]; + draw z$wl{pdir}..z$wc{right}..{pdir}z$wr; + labels($wl,$wc,$wr); +enddef; % end of draw_wave +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tail} +% A macro to draw a tail at the bottom of a (vertical) stem. +% |draw_tail(1,fjut)| draws a tail at the bottom of the stem which ends at |z1|. +% The depth is controlled by the |desc_depth| value and the jut by |fjut|. +% \begin{macrocode} + +def draw_tail(suffix $)(expr fj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$tl' = lft x$; y$tl=bot y$; + pickup stylus; + lft x$tl=x$tl'; + x$tb=x$tl-fj; bot y$tb=y$tl-1/2desc_depth; + filldraw z${down}..{-pdir}z$tb & z$tb{pdir}..{up}z$tl--cycle; + pickup oldpen; + labels($tb,$tl); +enddef; % end of draw_tail +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_triangle} +% A macro to draw a downward pointing equilateral triangle. +% |draw_triangle(1,sz)| draws a triangle of side length with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_triangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$-0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_triangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rtriangle} +% A macro to draw a downward pointing right angled triangle. +% |draw_triangle(1,sz)| draws a triangle of side length with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rtriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$-sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rtriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rutriangle} +% A macro to draw an upward pointing right angled triangle. +% |draw_triangle(1,sz)| draws a triangle of side length with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rutriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$+sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rutriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_fork} +% A macro to draw a forked line. +% |draw_fork(1,2,sz)| draws a graduated line from |z1| to |z2| with a forked +% end of size |sz|. +% \begin{macrocode} + +def draw_fork(suffix $, $$)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$f1'=lft x$; y$f1'=bot y$; + x$f3'=rt x$; y$f3'=top y$; + pickup stylus; + lft x$f1=x$f1'; bot y$f1=y$f1'; + rt x$f3=x$f3'; y$f3-y$=2*(y$-y$f1); + rt x$f2=x$$-sz; bot y$f2=y$$; + rt x$f4= rt x$f5=x$$; + bot y$f5=y$$-sz; top y$f4=y$$+1/2sz; + filldraw z$f1--z$f2--z$f3--cycle; % the line + draw z$f2{right}..z$f4; % upper fork + draw z$f2{right}..z$f5; % lower fork + pickup oldpen; + labels($f1,$f2,$f3,$f4,$f5); +enddef; % end of draw_fork +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_urswish} +% A macro to draw a line up and to the right with an under curl at the end. +% |draw_urswish(1,2)| draws from |z1| towards |z2|, which is the max upper right +% of a bounding box, where the curl is. +% \begin{macrocode} + +def draw_urswish(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + pickup quill; + rt x$$s1=x$$-thick; top y$$s1=y$$; + rt x$$s2=x$$; +%% x$$s3=x$$-thick; + lft x$$s3=x$$s1; + bot y$$s3=y$$-thick; y$$s2=0.5[y$$s1,y$$s3]; +%% draw z$---z$$s1{right}..z$$s2{down}..{-pdir}z$$s3; + draw z$..z$$s1{pdir}..z$$s2{down}; + labels($$s1,$$s2,$$s3); +enddef; % end of draw_urswish +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{bowl_stem} +% Calculate where a bowl should meet a stem so that the pen is moving in the +% pen direction. +% |bowl_stem(1,2)| calculates the point |z1i|, where |z1| is on the bowl and +% there is a vertical line at |x2|. +% +% \begin{macrocode} + +def bowl_stem(suffix $, $$)= + x$'=0.5[x$,x$$]; y$'=y$; % the mid-point + z$''=z$' shifted (thick*pdir); + x$i=x$$; z$i=whatever[z$',z$'']; + labels($',$i); +enddef; % end of bowl_stem +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pdot} +% A macro to draw a period dot. +% |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|. +% \begin{macrocode} + +def draw_pdot(suffix $)(expr sz)= +% \end{macrocode} +% Draw a square rotated 45 degrees. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$ shifted (0.5sz*up); + z$u = z$s shifted (sz*right); + z$v = z$t shifted (sz*down); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pdot + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pcomma} +% A macro to draw a period comma. +% |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. The pen is |stylus|. +% \begin{macrocode} + +def draw_pcomma(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping back and down at 45 degrees +% for a total width of |ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s-ar; y$v=y$s-ar; + z$u = z$v shifted (sz*right); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; +%% filldraw z$s--z$t--z$u--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pcomma + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_plq} +% A macro to draw a period left quote. +% |draw_pcomma(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. +% \begin{macrocode} + +def draw_plq(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping forward and down at 45 degrees +% for a total width of |ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s+ar; y$v=y$s-ar; + z$u = z$v shifted (sz*right); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; +%% filldraw z$s--z$t--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_plq + +% \end{macrocode} +% \end{routine} +% +% +% Set the mode and font setup. +% \begin{macrocode} + +font_coding_scheme:="ASCII minuscules and punctuation"; +mode_setup; +huncial_font_setup; + +% \end{macrocode} +% +% +% We generate letters, together with some punctuation and +% analphabetics. +% \begin{macrocode} + +input huncll; % minuscules (lower case) +input hunclu; % majuscules (capitals) +input hunclpunct; % punctuation +input huncllig; % the several dashes +input huncldig; % arabic digits + +% \end{macrocode} +% +% Finally, do the uppercase ligtable. +% +% \begin{macrocode} + +font_slant slant; font_x_height x_height#; +if monospace: font_normal_space 9u#; % no stretching or shrinking + font_quad 18u#; + font_extra_space 9u#; +else: font_normal_space 6u#+2letter_fit#; + font_normal_stretch 3u#; font_normal_shrink 2u#; + font_quad 18u#+4letter_fit#; + font_extra_space 2u#; + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning +%% ligtable "P": "T": "Y": "A" kern kk#; +%% ligtable "F": "V": "W": "A" kern if serifs: kkk# else: kk#fi, +%% "K": "X": "O" kern k#, "C" kern k#, "G" kern k#, "Q" kern k#; +%% ligtable "O": "D": "X" kern k#, "W" kern k#, "A" kern k#, +%% "V" kern k#, "Y" kern k#; +%% ligtable "A": if serifs: "R": fi +%% "C" kern k#, "O" kern k#, "G" kern k#, "U" kern k#, "Q" kern k#, +%% "L": "T" kern kk#, "Y" kern kkk#, "V" kern kk#, "W" kern kkk#; +%%ligtable "I": "I" kern -k#; % Richard III +fi + +bye. + +%</mfd> +% \end{macrocode} +% +% \subsection{The code for normal letters} +% +% The following code is for the minuscule characters. +% +% \begin{macrocode} +%<*min> +% HUNCLL.MF Program file for Half Uncial minuscules +% + + +% \end{macrocode} +% +% +% \begin{routine}{a} +% The letter `a'. +% \begin{macrocode} +cmchar "HUncial letter a"; +beginchar("a", 2u#+hstretch*(x_height#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +rt x1=w-pcshiftx; top y1=h; +x2=x1; bot y2=0; +x5=x1-jut; y5=0.5[y1,y2]; +path p[]; +p1=z1{-pdir}..z5{down}..{right}z2; +% bowl +lft x3=pcshiftx; y3=y5; +x4=x6=0.5[x3,x5]; top y4=h; bot y6=0; +x2'=0.5[x2,x5]; +bowl_stem(6,2'); +rt x7=x6i; top y7=y6i; +rt x8=x1; y4-y8=y7-y6; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw p1; % the stem +draw z8..z4{left}..z3{down}..z6{right}..{pdir}z7; % the bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "a" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{b} +% The letter `b'. +% \begin{macrocode} +cmchar "HUncial letter b"; +beginchar("b", 2u#+hstretch*(x_height#+trijut#), asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; +% lower bowl +rt x4=w-pcshiftx; +x3=x5=0.5[x2,x4]; bot y3=0; top y5=h/ascratio; +y2=y4=0.5[y3,y5]; +x11=rt x1; bowl_stem(5,11); +lft x7=x5i; bot y7=y5i; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2{down}..z3{right}..z4{up}..z5{left}..{-pdir}z7; +draw_triserif(1,trijut); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "b" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{c} +% The letter `c'. +% \begin{macrocode} +cmchar "HUncial letter c"; +beginchar("c", 2u#+hstretch*(x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x3'=w-pcshiftx; +bowl_stem(4,3'); +rt x5=x4i; top y5=y4i; +x6=x5; y2-y6=y5-y4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; +ductus:=false; +penlabels(1,2,3,4,5,6,16,17,18,100); +endchar; % end "c" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{d} +% The letter `d'. +% \begin{macrocode} +cmchar "HUncial letter d"; +beginchar("d", 2u#+hstretch*(x_height#+thick#+jut#), asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx-jut; top y1=h; +x2=x1; bot y2=0; +x1'=lft x1; y1'=h; +lft x5=pcshiftx; +top y4=h/ascratio; bot y6=0; +x4=x6=0.5[x5,x1']; y5=0.5[y6,y4]; +bowl_stem(6,1'); +rt x7=x6i; top y7=y6i; +x8=x7; y4-y8=y7-y6; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw z8..z4{left}..z5{down}..z6{right}..{pdir}z7; % bowl +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "d" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{e} +% The letter `e'. +% \begin{macrocode} +cmchar "HUncial letter e"; +beginchar("e", 2u#+hstretch*(x_height#+trijut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx-trijut; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x3'=w-pcshiftx-trijut; +bowl_stem(4,3'); +rt x5=x4i; top y5=y4i; +% the bar +x7=x1; y7=y1; +rt x8=w-pcshiftx; top y8=2/3h; +path p[]; +p1=z7{right}..{pdir}z8; +p2=z2{right}..z3{down}..{left}z4; +z6 = p1 intersectionpoint p2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2{right}..z6; % the bowl +draw p1; % the bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{f} +% The letter `f'. +% \begin{macrocode} +cmchar "HUncial letter f"; +beginchar("f", 2u#+hstretch*(7/6x_height#+trijut#), (3/2x_height#), desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+trijut; +top y1=2/3h; bot y2=-d; +% bars +z3=z4=z1; +rt x5= rt x6=w-pcshiftx; top y5=h; y6=y4; +x7=0.5[x4,x6]; y7=y6-2thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_urswish(3,5); % top bar +draw z4..z7{right}..{pdir}z6; % bottom bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "f" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{g} +% The letter `g'. This came in three forms; like the `g' in the Artificial +% Uncial script, like an `S' with a bar at the top, or the form I have +% done here. +% \begin{macrocode} +cmchar "HUncial letter g"; +beginchar("g", 2u#+hstretch*(4/3x_height#), x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=thin; +pickup quill; +% top bar +lft x1=pcshiftx; top y1=h+alpha; +rt x3=w-pcshiftx; top y3=h-alpha; +% diagonal +rt x2=3/4w; top y2=h-alpha; +x4=1/4w; y4=0; +% the bowl +rt x6=w-pcshiftx; y6=-1/2d; +x7=1/2w; bot y7=-d; +lft x8=pcshiftx; top y8=-1/2d; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(1,3,alpha); % top bar +draw z2--z4; % diagonal +draw z4{pdir}..z6{down}..z7{left}..z8; % the bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "g" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{h} +% The letter `h'. +% \begin{macrocode} +cmchar "HUncial letter h"; +beginchar("h", 2u#+hstretch*(x_height#+trijut#), asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=0; +% bowl +rt x5=w-pcshiftx; y5=h/(2ascratio); +lft x6=2/3w; bot y6=0; +x4=0.5[x1,x5]; top y4=h/ascratio; +x1'=rt x1; +bowl_stem(4,1'); +lft x3=x4i; bot y3=y4i; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw z3{pdir}..z4{right}..z5{down}..z6; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "h" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{i} +% The letter i. +% \begin{macrocode} +cmchar "HUncial letter i"; +beginchar("i", 2u#+hstretch*(thick#+trijut#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_triserif(1,trijut); +ductus:=false; +penlabels(1,2,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{j} +% The letter `j'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "HUncial letter j"; +beginchar("j", 2u#+hstretch*(thick#+trijut#), x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=-1/2d; +lft x3=pcshiftx; bot y3=-d; +%%ductus:=true; +draw z1--z2{down}..{-pdir}z3; +draw_triserif(1,trijut); +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "j" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{k} +% The letter `k'. +% \begin{macrocode} +cmchar "HUncial letter k"; +beginchar("k", 2u#+hstretch*(x_height#+trijut#+jut#), asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=0; +% for the flick +numeric rise,fall,fjut; +x3=rt x1; y3=(3/4)*(h/ascratio); +rise:=1/6h; fall:=-rise/2; fjut:=1/2w; +% for the leg +z4=z3; +x5=w-pcshiftx-jut; y5=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_flick(3,rise,fall,fjut); % upper diag +draw_tstem(4,5,srad); % lower diag +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "k" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{l} +% The letter `l'. +% \begin{macrocode} +cmchar "HUncial letter l"; +beginchar("l", 2u#+hstretch*(7/6x_height#+trijut#), asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=0; +z3=z2; +rt x4=w-pcshiftx; bot y4=1/10h; +%%ductus:=true; +draw z1--z2; +draw_triserif(1,trijut); % the stem +draw z3{right}..{pdir}z4; % the foot +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "l" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{m} +% The letter `m'. +% \begin{macrocode} +cmchar "HUncial letter m"; +beginchar("m", 2u#+hstretch*(5/3x_height#+trijut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx+trijut; top y1=h; +x2=x1; bot y2=0; +x4=w/2; y4=2/3h; +x3=0.5[x2,x4]; top y3=h; +x5=x4; y5=y2; +z6=z4; +x7=3/4w; top y7=h; +rt x8=w-pcshiftx; y8=h/2; +lft x9=3/4w; y9=y2; +x14=x1; y14=y4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left half +draw_triserif(1,trijut); +draw z14..z3{right}..{down}z4; +draw_tstem(4,5,srad); % middle stem +draw z6..z7{right}..z8{down}..{-pdir}z9; % right half +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,14,100); +endchar; % end "m" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{n} +% The letter `n'. This could be like a capital `N' or a lower-case `n'. +% I have chosen to do the latter form. +% \begin{macrocode} +cmchar "HUncial letter n"; +beginchar("n", 2u#+hstretch*(x_height#+trijut#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left stem +lft x1=pcshiftx+trijut; top y1=h; +x2=x1; bot y2=0; +x1'=rt x1; +% right stem +rt x5=w-pcshiftx-jut; y5=h/2; +x6=x5; bot y6=0; +x4=0.5[x1,x5]; top y4=h; +bowl_stem(4,1'); +lft x3=x4i; bot y3=y4i; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left stem +draw_triserif(1,trijut); +draw_tstem(5,6,srad); % right stem +draw z3{pdir}..z4{right}..{down}z5; % the bowl top +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "n" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{o} +% The letter `o'. +% \begin{macrocode} +cmchar "HUncial letter o"; +beginchar("o", 2u#+hstretch*(7/6x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "o" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{p} +% The letter `p'. +% \begin{macrocode} +cmchar "HUncial letter p"; +beginchar("p", 2u#+hstretch*(7/6x_height#+trijut#), x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=-d; +% bowl +rt x4=w-pcshiftx; +x3=x5=0.5[x2,x4]; bot y3=0; top y5=h; +y4=0.5[y3,y5]; +x1'=rt x1; +bowl_stem(5,1'); +lft x7=x5i; bot y7=y5i; +lft x8=rt x1; bot y8=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw z8{right}..z4{up}..z5{left}..{-pdir}z7; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "p" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{q} +% The letter `q'. +% \begin{macrocode} +cmchar "HUncial letter q"; +beginchar("q", 2u#+hstretch*(7/6x_height#+jut#), x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right stem +rt x1=w-pcshiftx-jut; top y1=h; +x2=x1; bot y2=-d; +lft x5=pcshiftx; +top y4=h; bot y6=0; +x4=x6=0.5[x5,x1']; y5=0.5[y6,y4]; +x1'=lft x1; +bowl_stem(6,1'); +rt x7=x6i; top y7=y6i; +z8=z1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw z8{left}..z5{down}..z6{right}..{pdir}z7; % bowl +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{r} +% The letter `r'. +% \begin{macrocode} +cmchar "HUncial letter r"; +beginchar("r", 2u#+hstretch*(x_height#+trijut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+trijut; top y1=h; bot y2=0; +% bowl +lft x3=rt x1; bot y3=7/8h; +rt x5=w-pcshiftx; top y5=1/2h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw z3{pdir}..{pdir}z5; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "r" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{s} +% The letter `s'. This is a `long' S. +% \begin{macrocode} +cmchar "HUncial letter s"; +beginchar("s", 2u#+hstretch*(x_height#+trijut#), 3/2x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+trijut; top y1=2/3h; bot y2=0; +% arm +x5=w-pcshiftx; y5=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +%%draw z1{pdir}..{right}z5; % arm +draw_urswish(1,5); +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,26,27,28,100); +endchar; % end "s" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{t} +% The letter `t'. +% \begin{macrocode} +cmchar "HUncial letter t"; +beginchar("t", 2u#+hstretch*(4/3x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% bowl +lft x1=pcshiftx+1/4w; rt x3=w-pcshiftx; y1=h/3; y3=h/2; +x2=x4=0.5[x1,x3]; top y2=h; bot y4=0; +x6=x3; +x6'=w-pcshiftx; +bowl_stem(4,6'); +rt x5=x4i; top y5=y4i; +top y6=h; +% arm +lft x12=pcshiftx; top y12=h; +x11=0.5[x6,x12]; y11=y12-thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1{up}..{pdir}z6; % bowl +draw z6..z11..z12; % top bar +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "t" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{u} +% The letter `u'. +% \begin{macrocode} +cmchar "HUncial letter u"; +beginchar("u", 2u#+hstretch*(x_height#+trijut#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left half first +lft x6=pcshiftx+trijut; +top y6=h; +x7=x6; y7=h/2; +x8=0.5[x6,x1]; bot y8=0; +% the stem +rt x1=w-pcshiftx-jut; top y1=h; +x2=x1; bot y2=0; +% construction points for the curved part +x1'=lft x1; +bowl_stem(8,1'); +rt x9=x8i; top y9=y8i; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_triserif(6,trijut); % left half +draw z6--z7{down}..z8{right}..{pdir}z9; +draw_tstem(1,2,srad); % right stem +draw_triserif(1,trijut); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "u" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{v} +% The letter `v'. The right half of the `w' is used for the `v' (or vice-versa +% if you prefer). +% \begin{macrocode} +cmchar "HUncial letter v"; +beginchar("v", 2u#+hstretch*(x_height#+trijut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right side of W +numeric midx; midx:= pcshiftx; +lft x1=midx+trijut; top y1=h; +x2=x1; y2=h/2; +rt x4=w-pcshiftx; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-trijut; y5=y1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_triserif(1,trijut); +%%draw_triserif(5,trijut); +draw z1--z2{down}..z3{right}..z4{up}..z5; +ductus:=false; +penlabels(1,2,3,4,5,11,100); +endchar; % end "v" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{w} +% The letter `w'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "HUncial letter w"; +beginchar("w", 2u#+hstretch*(5/3x_height#+trijut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right side first +numeric midx; midx:= w/2-trijut; +lft x1=midx+trijut; top y1=h; +x2=x1; y2=h/2; +rt x4=w-pcshiftx; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-trijut; y5=y1; +% left side +lft x6=pcshiftx+trijut; +top y6=h; +%%lft x7=pcshiftx; y7=y2; +x7=x6; y7=y2; +x8=0.5[x7,x1]; y8=y3; +% construction points +x15=0.5[x8,x1]; y15=y8; +z15'=z15 shifted (w*pdir); +x2'=x2; y2'=y15; +path p[]; +p1=z1--z2'; +p2=z15--z15'; +z9= p2 intersectionpoint p1; +pair vec[]; +p3=z6..z7{down}..{right}z8; +vec3 = direction 0 of p3; +z16=z6 shifted vec3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_triserif(1,trijut); % right half +draw z1--z2{down}..z3{right}..z4{up}..z5; +draw_triserif(6,trijut); % left half +draw z6--z7{down}..z8{right}..z9; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "w" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{x} +% The letter `x'. +% \begin{macrocode} +cmchar "HUncial letter x"; +beginchar("x", 2u#+hstretch*(4/3x_height#+jut#), x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% thick diagonal +lft x1=1/4w; rt x2=w-pcshiftx-jut; +y1=h; y2=0; +% top half of thin diagonal +rt x4=w-pcshiftx; top y4=h; +z3=2/3[z2,z1]; +% bottom half +lft x6=pcshiftx; bot y6=-d; +path p[]; +pair vec; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % thick diagonal +draw_urswish(3,4); % top thin diagonal +p1=z3..z4s1{pdir}..z4s2{down}; % bottom thin diagonal +vec= direction 0 of p1; +draw z3{-vec}..{down}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "x" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{y} +% The letter `y'. This has a dot on top! +% \begin{macrocode} +cmchar "HUncial letter y"; +beginchar("y", 2u#+hstretch*(4/3x_height#), x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left stroke +lft x1=pcshiftx; top y1=h; +lft x3=w/2; bot y3=-d; +x2=lft x5; y2=bot y5; +% right stroke +x5=w/2; y5=1/3h; +x4=w-pcshiftx; top y4=h; +% the dot +x8=w/2; y8=h+jut; +if ductus: + pickup stylus; +fi +draw z1..z2..z3; % left stroke +draw_urswish(2,4); % right stroke +draw_pdot(8,dot_size); % the dot +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{z} +% The letter `z'. +% \begin{macrocode} +cmchar "HUncial letter z"; +beginchar("z", 2u#+hstretch*(5/3x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha, beta; alpha:=thin; beta:=2thin; +pickup quill; +% bottom stroke +lft x4=pcshiftx; bot y4=0; x14=x4; y14=y4+beta; +rt x6=w-pcshiftx; bot y6=-beta; +% top stroke +lft x1=1/5w; top y1=h+alpha; +rt x3=4/5w; top y3=h; x13=x3; y13=y3-alpha; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(1,13,alpha); % top stroke +draw_wave(14,6,beta); % bottom stroke +draw z4--z3; % diagonal +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "z" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file +% \begin{macrocode} +%</min> +% \end{macrocode} +% +% +% \subsection{The code for capital letters} +% +% \thisfont{} `capitals' were drawn with the same pen as for the minuscules, +% and the letters were merely larger versions of the minuscules. +% +% \begin{macrocode} +%<*maj> +% HUNCLU.MF Program file for Half Uncial `capitals' +% + +% \end{macrocode} +% +% +% \begin{routine}{A} +% The letter `A'. +% \begin{macrocode} +cmchar "HUncial letter A"; +beginchar("A", 2u#+caprat*hstretch*(x_height#+jut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +rt x1=w-pcshiftx; top y1=h; +x2=x1; bot y2=0; +x5=x1-jut; y5=0.5[y1,y2]; +path p[]; +p1=z1{-pdir}..z5{down}..{right}z2; +% bowl +lft x3=pcshiftx; y3=y5; +x4=x6=0.5[x3,x5]; top y4=h; bot y6=0; +x2'=0.5[x2,x5]; +bowl_stem(6,2'); +rt x7=x6i; top y7=y6i; +rt x8=x1; y4-y8=y7-y6; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw p1; % the stem +draw z8..z4{left}..z3{down}..z6{right}..{pdir}z7; % the bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "A" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{B} +% The letter `B'. +% \begin{macrocode} +cmchar "HUncial letter B"; +beginchar("B", 2u#+caprat*hstretch*(x_height#+trijut#), caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; +% lower bowl +rt x4=w-pcshiftx; +x3=x5=0.5[x2,x4]; bot y3=0; top y5=h/ascratio; +y2=y4=0.5[y3,y5]; +x11=rt x1; bowl_stem(5,11); +lft x7=x5i; bot y7=y5i; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2{down}..z3{right}..z4{up}..z5{left}..{-pdir}z7; +draw_triserif(1,trijut); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "B" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{C} +% The letter `C'. +% \begin{macrocode} +cmchar "HUncial letter C"; +beginchar("C", 2u#+caprat*hstretch*(x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x3'=w-pcshiftx; +bowl_stem(4,3'); +rt x5=x4i; top y5=y4i; +x6=x5; y2-y6=y5-y4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; +ductus:=false; +penlabels(1,2,3,4,5,6,16,17,18,100); +endchar; % end "C" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{D} +% The letter `D'. +% \begin{macrocode} +cmchar "HUncial letter D"; +beginchar("D", 2u#+caprat*hstretch*(x_height#+thick#+jut#), caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx-jut; top y1=h; +x2=x1; bot y2=0; +x1'=lft x1; y1'=h; +lft x5=pcshiftx; +top y4=h/ascratio; bot y6=0; +x4=x6=0.5[x5,x1']; y5=0.5[y6,y4]; +bowl_stem(6,1'); +rt x7=x6i; top y7=y6i; +x8=x7; y4-y8=y7-y6; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw z8..z4{left}..z5{down}..z6{right}..{pdir}z7; % bowl +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "D" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{E} +% The letter `E'. +% \begin{macrocode} +cmchar "HUncial letter E"; +beginchar("E", 2u#+caprat*hstretch*(x_height#+trijut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx-trijut; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x3'=w-pcshiftx-trijut; +bowl_stem(4,3'); +rt x5=x4i; top y5=y4i; +% the bar +x7=x1; y7=y1; +rt x8=w-pcshiftx; top y8=2/3h; +path p[]; +p1=z7{right}..{pdir}z8; +p2=z2{right}..z3{down}..{left}z4; +z6 = p1 intersectionpoint p2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2{right}..z6; % the bowl +draw p1; % the bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "E" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{F} +% The letter `F'. +% \begin{macrocode} +cmchar "HUncial letter F"; +beginchar("F", 2u#+caprat*hstretch*(7/6x_height#+trijut#), caprat*(3/2x_height#), + caprat*desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+trijut; +top y1=2/3h; bot y2=-d; +% bars +z3=z4=z1; +rt x5= rt x6=w-pcshiftx; top y5=h; y6=y4; +x7=0.5[x4,x6]; y7=y6-2thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_urswish(3,5); % top bar +draw z4..z7{right}..{pdir}z6; % bottom bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "F" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{G} +% The letter `G'. +% \begin{macrocode} +cmchar "HUncial letter G"; +beginchar("G", 2u#+caprat*hstretch*(4/3x_height#), caprat*x_height#, + caprat*desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=thin; +pickup quill; +% top bar +lft x1=pcshiftx; top y1=h+alpha; +rt x3=w-pcshiftx; top y3=h-alpha; +% diagonal +rt x2=3/4w; top y2=h-alpha; +x4=1/4w; y4=0; +% the bowl +rt x6=w-pcshiftx; y6=-1/2d; +x7=1/2w; bot y7=-d; +lft x8=pcshiftx; top y8=-1/2d; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(1,3,alpha); % top bar +draw z2--z4; % diagonal +draw z4{pdir}..z6{down}..z7{left}..z8; % the bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "G" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{H} +% The letter `H'. +% \begin{macrocode} +cmchar "HUncial letter H"; +beginchar("H", 2u#+caprat*hstretch*(x_height#+trijut#), caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=0; +% bowl +rt x5=w-pcshiftx; y5=h/(2ascratio); +lft x6=2/3w; bot y6=0; +x4=0.5[x1,x5]; top y4=h/ascratio; +x1'=rt x1; +bowl_stem(4,1'); +lft x3=x4i; bot y3=y4i; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw z3{pdir}..z4{right}..z5{down}..z6; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "H" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{I} +% The letter I. +% \begin{macrocode} +cmchar "HUncial letter I"; +beginchar("I", 2u#+hstretch*(thick#+trijut#+jut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_triserif(1,trijut); +ductus:=false; +penlabels(1,2,100); +endchar; % end "I" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{J} +% The letter `J'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "HUncial letter J"; +beginchar("J", 2u#+hstretch*(thick#+trijut#), caprat*x_height#, caprat*desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=-1/2d; +lft x3=pcshiftx; bot y3=-d; +%%ductus:=true; +draw z1--z2{down}..{-pdir}z3; +draw_triserif(1,trijut); +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "J" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{K} +% The letter `K'. +% \begin{macrocode} +cmchar "HUncial letter K"; +beginchar("K", 2u#+caprat*hstretch*(x_height#+trijut#+jut#), caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=0; +% for the flick +numeric rise,fall,fjut; +x3=rt x1; y3=(3/4)*(h/ascratio); +rise:=1/6h; fall:=-rise/2; fjut:=1/2w; +% for the leg +z4=z3; +x5=w-pcshiftx-jut; y5=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_flick(3,rise,fall,fjut); % upper diag +draw_tstem(4,5,srad); % lower diag +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "K" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{L} +% The letter `L'. +% \begin{macrocode} +cmchar "HUncial letter L"; +beginchar("L", 2u#+caprat*hstretch*(7/6x_height#+trijut#), caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=0; +z3=z2; +rt x4=w-pcshiftx; bot y4=1/10h; +%%ductus:=true; +draw z1--z2; +draw_triserif(1,trijut); % the stem +draw z3{right}..{pdir}z4; % the foot +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "L" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{M} +% The letter `M'. +% \begin{macrocode} +cmchar "HUncial letter M"; +beginchar("M", 2u#+caprat*hstretch*(5/3x_height#+trijut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx+trijut; top y1=h; +x2=x1; bot y2=0; +x4=w/2; y4=2/3h; +x3=0.5[x2,x4]; top y3=h; +x5=x4; y5=y2; +z6=z4; +x7=3/4w; top y7=h; +rt x8=w-pcshiftx; y8=h/2; +lft x9=3/4w; y9=y2; +x14=x1; y14=y4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left half +draw_triserif(1,trijut); +draw z14..z3{right}..{down}z4; +draw_tstem(4,5,srad); % middle stem +draw z6..z7{right}..z8{down}..{-pdir}z9; % right half +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,14,100); +endchar; % end "M" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{N} +% The letter `N'. +% \begin{macrocode} +cmchar "HUncial letter N"; +beginchar("N", 2u#+caprat*hstretch*(x_height#+trijut#+jut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left stem +lft x1=pcshiftx+trijut; top y1=h; +x2=x1; bot y2=0; +x1'=rt x1; +% right stem +rt x5=w-pcshiftx-jut; y5=h/2; +x6=x5; bot y6=0; +x4=0.5[x1,x5]; top y4=h; +bowl_stem(4,1'); +lft x3=x4i; bot y3=y4i; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left stem +draw_triserif(1,trijut); +draw_tstem(5,6,srad); % right stem +draw z3{pdir}..z4{right}..{down}z5; % the bowl top +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "N" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{O} +% The letter `O'. +% \begin{macrocode} +cmchar "HUncial letter O"; +beginchar("O", 2u#+caprat*hstretch*(7/6x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "O" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{P} +% The letter `P'. +% \begin{macrocode} +cmchar "HUncial letter P"; +beginchar("P", 2u#+caprat*hstretch*(7/6x_height#+trijut#), caprat*x_height#, + caprat*desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=-d; +% bowl +rt x4=w-pcshiftx; +x3=x5=0.5[x2,x4]; bot y3=0; top y5=h; +y4=0.5[y3,y5]; +x1'=rt x1; +bowl_stem(5,1'); +lft x7=x5i; bot y7=y5i; +lft x8=rt x1; bot y8=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw z8{right}..z4{up}..z5{left}..{-pdir}z7; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "P" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Q} +% The letter `Q'. +% \begin{macrocode} +cmchar "HUncial letter Q"; +beginchar("Q", 2u#+caprat*hstretch*(7/6x_height#+jut#), caprat*x_height#, + caprat*desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right stem +rt x1=w-pcshiftx-jut; top y1=h; +x2=x1; bot y2=-d; +lft x5=pcshiftx; +top y4=h; bot y6=0; +x4=x6=0.5[x5,x1']; y5=0.5[y6,y4]; +x1'=lft x1; +bowl_stem(6,1'); +rt x7=x6i; top y7=y6i; +z8=z1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw z8{left}..z5{down}..z6{right}..{pdir}z7; % bowl +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "Q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{R} +% The letter `R'. +% \begin{macrocode} +cmchar "HUncial letter R"; +beginchar("R", 2u#+caprat*hstretch*(x_height#+trijut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+trijut; top y1=h; bot y2=0; +% bowl +lft x3=rt x1; bot y3=7/8h; +rt x5=w-pcshiftx; top y5=1/2h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw z3{pdir}..{pdir}z5; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "R" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{S} +% The letter `S'. This is a `long' S. +% \begin{macrocode} +cmchar "HUncial letter S"; +beginchar("S", 2u#+caprat*hstretch*(x_height#+trijut#), caprat*(3/2x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+trijut; top y1=2/3h; bot y2=0; +% arm +x5=w-pcshiftx; y5=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +%%draw z1{pdir}..{right}z5; % arm +draw_urswish(1,5); +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,26,27,28,100); +endchar; % end "S" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{T} +% The letter `T'. +% \begin{macrocode} +cmchar "HUncial letter T"; +beginchar("T", 2u#+caprat*hstretch*(4/3x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% bowl +lft x1=pcshiftx+1/4w; rt x3=w-pcshiftx; y1=h/3; y3=h/2; +x2=x4=0.5[x1,x3]; top y2=h; bot y4=0; +x6=x3; +x6'=w-pcshiftx; +bowl_stem(4,6'); +rt x5=x4i; top y5=y4i; +top y6=h; +% arm +lft x12=pcshiftx; top y12=h; +x11=0.5[x6,x12]; y11=y12-thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1{up}..{pdir}z6; % bowl +draw z6..z11..z12; % top bar +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "T" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{U} +% The letter `U'. +% \begin{macrocode} +cmchar "HUncial letter U"; +beginchar("U", 2u#+caprat*hstretch*(x_height#+trijut#+jut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left half first +lft x6=pcshiftx+trijut; +top y6=h; +x7=x6; y7=h/2; +x8=0.5[x6,x1]; bot y8=0; +% the stem +rt x1=w-pcshiftx-jut; top y1=h; +x2=x1; bot y2=0; +% construction points for the curved part +x1'=lft x1; +bowl_stem(8,1'); +rt x9=x8i; top y9=y8i; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_triserif(6,trijut); % left half +draw z6--z7{down}..z8{right}..{pdir}z9; +draw_tstem(1,2,srad); % right stem +draw_triserif(1,trijut); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "U" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{V} +% The letter `V'. The right half of the `w' is used for the `v' (or vice-versa +% if you prefer). +% \begin{macrocode} +cmchar "HUncial letter V"; +beginchar("V", 2u#+caprat*hstretch*(x_height#+trijut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right side of W +numeric midx; midx:= pcshiftx; +lft x1=midx+trijut; top y1=h; +x2=x1; y2=h/2; +rt x4=w-pcshiftx; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-trijut; y5=y1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_triserif(1,trijut); +%%draw_triserif(5,trijut); +draw z1--z2{down}..z3{right}..z4{up}..z5; +ductus:=false; +penlabels(1,2,3,4,5,11,100); +endchar; % end "V" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{W} +% The letter `W'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "HUncial letter W"; +beginchar("W", 2u#+caprat*hstretch*(5/3x_height#+trijut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right side first +numeric midx; midx:= w/2-trijut; +lft x1=midx+trijut; top y1=h; +x2=x1; y2=h/2; +rt x4=w-pcshiftx; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-trijut; y5=y1; +% left side +lft x6=pcshiftx+trijut; +top y6=h; +%%lft x7=pcshiftx; y7=y2; +x7=x6; y7=y2; +x8=0.5[x7,x1]; y8=y3; +% construction points +x15=0.5[x8,x1]; y15=y8; +z15'=z15 shifted (w*pdir); +x2'=x2; y2'=y15; +path p[]; +p1=z1--z2'; +p2=z15--z15'; +z9= p2 intersectionpoint p1; +pair vec[]; +p3=z6..z7{down}..{right}z8; +vec3 = direction 0 of p3; +z16=z6 shifted vec3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_triserif(1,trijut); % right half +draw z1--z2{down}..z3{right}..z4{up}..z5; +draw_triserif(6,trijut); % left half +draw z6--z7{down}..z8{right}..z9; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "W" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{X} +% The letter `X'. +% \begin{macrocode} +cmchar "HUncial letter X"; +beginchar("X", 2u#+caprat*hstretch*(4/3x_height#+jut#), caprat*x_height#, + caprat*desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% thick diagonal +lft x1=1/4w; rt x2=w-pcshiftx-jut; +y1=h; y2=0; +% top half of thin diagonal +rt x4=w-pcshiftx; top y4=h; +z3=2/3[z2,z1]; +% bottom half +lft x6=pcshiftx; bot y6=-d; +path p[]; +pair vec; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % thick diagonal +draw_urswish(3,4); % top thin diagonal +p1=z3..z4s1{pdir}..z4s2{down}; % bottom thin diagonal +vec= direction 0 of p1; +draw z3{-vec}..{down}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "X" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Y} +% The letter `Y'. This has a dot on top! +% \begin{macrocode} +cmchar "HUncial letter Y"; +beginchar("Y", 2u#+caprat*hstretch*(4/3x_height#), caprat*x_height#, + caprat*desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left stroke +lft x1=pcshiftx; top y1=h; +lft x3=w/2; bot y3=-d; +x2=lft x5; y2=bot y5; +% right stroke +x5=w/2; y5=1/3h; +x4=w-pcshiftx; top y4=h; +% the dot +x8=w/2; y8=h+jut; +if ductus: + pickup stylus; +fi +draw z1..z2..z3; % left stroke +draw_urswish(2,4); % right stroke +draw_pdot(8,dot_size); % the dot +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "Y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{Z} +% The letter `Z'. +% \begin{macrocode} +cmchar "HUncial letter Z"; +beginchar("Z", 2u#+caprat*hstretch*(5/3x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha, beta; alpha:=thin; beta:=2thin; +pickup quill; +% bottom stroke +lft x4=pcshiftx; bot y4=0; x14=x4; y14=y4+beta; +rt x6=w-pcshiftx; bot y6=-beta; +% top stroke +lft x1=1/5w; top y1=h+alpha; +rt x3=4/5w; top y3=h; x13=x3; y13=y3-alpha; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(1,13,alpha); % top stroke +draw_wave(14,6,beta); % bottom stroke +draw z4--z3; % diagonal +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "Z" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file +% \begin{macrocode} +%</maj> +% \end{macrocode} +% +% +% +% \subsection{The punctuation file} +% +% The main punctuation marks are defined in this file. +% +% \begin{macrocode} +%<*punct> +% HUNCLPUNCT.MF This file contains punctuation marks + +% \end{macrocode} +% +% +% \begin{routine}{,} +% The `,' character. +% \begin{macrocode} + +cmchar "Uncial Comma"; +beginchar(",",2u#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h/2; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "," + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{.} +% The `.' character. +% \begin{macrocode} + +cmchar "Uncial Period"; +beginchar(".",2u#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=u; +x1=w/2; y1=h/2; +draw_pdot(1,dot_size); +penlabels(1); +endchar; % end of "." + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{:} +% The `:' character. +% \begin{macrocode} + +cmchar "Uncial Colon"; +beginchar(":",2u#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=u; +x1=x2=w/2; y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pdot(2,dot_size); +penlabels(1,2); +endchar; % end ":" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{;} +% The `;' character. +% \begin{macrocode} + +cmchar "Uncial Semicolon"; +beginchar(";",2u#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pcomma(2,dot_size,comma_width); +penlabels(1,2); +endchar; % end of ";" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{'} +% The `'' character. +% \begin{macrocode} + +cmchar "Uncial Apostrophe"; +beginchar("'",2u#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "'" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{`} +% The ``' character. +% \begin{macrocode} + +cmchar "Uncial Reverse apostrophe"; +beginchar("`",2u#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=pcshiftx+(0.5hstretch*dot_size); y1=h; +draw_plq(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "`" + +% \end{macrocode} +% \end{routine} +% +% The end of this file. +% \begin{macrocode} +%</punct> +% \end{macrocode} +% +% +% \subsection{The ligatures and dashes file} +% +% The ligatured letters, punctuation marks and dashes are defined in this file. +% \begin{macrocode} +%<*lig> +% HUNCLLIG.MF Uncial ligatured letters, punctation and dashes + +% \end{macrocode} +% First the ligtables. +% \begin{macrocode} + +ligtable "`": "`"=:oct"134"; +ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#; + +ligtable "-": "-"=:oct"173"; +ligtable oct"173": "-"=:oct"174"; + +ligtable "f": "i"=:oct"014"; + +% \end{macrocode} +% +% \begin{routine}{''} +% The `''' ligature. +% \begin{macrocode} + +cmchar "Uncial closing quotes"; +beginchar(oct"042",2u#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h; +x2=x1-(2hstretch*dot_size); +draw_pcomma(1,dot_size,comma_width); % right +draw_pcomma(2,dot_size,comma_width); % left +penlabels(1,2); +endchar; % end of "''" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{``} +% The ```' ligature. +% \begin{macrocode} + +cmchar "Uncial opening quotes"; +beginchar(oct"134",2u#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h; +x2=x1+(2hstretch*dot_size); +draw_plq(1,dot_size,comma_width); % left +draw_plq(2,dot_size,comma_width); % right +penlabels(1,2); +endchar; % end of "``" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{-} +% The `-' character. +% \begin{macrocode} + +cmchar "Uncial hyphen"; +beginchar("-",u#+hstretch*(0.8x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u/2; +numeric alpha; alpha:=w/8; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +x11=lft x1+alpha/2; y11=top y1-0.5thin; +x12=rt x2; y12=bot y1+0.5thin; +draw z1--z2; % bar +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +penlabels(1,2); +endchar; % end of "-" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{--} +% The -- ligature. +% \begin{macrocode} + +cmchar "Uncial en dash"; +beginchar(oct"173",u#+hstretch*(x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u/2; +numeric alpha; alpha:=w/8; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +x11=lft x1+alpha/2; y11=top y1-0.5thin; +x12=rt x2; y12=bot y1+0.5thin; +draw z1--z2; % bar +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +penlabels(1,2); +endchar; % end of "--" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{---} +% The `---' ligature. The em dash is twice the width of the en dash. +% \begin{macrocode} + +cmchar "Uncial em dash"; +beginchar(oct"174",u#+hstretch*(2x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u/2; +numeric alpha; alpha:=w/8; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +x11=lft x1+alpha/2; y11=top y1-0.5thin; +x12=rt x2; y12=bot y1+0.5thin; +draw z1--z2; % bar +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +penlabels(1,2); +endchar; % end of "---" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{fi} +% The `fi' ligature. +% \begin{macrocode} + +cmchar "HUncial ligature fi"; +beginchar(oct"014", 2u#+hstretch*(7/6x_height#+trijut#), (3/2x_height#), desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=lft x2=pcshiftx+trijut; +top y1=2/3h; bot y2=-d; +% bars +z3=z4=z1; +rt x5=w-pcshiftx; top y5=h; +rt x6=w-pcshiftx-jut; y6=y4; +x7=x6; bot y7=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% the f part +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_urswish(3,5); % top bar +draw z4--z6; % bottom bar +% the i part +draw_tstem(6,7,srad); % stem +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end of "fi" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{&} +% The ampersand (which is really an `et' ligature). +% \begin{macrocode} + +cmchar "HUncial ampersand"; +beginchar("&", 2u#+hstretch*(5/3x_height#), x_height#, 0.5desc_depth#); +adjust_fit(0,0); +pcshiftx:=u; +numeric alpha; alpha:=3/5w-u; +pickup quill; +% for the e part +lft x1=pcshiftx; rt x3= alpha; y1=y3=h/2; +x2=x4=alpha/2; top y2=h; bot y4=0; +x3'=alpha; +bowl_stem(4,3'); +rt x5=x4i; top y5=y4i; +rt x6=x4i; y5-y4=y2-y6; +% the bar +x7=x1; y7=y1; +rt x8=w-pcshiftx; y8=y7; +% the t part +lft x9=x5; y9=y5; +x10=0.5[x9,x8]; bot y10=-d; +x8'=x8; +bowl_stem(10,8'); +x11=x10i; y11=y10i; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; % the E bowl +draw z7--z8; % the (top) bar +draw z8{left}..z9..z10{right}..{pdir}z11; % the T bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,16,17,18,31,32,33); +endchar; % end of "&" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</lig> +% \end{macrocode} +% +% \subsection{The digits file} +% +% These are arabic digits in the style of the book-hand. They are a +% modern invention. +% +% \begin{macrocode} +%<*dig> +% HUNCLDIG.MF Program file for Half Uncial digits +% + +% \end{macrocode} +% +% +% \begin{routine}{1} +% The digit `1'. +% \begin{macrocode} +cmchar "HUncial digit 1"; +beginchar("1", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +x1=x2=w/2; +y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_triserif(1,trijut); +ductus:=false; +penlabels(1,2,100); +endchar; % end "1" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{2} +% The digit `2'. +% \begin{macrocode} +cmchar "HUncial digit 2"; +beginchar("2", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=pcshiftx+o; top y1=h-2thin; +x2=1/2w; top y2= h+o; +rt x3=w-pcshiftx-o; y3=3/4h; +% foot +lft x5=pcshiftx; bot y5=0; +rt x6=w-pcshiftx; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{down}..{-pdir}z5; % curve +draw z5--z6; % foot +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "2" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{3} +% The digit `3'. +% \begin{macrocode} +cmchar "HUncial digit 3"; +beginchar("3", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% x values +lft x3=pcshiftx; x10=x3; +rt x5=w-pcshiftx; x8=x5-3thin; +x4=0.5[x3,x5]; +x9=0.5[x10,x8]; +lft x6=pcshiftx+3thin; x7=x6; +% y values +bot y3=thin; top y10=h-2thin; +y6=0.5[y3,y10]; y7=y6; +bot y4=-thin; top y9=h+thin; +y5=0.5[y3,y6]; +y8=11/12[y7,y10]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z3..z4{right}..z5{up}...{-pdir}z6; % bottom bowl +draw z7{pdir}...z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "3" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{4} +% The digit `4'. +% \begin{macrocode} +cmchar "HUncial digit 4"; +beginchar("4", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the stem +x1=x2=w-pcshiftx-jut; +y1=h; bot y2=0; +% the crossbar +lft x3=pcshiftx; y3=0.33h; +rt x4=w-pcshiftx; y4=y3; +% the diagonal +lft x5=pcshiftx+jut; y5=h; +x6=x5; y6=y4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % main stem +draw z3--z4; % crossbar +draw z3{pdir}..{pdir}z1; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "4" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{5} +% The digit `5'. +% \begin{macrocode} +cmchar "HUncial digit 5"; +beginchar("5", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% for the top +rt x1=w-pcshiftx; top y1=h; +lft x2=pcshiftx+trijut; y2=y1; +% the S curve +x3=x2; y3=0.5h+thin; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +rt x5=w-pcshiftx; y5=0.3h; +x6=w/2; bot y6=0; +lft x7=pcshiftx+trijut; bot y7=2thin; +%%x8=w-pcshiftx; y8=h-0.5thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw_wave(2,1,thin); % top squiggle +draw z2--z1; % top bar +%%draw_rtriangle(8,3/4jut); +draw z3{pdir}..z5{down}..z6{left}..z7; % curve +draw z2--z3; % vertical +draw_triserif(2,trijut); +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "5" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{6} +% The digit `6'. +% \begin{macrocode} +cmchar "HUncial digit 6"; +beginchar("6", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx; top y1=h-2thin; +x2=1/2w; top y2= h; +lft x3=pcshiftx; y3=1/2h; +x4=x2; bot y4=0; +rt x5=w-pcshiftx; y5=1/4h; +lft x6=rt x3; bot y6=y3; +x8=w-pcshiftx; y8=h-0.5thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{left}..z3{down}..z4{right}..z5{up}..{-pdir}z6; +%%draw z1{left}..z3{down}..z4{right}..z5{up}..{-pdir}z6; +%%draw_rtriangle(8,3/4jut); +ductus:=false; +penlabels(1,2,3,4,5,6,8,100); +endchar; % end "6" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{7} +% The digit `7'. +% \begin{macrocode} +cmchar "HUncial digit 7"; +beginchar("7", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% top bar +lft x1=pcshiftx; +rt x2=w-pcshiftx; +top y1=top y2=h; +x8=pcshiftx+3/8jut; y8=h-0.5thin; +% bowed leg +x4=w/2; bot y4=0; +x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % top bar +%%draw_triangle(8,3/4jut); +draw z2..z3..z4; % leg +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "7" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{8} +% The digit `8'. +% \begin{macrocode} +cmchar "HUncial digit 8"; +beginchar("8", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=1; +pickup quill; +lft x1=alpha*pcshiftx+o; rt x3=w-alpha*pcshiftx-o; y1=y3=3/4h; +x2=x4=w/2; top y2=h+o; bot y4=-o; +x5=x2; y5=h/2+2o; +lft x11=pcshiftx; rt x13=w-pcshiftx; y11=y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z5..z11..z4..z13..z5..cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,100); +endchar; % end "8" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{9} +% The digit `9'. +% \begin{macrocode} +cmchar "HUncial digit 9"; +beginchar("9", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; bot y1=2thin; +x2=1/2w; bot y2= 0; +rt x3=w-pcshiftx; y3=1/2h; +x4=x2; top y4=h; +lft x5=pcshiftx; y5=3/4h; +rt x6=lft x3; top y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{up}..z4{left}..z5{down}..{pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "9" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{0} +% The digit `0'. +% \begin{macrocode} +cmchar "Uncial digit 0"; +beginchar("0", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "0" + +% \end{macrocode} +% \end{routine} +% +% +% +% +% The end of this file. +% \begin{macrocode} +%</dig> +% \end{macrocode} +% +% \section{The font definition files} \label{sec:fd} +% +% The font comes in normal and bold weights only. +% +% \begin{macrocode} +%<*fdot1> +\DeclareFontFamily{OT1}{huncl}{} + \DeclareFontShape{OT1}{huncl}{m}{n}{ <-8.5> huncl7 <8.5-15> huncl10 <15-> huncl17 }{} + \DeclareFontShape{OT1}{huncl}{m}{sl}{ <-> sub * huncl/m/n }{} + \DeclareFontShape{OT1}{huncl}{m}{it}{ <-> sub * huncl/m/n }{} + \DeclareFontShape{OT1}{huncl}{m}{sc}{ <-> sub * huncl/m/n }{} + \DeclareFontShape{OT1}{huncl}{m}{u}{ <-> sub * huncl/m/n }{} + \DeclareFontShape{OT1}{huncl}{bx}{n}{ <-8.5> hunclb7 <8.5-15> hunclb10 <15-> hunclb17 }{} + \DeclareFontShape{OT1}{huncl}{bx}{it}{ <-> sub * huncl/bx/n }{} + \DeclareFontShape{OT1}{huncl}{bx}{sl}{ <-> sub * huncl/bx/n }{} + \DeclareFontShape{OT1}{huncl}{b}{n}{ <-> sub * huncl/bx/n }{} +%</fdot1> +% \end{macrocode} +% +% +% \begin{macrocode} +%<*fdt1> +\DeclareFontFamily{T1}{huncl}{} + \DeclareFontShape{T1}{huncl}{m}{n}{ <-8.5> huncl7 <8.5-15> huncl10 <15-> huncl17 }{} + \DeclareFontShape{T1}{huncl}{m}{sl}{ <-> sub * huncl/m/n }{} + \DeclareFontShape{T1}{huncl}{m}{it}{ <-> sub * huncl/m/n }{} + \DeclareFontShape{T1}{huncl}{m}{sc}{ <-> sub * huncl/m/n }{} + \DeclareFontShape{T1}{huncl}{m}{u}{ <-> sub * huncl/m/n }{} + \DeclareFontShape{T1}{huncl}{bx}{n}{ <-8.5> hunclb7 <8.5-15> hunclb10 <15-> hunclb17 }{} + \DeclareFontShape{T1}{huncl}{bx}{it}{ <-> sub * huncl/bx/n }{} + \DeclareFontShape{T1}{huncl}{bx}{sl}{ <-> sub * huncl/bx/n }{} + \DeclareFontShape{T1}{huncl}{b}{n}{ <-> sub * huncl/bx/n }{} +%</fdt1> +% \end{macrocode} +% +% \section{The package code} \label{sec:code} +% +% \subsection{The \Lpack{huncial} package} +% +% The \Lpack{huncial} package is for typesetting short pieces of text +% in the \thisfont{} fonts. +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. +% \begin{macrocode} +%<*usc> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{huncial}[1999/05/22 v1.0 package for Half Uncial fonts] +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\hunclfamily} +% Selects the \thisfont{} font family in the OT1 or T1 encoding. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \newcommand{\hunclfamily}{\usefont{T1}{huncl}{m}{n}} +\else + \newcommand{\hunclfamily}{\usefont{OT1}{huncl}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\texthuncl} +% Text command for the \thisfont{} font family. +% \begin{macrocode} +\DeclareTextFontCommand{\texthuncl}{\hunclfamily} +% \end{macrocode} +% \end{macro} +% +% The end of this package. +% \begin{macrocode} +%</usc> +% \end{macrocode} +% +% \subsection{The \Lpack{allhuncl} package} +% +% The \Lpack{allhuncl} package is intended for use when the entire document +% will be typeset in the book-hand. This is a minimal package. Because the +% book-hand should not contain arabic digits a fuller package would redefine +% anything numbered in \LaTeX{} to use roman instead of arabic numbering. +% Also, because of the large |\baselineskip| many other aspects of \LaTeX{} +% to do with vertical positioning should also be redefined. +% +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. It also uses the \Lpack{huncial} package. +% \begin{macrocode} +%<*uscall> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{allhuncl}[1999/05/22 v1.0 package for all Half Uncial fonts] +\RequirePackage{huncial} +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% Redefine the default fonts to be \thisfont, which has only one family +% member. +% \begin{macro}{\rmdefault} +% \begin{macro}{\sfdefault} +% \begin{macro}{\ttdefault} +% \begin{macrocode} +\renewcommand{\rmdefault}{huncl} +\renewcommand{\sfdefault}{huncl} +\renewcommand{\ttdefault}{huncl} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The `leading' in the book-hands is a function of the |x-height|, which is +% normally much +% greater than for the CMR fonts. I have borrowed code from Frank Jensen's +% \Lpack{beton} package~\cite{BETON} to do this. The |x-height| (in points) +% for the CMR +% fonts is given in Table~\ref{tab:cmrx}. Note that the CMR design sizes are +% 5--10, 12, and 17.28 points. The other values given are scaled from these +% figures. +% +% \begin{table} +% \centering +% \caption{The x heights of the CMR and \thisfont{} fonts} \label{tab:cmrx} +% \begin{tabular}{ccc} \hline +% Design & CMR & \thisfont \\ +% Size & X Height & X Height \\ \hline +% 5 & 2.14 & 2.29 \\ ^^A CMR skip = 6pt = 2.8 times +% 6 & 2.58 & 2.76 \\ ^^A CMR skip = 7pt = 2.7 times +% 7 & 3.00 & 3.21 \\ ^^A CMR skip = 8pt = 2.7 times +% 8 & 3.44 & 3.68 \\ ^^A CMR skip = 9.5pt = 2.8 times +% 9 & 3.86 & 4.13 \\ ^^A CMR skip = 11pt = 2.8 times +% 10 & 4.31 & 4.61 \\ ^^A CMR skip = 12pt = 2.8 times +% 11 & 4.74 & 5.08 \\ ^^A CMR skip = 13.6pt = 2.8 times +% 12 & 5.17 & 5.53 \\ ^^A CMR skip = 14.5pt = 2.8 times +% 14 & 6.03 & 6.45 \\ ^^A CMR skip = 18pt = 3.0 times +% 17 & 7.44 & 7.96 \\ ^^A CMR skip = 22pt = 3.0 times +% 20 & 8.75 & 9.36 \\ ^^A CMR skip = 25pt = 2.9 times +% 25 & 10.94 & 11.71 \\ ^^A CMR skip = 30pt = 2.7 times +% \hline +% \end{tabular} +% \end{table} +% +% \begin{macro}{\huncial@baselineskip@table} +% A table of the normal font sizes and the corresponding baselineskip. +% The distance between baselines for \thisfont{} is over twice +% the |x-height|. ^^A actually 2.5 times +% +% \begin{macrocode} +\newcommand{\huncial@baselineskip@table}{% + <\@vpt>5.7% + <\@vipt>6.9% + <\@viipt>8.0% + <\@viiipt>9.2% + <\@ixpt>10.3% + <\@xpt>11.5% + <\@xipt>12.7% + <\@xiipt>13.8% + <\@xivpt>16.1% + <\@xviipt>19.9% + <\@xxpt>23.4% + <\@xxvpt>29.3} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\huncial@new@setfontsize} +% This is a macro that replaces the |\@setfontsize| macro which is called by +% the font size changing commands. +% \begin{macrocode} +\newcommand{\huncial@new@setfontsize}[3]{% + \edef\@tempa{\def\noexpand\@tempb####1<#2}% + \@tempa>##2<##3\@nil{\def\huncial@baselineskip@value{##2}}% + \edef\@tempa{\noexpand\@tempb\huncial@baselineskip@table<#2}% + \@tempa><\@nil + \ifx\huncial@baselineskip@value\@empty + \def\huncial@baselineskip@value{#3}% + \fi + \huncial@old@setfontsize{#1}{#2}\huncial@baselineskip@value} +% \end{macrocode} +% \end{macro} +% +% We had better give an author a means of using The Computer Modern fonts +% if necessary. +% +% \begin{macro}{\cmrfamily} +% \begin{macro}{\cmssfamily} +% \begin{macro}{\cmttfamily} +% These macros select the Computer Modern Roman, Sans, and Typewriter +% font families in either the T1 or OT1 encodings. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}} +\else + \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcmr} +% Text command for the Computer Modern Roman font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmr}{\cmrfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmss} +% Text command for the Computer Modern Sans font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmss}{\cmssfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmtt} +% Text command for the Computer Modern Typewriter font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmtt}{\cmttfamily} +% \end{macrocode} +% \end{macro} +% +% +% At the start of the document, change the |\@setfontsize| macro and call +% the normal font to implement the change. +% \begin{macrocode} +\AtBeginDocument{% + \let\huncial@old@setfontsize=\@setfontsize + \let\@setfontsize=\huncial@new@setfontsize} +\AtBeginDocument{\normalsize} +% \end{macrocode} +% +% +% The end of this package. +% \begin{macrocode} +%</uscall> +% \end{macrocode} +% +% +% +% \bibliographystyle{alpha} +% \renewcommand{\refname}{Bibliography} +% \begin{thebibliography}{GMS94} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem[And69]{ANDERSON69} +% Donald M.~Anderson. +% \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}. +% \newblock Holt, Rinehart and Winston, 1969. +% +% \bibitem[Bol95]{BOLOGNA95} +% Giulia Bologna. +% \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}. +% \newblock Crescent Books, 1995. +% +% \bibitem[Day95]{DAY95} +% Lewis F.~Day. +% \newblock {\em Alphabets Old \& New}. +% \newblock (3rd edition originally published by B.~T.~Batsford, 1910) +% \newblock Senate, 1995. +% +% \bibitem[Dro80]{DROGIN80} +% Marc Drogin. +% \newblock {\em Medieval Calligraphy: Its History and Technique}. +% \newblock Allenheld, Osmun \& Co., 1980. +% +% \bibitem[Dru95]{DRUCKER95} +% Johanna Drucker. +% \newblock {\em The Alphabetic Labyrinth}. +% \newblock Thames \& Hudson, 1995. +% +% \bibitem[Fir93]{FIRMAGE93} +% Richard A.~Firmage. +% \newblock {\em The Alphabet Abecedarium}. +% \newblock David R~Goodine, 1993. +% +% \bibitem[Fli98]{LETTRINE} +% Daniel Flipo. +% \newblock {\em The LETTRINE package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1998. +% +% \bibitem[Har95]{HARRIS95} +% David Harris. +% \newblock {\em The Art of Calligraphy}. +% \newblock DK Publishing, 1995. +% +% \bibitem[Jen95]{BETON} +% Frank Jensen. +% \newblock {\em The BETON package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1995. +% +% \bibitem[Joh71]{JOHNSTON75} +% Edward Johnston (ed. Heather Child). +% \newblock {\em Formal Penship and Other Papers}. +% \newblock Penthalic, 1971. +% +% \bibitem[Knu87]{CM} +% Donald E.~Knuth. +% \newblock {\em Computer Modern Typefaces}. +% \newblock Addison-Wesley, 1987. +% +% \bibitem[Knu92]{METAFONT} +% Donald E.~Knuth. +% \newblock {\em The METAFONTbook}. +% \newblock Addison-Wesley, 1992. +% +% \bibitem[GMS94]{GOOSSENS94} +% Michel Goossens, Frank Mittelbach, and Alexander Samarin. +% \newblock {\em The LaTeX Companion}. +% \newblock Addison-Wesley Publishing Company, 1994. +% +% \bibitem[Tho75]{THOMAS75} +% Alan G.~Thomas. +% \newblock {\em Great Books and Book Collectors}. +% \newblock Weidenfield and Nichoson, 1975. +% +% \bibitem[Wil99]{DOCMFP} +% Peter R.~Wilson. +% \newblock {\em The DOCMFP Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \bibitem[Wil99b]{ROMANNUM} +% Peter R.~Wilson. +% \newblock {\em The ROMANNUM Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \end{thebibliography} +% +% +% \Finale +% \PrintIndex +% +\endinput + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + diff --git a/Master/texmf-dist/source/latex/bookhands/huncial/huncial.ins b/Master/texmf-dist/source/latex/bookhands/huncial/huncial.ins new file mode 100644 index 00000000000..84f2d8cfb41 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/huncial/huncial.ins @@ -0,0 +1,101 @@ +%% +%% huncial.ins +%% Copyright 1999 Peter R. Wilson +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Peter Wilson (CUA) +%% now at: peter.r.wilson@boeing.com +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{huncial.ins} +\input docstrip.tex +\preamble + + Copyright 1999 Peter R. Wilson + + This program is provided under the terms of the + LaTeX Project Public License distributed from CTAN + archives in directory macros/latex/base/lppl.txt. + +Author: Peter Wilson (CUA) + now at: peter.r.wilson@boeing.com + +\endpreamble + +\keepsilent + +%%% \Msg{*** Generating the driver file ***} +%%% \generateFile{huncial.drv}{t}{\from{huncial.dtx}{driver}} + +\Msg{*** Generating the Metafont files ***} + +\usepostamble\empty +\generateFile{huncl7.mf}{t}{\from{huncial.dtx}{base7}} +\generateFile{huncl10.mf}{t}{\from{huncial.dtx}{base10}} +\generateFile{huncl17.mf}{t}{\from{huncial.dtx}{base17}} +\generateFile{hunclb7.mf}{t}{\from{huncial.dtx}{base7b}} +\generateFile{hunclb10.mf}{t}{\from{huncial.dtx}{base10b}} +\generateFile{hunclb17.mf}{t}{\from{huncial.dtx}{base17b}} +\generateFile{huncll.mf}{t}{\from{huncial.dtx}{min}} +\generateFile{hunclu.mf}{t}{\from{huncial.dtx}{maj}} +\generateFile{huncltitle.mf}{t}{\from{huncial.dtx}{mfd}} +\generateFile{hunclpunct.mf}{t}{\from{huncial.dtx}{punct}} +\generateFile{huncllig.mf}{t}{\from{huncial.dtx}{lig}} +\generateFile{huncldig.mf}{t}{\from{huncial.dtx}{dig}} + +\Msg{*** Generating the Font Definition files ***} +\usepostamble\defaultpostamble + +\generateFile{ot1huncl.fd}{t}{\from{huncial.dtx}{fdot1}} +\generateFile{t1huncl.fd}{t}{\from{huncial.dtx}{fdt1}} + +\Msg{*** Generating the LaTeX2e package files ***} + +\generateFile{huncial.sty}{t}{\from{huncial.dtx}{usc}} +\generateFile{allhuncl.sty}{t}{\from{huncial.dtx}{uscall}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into directories searched by TeX:} +\Msg{*} +\Msg{* Move these into the font source area:} +\Msg{* \space\space huncl7.mf} +\Msg{* \space\space huncl10.mf} +\Msg{* \space\space huncl17.mf} +\Msg{* \space\space hunclb7.mf} +\Msg{* \space\space hunclb10.mf} +\Msg{* \space\space hunclb17.mf} +\Msg{* \space\space huncll.mf} +\Msg{* \space\space hunclu.mf} +\Msg{* \space\space huncltitle.mf} +\Msg{* \space\space hunclpunct.mf} +\Msg{* \space\space huncllig.mf} +\Msg{* \space\space huncldig.mf} +\Msg{*} +\Msg{* Move these into the LaTeX macro area:} +\Msg{* \space\space ot1huncl.fd} +\Msg{* \space\space t1huncl.fd} +\Msg{* \space\space huncial.sty} +\Msg{* \space\space allhuncl.sty} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{* Process any name.idx file by:} +\Msg{* \space\space\space\space makeindex -s gind.ist name} +\Msg{* Process any name.glo file by:} +\Msg{* \space\space\space\space makeindex -s gglo.ist -o name.gls name.glo} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/bookhands/inslrmaj/inslrmaj.dtx b/Master/texmf-dist/source/latex/bookhands/inslrmaj/inslrmaj.dtx new file mode 100644 index 00000000000..a566a44ac9e --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/inslrmaj/inslrmaj.dtx @@ -0,0 +1,4809 @@ +% \iffalse meta-comment +% +% inslrmaj.dtx +% Copyright 1999 Peter R. Wilson +% +% This program is provided under the terms of the +% LaTeX Project Public License distributed from CTAN +% archives in directory macros/latex/base/lppl.txt. +% +% Author: Peter Wilson (CUA) (now at: peter.r.wilson@boeing.com) +% +% If you do not have the docmfp package (available from CTAN in +% tex-archive/macros/latex/contrib/supported), comment out the +% \usepackage{docmfp} line below and uncomment the line following it. +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{docmfp} +%%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{} +\EnableCrossrefs +\CodelineIndex +%%\OnlyDescription +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{inslrmaj.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{132} +% +% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} +% \DoNotIndex{\@centercr,\@cite} +% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} +% \DoNotIndex{\@input,\@ixpt,\@m} +% \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} +% \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} +% \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} +% \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} +% \DoNotIndex{\advance,\Alph,\alph} +% \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\bullet} +% \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} +% \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} +% \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} +% \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +% \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} +% \DoNotIndex{\fbox} +% \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} +% \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +% \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} +% \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} +% \DoNotIndex{\input} +% \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} +% \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} +% \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +% \DoNotIndex{\NeedsTeXFormat,\newdimen} +% \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} +% \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} +% \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} +% \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +% \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +% \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +% \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} +% \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} +% \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} +% \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} +% \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} +% \DoNotIndex{\viipt,\vipt,\vskip,\vspace} +% \DoNotIndex{\wd,\xiipt,\year,\z@} +% +% \changes{v1.0}{1999/05/22}{First public release} +% \changes{v1.0a}{2001/01/02}{Fixed missing * in .fd files} +% +% ^^A \def\fileversion{v1.0} +% ^^A \def\filedate{1999/05/22} +% \def\fileversion{v1.0a} +% \def\filedate{2001/01/02} +% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package +% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option +% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file +% \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter +% \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle +% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment +% \newcommand*{\AD}{\textsc{ad}} +% \newcommand*{\thisfont}{Insular Majuscule} +% +% \title{The \Lpack{Insular Majuscule} fonts\thanks{This +% file has version number \fileversion, last revised +% \filedate.}} +% +% \author{% +% Peter Wilson\\ +% Catholic University of America \\ +% Now at \texttt{peter.r.wilson@boeing.com} +% } +% \date{\filedate} +% \maketitle +% \begin{abstract} +% The \Lpack{inslrmaj} and \Lpack{allimaj} packages provide a set of +% Metafont \thisfont{} book-hands +% as used +% for manuscripts in the 6th to the 9th century. This is one in a series +% of manuscript fonts. +% \end{abstract} +% \tableofcontents +% \listoftables +% +% +% +% +% \section{Introduction} +% +% The \Lpack{inslrmaj} and \Lpack{allimaj} packages provide a Metafont~\cite{METAFONT} version +% of the \thisfont{} manuscript book-hand that was in use between about the +% third and ninth centuries~\AD. It is part of a project to provide fonts +% covering the major manuscript hands between the first century~\AD{} and +% the invention of printing. The principal resources used in this project +% are listed in the Bibliography. +% +% This manual is typeset according to the conventions of the +% \LaTeX{} \textsc{docstrip} utility which enables the automatic +% extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. +% The \Lpack{docmfp} package is used for documenting the Metafont portions +% of the distribution~\cite{DOCMFP}. +% +% Section~\ref{sec:usc} describes the usage of the package. +% Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} +% and source code for the package is in Section~\ref{sec:code}. +% +% \subsection{Manuscript book-hands} +% +% Before the invention of printing all books were written by hand. The book-hands +% used by the scribes and copyists for the manuscripts changed as time +% went on. Table~\ref{tab:1} lists some of the common book-hands which were used +% between the 1st and 15th centuries. The later book-hands formed the basis of the +% fonts used by the early printers, which in turn form the basis of the printing +% fonts in use today. +% +% The manuscript book-hands were written with a broad nibbed reed or quill +% pen. Among the distinguishing characteristics of a hand, apart from the +% actual shape of the letters, are the angle of the pen (which controls the +% variation between thick and thin strokes) and the height of a letter compared +% to the width of the nib. The lower the ratio of the letter height to nib +% width, the more condensed is the script. The scripts also varied in their +% typical height. +% +% Table~\ref{tab:1} gives an `average' x-height for each +% script, which I obtained by measuring a sample of photographs of +% manuscripts written in the various hands. About a dozen examples +% of each book-hand were measured. This figure should not be taken too +% seriously. +% +% There was not a sharp division between the use of one hand and another. +% Many manuscripts exhibit a variety of hands in the same document. For example, +% the scribe writing in an Uncial hand may have used Roman Rustic letters +% for capitals. Usually the same pen was used for the two different scripts. +% +% Generally speaking, as a hand got older it became more embelished, and +% therefore took longer to write. As this happened a new hand would appear that +% was faster, and which would eventually make the earlier one obsolete. +% +% Many of the book-hands were single-cased; that is, they did not have an +% upper- and lower-case as we do nowadays in Western scripts. On the other +% hand, a script might be majuscule or minuscule. A \textit{majuscule} script +% is one, like our upper-case, where the letters are drawn between two lines +% and are of a uniform height with no ascenders or descenders. +% A \textit{minuscule} script, like our lower-case, is drawn between four lines +% and has ascenders and descenders. +% +% \begin{table} +% \centering +% \caption{The main manuscript book-hands} \label{tab:1} +% \begin{tabular}{lccccc} \hline +% Name & Century & x-height & Height & Pen & Normalised \\ +% & & (mm) & (nib widths) & angle & height \\ \hline +% Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\ +% Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\ +% Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\ +% Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\ +% Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\ +% Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\ +% Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\ +% Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\ +% Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\ +% Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\ +% Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\ +% Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline +% \end{tabular} +% \end{table} +% +% During the period under consideration arabic numerals were effectively +% not used. At the beginning they were unknown and even though some knew +% of them towards the end, the glyphs used for them are not recognisable --- +% to me they look somewhat like cryllic letters --- and each locality +% and time had its own highly individualistic rendering. The general rule +% when using one of these book-hands is to write all numbers using +% roman numerals. +% +% The Roman alphabet consisted of 23 capital letters --- the J, U and W +% were absent. The book-hands initially used both a `u' and a `v' interchangeably +% but by the 10th century the practice had become to use the `v' before a vowel +% and the `u' otherwise. The letter corresponding to the W sound appeared +% in England around the 7th century in +% the form of the runic \textit{wen} character and by about the 11th century +% the `w' chacter was generally used. The `J' is the newest letter of all, not +% appearing until about the mid 16th century. +% +% In the first century punctuation was virtually unknown, and typically +% would not even be any additional space between individual words, never +% mind denoting ends of sentences. Sometimes a dot at mid-height would be +% used as a word seperator, or to mark off the end of a paragraph. Effectively +% a text was a continuous stream of letters. By the time that printing was +% invented, though, all of our modern punctuation marks were being used. +% +% Among all these manuscript hands, the Carolingian minuscule is the +% most important as our modern fonts are based on its letter shapes, and it is +% also at this point in time where the division occured between the black letter +% scripts as used even today in Germany, and the lighter fonts used elesewhere. +% The Rotunda and Humanist minuscule hands were developed in Italy and were +% essentially a rediscovery of the Carolingian minusucle. Guthenberg took the +% Gothic scripts as the model for his types. Later printers, +% such as Nicholas Jenson of Venice, +% took the Humanist scripts as their models. +% +% +% \subsection{The \thisfont{} script} +% +% The \thisfont{} hand, which is a majuscule script even though it does +% have some ascenders and descenders, was in use for some three +% centuries. It was originally developed in Ireland by St.~Patrick's monks +% from the Roman Half Uncial script which they brought with them. +% It was a formal script, the triangular serifs and clubbed ascenders took +% at least two strokes each, so was not fast to write. The most famous +% example of the script is the \textit{Book of Kells}, which was written +% between 790 and 830. The hand eventually moved from Ireland to England +% and became even more formal until it effectively dissappeared under its +% own weight. +% +% Although the letter shapes in this book-hand are principally of +% a lower-case form, there are a few that are shaped like capital letters. +% For example, the `n' appeared as both an `n' and as an `N', +% while the `f' and `r' were written like `F' and `R'. +% Some letters had multiple forms. As well as the `n', both a short and +% a long `s' were used and the `z' also took two forms. +% +% The letters were written very close together and the scibes used many +% adhoc ligatures. A favourite was using a long `e' before a letter +% with a bar at the x-height, and joining the crossbar of the `e' to +% the bar of the following letter, for instance the pair `eg'. +% I have only provided the ampersand, `\&', as a ligature, standing for +% `et' which is the Latin for `and'. +% Letters were also stretched if a line +% needed some filling. For example, the capital form of the `n' might be +% stretched to 2 or 3 times its normal width. +% +% Usually the +% lettering in a manuscript was all one size. If the scribe felt the need +% for `capital' letters then, using the same pen, would either write a larger +% \thisfont{} letter or a letter from one of the more formal book-hands. +% I have provided a set of `capital' letters that are only a little larger +% than the normal letters for use in running text. +% During the time the \thisfont{} script was used the alphabet only had 24 +% letters. I have included the missing J. +% +% Arabic numerals were unknown at this time, so all numbers were written +% using the roman numbering system. I have provided \thisfont{} versions of +% the arabic digits. +% +% Punctuation was used, but not with the frequency of today. +% A sentence might be ended with +% a dot at mid-height or a paragraph ended with a colon, also at mid-height. +% The comma was was a small +% slash; the semi-colon was known, as was the single quotation +% mark which was represented by a raised comma. +% +% +% \section{The \Lpack{inslrmaj} and \Lpack{allimaj} packages} \label{sec:usc} +% +% The \thisfont{} font family is called |imaj|. The font is supplied in both +% OT1 and T1 encodings. +% +% \subsection{The \Lpack{inslrmaj} package} +% +% This is intended for the occasions when some short pieces of text have +% to be written in \thisfont{} while the majority of the document is in another +% font. The normal baselineskips are used. +% +% \DescribeMacro{\imajfamily} +% The |\imajfamily| declaration starts typesetting with the \thisfont{} fonts. +% Use of the \thisfont{} font will continue until either there is another |\...family| +% declaration or the current group (e.g., environment) is closed. +% +% \DescribeMacro{\textimaj} +% The command |\textimaj{|\meta{text}|}| will typeset \meta{text} using the +% \thisfont{} fonts. +% +% \subsection{The \Lpack{allimaj} package} +% +% +% This package is for when the entire document will be typeset with the +% \thisfont font. The baselineskips are set to those appropriate to the +% book-hand. +% +% This is a minimalist package. Apart from declaring \thisfont{} to be the +% default font and setting the baselineskips appropriately, it makes no other +% alterations. +% Vertical spacing +% before and after section titles and before and after lists, etc., will be +% too small as the \LaTeX{} design assumes a font comparable in size to +% normal printing fonts, and the book-hand is much taller. +% To capture more of the flavour of the time, all numbers +% should be written using roman numerals. +% The \Lpack{romannum} package~\cite{ROMANNUM} +% can be used so that \LaTeX{} will typeset the numbers that it generates, +% like sectioning or caption numbers, using roman numerals instead of arabic +% digits. +% +% \DescribeMacro{\cmrfamily} +% \DescribeMacro{\textcmr} +% \DescribeMacro{\cmssfamily} +% \DescribeMacro{\textcmss} +% \DescribeMacro{\cmttfamily} +% \DescribeMacro{\textcmtt} +% The |...family| declarations start typesetting with the Computer Modern Roman +% (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer +% Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}| +% commands will typeset \meta{text} in the corresponding Computer Modern font. +% +% The \Lpack{allimaj} package automatically loads the \Lpack{inslrmaj} package, +% so its font commands are available if necessary. +% +% \StopEventually{ +% \bibliographystyle{alpha} +% \renewcommand{\refname}{Bibliography} +% \begin{thebibliography}{GMS94} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem[And69]{ANDERSON69} +% Donald M.~Anderson. +% \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}. +% \newblock Holt, Rinehart and Winston, 1969. +% +% \bibitem[Bol95]{BOLOGNA95} +% Giulia Bologna. +% \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}. +% \newblock Crescent Books, 1995. +% +% \bibitem[Day95]{DAY95} +% Lewis F.~Day. +% \newblock {\em Alphabets Old \& New}. +% \newblock (3rd edition originally published by B.~T.~Batsford, 1910) +% \newblock Senate, 1995. +% +% \bibitem[Dro80]{DROGIN80} +% Marc Drogin. +% \newblock {\em Medieval Calligraphy: Its History and Technique}. +% \newblock Allenheld, Osmun \& Co., 1980. +% +% \bibitem[Dru95]{DRUCKER95} +% Johanna Drucker. +% \newblock {\em The Alphabetic Labyrinth}. +% \newblock Thames \& Hudson, 1995. +% +% \bibitem[Fir93]{FIRMAGE93} +% Richard A.~Firmage. +% \newblock {\em The Alphabet Abecedarium}. +% \newblock David R~Goodine, 1993. +% +% \bibitem[Fli98]{LETTRINE} +% Daniel Flipo. +% \newblock {\em The LETTRINE package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1998. +% +% \bibitem[Har95]{HARRIS95} +% David Harris. +% \newblock {\em The Art of Calligraphy}. +% \newblock DK Publishing, 1995. +% +% \bibitem[Jen95]{BETON} +% Frank Jensen. +% \newblock {\em The BETON package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1995. +% +% \bibitem[Joh71]{JOHNSTON75} +% Edward Johnston (ed. Heather Child). +% \newblock {\em Formal Penship and Other Papers}. +% \newblock Penthalic, 1971. +% +% \bibitem[Knu87]{CM} +% Donald E.~Knuth. +% \newblock {\em Computer Modern Typefaces}. +% \newblock Addison-Wesley, 1987. +% +% \bibitem[Knu92]{METAFONT} +% Donald E.~Knuth. +% \newblock {\em The METAFONTbook}. +% \newblock Addison-Wesley, 1992. +% +% \bibitem[GMS94]{GOOSSENS94} +% Michel Goossens, Frank Mittelbach, and Alexander Samarin. +% \newblock {\em The LaTeX Companion}. +% \newblock Addison-Wesley Publishing Company, 1994. +% +% \bibitem[Tho75]{THOMAS75} +% Alan G.~Thomas. +% \newblock {\em Great Books and Book Collectors}. +% \newblock Weidenfield and Nichoson, 1975. +% +% \bibitem[Wil99]{DOCMFP} +% Peter R.~Wilson. +% \newblock {\em The DOCMFP Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \bibitem[Wil99b]{ROMANNUM} +% Peter R.~Wilson. +% \newblock {\em The ROMANNUM Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \end{thebibliography} +% } +% +% \section{The Metafont code} \label{sec:mf} +% +% +% As previously noted, this work is part of a larger project to provide +% fonts covering the main manuscript book-hands. As such, one of the +% aims is to produce a coordinated set of fonts, especially as multiple +% hands might be used in a single document. +% +% Noting that the hands tend to be somewhat larger than the typical 10pt +% size (where the x-height is approximately 1.5mm) used for modern books, +% I have also designed the fonts +% at a larger than normal size, then applied some non-linear factors when reducing +% them down to a 10pt size. +% Further, I have used the height of the Carolingian minuscule as a +% normalising factor when deciding on the absolute height of any particular +% script. The x-height of the Carolingian font is made equal to the +% x-height of the Computer Modern Roman (CMR) font. +% +% Modern fonts are effectively drawn. That is, the outline of the letter is +% drawn carefully and the center is filled with ink. This is shown to good +% effect in the Metafont code for the Computer Modern fonts~\cite{CM}. +% In contrast, the manuscript letters were inked by single pen strokes in +% a calligraphic manner. I have tried to repeat this calligraphic style +% in the Metafont code. +% +% As much as possible I have tried to use parameter values from the +% Computer Modern Roman (CMR) fonts in order to reduce possible +% infelicities if the CM and manuscript fonts are used together. However, +% few of the CMR parameters are applicable to the calligraphic style. +% +% +% \subsection{The parameter file} +% +% We deal with the parameter files first, and start by announcing +% what they are for. The \thisfont{} font comes in three sizes and also as a normal +% and a bold font. +% \begin{macrocode} +%<*base7|base10|base17|base7b|base10b|base17b> +%<base7>%%% IMAJ7.MF Insular Majuscule at 7 point design size. +%<base10>%%% IMAJ10.MF Insular Majuscule at 10 point design size. +%<base17>%%% IMAJ17.MF Insular Majuscule at 17 point design size. +%<base7b>%%% IMAJB7.MF Insular Majuscule Bold at 7 point design size. +%<base10b>%%% IMAJB10.MF Insular Majuscule Bold at 10 point design size. +%<base17b>%%% IMAJB17.MF Insular Majuscule Bold at 17 point design size. +% +% \end{macrocode} +% Parameters from CMR are used as much as possible. We also +% make sure that \Lpack{cmbase} is loaded as well as plain Metafont. +% \begin{macrocode} +if unknown cmbase: input cmbase fi + +%<base7>font_identifier:="IMAJ"; font_size 7pt#; +%<base10>font_identifier:="IMAJ"; font_size 10pt#; +%<base17>font_identifier:="IMAJ"; font_size 17.28pt#; +%<base7b>font_identifier:="IMAJB"; font_size 7pt#; +%<base10b>font_identifier:="IMAJB"; font_size 10pt#; +%<base17b>font_identifier:="IMAJB"; font_size 17.28pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutstretch} +% The CMR scaling for lowercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> jutstretch:=1.19; +%<base10|base10b> jutstretch:=1.152; +%<base17|base17b> jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{stemstretch} +% The CMR scaling for lowercase stem widths wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> stemstretch:=1.50; +%<base10|base10b> stemstretch:=1.31; +%<base17|base17b> stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{caprat} +% The scaling for `capitals' wrt `lowercase'. This is pretty much a guess +% (the ratio for CMR10 is 1.59). +% \begin{macrocode} + caprat:=1.5; % ratio of capital height to minuscule height +% \end{macrocode} +% +% \DescribeVariable{cap_jutstretch} +% The CMR scaling for uppercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_jutstretch:=1.3; +%<base10|base10b> cap_jutstretch:=1.2; +%<base17|base17b> cap_jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{cap_stemstretch} +% The CMR scaling for uppercase stem width wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_stemstretch:=1.45; +%<base10|base10b> cap_stemstretch:=1.31; +%<base17|base17b> cap_stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{bfudge} +% Letter width scaling for bold font wrt normal font. +% \begin{macrocode} +%<base7|base10|base17> bfudge:=1.0; +%<base7b|base10b|base17b> bfudge:=1.2; +% \end{macrocode} +% +% \DescribeVariable{szfudge} +% Width scaling wrt 17pt letter width. +% \begin{macrocode} +%<base7|base7b> szfudge:=1.18; +%<base10|base10b> szfudge:=1.0; +%<base17|base17b> szfudge:=1.0; +% \end{macrocode} +% +% \DescribeVariable{hstretch} +% Horizontal stretching factor wrt 17pt size letter width. +% \begin{macrocode} + hstretch:=szfudge*bfudge; +% \end{macrocode} +% +% \DescribeVariable{carol_height} +% The x-height of the Carolingian minuscule font. +% \begin{macrocode} +%<base7|base7b> carol_height#:=108.5/36pt#; +%<base10|base10b> carol_height#:=155/36pt#; +%<base17|base17b> carol_height#:=268/36pt#; +% \end{macrocode} +% +% \DescribeVariable{vstretch} +% The height of this font wrt the Carolingian font. +% \begin{macrocode} + vstretch:=1.4; + +% \end{macrocode} +% +% \DescribeVariable{x_height} +% The x-height of lower case letters. Scaled from the Carolingian font. +% \begin{macrocode} + x_height#:=vstretch*carol_height#; +% \end{macrocode} +% +% \DescribeVariable{u} +% The unit width. The CMR values are used. +% \begin{macrocode} +%<base7> u#:=15.5/36pt#; +%<base10> u#:=20/36pt#; +%<base17> u#:=32.5/36pt#; +%<base7b> u#:=17.9/36pt#; +%<base10b> u#:=23/36pt#; +%<base17b> u#:=37/36pt#; +% \end{macrocode} +% +% \DescribeVariable{width_adj} +% \DescribeVariable{serif_fit} +% \DescribeVariable{cap_serif_fit} +% \DescribeVariable{letter_fit} +% The majority of these parameters and values are constant. +% They are for fine adjustements of characters. The CM values are used. +% \begin{macrocode} + width_adj#:=0pt#; % width adjustment for certain characters + serif_fit#:=0pt#; % extra sidebar near lowercase serifs +%<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs +%<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +%<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs +%<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars +% \end{macrocode} +% +% \DescribeVariable{sb} +% A length used for adjusting the side bearings of characters. +% \begin{macrocode} +%<base7|base7b> sb#:=1/2u#; % unit for side bearings +%<base10|base10b> sb#:=1/2u#; % unit for side bearings +%<base17|base17b> sb#:=1/2u#; % unit for side bearings + +% \end{macrocode} +% +% \DescribeVariable{cap_height} +% The height of capital letters. +% \begin{macrocode} +%<base7|base7b> cap_height#:=172.2/36pt#; % height of caps +%<base10|base10b> cap_height#:=246/36pt#; % height of caps +%<base17|base17b> cap_height#:=425/36pt#; % height of caps +% \end{macrocode} +% +% \DescribeVariable{thickfudge} +% The reciprocal of the font height in nib widths. Normal font height +% is 5 nib widths and the bold font height is 4 nib widths. +% \begin{macrocode} +%<base7|base10|base17> thickfudge:=1/5; +%<base7b|base10b|base17b> thickfudge:=1/4; +% \end{macrocode} +% +% \DescribeVariable{thinfudge} +% The nib sharpness. +% \begin{macrocode} +thinfudge:=1/6; +% \end{macrocode} +% +% \DescribeVariable{thick} +% The maximum nib width. +% That is, the width of the thickest line that can be penned. +% \begin{macrocode} +thick#:=stemstretch*thickfudge*x_height#; % max pen breadth +% \end{macrocode} +% +% \DescribeVariable{thin} +% The nib thinness. +% That is, the width of the thinnest line that can be penned. +% \begin{macrocode} +thin#:=thinfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{pangle} +% The pen angle (in degrees). +% \begin{macrocode} +pangle:=0; % pen angle +% \end{macrocode} +% +% \DescribeVariable{ascratio} +% The height of lower case ascenders wrt |x_height|. +% \begin{macrocode} + ascratio:=5/3; +% \end{macrocode} +% +% \DescribeVariable{asc_height} +% The height of lower case ascenders. +% \begin{macrocode} + asc_height#:=ascratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{descratio} +% The depth of lower case descenders wrt |x_height|. +% \begin{macrocode} + descratio:=1.5/3; +% \end{macrocode} +% +% \DescribeVariable{desc_depth} +% The depth of lower case descenders. +% \begin{macrocode} + desc_depth#:=descratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_height} +% The height of numerals. Make these midway between normal and capital +% letters. +% \begin{macrocode} + fig_height#:=(0.5[1,caprat])*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_width} +% The width of numerals. All numerals are the same width (roughly, an `o'). +% \begin{macrocode} + fig_width#:=hstretch*(x_height#); +% \end{macrocode} +% +% \DescribeVariable{body_height} +% The height of the tallest character. +% \begin{macrocode} + body_height#:=caprat*asc_height#; +% \end{macrocode} +% +% \DescribeVariable{body_depth} +% The depth of the lowest character. +% \begin{macrocode} + body_depth#:=caprat*desc_depth#; +% \end{macrocode} +% +% \DescribeVariable{half_height} +% Half the normal letter height. +% \begin{macrocode} + half_height#:=1/2x_height#; % half the height of x height letters + +% \end{macrocode} +% +% \DescribeVariable{side} +% We might be using a square for the character design. +% \begin{macrocode} +side#:=x_height#; +% \end{macrocode} +% +% \DescribeVariable{rule_thickness} +% Thickness of rules (in math symbols). The CMR values are used. +% \begin{macrocode} +%<base7|base7b> rule_thickness#:=.34pt#; +%<base10|base10b> rule_thickness#:=.4pt#; +%<base17|base17b> rule_thickness#:=.6pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutfudge} +% Controls the protrusion of serifs. +% \begin{macrocode} +%%%%jutfudge:= 3/4; +jutfudge:= 1/2; +% \end{macrocode} +% +% \DescribeVariable{jut} +% The lowercase serif protrusion. +% \begin{macrocode} +jut#:=jutstretch*jutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{srad} +% |srad| with |0 < srad < 1| controls the serif radius. +% \begin{macrocode} +srad:=0.5; +% \end{macrocode} +% +% \DescribeVariable{trijut} +% The lowercase triangular serif protrusion. +% \begin{macrocode} +trijut#:=0.75jutstretch*thick#; +% \end{macrocode} +% +% \DescribeVariable{clubjut} +% The fractional protusion of the club base. +% \begin{macrocode} +clubjut:=5/12; +% \end{macrocode} +% +% \DescribeVariable{o} +% Amount of overshoot for curves (as in an `o'). Use CMR values. +% \begin{macrocode} +%<base7|base7b> o#:=5/36pt#; +%<base10|base10b> o#:=8/36pt#; +%<base17|base17b> o#:=10/36pt#; + +% \end{macrocode} +% +% \DescribeVariable{slant} +% |slant| is the amount the font slopes to the right. +% \begin{macrocode} +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ + +% \end{macrocode} +% +% \DescribeVariable{monospace} +% We are generating a variable-width font. +% \begin{macrocode} +monospace:=false; % should all characters have the same width? + +% \end{macrocode} +% +% \DescribeVariable{dot_size} +% The size of (punctuation) dots. +% \begin{macrocode} +dot_size#:=5thin#; % size of dots +% \end{macrocode} +% +% \DescribeVariable{comma_width} +% The horizontal width of a comma. +% \begin{macrocode} +comma_width#:=2.5dot_size#; + +% \end{macrocode} +% +% Finally, call the driver file for the font. +% \begin{macrocode} +generate imajtitle %% switch to the driver file + +% \end{macrocode} +% +% The end of this code section. +% \begin{macrocode} +%</base7|base10|base17|base7b|base10b|base17b> +% \end{macrocode} +% +% +% \subsection{The driver file} +% +% The driver file sets up the font parameters and also contains +% the macros used in the definition of the characters. +% +% \begin{macrocode} +%<*mfd> +% This is IMAJTITLE.MF for the Insular Majuscule font. +% This makes a short font. +% This file also contains special macros universally needed in the +% font but either not in the cmbase.mf file or modifications of these. +% +% \end{macrocode} +% +% \begin{routine}{makebox} +% This is a new version of the \Lpack{cmbase.mf} |makebox| macro. +% Essentially, as we are only generating a single case font, we don't +% need all the horizontals for the CMR characters. +% +% \begin{macrocode} +% A new version of cmbase.mf makebox macro +def makebox(text rule) = + for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth: + rule((l,y)t_,(r,y)t_); endfor % horizontals + for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals + for x=u*(1+floor(1/u)) step u until r-1: + rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals + if charic<>0: + rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{proofpcbb} +% The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the +% square, and at the bottom and top midpoints, where the point |zS| is at +% position |(xoff,yoff)| in the square. +% \begin{macrocode} + +% A macro to delineate a letter's bounding square in proof mode. +% Point z$ is at (xoff,yoff) in the bounding square. +def proofpcbb(suffix $)(expr xoff, yoff) = +if proofing > 0: + x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner + z$br = (x$bl+side, y$bl); % BRHC + z$tr = (x$bl+side, y$bl+side); % TRHC + z$tl = (x$bl, y$bl+side); % TLHC + z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points + pair hc, vc; + hc = (2u,0); vc = (0,2u); + pickup pensquare scaled 2; + for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc: + draw s-hc--s+hc; + draw s-vc--s+vc; + endfor +fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{inslrmaj_font_setup} +% This macro contains the set up for the \thisfont{} fonts. +% \begin{macrocode} + +def inslrmaj_font_setup= % contains special stuff for inslrmaj fonts + define_pixels(side,half_height,carol_height,comma_width); + define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit, + cap_serif_fit,jut,cap_jut,trijut); + define_pixels(fig_width); + define_whole_pixels(letter_fit,sb); + define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height, + desc_depth,body_depth,fig_height); + define_corrected_pixels(o); + define_blacker_pixels(thick,thin); + let adjust_fit = normal_adjust_fit; +% \end{macrocode} +% \DescribeVariable{stylus} +% The pen for drawing the thinnest lines is |stylus|. +% \begin{macrocode} + pickup pencircle scaled thin; + stylus:=savepen; +% \end{macrocode} +% \DescribeVariable{thickstylus} +% The pen for drawing lines a bit thicker than the thinnest is |thickstylus|. +% \begin{macrocode} + pickup pencircle scaled (1.5thin); + thickstylus:=savepen; +% \end{macrocode} +% \DescribeVariable{quill} +% The normal calligraphic pen is |quill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated pangle; + quill:=savepen; + numeric pcshiftx#; % x value of LHS of box wrt origin of char box + define_pixels(pcshiftx); + numeric sqxside#; % x size of the square + numeric sqyside#; % y size of the square + define_pixels(sqxside,sqyside); + +enddef; % end of inslrmaj_font_setup + +% \end{macrocode} +% \end{routine} +% +% +% \DescribeVariable{ductus} +% A boolean to control drawing the ductus (TRUE) or the full letter (FALSE). +% \begin{macrocode} +boolean ductus; +ductus:=false; +% \end{macrocode} +% +% \DescribeVariable{qhor} +% \DescribeVariable{qvert} +% The cosine and sine of the pen angle. +% \begin{macrocode} +numeric qhor, qvert; +qhor:=cosd(pangle); qvert:=sind(pangle); +% \end{macrocode} +% +% \DescribeVariable{pdir} +% The vector corresponding to the pen angle. +% \begin{macrocode} +pair pdir; pdir=dir(pangle); +% \end{macrocode} +% +% \DescribeVariable{ppdir} +% The vector that is perpendicular (anticlockwise) to the pen angle. +% \begin{macrocode} +pair ppdir; ppdir=dir(pangle+90); +% \end{macrocode} +% +% \begin{routine}{draw_serif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_serif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; + z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + top_serif:=false; + z$c=z$b shifted (bjut*pdir); + fi +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_serif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_triserif} +% A macro to draw a triangular top left serif. +% |draw_triserif(1,tj)| draws a serif at |z1| with its leftmost x +% value at |x1-tj|, where it is assumed that the +% top point on the stem is at |z1| and the stem was drawn with |quill|. +% \begin{macrocode} + +def draw_triserif(suffix $)(expr tj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$ts1'=lft x$; y$ts1'=bot y$; + pickup stylus; + lft x$ts1=x$ts1'; bot y$ts1=y$ts1'; + x$ts2=x$ts1-tj; z$ts2=whatever[z$,z$ts1]; + x$ts3=x$ts1; y$ts3=y$ts2-tj; + pickup stylus; +%% filldraw z$ts1--z$ts2--z$ts3--cycle; + filldraw z$--z$ts2--z$ts3--cycle; + pickup oldpen; + labels($ts1,$ts2,$ts3); +enddef; % end of draw_triserif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_istem} +% A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs +% are of extent |jut|. There is a top left and bottom right serif. +% The serif radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_istem(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % top serif + draw_serif($$, $, fr); % bottom serif + draw z$a--z$$a; % the stem +enddef; % end of draw_istem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tstem} +% A macro to draw the shape of the stem of a `t'. |draw_tstem(1,2,f)| draws a +% stem whose +% top is at |z1| and bottom at |z2| with a right serif at |z2|. The radius +% is controlled by |f|, with $0 < f < 1$. +% It draws with the current pen and the serif is of extent |jut|. +% NOTE: for the IMAJ font, just the stem is drawn --- no serif! +% \begin{macrocode} + +def draw_tstem(suffix $, $$)(expr fr)= +%% draw_serif($$, $, fr); % the serif +%% draw z$--z$$a; % the stem + draw z$--z$$; +enddef; % end of draw_tstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tlserif} +% A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serif +% is of extent |jut|. It also draws the stem to the point |z2|. The serif +% radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_tlserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % the serif + draw z$a--z$$; % the stem +enddef; % end of draw_tlserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flick} +% A macro to draw a flick (like an eyebrow). +% |draw_flick(1,rise,fall,fjut)| draws a stroke starting at |z1| rising up by +% |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is +% |fjut| to the right of |z1|. It is drawn with the current pen. +% \begin{macrocode} + +def draw_flick(suffix $)(expr rise, fall, fjut)= +% \end{macrocode} +% The points |z$a| and |z$b|, together with |z$| make up three points on the +% ductus. +% \begin{macrocode} + rt x$b = x1+fjut; top y$b=y$-fall; + x$a=0.5[x$,x$b]; top y$a=y$+rise; +% \end{macrocode} +% Draw the part, and finish off. +% \begin{macrocode} + draw z$..z$a..z$b; + labels($a,$b); +enddef; % end of draw_flick + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_wave} +% A macro to draw a (horizontal) stroke with a flick at each end +% (down at the left and up at the right). |draw_wave(1,2,f)| uses the current +% pen to draw from |z1wl| to |z1wr|, where |x1wl=x1|, |y1wl=y1-f|, and +% |x1wr=x2|, |y1wr=y2+f|, with |z1| assumed to be at the left of |z2|. +% \begin{macrocode} + +def draw_wave(suffix $,$$)(expr f)= + x$wl=x$; y$wl=y$-f; + x$wr=x$$; y$wr=y$$+f; + z$wc=0.5[z$wl,z$wr]; + draw z$wl{pdir}..z$wc{right}..{pdir}z$wr; + labels($wl,$wc,$wr); +enddef; % end of draw_wave +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tail} +% A macro to draw a tail at the bottom of a (vertical) stem. +% |draw_tail(1,fjut)| draws a tail at the bottom of the stem which ends at |z1|. +% The depth is controlled by the |desc_depth| value and the jut by |fjut|. +% \begin{macrocode} + +def draw_tail(suffix $)(expr fj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$tl' = lft x$; y$tl=bot y$; + pickup stylus; + lft x$tl=x$tl'; + x$tb=x$tl-fj; bot y$tb=y$tl-1/2desc_depth; + filldraw z${down}..{-pdir}z$tb & z$tb{pdir}..{up}z$tl--cycle; + pickup oldpen; + labels($tb,$tl); +enddef; % end of draw_tail +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_triangle} +% A macro to draw a downward pointing equilateral triangle. +% |draw_triangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_triangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$-0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_triangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_utriangle} +% A macro to draw an upward pointing equilateral triangle. +% |draw_utriangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_utriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$+0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_utriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rtriangle} +% A macro to draw a downward pointing right angled triangle. +% |draw_rtriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rtriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$-sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rtriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rutriangle} +% A macro to draw an upward pointing right angled triangle. +% |draw_rutriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rutriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$+sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rutriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_fork} +% A macro to draw a forked line. +% |draw_fork(1,2,sz)| draws a graduated line from |z1| to |z2| with a forked +% end of size |sz|. +% \begin{macrocode} + +def draw_fork(suffix $, $$)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$f1'=lft x$; y$f1'=bot y$; + x$f3'=rt x$; y$f3'=top y$; + pickup stylus; + lft x$f1=x$f1'; bot y$f1=y$f1'; + rt x$f3=x$f3'; y$f3-y$=2*(y$-y$f1); + rt x$f2=x$$-sz; bot y$f2=y$$; + rt x$f4= rt x$f5=x$$; + bot y$f5=y$$-sz; top y$f4=y$$+1/2sz; + filldraw z$f1--z$f2--z$f3--cycle; % the line + draw z$f2{right}..z$f4; % upper fork + draw z$f2{right}..z$f5; % lower fork + pickup oldpen; + labels($f1,$f2,$f3,$f4,$f5); +enddef; % end of draw_fork +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_urswish} +% A macro to draw a line up and to the right with an under curl at the end. +% |draw_urswish(1,2)| draws from |z1| towards |z2|, which is the max upper right +% of a bounding box, where the curl is. +% \begin{macrocode} + +def draw_urswish(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + pickup quill; + rt x$$s1=x$$-thick; top y$$s1=y$$; + rt x$$s2=x$$; +%% x$$s3=x$$-thick; + lft x$$s3=x$$s1; + bot y$$s3=y$$-thick; y$$s2=0.5[y$$s1,y$$s3]; +%% draw z$---z$$s1{right}..z$$s2{down}..{-pdir}z$$s3; + draw z$..z$$s1{pdir}..z$$s2{down}; + labels($$s1,$$s2,$$s3); +enddef; % end of draw_urswish +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{bowl_stem} +% Calculate where a bowl should meet a stem so that the pen is moving in the +% pen direction. +% |bowl_stem(1,2)| calculates the point |z1i|, where |z1| is on the bowl and +% there is a vertical line at |x2|. +% +% \begin{macrocode} + +def bowl_stem(suffix $, $$)= + x$'=0.5[x$,x$$]; y$'=y$; % the mid-point + z$''=z$' shifted (thick*pdir); + x$i=x$$; z$i=whatever[z$',z$'']; + labels($',$i); +enddef; % end of bowl_stem +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_clubbase} +% Draw a clubbed bottom of a vertical stem for the IMAJ font. +% |draw_clubbase(1, 2, st, left, right)| draws from |st[z2,z1]| to |z2|. +% At |z2| the pen +% is shifted |left| fraction of the pen width and |right| fraction of the +% pen width, both in the direction of the pen angle. Pen draws smoothly the +% path |z1|, |left|, |right|, |z1|. +% \begin{macrocode} + +% draw clubbed bottom of vertical stem for IMAJ font. +def draw_clubbase(suffix $, $$)(expr st, lft, rt)= + z$$l = z$$ shifted (lft*thick*(-pdir)); + z$$r = z$$ shifted (rt*thick*(pdir)); + z$$t = st[z$$,z$]; + draw z$$t{z$$-z$}..z$$l--z$$r..{z$-z$$}z$$t; + labels($$t,$$l,$$r); +enddef; % end of draw_clubbase + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pdot} +% A macro to draw a period dot. +% |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|. +% \begin{macrocode} + +def draw_pdot(suffix $)(expr sz)= +% \end{macrocode} +% Draw a square rotated 45 degrees. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$ shifted (0.5sz*up); + z$u = z$s shifted (sz*right); + z$v = z$t shifted (sz*down); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pdot + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pcomma} +% A macro to draw a period comma. +% |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. The pen is |stylus|. +% \begin{macrocode} + +def draw_pcomma(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping back and down at 45 degrees +% for a total width of |ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s-ar; y$v=y$s-ar; + z$u = z$v shifted (sz*right); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; +%% filldraw z$s--z$t--z$u--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pcomma + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_plq} +% A macro to draw a period left quote. +% |draw_pcomma(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. +% \begin{macrocode} + +def draw_plq(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping forward and down at 45 degrees +% for a total width of |ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s+ar; y$v=y$s-ar; + z$u = z$v shifted (sz*right); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; +%% filldraw z$s--z$t--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_plq + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{offsetbowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for a non-centered letter `o'. |offsetbowl($, sx, sy, fx, fy)| +% calculates the paths for an `o' +% enclosed in a rectangle size |sx| by |sy| with its bottom lefthand corner +% located at |z$|, where the center of the o is at |(fx*sx, fy*sy)| in the +% bounding rectangle. +% +% Two construction paths, namely |obfirst| and |obsecond| are also +% available. They should be identical. +% +% All paths have points listed in a clockwise direction, starting with +% |z$nh| or |z$minl| as appropriate. +% +% |offsetbowl($, sx, sy, 1/2, 1/2)| gives the same results as |obowl($, sx, sy)|. +% \begin{macrocode} + +path obouter, obinner, obfirst, obsecond; +def offsetbowl(suffix $)(expr sx, sy, fx, fy)= + numeric inx, iny, cx, cy; + pair pt[]; + inx := 1/2thick*cosd(pangle); iny := 1/2thick*sind(pangle); + cx := x$+fx*sx; cy := y$+fy*sy; + z$obc = (cx,cy); +% \end{macrocode} +% Calulate points on the centre path of the pen. These are offset by |inx| +% from the rectangles vertical sides and by |iny| from the horizontal sides. +% If the pen is parallel to a side, offset the point by half the pen's +% dimension. First do the West, East, North and South points. +% \begin{macrocode} + if pangle = 90: + z$wt=(x$+1/2thin, cy); + z$et=(x$+sx-1/2thin, cy); + else: + z$wt=(x$+inx, cy); + z$et=(x$+sx-inx, cy); + fi + if pangle = 0: + z$nh=(cx, y$+sy-1/2thin); + z$sh=(cx, y$+1/2thin); + else: + z$nh=(cx, y$+sy-iny); + z$sh=(cx, y$+iny); + fi + obfirst := z$nh{right}..z$et{down}..z$sh{left}..z$wt{up}..cycle; +% \end{macrocode} +% Now calculate the points on the path |obfirst| where the pen will +% draw the max and min width lines (i.e., the points where the pen will be +% moving parallel and perpendicular to |pangle|). +% \begin{macrocode} + z$minl = directionpoint dir(pangle) of obfirst; + z$maxr = directionpoint -dir(pangle+90) of obfirst; + z$minr = directionpoint -dir(pangle) of obfirst; + z$maxl = directionpoint dir(pangle+90) of obfirst; +% \end{macrocode} +% Place the pen at each of these points to get the outer and inner points. +% \begin{macrocode} + penpos$minl(thin,pangle+90); + penpos$maxr(thick,pangle); + penpos$minr(thin,pangle+90); + penpos$maxl(thick,pangle); +% \end{macrocode} +% Finally, the outer and inner paths. +% \begin{macrocode} + obsecond := z$minl..z$maxr..z$minr..z$maxl..cycle; + z$minlo = z$minl.r; z$maxro = z$maxr.r; + z$minro = z$minr.l; z$maxlo = z$maxl.l; + obouter := z$minlo..z$maxro..z$minro..z$maxlo..cycle; +%% obouter := z$minl.r..z$maxr.r..z$minr.l..z$maxl.l..cycle; + z$minli = z$minl.l; z$maxri = z$maxr.l; + z$minri = z$minr.r; z$maxli = z$maxl.r; + obinner := z$minli..z$maxri..z$minri..z$maxli..cycle; +%% obinner := z$minl.l..z$maxr.l..z$minr.r..z$maxl.r..cycle; + labels($obc, $nh, $et, $sh, $wt); + labels($minl, $maxr, $minr, $maxl); + labels($minlo, $maxro, $minro, $maxlo); + labels($minli, $maxri, $minri, $maxli); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{obowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for the letter `o'. |obowl($, sx, sy)| calculates the paths for an `o' +% centered and enclosed in a rectangle size |sx| by |sy| with its bottom +% lefthand corner located at |z$|. +% \begin{macrocode} + +def obowl(suffix $)(expr sx, sy)= + offsetbowl($, sx, sy, 1/2, 1/2); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{scalarprod} +% |v scalarprod w| calulates the scalar product between the +% two vectors |v| and |w|. +% \begin{macrocode} + +primarydef v scalarprod w = + (xpart v * ypart w - ypart v * xpart w) +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{tangentpoint} +% |tangentpoint($, path)| calculates the point |z$tan| on the |path| +% so that |z$tan--z$| is tangent to the path. It uses a binary search +% to find a point on the path such that the path direction is +% (anti-) parallel to the dirction from that point to the given point. +% \begin{macrocode} + +def tangentpoint(suffix $)(expr pth)= + pair vecll, veclr, veclm; % "tangent" line directions + numeric pl, pr, pm; % path parameter values + pair vecpl, vecpr, vecpm; % path directions + pair ptl, ptr, ptm; % path points + numeric sl, sr, sm; % scalar products of path/line directions + numeric stpsize; % size of current binary step + numeric tantol; % tolerance + boolean wtest; % a boolean + + tantol := eps; +% \end{macrocode} +% Initialise using the left right and middle points on the path. +% \begin{macrocode} + pl:=0; pr:=length pth; pm:=0.5(pl+pr); stpsize:=pr-pl; + ptl := point pl of pth; + ptm := point pm of pth; + ptr := point pr of pth; +% \end{macrocode} +% Now the various vectors, and make sure they are unit vectors to +% have a consistent measure scale when we take the scalar products. +% \begin{macrocode} + vecll := unitvector (z$-ptl); + veclm := unitvector (z$-ptm); + veclr := unitvector (z$-ptr); + vecpl := unitvector (direction pl of pth); + vecpm := unitvector (direction pm of pth); + vecpr := unitvector (direction pr of pth); + sl := vecll scalarprod vecpl; + sm := veclm scalarprod vecpm; + sr := veclr scalarprod vecpr; +% \end{macrocode} +% We stop if any of the points is the tangent point, or if the step +% size is too small, or if the signs of the left and right scalar +% products are the same. +% \begin{macrocode} + wtest := (stpsize < tantol) or (sl*sr > 0) or + (abs sl < tantol) or (abs sm < tantol) or (abs sr < tantol); + if wtest: + if (stpsize < tantol): + z$tan=(0,0); + errmessage("No tangent; path too short"); + else: + if (sl*sr > 0): + z$tan=(0,0); + errmessage("No tangent; end products have the same sign"); + else: + if (abs sl < tantol): + z$tan=ptl; + else: + if (abs sm < tantol): + z$tan=ptm; + else: + z$tan=ptr; + fi + fi + fi + fi + else: +% \end{macrocode} +% There should be a tangent and we iterate to find it, using +% bisection. If there is one to be found it will be at the +% current middle point. The tangent point will be somewhere +% between the two points that lead to opposite signed scalar +% products. +% \begin{macrocode} + forever: + if (sl*sm < 0): % opposite signs, look between pl & pm + pr:=pm; pm:=0.5(pr+pl); + vecpr := vecpm; veclr := veclm; sr:=sm; + else: + pl:=pm; pm:=0.5(pr+pl); + vecpl:=vecpm; vecll:=veclm; sl:=sm; + fi + stpsize:=pr-pl; + ptm := point pm of pth; + veclm := unitvector (z$-ptm); + vecpm := unitvector (direction pm of pth); + sm := veclm scalarprod vecpm; +% \end{macrocode} +% We stop the iteration if the step size is too small or the +% middle point is the tangent point. In either case, the +% middle point is the best guess that can be made. +% \begin{macrocode} + wtest := (stpsize < tantol) or (abs sm < tantol); + if wtest: + if (abs sm < tantol): + z$tan = ptm; + else: + z$tan = ptm; +%%%%%% errmessage("Warning: tangent approximated"); + fi + fi + exitif wtest; + endfor + fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% Set the mode and font setup. +% \begin{macrocode} + +font_coding_scheme:="ASCII minuscules and punctuation"; +mode_setup; +inslrmaj_font_setup; + +% \end{macrocode} +% +% +% We generate letters, together with some punctuation and +% analphabetics. +% \begin{macrocode} + +input imajl; % lower case +input imaju; % capitals +input imajpunct; % punctuation +input imajlig; % the several dashes +input imajdig; % arabic digits + +% \end{macrocode} +% +% Set up the spacings, stretches and shrinks. +% +% \begin{macrocode} + +font_slant slant; font_x_height x_height#; +if monospace: + font_normal_space vstretch*9u#; % no stretching or shrinking + font_quad vstretch*18u#; + font_extra_space vstretch*9u#; +else: + font_normal_space vstretch*6u#+2letter_fit#; + font_normal_stretch vstretch*3u#; font_normal_shrink vstretch*2u#; + font_quad vstretch*18u#+4letter_fit#; + font_extra_space vstretch*2u#; + +% \end{macrocode} +% +% Finally, do the ligtables. +% +% \begin{macrocode} + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + kks#:=-4u#; kkx#:=-1.5u#; kkj#:=-2u#; kkr#:=-5u#; kkrs#:=-2u#; kkrl#:=-8u#; + ligtable "s": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "S": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "x": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "X": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "a": "A": + "b": "B": + "c": "C": + "d": "D": + "e": "E": + "h": "H": + "i": "I": + "k": "K": + "l": "L": + "m": "M": + "n": "N": + "o": "O": + "p": "P": + "t": "T": + "u": "U": + "v": "V": + "w": "W": + "z": "Z": + "j" kern kkj#, "J" kern kkj#; + + ligtable "r": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + ligtable "R": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + +fi + +bye. + +%</mfd> +% \end{macrocode} +% +% \subsection{The code for normal letters} +% +% The following code is for the lower case characters. +% +% \begin{macrocode} +%<*min> +% IMAJL.MF Program file for Insular Majuscule lower case +% + +% \end{macrocode} +% +% +% \begin{routine}{a} +% The letter `a'. +% \begin{macrocode} +cmchar "IMAJ letter a"; +beginchar("a", 2sb#+hstretch*(5/3x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% left bowl +n1 := w-2pcshiftx; % actual letter width +n2 := 7/10n1; % width of left bowl +z1=(pcshiftx,0); +obowl(1, n2, h); +pth1:=obouter; pth2:=obinner; +pth10:=obfirst; pth20:=obsecond; +%% right bowl +n3:=x1+n2-16/12thick; % leftmost point of "stem" +n4:=2(n1-n3); % total width of right stem bowl +z2=(n3,0); +offsetbowl(2, n4, h, 6/12, 1/2); +pth3:=obouter; pth4:=obinner; +pth30:=obfirst; pth40:=obsecond; +%% intersect left bowl with outer of right bowl +z1tout = (subpath (0,1) of pth1) intersectionpoint (subpath (4,2) of pth3); +z1tinn = (subpath (0,1) of pth2) intersectionpoint (subpath (4,2) of pth3); +z1lout = (subpath (1,2) of pth1) intersectionpoint (subpath (4,2) of pth3); +z1linn = (subpath (1,2) of pth2) intersectionpoint (subpath (4,2) of pth3); + +%%ductus:=true; +if ductus: + pickup stylus; + % draw the control paths + draw pth10; draw pth20; + draw pth30; draw pth40; +else: + %% draw left bowl + fill z1lout..z1minro{-pdir}..z1maxlo{ppdir}..z1minlo{pdir}..z1tout-- + z1tinn..z1minli{-pdir}..z1maxli{-ppdir}..z1minri{pdir}..z1linn-- + cycle; + %% draw right stem/bowl + fill z2minro{-pdir}..z2maxlo{ppdir}..{pdir}z2minlo-- + z2minli{-pdir}..z2maxli{-ppdir}..{pdir}z2minri--cycle; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "a" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{b} +% The letter `b'. +% \begin{macrocode} +cmchar "IMAJ letter b"; +beginchar("b", 2sb#+hstretch*(7/6x_height#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=h/ascratio; % top of bowl +z1=(pcshiftx, -o); +obowl(1, n1, n2+o); +%% draw bowl +fill obouter; unfill obinner; +%% top of stem +x2=x1wt+1/3n1; top y2=h; +tangentpoint(2, subpath (3,4) of obsecond); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z2tan--z2; +draw_triserif(2,trijut); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "b" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{c} +% The letter `c'. +% \begin{macrocode} +cmchar "IMAJ letter c"; +beginchar("c", 2sb#+hstretch*(5/6x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +z1=(pcshiftx,0); +obowl(1, n2, h); +z3=(x1+n1, h); % top RH corner +z4=(x1obc,1/6h); z5=(3/2w,y4); % for horizontal line +%% top intersection points +z10i = (z1obc--z3) intersectionpoint obinner; +z10o = (z1obc--z3) intersectionpoint obouter; +%% bottom intersection points +z20i = (z4--z5) intersectionpoint obinner; +z20o = (z4--z5) intersectionpoint obouter; +%%ductus:=true; +if ductus: + pickup stylus; +fi +fill z20o..z1minro{-pdir}..z1maxlo{ppdir}..z1minlo{pdir}..z10o-- + z10i..z1minli{-pdir}..z1maxli{-ppdir}..z1minri{pdir}..z20i-- + cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,16,17,18,100); +endchar; % end "c" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{d} +% The letter `d'. There is a choice between an upright and a low d. I have done +% the low d. +% \begin{macrocode} +cmchar "IMAJ letter d"; +beginchar("d", 2sb#+hstretch*(x_height#+1/2thick#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +%% bowl +n1 := w-2pcshiftx; % actual letter width +n2 := n1-1/2thick; % width of bowl +n3 := h; % top of bowl +z1=(w-pcshiftx-n2, 0); +obowl(1, n2, n3); +%% top bar +lft x3=pcshiftx; y3=h; +z3i=(pcshiftx, y3-1/2thin); z3o=(x3i,y3i+thin); +z2i=(x1nh,y3i); +z2o=(x2i,y3o); +%%ductus:=true; +if ductus: + pickup stylus; +fi +fill z1minlo{-pdir}..z1maxlo{-ppdir}..z1minro{pdir}..z1maxro{ppdir}..{left}z2o-- + z3o--z3i-- + z2i{right}..z1maxri{-ppdir}..z1minri{-pdir}..z1maxli{ppdir}..{pdir}z1minli-- + cycle; +draw_utriangle(3, thick); +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "d" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{e} +% The letter `e'. +% \begin{macrocode} +cmchar "IMAJ letter e"; +beginchar("e", sb#+hstretch*(x_height#+3/2thick#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +n1 := w-pcshiftx; % actual letter width +n2 := n1-3/2thick; % width of bowl +z1=(pcshiftx,0); +obowl(1, n2, h); +%% for crossbar +z2=(0,2/3h); rt x3=w; y3=y2; z3'=(x1obc,y2); +z4 = (z2--z3') intersectionpoint subpath (3,4) of obsecond; +z10tout = (z3'--z3) intersectionpoint subpath (0,3) of obouter; +z10tinn = (z3'--z3) intersectionpoint subpath (0,3) of obinner; +%% bottom cutoff +z5=(x1obc,1/6h); z6=(w,y5); +z20bout = (z5--z6) intersectionpoint subpath (0,3) of obouter; +z20binn = (z5--z6) intersectionpoint subpath (0,3) of obinner; +%%ductus:=true; +if ductus: + pickup stylus; +fi +fill z20bout..z1minro{-pdir}..z1maxlo{ppdir}..z1minlo{pdir}..z10tout-- + z10tinn..z1minli{-pdir}..z1maxli{-ppdir}..z1minri{pdir}..z20binn-- + cycle; +draw z4--z3; % crossbar & decoration +draw_triangle(3,thick); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{f} +% The letter `f'. +% \begin{macrocode} +cmchar "IMAJ letter f"; +beginchar("f", 2sb#+hstretch*(x_height#+trijut#), + (x_height#), desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=-d; +%% bottom bar +z4=(rt x1,-thin); rt x6=w-pcshiftx; y6=y4+2thin; z5=1/2[z4,z6]; +%% top bar +z7=(rt x1, bot y1); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, clubjut); +draw z4{dir(45)}..z5{right}..z6{dir(45)}; % bottom bar +draw_flick(7, 2thin, thin, (w-pcshiftx-x7+1/2thick)); % top bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "f" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{g} +% The letter `g'. +% \begin{macrocode} +cmchar "IMAJ letter g"; +beginchar("g", 2sb#+hstretch*(5/3x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +path pth[]; +pair vec[]; +pcshiftx := sb; +pickup quill; +%% top bar +lft x1=pcshiftx; y1=h; rt x2=w-pcshiftx; y2=h; +%% curves +z3=2/5[z1,z2]; +x5=4/5[x1,x2]; y5=-1/2d; +x4=(x3-thick); y4=1/2[y5,y3]; +x7=1/2[x1,x4]; y7=y5; +x6=2/3[x7,x5]; bot y6=-d; +pth1 := z3..z4{down}..z5; +pth2 := z5--z6{left}..z7; +%% diagonal to close bottom bowl +vec1 := direction 2 of pth2; +vec2 := (z5-z6); +z7'=(lft x7, bot y7); z7''=(rt x7, y7); +pickup thickstylus; +lft x8 = x7'; bot y8 = y7'; +z9' = z8 shifted 2vec2; +z9 = (z8--z9') intersectionpoint pth1; +z7''' = z7'' shifted 2vec1; +z8' = whatever[z7'',z7'''] = whatever[z8,z9']; +%%ductus:=true; +if ductus: + pickup stylus; + draw z1--z2; % top bar + draw pth1; draw pth2; % curves + draw rt z8--z9; % diagonal +else: + pickup quill; + draw z1--z2; % top bar + draw_triangle(2,thick); + draw_utriangle(1,thick); + draw pth1; draw pth2; % curves + pickup thickstylus; + draw rt z8--z9; % diagonal + fill z7''--z8'--z8--cycle; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "g" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{h} +% The letter `h'. +% \begin{macrocode} +cmchar "IMAJ letter h"; +beginchar("h", 2sb#+hstretch*(x_height#+trijut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +%% stem +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=0; +%% bowl +rt x3 = lft x1; y3=0; +n1 := w-pcshiftx-x3; % bowl width +n2 := h/ascratio; % bowl height +obowl(3, n1, n2); +z1'=(rt x1, y1); z2'=(x1',y2); %% right hand side of stem +z10tout = (z1'--z2') intersectionpoint subpath (3,4) of obouter; +z10tinn = (z1'--z2') intersectionpoint subpath (3,4) of obinner; +z10toth = (x1, y10tinn); % avoids 180 turn in path +z6 = directionpoint down of obsecond; % top of right leg +z6i=(lft x6, bot y6); z6o=(rt x6, bot y6); +z8=(x6,0); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, clubjut); +draw_tstem(6,8,srad); % right leg +draw_clubbase(6, 8, 1/3, 0, 1/2clubjut); +fill z6i{up}..z3minli{-pdir}..z10tinn--z10toth-- % top of bowl + z10tout..z3minlo{pdir}..{down}z6o--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "h" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{i} +% The letter `i'. +% \begin{macrocode} +cmchar "IMAJ letter i"; +beginchar("i", 2sb#+hstretch*(thick#+trijut#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, clubjut); +ductus:=false; +penlabels(1,2,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{j} +% The letter `j'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "IMAJ letter j"; +beginchar("j", sb#+hstretch*(2/3x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +rt x1 = w-pcshiftx; top y1 = h; +x2=x1; y2=-1/2d; +%% bottom hook +lft x3 = 0; bot y3 = -d; +%% triangle +n1 := thick; % side length +z6=(lft x3, bot y3); +x7=x6+n1; z7=whatever[z6,z2]; +z8=1/2[z6,z7]; +z9=(x8, y8+0.9n1); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw_triserif(1,trijut); +draw z2--z3; % hook +fill z6--z7--z9--cycle; % triangle +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "j" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{k} +% The letter `k'. +% \begin{macrocode} +cmchar "IMAJ letter k"; +beginchar("k", 2sb#+hstretch*(x_height#+trijut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=-d; +%% top arm +z3=(x1,5/6h); +rt x5=w-pcshiftx; y5=2/3h; +x4=1/2[x3,x5]; top y4=h; +%% lower arm +x7=x5; bot y7=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1,2,1/3, clubjut, clubjut); +draw z3..z4{right}..z5; % upper arm +draw z3..{right}z7; % lower arm +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "k" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{l} +% The letter `l'. +% \begin{macrocode} +cmchar "IMAJ letter l"; +beginchar("l", 2sb#+hstretch*(7/6x_height#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x2=pcshiftx; y2=1/5h; +x1=x2+trijut; top y1=h; +rt x4=w-pcshiftx; y4=1/5h; +x3=1/2[x2,x4]; bot y3=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}..z2..z3{right}..z4; +draw_triserif(1,trijut); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "l" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{m} +% The letter `m'. +% \begin{macrocode} +cmchar "IMAJ letter m"; +beginchar("m", 2sb#+hstretch*(5/3x_height#+trijut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+trijut; top y1=h; +x2=x1; bot y2=0; +z1'=(rt x1, y1+h); z2'=(rt x2, y2-h); +%% right stem +rt x5=w-pcshiftx; y5=y1; +z6=(x5,0); +%% middle stem +z3=1/2[z1,z5]; z4=1/2[z2,z6]; +z3'=(rt x3, y3); z4'=(rt x4, y4); +n1 := x4-x2+3/2thick; % width of bowl +n2 := 2/3h; % height of bowl +%% left bowl +z7=(rt x4 - n1, h-n2); +obowl(7, n1, n2); +pth1 := obouter; pth2 := obinner; pth3 := obsecond; +z17tout = (z1'--z2') intersectionpoint subpath (3,4) of obouter; +z17tinn = (z1'--z2') intersectionpoint subpath (3,4) of obinner; +z17toth = (x2, y17tinn); +%% right bowl +z8=(rt x6 - n1, y7); +obowl(8, n1, n2); +pth5 := obouter; pth6 := obinner; pth7 := obsecond; +z18tout = pth5 intersectionpoint subpath (0,1) of pth1; +z18tinn = pth6 intersectionpoint subpath (0,1) of pth1; +z13 = directionpoint down of pth3; +z15 = directionpoint down of pth7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left half +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, clubjut); +fill z17tout..z7minlo{pdir}..{down}(rt x13, y13)-- + (lft x13, y13){up}..z7minli{-pdir}..z17tinn--z17toth--cycle; +draw_tstem(13,4,srad); % right half +fill z18tout..z8minlo{pdir}..{down}(rt x15, y15)-- + (lft x15, y15){up}..z8minli{-pdir}..z18tinn--cycle; +draw_tstem(15,6,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,14,100); +endchar; % end "m" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{n} +% The letter `n'. This could be like a capital `N' or a lower-case `n'. +% I have chosen to do the first form. +% \begin{macrocode} +cmchar "IMAJ letter n"; +beginchar("n", 2sb#+hstretch*(7/6x_height#+trijut#), + x_height#, 1/2desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1=pcshiftx+trijut; top y1=h; +x2=x1; bot y2=-d; +%% right stem +rt x3=w-pcshiftx; y3=y1; +z4=(x3,0); +%% bar +z5=(x1,1/3h); z6=(x4,1/6h); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, clubjut); +draw_tstem(3,4,srad); % right stem +draw_clubbase(3, 4, 1/3, clubjut, clubjut); +draw z5--z6; % bar +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "n" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{o} +% The letter `o'. +% \begin{macrocode} +cmchar "IMAJ letter o"; +beginchar("o", 2sb#+hstretch*(7/6x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%%draw z1..z2..z3..z4..cycle; +z5=(pcshiftx,-o); +obowl(5, w-2pcshiftx, h+2o); +fill obouter; unfill obinner; +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "o" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{p} +% The letter `p'. +% \begin{macrocode} +cmchar "IMAJ letter p"; +beginchar("p", 2sb#+hstretch*(8/6x_height#+trijut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+trijut; +top y1=1/3h; bot y2=-d; +n1 := w - pcshiftx - lft x1; % width of bowl +n2 := h+1/4d; % height of bowl +z3=(lft x1, -1/4d); +obowl(3, n1, n2); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, 0); +fill lft z1{up}..z3minlo{pdir}..z3maxro{-ppdir}..{-pdir}z3minro-- + z3minri{pdir}..z3maxri{ppdir}..z3minli{-pdir}..{down}rt z1-- + cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "p" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{q} +% The letter `q'. +% \begin{macrocode} +cmchar "IMAJ letter q"; +beginchar("q", 2sb#+hstretch*(x_height#+1/2trijut#), + x_height#, 1/2desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% right stem +rt x1=w-pcshiftx-1/2trijut; top y1=h; +x2=x1; bot y2=-d; +z3=(pcshiftx,0); +n1 := w; % width of bowl +n2 := h; % height of bowl +obowl(3, n1, n2); +z10o = (rt z1--rt z2) intersectionpoint subpath (0,1) of obouter; +z10i = (lft z1--lft z2) intersectionpoint subpath (0,1) of obinner; +z20o = (rt z1--rt z2) intersectionpoint subpath (1,2) of obouter; +z20i = (lft z1--lft z2) intersectionpoint subpath (1,2) of obinner; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, 0, clubjut); +fill z10o..z3minlo{-pdir}..z3maxlo{-ppdir}..z3minro{right}..z20o-- + z20i..z3minri{-pdir}..z3maxli{ppdir}..z3minli{pdir}..z10i-- + cycle; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{r} +% The letter `r'. +% \begin{macrocode} +cmchar "IMAJ letter r"; +beginchar("r", sb#+hstretch*(11/6x_height#+trijut#), + x_height#, 1/2desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+trijut; top y1=h; bot y2=-d; +n1 := w-pcshiftx; % width of bowl +n2 := 5/6h; % height of bowl +z3=(x1-1/2n1, h-n2); +obowl(3, n1, n2); +z10o=(x1,h); z10i=(x1, y10o-thin); +z20o=(x1,y3); z20i=(x20o, y20o+thin); +%% arm +x4=x1; bot y4=y3; +x5=x3maxro; top y5=0; +%%rt x6=w; y6=y4; +rt x6=w; y6=y2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, 0); +fill z10o{right}..z3maxro{-ppdir}..{left}z20o-- + z20i{right}..z3maxri{ppdir}..{left}z10i--cycle; +%%draw z4{right}..z5{right}..{right}z6; % arm +draw z4{right}..{right}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "r" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{s} +% The letter `s'. This is a `long' S. +% \begin{macrocode} +cmchar "IMAJ letter s"; +beginchar("s", 2sb#+hstretch*(x_height#+trijut#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+trijut; top y1=h/ascratio; bot y2=0; +n1 := w; % width of bowl +n2 := 2(h-y1); % height of bowl +z3=(lft x1, y1-1/2n2); +obowl(3, n1, n2); +z4=(2w,2h); +z10o = (z3--z4) intersectionpoint subpath (0,1) of obouter; +z10i = (z3--z4) intersectionpoint subpath (0,1) of obinner; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, clubjut); +fill rt z1{up}..z3minli{pdir}..z10i-- + z10o..z3minlo{-pdir}..{down}lft z1--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,26,27,28,100); +endchar; % end "s" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{t} +% The letter `t'. +% \begin{macrocode} +cmchar "IMAJ letter t"; +beginchar("t", 2sb#+hstretch*(4/3x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% bar +lft x1 = pcshiftx; y1=h; rt x2=w-pcshiftx; y2=y1; +n1 := w; % width of bowl +n2 := h; % height of bowl +z3=(pcshiftx+thick,0); +obowl(3, n1, n2); +z5=(x1+w, 0); +z20o = (z1--z5) intersectionpoint subpath (1,2) of obouter; +z20i = (z1--z5) intersectionpoint subpath (1,2) of obinner; +z10o = (x3minlo, top y1); +z10i = (x3minlo, bot y1); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % bar +draw_utriangle(1, thick); +draw_triangle(2, thick); +fill z10o{left}..z3maxlo{-ppdir}..z3minro{pdir}..z20o-- + z20i..z3minri{-pdir}..z3maxli{ppdir}..z10i{right}--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "t" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{u} +% The letter `u'. +% \begin{macrocode} +cmchar "IMAJ letter u"; +beginchar("u", 2sb#+hstretch*(7/6x_height#+1/2trijut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% right stem +rt x1 = rt x2 = w-pcshiftx-1/2trijut; +y1=h; y2=0; +z1'=(x1-1/2thick,2h); z2'=(x1',-h); +%% bowl +n1 := w; % width of bowl +n2 := 4/3h; % height of bowl +z3=(pcshiftx,0); +obowl(3, n1, n2); +z4=(pcshiftx,h); z5=(w,y4); +z10o = (z4--z5) intersectionpoint subpath (3,4) of obouter; +z10i = (z4--z5) intersectionpoint subpath (3,4) of obinner; +z10'=1/2[z10o,z10i]; +z10=(x10i,y1); +z20o = (z1'--z2') intersectionpoint subpath (1,3) of obouter; +z20i = (z1'--z2') intersectionpoint subpath (1,3) of obinner; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, 0, clubjut); +fill z10o..z3maxlo{-ppdir}..z3minro{pdir}..z20o-- + z20i..z3minri{-pdir}..z3maxli{ppdir}..z10i--cycle; +draw_triserif(10,trijut); % serif on bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "u" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{v} +% The letter `v'. The right half of the `w' is used for the `v' (or vice-versa +% if you prefer). +% \begin{macrocode} +cmchar "IMAJ letter v"; +beginchar("v", 2sb#+hstretch*(x_height#+trijut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +% right side of W +numeric midx; midx:= pcshiftx; +lft x1=midx+trijut; top y1=h; +x2=x1; y2=h/2; +rt x4=w-pcshiftx; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-trijut; y5=y1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_triserif(1,trijut); +%%draw_triserif(5,trijut); +draw z1--z2{down}..z3{right}..z4{up}..z5; +ductus:=false; +penlabels(1,2,3,4,5,11,100); +endchar; % end "v" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{w} +% The letter `w'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "IMAJ letter w"; +beginchar("w", 2sb#+hstretch*(5/3x_height#+trijut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +% right side first +numeric midx; midx:= w/2-trijut; +lft x1=midx+trijut; top y1=h; +x2=x1; y2=h/2; +rt x4=w-pcshiftx; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-trijut; y5=y1; +% left side +lft x6=pcshiftx+trijut; +top y6=h; +%%lft x7=pcshiftx; y7=y2; +x7=x6; y7=y2; +x8=0.5[x7,x1]; y8=y3; +% construction points +x15=0.5[x8,x1]; y15=y8; +z15'=z15 shifted (w*pdir); +x2'=x2; y2'=y15; +path p[]; +p1=z1--z2'; +p2=z15--z15'; +z9= p2 intersectionpoint p1; +pair vec[]; +p3=z6..z7{down}..{right}z8; +vec3 = direction 0 of p3; +z16=z6 shifted vec3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_triserif(1,trijut); % right half +draw z1--z2{down}..z3{right}..z4{up}..z5; +draw_triserif(6,trijut); % left half +draw z6--z7{down}..z8{right}..z9; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "w" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{x} +% The letter `x'. +% \begin{macrocode} +cmchar "IMAJ letter x"; +beginchar("x", 2sb#+hstretch*(16/6x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := w-2pcshiftx; % total width +n2 := thick; % triangle side +%% diag top left to bottom right +lft x1=pcshiftx; bot y1=2/3h; +x2=pcshiftx+1/7n1; top y2=h; +x5=pcshiftx+11/14n1; bot y5=-1/4d; +rt x6=pcshiftx+n1; top y6=1/6h; +%% diag bottom left to top right +x10=x1; bot y10=-d; +x50=pcshiftx+9/14n1; top y50=h; +rt x60=x5; bot y60=2/3h; +x40=pcshiftx+8/14n1; y40=h; +%% triangle +z100=(lft x10, bot y10); +x101=x100+n2; z101=whatever[z100,z40]; +x102=x100; y102=1/2[y100,y101]+n2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z5{right}..z6; % top left to bottom right +draw z10{z40-z10}..z50{right}..z60; % bottom left to top right +fill z100--z101--z102--cycle; % triangle +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "x" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{y} +% The letter `y'. This looks like a curly capital F. +% \begin{macrocode} +cmchar "IMAJ letter y"; +beginchar("y", 2sb#+hstretch*(x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +%% main stroke +rt x1=w-pcshiftx; top y1=h; +lft x3=pcshiftx; y3=1/2h; +x4=x1; y4=0; +x2=2/3[x3,x1]; bot y2=h; +lft x5=1/2[x3,x4]; bot y5=-d; +%% arm +z101=1/2[z3,z4]; +z103=(x1,y3); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{left}..z3{down}..z4{down}..z5; % main stroke +draw z101..z103{right}; % arm +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{z} +% The letter `z'. +% \begin{macrocode} +cmchar "IMAJ letter z"; +beginchar("z", 2sb#+hstretch*(9/6x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +%% top bar +n10 := w-2pcshiftx; % letter width +lft x1=pcshiftx; y1=h; +rt x2=pcshiftx+2/3n10; y2=y1; +%% diagonal +x3=x1; bot y3=0; +%% bowl +n1 := 2/3n10; % width of bowl +n2 := 5/6h; % height of bowl +z4=(w-pcshiftx-n1, 0); +obowl(4, n1, n2); +z5'=(0,1/4n2); z6'=(x4obc,y5'); +z20o = (z5'--z6') intersectionpoint obouter; +z20i = (z5'--z6') intersectionpoint obinner; +z7'=(0,2/3n2); z8'=(x6',y7'); +z10o = whatever[lft z3, lft z2] = whatever[z7',z8']; +z10i = whatever[rt z3, rt z2] = whatever[z7',z8']; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % top bar +draw_utriangle(1,thick); +draw z2--z3; % diagonal +fill z20o..z4minro{pdir}..z4maxro{ppdir}..z4minlo{-pdir}..{z3-z2}z10o-- + z10i{z2-z3}..z4minli{pdir}..z4maxri{-ppdir}..z4minri{-pdir}..z20i-- + cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "z" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file +% \begin{macrocode} +%</min> +% \end{macrocode} +% +% +% \subsection{The code for capital letters} +% +% \thisfont{} `capitals' were drawn with the same pen as for the minuscules, +% and the letters were merely larger versions of the minuscules. +% +% \begin{macrocode} +%<*maj> +% IMAJU.MF Program file for Insular Majuscule `capitals' +% + +% \end{macrocode} +% +% \begin{routine}{A} +% The letter `A'. +% \begin{macrocode} +cmchar "IMAJ letter A"; +beginchar("A", 2sb#+caprat*hstretch*(5/3x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% left bowl +n1 := w-2pcshiftx; % actual letter width +n2 := 7/10n1; % width of left bowl +z1=(pcshiftx,0); +obowl(1, n2, h); +pth1:=obouter; pth2:=obinner; +pth10:=obfirst; pth20:=obsecond; +%% right bowl +n3:=x1+n2-16/12thick; % leftmost point of "stem" +n4:=2(n1-n3); % total width of right stem bowl +z2=(n3,0); +offsetbowl(2, n4, h, 6/12, 1/2); +pth3:=obouter; pth4:=obinner; +pth30:=obfirst; pth40:=obsecond; +%% intersect left bowl with outer of right bowl +z1tout = (subpath (0,1) of pth1) intersectionpoint (subpath (4,2) of pth3); +z1tinn = (subpath (0,1) of pth2) intersectionpoint (subpath (4,2) of pth3); +z1lout = (subpath (1,2) of pth1) intersectionpoint (subpath (4,2) of pth3); +z1linn = (subpath (1,2) of pth2) intersectionpoint (subpath (4,2) of pth3); + +%%ductus:=true; +if ductus: + pickup stylus; + % draw the control paths + draw pth10; draw pth20; + draw pth30; draw pth40; +else: + %% draw left bowl + fill z1lout..z1minro{-pdir}..z1maxlo{ppdir}..z1minlo{pdir}..z1tout-- + z1tinn..z1minli{-pdir}..z1maxli{-ppdir}..z1minri{pdir}..z1linn-- + cycle; + %% draw right stem/bowl + fill z2minro{-pdir}..z2maxlo{ppdir}..{pdir}z2minlo-- + z2minli{-pdir}..z2maxli{-ppdir}..{pdir}z2minri--cycle; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "A" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{B} +% The letter `B'. +% \begin{macrocode} +cmchar "IMAJ letter B"; +beginchar("B", 2sb#+caprat*hstretch*(7/6x_height#), + caprat*asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=h/ascratio; % top of bowl +z1=(pcshiftx, -o); +obowl(1, n1, n2+o); +%% draw bowl +fill obouter; unfill obinner; +%% top of stem +x2=x1wt+1/3n1; top y2=h; +tangentpoint(2, subpath (3,4) of obsecond); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z2tan--z2; +draw_triserif(2,trijut); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "B" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{C} +% The letter `C'. +% \begin{macrocode} +cmchar "IMAJ letter C"; +beginchar("C", 2sb#+caprat*hstretch*(5/6x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +z1=(pcshiftx,0); +obowl(1, n2, h); +z3=(x1+n1, h); % top RH corner +z4=(x1obc,1/6h); z5=(3/2w,y4); % for horizontal line +%% top intersection points +z10i = (z1obc--z3) intersectionpoint obinner; +z10o = (z1obc--z3) intersectionpoint obouter; +%% bottom intersection points +z20i = (z4--z5) intersectionpoint obinner; +z20o = (z4--z5) intersectionpoint obouter; +%%ductus:=true; +if ductus: + pickup stylus; +fi +fill z20o..z1minro{-pdir}..z1maxlo{ppdir}..z1minlo{pdir}..z10o-- + z10i..z1minli{-pdir}..z1maxli{-ppdir}..z1minri{pdir}..z20i-- + cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,16,17,18,100); +endchar; % end "C" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{D} +% The letter `D'. +% \begin{macrocode} +cmchar "IMAJ letter D"; +beginchar("D", 2sb#+caprat*hstretch*(x_height#+1/2thick#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +%% bowl +n1 := w-2pcshiftx; % actual letter width +n2 := n1-1/2thick; % width of bowl +n3 := h; % top of bowl +z1=(w-pcshiftx-n2, 0); +obowl(1, n2, n3); +%% top bar +lft x3=pcshiftx; y3=h; +z3i=(pcshiftx, y3-1/2thin); z3o=(x3i,y3i+thin); +z2i=(x1nh,y3i); +z2o=(x2i,y3o); +%%ductus:=true; +if ductus: + pickup stylus; +fi +fill z1minlo{-pdir}..z1maxlo{-ppdir}..z1minro{pdir}..z1maxro{ppdir}..{left}z2o-- + z3o--z3i-- + z2i{right}..z1maxri{-ppdir}..z1minri{-pdir}..z1maxli{ppdir}..{pdir}z1minli-- + cycle; +draw_utriangle(3, thick); +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "D" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{E} +% The letter `E'. +% \begin{macrocode} +cmchar "IMAJ letter E"; +beginchar("E", sb#+caprat*hstretch*(x_height#+3/2thick#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +n1 := w-pcshiftx; % actual letter width +n2 := n1-3/2thick; % width of bowl +z1=(pcshiftx,0); +obowl(1, n2, h); +%% for crossbar +z2=(0,2/3h); rt x3=w; y3=y2; z3'=(x1obc,y2); +z4 = (z2--z3') intersectionpoint subpath (3,4) of obsecond; +z10tout = (z3'--z3) intersectionpoint subpath (0,3) of obouter; +z10tinn = (z3'--z3) intersectionpoint subpath (0,3) of obinner; +%% bottom cutoff +z5=(x1obc,1/6h); z6=(w,y5); +z20bout = (z5--z6) intersectionpoint subpath (0,3) of obouter; +z20binn = (z5--z6) intersectionpoint subpath (0,3) of obinner; +%%ductus:=true; +if ductus: + pickup stylus; +fi +fill z20bout..z1minro{-pdir}..z1maxlo{ppdir}..z1minlo{pdir}..z10tout-- + z10tinn..z1minli{-pdir}..z1maxli{-ppdir}..z1minri{pdir}..z20binn-- + cycle; +draw z4--z3; % crossbar & decoration +draw_triangle(3,thick); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "E" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{F} +% The letter `F'. +% \begin{macrocode} +cmchar "IMAJ letter F"; +beginchar("F", 2sb#+caprat*hstretch*(x_height#+trijut#), + caprat*(x_height#), caprat*desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=-d; +%% bottom bar +z4=(rt x1,-thin); rt x6=w-pcshiftx; y6=y4+2thin; z5=1/2[z4,z6]; +%% top bar +z7=(rt x1, bot y1); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, clubjut); +draw z4{dir(45)}..z5{right}..z6{dir(45)}; % bottom bar +draw_flick(7, 2thin, thin, (w-pcshiftx-x7+1/2thick)); % top bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "F" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{G} +% The letter `G'. +% \begin{macrocode} +cmchar "IMAJ letter G"; +beginchar("G", 2sb#+caprat*hstretch*(5/3x_height#), + caprat*x_height#, caprat*desc_depth#); +adjust_fit(0,0); +path pth[]; +pair vec[]; +pcshiftx := sb; +pickup quill; +%% top bar +lft x1=pcshiftx; y1=h; rt x2=w-pcshiftx; y2=h; +%% curves +z3=2/5[z1,z2]; +x5=4/5[x1,x2]; y5=-1/2d; +x4=(x3-thick); y4=1/2[y5,y3]; +x7=1/2[x1,x4]; y7=y5; +x6=2/3[x7,x5]; bot y6=-d; +pth1 := z3..z4{down}..z5; +pth2 := z5--z6{left}..z7; +%% diagonal to close bottom bowl +vec1 := direction 2 of pth2; +vec2 := (z5-z6); +z7'=(lft x7, bot y7); z7''=(rt x7, y7); +pickup thickstylus; +lft x8 = x7'; bot y8 = y7'; +z9' = z8 shifted 2vec2; +z9 = (z8--z9') intersectionpoint pth1; +z7''' = z7'' shifted 2vec1; +z8' = whatever[z7'',z7'''] = whatever[z8,z9']; +%%ductus:=true; +if ductus: + pickup stylus; + draw z1--z2; % top bar + draw pth1; draw pth2; % curves + draw rt z8--z9; % diagonal +else: + pickup quill; + draw z1--z2; % top bar + draw_triangle(2,thick); + draw_utriangle(1,thick); + draw pth1; draw pth2; % curves + pickup thickstylus; + draw rt z8--z9; % diagonal + fill z7''--z8'--z8--cycle; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "G" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{H} +% The letter `H'. +% \begin{macrocode} +cmchar "IMAJ letter H"; +beginchar("H", 2sb#+caprat*hstretch*(x_height#+trijut#), + caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +%% stem +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=0; +%% bowl +rt x3 = lft x1; y3=0; +n1 := w-pcshiftx-x3; % bowl width +n2 := h/ascratio; % bowl height +obowl(3, n1, n2); +z1'=(rt x1, y1); z2'=(x1',y2); %% right hand side of stem +z10tout = (z1'--z2') intersectionpoint subpath (3,4) of obouter; +z10tinn = (z1'--z2') intersectionpoint subpath (3,4) of obinner; +z10toth = (x1, y10tinn); % avoids 180 turn in path +z6 = directionpoint down of obsecond; % top of right leg +z6i=(lft x6, bot y6); z6o=(rt x6, bot y6); +z8=(x6,0); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, clubjut); +draw_tstem(6,8,srad); % right leg +draw_clubbase(6, 8, 1/3, 0, 1/2clubjut); +fill z6i{up}..z3minli{-pdir}..z10tinn--z10toth-- % top of bowl + z10tout..z3minlo{pdir}..{down}z6o--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "H" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{I} +% The letter `I'. +% \begin{macrocode} +cmchar "IMAJ letter I"; +beginchar("I", 2sb#+caprat*hstretch*(thick#+trijut#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, clubjut); +ductus:=false; +penlabels(1,2,100); +endchar; % end "I" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{J} +% The letter `J'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "IMAJ letter J"; +beginchar("J", sb#+caprat*hstretch*(2/3x_height#), + caprat*x_height#, caprat*desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +rt x1 = w-pcshiftx; top y1 = h; +x2=x1; y2=-1/2d; +%% bottom hook +lft x3 = 0; bot y3 = -d; +%% triangle +n1 := thick; % side length +z6=(lft x3, bot y3); +x7=x6+n1; z7=whatever[z6,z2]; +z8=1/2[z6,z7]; +z9=(x8, y8+0.9n1); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw_triserif(1,trijut); +draw z2--z3; % hook +fill z6--z7--z9--cycle; % triangle +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "J" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{K} +% The letter `K'. +% \begin{macrocode} +cmchar "IMAJ letter K"; +beginchar("K", 2sb#+caprat*hstretch*(x_height#+trijut#), + caprat*x_height#, caprat*desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+trijut; +top y1=h; bot y2=-d; +%% top arm +z3=(x1,5/6h); +rt x5=w-pcshiftx; y5=2/3h; +x4=1/2[x3,x5]; top y4=h; +%% lower arm +x7=x5; bot y7=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1,2,1/3, clubjut, clubjut); +draw z3..z4{right}..z5; % upper arm +draw z3..{right}z7; % lower arm +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "K" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{L} +% The letter `L'. +% \begin{macrocode} +cmchar "IMAJ letter L"; +beginchar("L", 2sb#+caprat*hstretch*(7/6x_height#), + caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x2=pcshiftx; y2=1/5h; +x1=x2+trijut; top y1=h; +rt x4=w-pcshiftx; y4=1/5h; +x3=1/2[x2,x4]; bot y3=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}..z2..z3{right}..z4; +draw_triserif(1,trijut); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "L" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{M} +% The letter `M'. +% \begin{macrocode} +cmchar "IMAJ letter M"; +beginchar("M", 2sb#+caprat*hstretch*(5/3x_height#+trijut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+trijut; top y1=h; +x2=x1; bot y2=0; +z1'=(rt x1, y1+h); z2'=(rt x2, y2-h); +%% right stem +rt x5=w-pcshiftx; y5=y1; +z6=(x5,0); +%% middle stem +z3=1/2[z1,z5]; z4=1/2[z2,z6]; +z3'=(rt x3, y3); z4'=(rt x4, y4); +n1 := x4-x2+3/2thick; % width of bowl +n2 := 2/3h; % height of bowl +%% left bowl +z7=(rt x4 - n1, h-n2); +obowl(7, n1, n2); +pth1 := obouter; pth2 := obinner; pth3 := obsecond; +z17tout = (z1'--z2') intersectionpoint subpath (3,4) of obouter; +z17tinn = (z1'--z2') intersectionpoint subpath (3,4) of obinner; +z17toth = (x2, y17tinn); +%% right bowl +z8=(rt x6 - n1, y7); +obowl(8, n1, n2); +pth5 := obouter; pth6 := obinner; pth7 := obsecond; +z18tout = pth5 intersectionpoint subpath (0,1) of pth1; +z18tinn = pth6 intersectionpoint subpath (0,1) of pth1; +z13 = directionpoint down of pth3; +z15 = directionpoint down of pth7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left half +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, clubjut); +fill z17tout..z7minlo{pdir}..{down}(rt x13, y13)-- + (lft x13, y13){up}..z7minli{-pdir}..z17tinn--z17toth--cycle; +draw_tstem(13,4,srad); % right half +fill z18tout..z8minlo{pdir}..{down}(rt x15, y15)-- + (lft x15, y15){up}..z8minli{-pdir}..z18tinn--cycle; +draw_tstem(15,6,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,14,100); +endchar; % end "M" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{N} +% The letter `n'. This could be like a capital `N' or a lower-case `n'. +% I have chosen to do the first form. +% \begin{macrocode} +cmchar "IMAJ letter N"; +beginchar("N", 2sb#+caprat*hstretch*(7/6x_height#+trijut#), + caprat*x_height#, caprat*(1/2desc_depth#)); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1=pcshiftx+trijut; top y1=h; +x2=x1; bot y2=-d; +%% right stem +rt x3=w-pcshiftx; y3=y1; +z4=(x3,0); +%% bar +z5=(x1,1/3h); z6=(x4,1/6h); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, clubjut); +draw_tstem(3,4,srad); % right stem +draw_clubbase(3, 4, 1/3, clubjut, clubjut); +draw z5--z6; % bar +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "N" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{O} +% The letter `O'. +% \begin{macrocode} +cmchar "IMAJ letter O"; +beginchar("O", 2sb#+caprat*hstretch*(7/6x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +z5=(pcshiftx,-o); +obowl(5, w-2pcshiftx, h+2o); +%%ductus:=true; +if ductus: + pickup stylus; +fi +fill obouter; unfill obinner; +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "O" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{P} +% The letter `P'. +% \begin{macrocode} +cmchar "IMAJ letter P"; +beginchar("P", 2sb#+caprat*hstretch*(8/6x_height#+trijut#), + caprat*x_height#, caprat*desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+trijut; +top y1=1/3h; bot y2=-d; +n1 := w - pcshiftx - lft x1; % width of bowl +n2 := h+1/4d; % height of bowl +z3=(lft x1, -1/4d); +obowl(3, n1, n2); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, 0); +fill lft z1{up}..z3minlo{pdir}..z3maxro{-ppdir}..{-pdir}z3minro-- + z3minri{pdir}..z3maxri{ppdir}..z3minli{-pdir}..{down}rt z1-- + cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "P" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Q} +% The letter `Q'. +% \begin{macrocode} +cmchar "IMAJ letter Q"; +beginchar("Q", 2sb#+caprat*hstretch*(x_height#+1/2trijut#), + caprat*x_height#, caprat*(1/2desc_depth#)); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% right stem +rt x1=w-pcshiftx-1/2trijut; top y1=h; +x2=x1; bot y2=-d; +z3=(pcshiftx,0); +n1 := w; % width of bowl +n2 := h; % height of bowl +obowl(3, n1, n2); +z10o = (rt z1--rt z2) intersectionpoint subpath (0,1) of obouter; +z10i = (lft z1--lft z2) intersectionpoint subpath (0,1) of obinner; +z20o = (rt z1--rt z2) intersectionpoint subpath (1,2) of obouter; +z20i = (lft z1--lft z2) intersectionpoint subpath (1,2) of obinner; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, 0, clubjut); +fill z10o..z3minlo{-pdir}..z3maxlo{-ppdir}..z3minro{right}..z20o-- + z20i..z3minri{-pdir}..z3maxli{ppdir}..z3minli{pdir}..z10i-- + cycle; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "Q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{R} +% The letter `R'. +% \begin{macrocode} +cmchar "IMAJ letter R"; +beginchar("R", sb#+caprat*hstretch*(11/6x_height#+trijut#), + caprat*x_height#, caprat*(1/2desc_depth#)); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+trijut; top y1=h; bot y2=-d; +n1 := w-pcshiftx; % width of bowl +n2 := 5/6h; % height of bowl +z3=(x1-1/2n1, h-n2); +obowl(3, n1, n2); +z10o=(x1,h); z10i=(x1, y10o-thin); +z20o=(x1,y3); z20i=(x20o, y20o+thin); +%% arm +x4=x1; bot y4=y3; +x5=x3maxro; top y5=0; +%%rt x6=w; y6=y4; +rt x6=w; y6=y2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, 0); +fill z10o{right}..z3maxro{-ppdir}..{left}z20o-- + z20i{right}..z3maxri{ppdir}..{left}z10i--cycle; +%%draw z4{right}..z5{right}..{right}z6; % arm +draw z4{right}..{right}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "R" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{S} +% The letter `S'. This is a `long' S. +% \begin{macrocode} +cmchar "IMAJ letter S"; +beginchar("S", 2sb#+caprat*hstretch*(x_height#+trijut#), + caprat*asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+trijut; top y1=h/ascratio; bot y2=0; +n1 := w; % width of bowl +n2 := 2(h-y1); % height of bowl +z3=(lft x1, y1-1/2n2); +obowl(3, n1, n2); +z4=(2w,2h); +z10o = (z3--z4) intersectionpoint subpath (0,1) of obouter; +z10i = (z3--z4) intersectionpoint subpath (0,1) of obinner; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, clubjut, clubjut); +fill rt z1{up}..z3minli{pdir}..z10i-- + z10o..z3minlo{-pdir}..{down}lft z1--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,26,27,28,100); +endchar; % end "S" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{T} +% The letter `T'. +% \begin{macrocode} +cmchar "IMAJ letter T"; +beginchar("T", 2sb#+caprat*hstretch*(4/3x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% bar +lft x1 = pcshiftx; y1=h; rt x2=w-pcshiftx; y2=y1; +n1 := w; % width of bowl +n2 := h; % height of bowl +z3=(pcshiftx+thick,0); +obowl(3, n1, n2); +z5=(x1+w, 0); +z20o = (z1--z5) intersectionpoint subpath (1,2) of obouter; +z20i = (z1--z5) intersectionpoint subpath (1,2) of obinner; +z10o = (x3minlo, top y1); +z10i = (x3minlo, bot y1); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % bar +draw_utriangle(1, thick); +draw_triangle(2, thick); +fill z10o{left}..z3maxlo{-ppdir}..z3minro{pdir}..z20o-- + z20i..z3minri{-pdir}..z3maxli{ppdir}..z10i{right}-- + cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "T" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{U} +% The letter `U'. +% \begin{macrocode} +cmchar "IMAJ letter U"; +beginchar("U", 2sb#+caprat*hstretch*(7/6x_height#+1/2trijut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% right stem +rt x1 = rt x2 = w-pcshiftx-1/2trijut; +y1=h; y2=0; +z1'=(x1-1/2thick,2h); z2'=(x1',-h); +%% bowl +n1 := w; % width of bowl +n2 := 4/3h; % height of bowl +z3=(pcshiftx,0); +obowl(3, n1, n2); +z4=(pcshiftx,h); z5=(w,y4); +z10o = (z4--z5) intersectionpoint subpath (3,4) of obouter; +z10i = (z4--z5) intersectionpoint subpath (3,4) of obinner; +z10'=1/2[z10o,z10i]; +z10=(x10i,y1); +z20o = (z1'--z2') intersectionpoint subpath (1,3) of obouter; +z20i = (z1'--z2') intersectionpoint subpath (1,3) of obinner; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_triserif(1,trijut); +draw_clubbase(1, 2, 1/3, 0, clubjut); +fill z10o..z3maxlo{-ppdir}..z3minro{pdir}..z20o-- + z20i..z3minri{-pdir}..z3maxli{ppdir}..z10i--cycle; +draw_triserif(10,trijut); % serif on bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "U" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{V} +% The letter `V'. The right half of the `w' is used for the `v' (or vice-versa +% if you prefer). +% \begin{macrocode} +cmchar "IMAJ letter V"; +beginchar("V", 2sb#+caprat*hstretch*(x_height#+trijut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +% right side of W +numeric midx; midx:= pcshiftx; +lft x1=midx+trijut; top y1=h; +x2=x1; y2=h/2; +rt x4=w-pcshiftx; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-trijut; y5=y1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_triserif(1,trijut); +%%draw_triserif(5,trijut); +draw z1--z2{down}..z3{right}..z4{up}..z5; +ductus:=false; +penlabels(1,2,3,4,5,11,100); +endchar; % end "V" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{W} +% The letter `W'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "IMAJ letter W"; +beginchar("W", 2sb#+caprat*hstretch*(5/3x_height#+trijut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +% right side first +numeric midx; midx:= w/2-trijut; +lft x1=midx+trijut; top y1=h; +x2=x1; y2=h/2; +rt x4=w-pcshiftx; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-trijut; y5=y1; +% left side +lft x6=pcshiftx+trijut; +top y6=h; +%%lft x7=pcshiftx; y7=y2; +x7=x6; y7=y2; +x8=0.5[x7,x1]; y8=y3; +% construction points +x15=0.5[x8,x1]; y15=y8; +z15'=z15 shifted (w*pdir); +x2'=x2; y2'=y15; +path p[]; +p1=z1--z2'; +p2=z15--z15'; +z9= p2 intersectionpoint p1; +pair vec[]; +p3=z6..z7{down}..{right}z8; +vec3 = direction 0 of p3; +z16=z6 shifted vec3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_triserif(1,trijut); % right half +draw z1--z2{down}..z3{right}..z4{up}..z5; +draw_triserif(6,trijut); % left half +draw z6--z7{down}..z8{right}..z9; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "W" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{X} +% The letter `X'. +% \begin{macrocode} +cmchar "IMAJ letter X"; +beginchar("X", 2sb#+caprat*hstretch*(16/6x_height#), + caprat*x_height#, caprat*desc_depth#); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := w-2pcshiftx; % total width +n2 := thick; % triangle side +%% diag top left to bottom right +lft x1=pcshiftx; bot y1=2/3h; +x2=pcshiftx+1/7n1; top y2=h; +x5=pcshiftx+11/14n1; bot y5=-1/4d; +rt x6=pcshiftx+n1; top y6=1/6h; +%% diag bottom left to top right +x10=x1; bot y10=-d; +x50=pcshiftx+9/14n1; top y50=h; +rt x60=x5; bot y60=2/3h; +x40=pcshiftx+8/14n1; y40=h; +%% triangle +z100=(lft x10, bot y10); +x101=x100+n2; z101=whatever[z100,z40]; +x102=x100; y102=1/2[y100,y101]+n2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z5{right}..z6; % top left to bottom right +draw z10{z40-z10}..z50{right}..z60; % bottom left to top right +fill z100--z101--z102--cycle; % triangle +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "X" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Y} +% The letter `Y'. This looks like a curly capital F. +% \begin{macrocode} +cmchar "IMAJ letter Y"; +beginchar("Y", 2sb#+caprat*hstretch*(x_height#), + caprat*x_height#, caprat*desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +%% main stroke +rt x1=w-pcshiftx; top y1=h; +lft x3=pcshiftx; y3=1/2h; +x4=x1; y4=0; +x2=2/3[x3,x1]; bot y2=h; +lft x5=1/2[x3,x4]; bot y5=-d; +%% arm +z101=1/2[z3,z4]; +z103=(x1,y3); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{left}..z3{down}..z4{down}..z5; % main stroke +draw z101..z103{right}; % arm +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "Y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{Z} +% The letter `Z'. +% \begin{macrocode} +cmchar "IMAJ letter Z"; +beginchar("Z", 2sb#+caprat*hstretch*(9/6x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +%% top bar +n10 := w-2pcshiftx; % letter width +lft x1=pcshiftx; y1=h; +rt x2=pcshiftx+2/3n10; y2=y1; +%% diagonal +x3=x1; bot y3=0; +%% bowl +n1 := 2/3n10; % width of bowl +n2 := 5/6h; % height of bowl +z4=(w-pcshiftx-n1, 0); +obowl(4, n1, n2); +z5'=(0,1/4n2); z6'=(x4obc,y5'); +z20o = (z5'--z6') intersectionpoint obouter; +z20i = (z5'--z6') intersectionpoint obinner; +z7'=(0,2/3n2); z8'=(x6',y7'); +z10o = whatever[lft z3, lft z2] = whatever[z7',z8']; +z10i = whatever[rt z3, rt z2] = whatever[z7',z8']; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % top bar +draw_utriangle(1,thick); +draw z2--z3; % diagonal +fill z20o..z4minro{pdir}..z4maxro{ppdir}..z4minlo{-pdir}..{z3-z2}z10o-- + z10i{z2-z3}..z4minli{pdir}..z4maxri{-ppdir}..z4minri{-pdir}..z20i-- + cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "Z" + +% \end{macrocode} +% \end{routine} +% +% +% +% The end of this file +% \begin{macrocode} +%</maj> +% \end{macrocode} +% +% +% +% \subsection{The punctuation file} +% +% The main punctuation marks are defined in this file. +% +% \begin{macrocode} +%<*punct> +% IMAJPUNCT.MF This file contains punctuation marks + +% \end{macrocode} +% +% +% \begin{routine}{!} +% The `!' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Exclamation mark"; +beginchar("!", 2sb#+hstretch*(thick#+trijut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +z1=(w/2,h); +z3=(x1, 1/2dot_size); +z2=(x1, y3+3/2dot_size); +draw z1--z2; +draw_pdot(3,dot_size); +penlabels(1,2,3); + +endchar; % end of "!" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{?} +% The `?' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Question mark"; +beginchar("?", 2sb#+hstretch*(x_height#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-2pcshiftx; % actual character width +n2 := 1/3h; % height of top bowl +n3 := n2; % height of bottom bowl +%% top bowl +z1=(pcshiftx, h-n2); +obowl(1, n1, n2); +pth1 := obouter; +%% bottom bowl +z2=(x1,y1-n3); +obowl(2, n1, n3); +pth2 := obouter; +%% stem and dot +lft x4 = x1 + 4/4thick; +z5=(x4,1/2dot_size); +y4=y5+3/2dot_size; +z4o=(lft x4, y4); z4i=(rt x4, y4); +%%ductus:= true; +if ductus: + pickup stylus; + draw pth1; draw pth2; + draw z2wt--z4; + draw_pdot(5, dot_size); +else: + fill z1maxlo{ppdir}..z1minlo{pdir}..z1maxro{-ppdir}.. +%% z1minro..z2maxli{-ppdir}.. + z2minli.. + {down}z4i--z4o{up}.. + z2minlo.. +%% z1minri..z1maxri{ppdir}.. + z1maxri{ppdir}..z1minli{-pdir}..z1maxli{-ppdir}--cycle; + draw_pdot(5, dot_size); +fi +penlabels(1,2,3,4,5); +endchar; % end of "?" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{,} +% The `,' character. +% \begin{macrocode} + +cmchar "Comma"; +beginchar(",",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h/2; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "," + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{.} +% The `.' character. +% \begin{macrocode} + +cmchar "Period"; +beginchar(".",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +x1=w/2; y1=h/2; +draw_pdot(1,dot_size); +penlabels(1); +endchar; % end of "." + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{:} +% The `:' character. +% \begin{macrocode} + +cmchar "Colon"; +beginchar(":",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +x1=x2=w/2; y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pdot(2,dot_size); +penlabels(1,2); +endchar; % end ":" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{;} +% The `;' character. +% \begin{macrocode} + +cmchar "Semicolon"; +beginchar(";",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pcomma(2,dot_size,comma_width); +penlabels(1,2); +endchar; % end of ";" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{'} +% The `'' character. +% \begin{macrocode} + +cmchar "Apostrophe"; +beginchar("'",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "'" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{`} +% The ``' character. +% \begin{macrocode} + +cmchar "Reverse apostrophe"; +beginchar("`",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=h; +draw_plq(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "`" + +% \end{macrocode} +% \end{routine} +% +% The end of this file. +% \begin{macrocode} +%</punct> +% \end{macrocode} +% +% +% \subsection{The ligatures and dashes file} +% +% The ligatured letters, punctuation marks and dashes are defined in this file. +% \begin{macrocode} +%<*lig> +% IMAJLIG.MF Uncial ligatured letters, punctation and dashes + +% \end{macrocode} +% First the ligtables. +% \begin{macrocode} + +ligtable "`": "`"=:oct"134"; +ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#; + +ligtable "-": "-"=:oct"173"; +ligtable oct"173": "-"=:oct"174"; + +%%%%ligtable "f": "i"=:oct"014"; + +% \end{macrocode} +% +% \begin{routine}{''} +% The `''' ligature. +% \begin{macrocode} + +cmchar "Closing quotes"; +beginchar(oct"042",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h; +x2=x1-(2hstretch*dot_size); +draw_pcomma(1,dot_size,comma_width); % right +draw_pcomma(2,dot_size,comma_width); % left +penlabels(1,2); +endchar; % end of "''" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{``} +% The ```' ligature. +% \begin{macrocode} + +cmchar "Opening quotes"; +beginchar(oct"134",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h; +x2=x1+(2hstretch*dot_size); +draw_plq(1,dot_size,comma_width); % left +draw_plq(2,dot_size,comma_width); % right +penlabels(1,2); +endchar; % end of "``" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{-} +% The `-' (hyphen) character. +% \begin{macrocode} + +cmchar "Hyphen"; +beginchar("-",sb#+hstretch*(0.8x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +x11=lft x1+alpha/2; y11=top y1-0.5thin; +x12=rt x2; y12=bot y1+0.5thin; +draw_triangle(11,alpha); +draw_rutriangle(12,alpha); +pickup thickstylus; +lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=y1; +draw z21--z22; +penlabels(1,2); +endchar; % end of "-" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{--} +% The `--' (en-dash) ligature. +% \begin{macrocode} + +cmchar "En dash"; +beginchar(oct"173",sb#+hstretch*(x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +x11=lft x1+alpha/2; y11=top y1-0.5thin; +x12=rt x2; y12=bot y1+0.5thin; +draw_triangle(11,alpha); +draw_rutriangle(12,alpha); +pickup thickstylus; +lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=y1; +draw z21--z22; +penlabels(1,2); +endchar; % end of "--" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{---} +% The `---' (em dash) ligature. The em dash is twice the width of the en dash. +% \begin{macrocode} + +cmchar "Em dash"; +beginchar(oct"174",sb#+hstretch*(2x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +x11=lft x1+alpha/2; y11=top y1-0.5thin; +x12=rt x2; y12=bot y1+0.5thin; +draw_triangle(11,alpha); +draw_rutriangle(12,alpha); +pickup thickstylus; +lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=y1; +draw z21--z22; +penlabels(1,2); +endchar; % end of "---" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{&} +% The ampersand (which is really an `et' ligature). +% \begin{macrocode} + +cmchar "IMAJ ampersand"; +beginchar("&", 2sb#+hstretch*(6/3x_height#), asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx:=sb; +pickup quill; +n10 := w-2pcshiftx; % width of character +%% crossbar +z1'=(0,h/ascratio); +rt x2=w-pcshiftx; y2=y1'; +%% main bowl +n1 := 4/6n10; % width of bowl +n2 := h; % height of bowl +z3=(pcshiftx,0); +obowl(3, n1, n2); +z2'=(x3obc,y1'); +z1 = (z1'--z2') intersectionpoint obinner; +z10o = (z2'--z2) intersectionpoint obouter; +z10i = (z2'--z2) intersectionpoint obinner; +%% wave +x4=x2; bot y4=0; +pth1 := z1{right}..z4{right}; +%% wave/bowl +z20o = pth1 intersectionpoint subpath (0,2) of obouter; +z20i = pth1 intersectionpoint subpath (0,2) of obinner; +%%ductus:=true; +if ductus: + pickup stylus; +fi +fill z10o..z3minlo{-pdir}..z3maxlo{-ppdir}..z3minro{pdir}..z20o-- + z20i..z3minri{-pdir}..z3maxli{ppdir}..z3minli{pdir}..z10i-- + cycle; +draw z1--z2; % bar +draw pth1; % wave +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,16,17,18,31,32,33); +endchar; % end of "&" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</lig> +% \end{macrocode} +% +% \subsection{The digits file} +% +% These are arabic digits in the style of the book-hand. They are a +% modern invention. +% +% \begin{macrocode} +%<*dig> +% IMAJDIG.MF Program file for Insular Majuscule digits +% + +% \end{macrocode} +% +% +% \begin{routine}{1} +% The digit `1'. +% \begin{macrocode} +cmchar "IMAJ digit 1"; +beginchar("1", 2sb#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +x1=x2=w/2; +y1=h; bot y2=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +draw_triserif(1,trijut); +ductus:=false; +penlabels(1,2,100); +endchar; % end "1" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{2} +% The digit `2'. +% \begin{macrocode} +cmchar "IMAJ digit 2"; +beginchar("2", 2sb#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% stem +lft x1=pcshiftx+o; top y1=h-2thin; +x2=1/2w; top y2= h+o; +rt x3=w-pcshiftx-o; y3=3/4h; +%% foot +lft x5=pcshiftx; bot y5=0; +rt x6=w-pcshiftx; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{down}..{down}z5; % curve +draw z5--z6; % foot +draw_utriangle(6,thick); +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "2" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{3} +% The digit `3'. +% \begin{macrocode} +cmchar "IMAJ digit 3"; +beginchar("3", 2sb#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% x values +lft x3=pcshiftx; x10=x3; +rt x5=w-pcshiftx; x8=x5-3thin; +x4=0.5[x3,x5]; +x9=0.5[x10,x8]; +lft x6=pcshiftx+3thin; x7=x6; +%% y values +bot y3=thin; top y10=h-2thin; +y6=0.5[y3,y10]; y7=y6; +bot y4=-thin; top y9=h+thin; +y5=0.5[y3,y6]; +y8=11/12[y7,y10]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z3..z4{right}..z5{up}...{-pdir}z6; % bottom bowl +draw z7{pdir}...z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "3" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{4} +% The digit `4'. +% \begin{macrocode} +cmchar "IMAJ digit 4"; +beginchar("4", 2sb#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% the stem +x1=x2=w-pcshiftx-jut; +y1=h; bot y2=0; +%% the crossbar +lft x3=pcshiftx; y3=0.33h; +rt x4=w-pcshiftx; y4=y3; +%% the diagonal +lft x5=pcshiftx+jut; y5=h; +x6=x5; y6=y4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % main stem +%%draw_clubbase(1, 2, 1/3, 0, clubjut); +draw z3--z4; % crossbar +draw z3{(1,1)}..{(1,1)}z1; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "4" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{5} +% The digit `5'. +% \begin{macrocode} +cmchar "IMAJ digit 5"; +beginchar("5", 2sb#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +%% for the top +rt x1=w-pcshiftx; top y1=h; +lft x2=pcshiftx; y2=y1; +z2'=(lft x2, top y2); z2''=(rt x2, y2'); +z0'=(x2', 0); z0''=(x2'', 0); +%% bowl +n1 := w-2pcshiftx+4/3thick; % width of bowl +n2 := 2/3h; % height of bowl +z3=(w-pcshiftx-n1, 0); +obowl(3, n1, n2); +z10o = (z2''--z0'') intersectionpoint subpath (3,4) of obouter; +z10i = (z2'--z0') intersectionpoint subpath (3,4) of obinner; +z10'=(x10i,y10o); +z20o = (z2'--z0') intersectionpoint subpath (2,3) of obouter; +z20i = (z2'--z0') intersectionpoint subpath (2,3) of obinner; +%%ductus:=true; +if ductus: + pickup stylus; + draw z2--z1; draw z2'--z0'; draw z2''--z0''; + draw obouter; draw obinner; +else: + draw z2--z1; % top bar + draw_triangle(1,thick); + fill z2'--z10i--z10o--z2''--cycle; % stem + fill z10o..z3minlo{pdir}..z3maxro{-ppdir}..z3minro{-pdir}..z20o-- + z20i..z3minri{pdir}..z3maxri{ppdir}..z3minli{-pdir}..z10i-- + z10'--cycle; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "5" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{6} +% The digit `6'. +% \begin{macrocode} +cmchar "IMAJ digit 6"; +beginchar("6", 2sb#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1 := w-2pcshiftx; % width of character +n2 := h; % height of character +%% main bowl +z3=(w-pcshiftx-n1,0); +obowl(3, n1, n2); +pth1 := obouter; pth2 := obinner; +z0 = (0,0); z0'=(w,h); +z10o' = (z0--z0') intersectionpoint subpath (0,1) of pth1; +z10i' = (z0--z0') intersectionpoint subpath (0,1) of pth2; +n0 := w-pcshiftx-x10o'; +z10o=(x10o'+n0, y10o'); +z10i=(x10i'+n0, y10i'); +%% bottom bowl +n3 := 16/12n2; % width +n4 := 2/3n2; % height +z13=(w-pcshiftx-n3, 0); +obowl(13, n3, n4); +pth11 := obouter; pth12 := obinner; +z20o = subpath (2,4) of pth2 intersectionpoint + (subpath (3,4) of pth11 & subpath (0,1) of pth11); +z20i = subpath (2,4) of pth2 intersectionpoint + (subpath (3,4) of pth12 & subpath (0,1) of pth12); +%%ductus:=true; +if ductus: + pickup stylus; + draw subpath (2,4) of pth2; + draw (subpath (3,4) of pth11 & subpath (0,1) of pth11); + draw (subpath (3,4) of pth12 & subpath (0,1) of pth12); +else: + fill z10o..z3minlo{-pdir}..z3maxlo{-ppdir}..z3minro{pdir}.. + z13maxro{ppdir}..{-pdir}z20o--z20i{pdir}..z13maxri{-ppdir}.. + z3minri{-pdir}..z3maxli{ppdir}..z3minli{pdir}..z10i-- + cycle; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,8,100); +endchar; % end "6" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{7} +% The digit `7'. +% \begin{macrocode} +cmchar "IMAJ digit 7"; +beginchar("7", 2sb#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% top bar +lft x1=pcshiftx; +rt x2=w-pcshiftx; +top y1=top y2=h; +x8=pcshiftx+3/8jut; y8=h-0.5thin; +%% bowed leg +x4=w/2; bot y4=0; +x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % top bar +draw_triangle(1,thick); +draw z2..z3..z4; % leg +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "7" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{8} +% The digit `8'. +% \begin{macrocode} +cmchar "IMAJ digit 8"; +beginchar("8", 2sb#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric alpha; alpha:=1; +pickup quill; +lft x1=alpha*pcshiftx+o; rt x3=w-alpha*pcshiftx-o; y1=y3=3/4h; +x2=x4=w/2; top y2=h+o; bot y4=-o; +x5=x2; y5=h/2+2o; +lft x11=pcshiftx; rt x13=w-pcshiftx; y11=y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z5..z11..z4..z13..z5..cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,100); +endchar; % end "8" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{9} +% The digit `9'. +% \begin{macrocode} +cmchar "IMAJ digit 9"; +beginchar("9", 2sb#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1 := w-2pcshiftx; % width of character +n2 := h; % height of character +%% main bowl +z3=(w-pcshiftx-n1,0); +obowl(3, n1, n2); +pth1 := obouter; pth2 := obinner; +z0=(0,0); z0'=(w,h); +z20o' = (z0--z0') intersectionpoint subpath (2,3) of pth1; +z20i' = (z0--z0') intersectionpoint subpath (2,3) of pth2; +n0 := x20o'-pcshiftx; +z20o=(x20o'-n0, y20o'); +z20i=(x20i'-n0, y20i'); +%% bottom bowl +n3 := 16/12n2; % width +n4 := 2/3n2; % height +z13=(pcshiftx,h-n4); +obowl(13, n3, n4); +pth11 := obouter; pth12 := obinner; +z10o = subpath (0,2) of pth2 intersectionpoint subpath (1,3) of pth11; +z10i = subpath (0,2) of pth2 intersectionpoint subpath (1,3) of pth12; +%%ductus:=true; +if ductus: + pickup stylus; + draw subpath (0,2) of pth2; + draw subpath (1,3) of pth11; + draw subpath (1,3) of pth12; +else: + fill z20o..z3minro{pdir}..z3maxro{ppdir}..z3minlo{-pdir}.. + z13maxlo{-ppdir}..{pdir}z10o--z10i{-pdir}..z13maxli{ppdir}.. + z3minli{pdir}..z3maxri{-ppdir}..z3minri{-pdir}..z20i-- + cycle; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "9" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{0} +% The digit `0'. +% \begin{macrocode} +cmchar "Uncial digit 0"; +beginchar("0", 2sb#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := w-2pcshiftx; % bowl width +n2 := h+2o; % bowl height +z1=(pcshiftx,-o); +obowl(1, n1, n2); +%%ductus:=true; +if ductus: + pickup stylus; +fi +fill obouter; unfill obinner; +ductus:=false; +%%%proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "0" + +% \end{macrocode} +% \end{routine} +% +% +% +% +% The end of this file. +% \begin{macrocode} +%</dig> +% \end{macrocode} +% +% \section{The font definition files} \label{sec:fd} +% +% The font comes in normal and bold weights only. +% +% \begin{macrocode} +%<*fdot1> +\DeclareFontFamily{OT1}{imaj}{} + \DeclareFontShape{OT1}{imaj}{m}{n}{ <-8.5> imaj7 <8.5-15> imaj10 <15-> imaj17 }{} + \DeclareFontShape{OT1}{imaj}{m}{sl}{ <-> sub * imaj/m/n }{} + \DeclareFontShape{OT1}{imaj}{m}{it}{ <-> sub * imaj/m/n }{} + \DeclareFontShape{OT1}{imaj}{m}{sc}{ <-> sub * imaj/m/n }{} + \DeclareFontShape{OT1}{imaj}{m}{u}{ <-> sub * imaj/m/n }{} + \DeclareFontShape{OT1}{imaj}{bx}{n}{ <-8.5> imajb7 <8.5-15> imajb10 <15-> imajb17 }{} + \DeclareFontShape{OT1}{imaj}{bx}{it}{ <-> sub * imaj/bx/n }{} + \DeclareFontShape{OT1}{imaj}{bx}{sl}{ <-> sub * imaj/bx/n }{} + \DeclareFontShape{OT1}{imaj}{b}{n}{ <-> sub * imaj/bx/n }{} +%</fdot1> +% \end{macrocode} +% +% +% \begin{macrocode} +%<*fdt1> +\DeclareFontFamily{T1}{imaj}{} + \DeclareFontShape{T1}{imaj}{m}{n}{ <-8.5> imaj7 <8.5-15> imaj10 <15-> imaj17 }{} + \DeclareFontShape{T1}{imaj}{m}{sl}{ <-> sub * imaj/m/n }{} + \DeclareFontShape{T1}{imaj}{m}{it}{ <-> sub * imaj/m/n }{} + \DeclareFontShape{T1}{imaj}{m}{sc}{ <-> sub * imaj/m/n }{} + \DeclareFontShape{T1}{imaj}{m}{u}{ <-> sub * imaj/m/n }{} + \DeclareFontShape{T1}{imaj}{bx}{n}{ <-8.5> imajb7 <8.5-15> imajb10 <15-> imajb17 }{} + \DeclareFontShape{T1}{imaj}{bx}{it}{ <-> sub * imaj/bx/n }{} + \DeclareFontShape{T1}{imaj}{bx}{sl}{ <-> sub * imaj/bx/n }{} + \DeclareFontShape{T1}{imaj}{b}{n}{ <-> sub * imaj/bx/n }{} +%</fdt1> +% \end{macrocode} +% +% \section{The package code} \label{sec:code} +% +% \subsection{The \Lpack{inslrmaj} package} +% +% The \Lpack{inslrmaj} package is for typesetting short pieces of text +% in the \thisfont{} fonts. +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. +% \begin{macrocode} +%<*usc> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{inslrmaj}[1999/05/22 v1.0 package for Insular Majuscule fonts] +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\imajfamily} +% Selects the \thisfont{} font family in the OT1 or T1 encoding. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \newcommand{\imajfamily}{\usefont{T1}{imaj}{m}{n}} +\else + \newcommand{\imajfamily}{\usefont{OT1}{imaj}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textimaj} +% Text command for the \thisfont{} font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textimaj}{\imajfamily} +% \end{macrocode} +% \end{macro} +% +% The end of this package. +% \begin{macrocode} +%</usc> +% \end{macrocode} +% +% \subsection{The \Lpack{allimaj} package} +% +% The \Lpack{allimaj} package is intended for use when the entire document +% will be typeset in the book-hand. This is a minimal package. Because the +% book-hand should not contain arabic digits a fuller package would redefine +% anything numbered in \LaTeX{} to use roman instead of arabic numbering. +% Also, because of the large |\baselineskip| many other aspects of \LaTeX{} +% to do with vertical positioning should also be redefined. +% +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. It also uses the \Lpack{inslrmaj} package. +% \begin{macrocode} +%<*uscall> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{allimaj}[1999/05/22 v1.0 package for all Insular Majuscule fonts] +\RequirePackage{inslrmaj} +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% Redefine the default fonts to be \thisfont, which has only one family +% member. +% \begin{macro}{\rmdefault} +% \begin{macro}{\sfdefault} +% \begin{macro}{\ttdefault} +% \begin{macrocode} +\renewcommand{\rmdefault}{imaj} +\renewcommand{\sfdefault}{imaj} +\renewcommand{\ttdefault}{imaj} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The `leading' in the book-hands is a function of the |x-height|, which is +% normally much +% greater than for the CMR fonts. I have borrowed code from Frank Jensen's +% \Lpack{beton} package~\cite{BETON} to do this. The |x-height| (in points) +% for the CMR +% fonts is given in Table~\ref{tab:cmrx}. Note that the CMR design sizes are +% 5--10, 12, and 17.28 points. The other values given are scaled from these +% figures. +% +% \begin{table} +% \centering +% \caption{The x heights of the CMR and \thisfont{} fonts} \label{tab:cmrx} +% \begin{tabular}{ccc} \hline +% Design & CMR & \thisfont \\ +% Size & X Height & X Height \\ \hline +% 5 & 2.14 & 3.00 \\ ^^A CMR skip = 6pt = 2.8 times +% 6 & 2.58 & 3.61 \\ ^^A CMR skip = 7pt = 2.7 times +% 7 & 3.00 & 4.20 \\ ^^A CMR skip = 8pt = 2.7 times +% 8 & 3.44 & 4.81 \\ ^^A CMR skip = 9.5pt = 2.8 times +% 9 & 3.86 & 5.40 \\ ^^A CMR skip = 11pt = 2.8 times +% 10 & 4.31 & 6.03 \\ ^^A CMR skip = 12pt = 2.8 times +% 11 & 4.74 & 6.64 \\ ^^A CMR skip = 13.6pt = 2.8 times +% 12 & 5.17 & 7.24 \\ ^^A CMR skip = 14.5pt = 2.8 times +% 14 & 6.03 & 8.44 \\ ^^A CMR skip = 18pt = 3.0 times +% 17 & 7.44 & 10.41 \\ ^^A CMR skip = 22pt = 3.0 times +% 20 & 8.75 & 12.25 \\ ^^A CMR skip = 25pt = 2.9 times +% 25 & 10.94 & 15.32 \\ ^^A CMR skip = 30pt = 2.7 times +% \hline +% \end{tabular} +% \end{table} +% +% \begin{macro}{\imaj@baselineskip@table} +% A table of the normal font sizes and the corresponding baselineskip. +% The distance between baselines for \thisfont{} is over twice +% the |x-height|. ^^A actually 2.5 times to nearest half point +% +% \begin{macrocode} +\newcommand{\imaj@baselineskip@table}{% + <\@vpt>7.5% + <\@vipt>9.0% + <\@viipt>10.5% + <\@viiipt>12.0% + <\@ixpt>13.5% + <\@xpt>15.0% + <\@xipt>16.5% + <\@xiipt>18.0% + <\@xivpt>21.0% + <\@xviipt>26.0% + <\@xxpt>30.5% + <\@xxvpt>38.5} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\imaj@new@setfontsize} +% This is a macro that replaces the |\@setfontsize| macro which is called by +% the font size changing commands. +% \begin{macrocode} +\newcommand{\imaj@new@setfontsize}[3]{% + \edef\@tempa{\def\noexpand\@tempb####1<#2}% + \@tempa>##2<##3\@nil{\def\imaj@baselineskip@value{##2}}% + \edef\@tempa{\noexpand\@tempb\imaj@baselineskip@table<#2}% + \@tempa><\@nil + \ifx\imaj@baselineskip@value\@empty + \def\imaj@baselineskip@value{#3}% + \fi + \imaj@old@setfontsize{#1}{#2}\imaj@baselineskip@value} +% \end{macrocode} +% \end{macro} +% +% We had better give an author a means of using The Computer Modern fonts +% if necessary. +% +% \begin{macro}{\cmrfamily} +% \begin{macro}{\cmssfamily} +% \begin{macro}{\cmttfamily} +% These macros select the Computer Modern Roman, Sans, and Typewriter +% font families in either the T1 or OT1 encodings. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}} +\else + \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcmr} +% Text command for the Computer Modern Roman font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmr}{\cmrfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmss} +% Text command for the Computer Modern Sans font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmss}{\cmssfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmtt} +% Text command for the Computer Modern Typewriter font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmtt}{\cmttfamily} +% \end{macrocode} +% \end{macro} +% +% +% At the start of the document, change the |\@setfontsize| macro and call +% the normal font to implement the change. +% \begin{macrocode} +\AtBeginDocument{% + \let\imaj@old@setfontsize=\@setfontsize + \let\@setfontsize=\imaj@new@setfontsize} +\AtBeginDocument{\normalsize} +% \end{macrocode} +% +% +% The end of this package. +% \begin{macrocode} +%</uscall> +% \end{macrocode} +% +% +% +% +% +% \Finale +% \PrintIndex +% +\endinput + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + diff --git a/Master/texmf-dist/source/latex/bookhands/inslrmaj/inslrmaj.ins b/Master/texmf-dist/source/latex/bookhands/inslrmaj/inslrmaj.ins new file mode 100644 index 00000000000..7860d41ef11 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/inslrmaj/inslrmaj.ins @@ -0,0 +1,101 @@ +%% +%% inslrmaj.ins +%% Copyright 1999 Peter R. Wilson +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Peter Wilson (CUA) +%% now at: peter.r.wilson@boeing.com +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{inslrmaj.ins} +\input docstrip.tex +\preamble + + Copyright 1999 Peter R. Wilson + + This program is provided under the terms of the + LaTeX Project Public License distributed from CTAN + archives in directory macros/latex/base/lppl.txt. + +Author: Peter Wilson (CUA) + now at: peter.r.wilson@boeing.com + +\endpreamble + +\keepsilent + +%%% \Msg{*** Generating the driver file ***} +%%% \generateFile{inslrmaj.drv}{t}{\from{inslrmaj.dtx}{driver}} + +\Msg{*** Generating the Metafont files ***} + +\usepostamble\empty +\generateFile{imaj7.mf}{t}{\from{inslrmaj.dtx}{base7}} +\generateFile{imaj10.mf}{t}{\from{inslrmaj.dtx}{base10}} +\generateFile{imaj17.mf}{t}{\from{inslrmaj.dtx}{base17}} +\generateFile{imajb7.mf}{t}{\from{inslrmaj.dtx}{base7b}} +\generateFile{imajb10.mf}{t}{\from{inslrmaj.dtx}{base10b}} +\generateFile{imajb17.mf}{t}{\from{inslrmaj.dtx}{base17b}} +\generateFile{imajl.mf}{t}{\from{inslrmaj.dtx}{min}} +\generateFile{imaju.mf}{t}{\from{inslrmaj.dtx}{maj}} +\generateFile{imajtitle.mf}{t}{\from{inslrmaj.dtx}{mfd}} +\generateFile{imajpunct.mf}{t}{\from{inslrmaj.dtx}{punct}} +\generateFile{imajlig.mf}{t}{\from{inslrmaj.dtx}{lig}} +\generateFile{imajdig.mf}{t}{\from{inslrmaj.dtx}{dig}} + +\Msg{*** Generating the Font Definition files ***} +\usepostamble\defaultpostamble + +\generateFile{ot1imaj.fd}{t}{\from{inslrmaj.dtx}{fdot1}} +\generateFile{t1imaj.fd}{t}{\from{inslrmaj.dtx}{fdt1}} + +\Msg{*** Generating the LaTeX2e package files ***} + +\generateFile{inslrmaj.sty}{t}{\from{inslrmaj.dtx}{usc}} +\generateFile{allimaj.sty}{t}{\from{inslrmaj.dtx}{uscall}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into directories searched by TeX:} +\Msg{*} +\Msg{* Move these into the font source area:} +\Msg{* \space\space imaj7.mf} +\Msg{* \space\space imaj10.mf} +\Msg{* \space\space imaj17.mf} +\Msg{* \space\space imajb7.mf} +\Msg{* \space\space imajb10.mf} +\Msg{* \space\space imajb17.mf} +\Msg{* \space\space imajl.mf} +\Msg{* \space\space imaju.mf} +\Msg{* \space\space imajtitle.mf} +\Msg{* \space\space imajpunct.mf} +\Msg{* \space\space imajlig.mf} +\Msg{* \space\space imajdig.mf} +\Msg{*} +\Msg{* Move these into the LaTeX macro area:} +\Msg{* \space\space ot1imaj.fd} +\Msg{* \space\space t1imaj.fd} +\Msg{* \space\space inslrmaj.sty} +\Msg{* \space\space allimaj.sty} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{* Process any name.idx file by:} +\Msg{* \space\space\space\space makeindex -s gind.ist name} +\Msg{* Process any name.glo file by:} +\Msg{* \space\space\space\space makeindex -s gglo.ist -o name.gls name.glo} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/bookhands/inslrmin/inslrmin.dtx b/Master/texmf-dist/source/latex/bookhands/inslrmin/inslrmin.dtx new file mode 100644 index 00000000000..ea25389999a --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/inslrmin/inslrmin.dtx @@ -0,0 +1,4630 @@ +% \iffalse meta-comment +% +% inslrmin.dtx +% Copyright 1999 Peter R. Wilson +% +% This program is provided under the terms of the +% LaTeX Project Public License distributed from CTAN +% archives in directory macros/latex/base/lppl.txt. +% +% Author: Peter Wilson (CUA) (now at: peter.r.wilson@boeing.com) +% +% If you do not have the docmfp package (available from CTAN in +% tex-archive/macros/latex/contrib/supported), comment out the +% \usepackage{docmfp} line below and uncomment the line following it. +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{docmfp} +%%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{} +\EnableCrossrefs +\CodelineIndex +%% comment out next line to see the code +\OnlyDescription +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{inslrmin.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{134} +% +% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} +% \DoNotIndex{\@centercr,\@cite} +% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} +% \DoNotIndex{\@input,\@ixpt,\@m} +% \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} +% \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} +% \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} +% \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} +% \DoNotIndex{\advance,\Alph,\alph} +% \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\bullet} +% \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} +% \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} +% \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} +% \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +% \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} +% \DoNotIndex{\fbox} +% \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} +% \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +% \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} +% \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} +% \DoNotIndex{\input} +% \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} +% \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} +% \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +% \DoNotIndex{\NeedsTeXFormat,\newdimen} +% \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} +% \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} +% \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} +% \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +% \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +% \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +% \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} +% \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} +% \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} +% \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} +% \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} +% \DoNotIndex{\viipt,\vipt,\vskip,\vspace} +% \DoNotIndex{\wd,\xiipt,\year,\z@} +% +% \changes{v1.0}{2002/12/30}{First public release} +% +% \def\fileversion{v1.0} +% \def\filedate{2002/12/30} +% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package +% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option +% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file +% \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter +% \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle +% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment +% \newcommand*{\AD}{\textsc{ad}} +% \newcommand*{\thisfont}{Insular Minuscule} +% +% \title{The \Lpack{Insular Minuscule} fonts\thanks{This +% file has version number \fileversion, last revised +% \filedate.}} +% +% \author{% +% Peter Wilson\\ +% Catholic University of America \\ +% Now at \texttt{peter.r.wilson@boeing.com} +% } +% \date{\filedate} +% \maketitle +% \begin{abstract} +% The \Lpack{inslrmin} and \Lpack{allimin} packages provide a set of +% Metafont \thisfont{} book-hands +% as used +% for manuscripts from the 6th century onwards. This is one in a series +% of manuscript fonts. +% \end{abstract} +% \tableofcontents +% \listoftables +% +% +% +% +% \section{Introduction} +% +% The \Lpack{inslrmin} and \Lpack{allimin} packages provide a Metafont~\cite{METAFONT} version +% of the \thisfont{} manuscript book-hand that was in use from the +% sixth century~\AD{} onwards. It is part of a project to provide fonts +% covering the major manuscript hands between the first century~\AD{} and +% the invention of printing. The principal resources used in this project +% are listed in the Bibliography. +% +% This manual is typeset according to the conventions of the +% \LaTeX{} \textsc{docstrip} utility which enables the automatic +% extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. +% The \Lpack{docmfp} package is used for documenting the Metafont portions +% of the distribution~\cite{DOCMFP}. +% +% Section~\ref{sec:usc} describes the usage of the package. +% Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} +% and source code for the package is in Section~\ref{sec:code}. +% +% \subsection{Manuscript book-hands} +% +% Before the invention of printing all books were written by hand. The book-hands +% used by the scribes and copyists for the manuscripts changed as time +% went on. Table~\ref{tab:1} lists some of the common book-hands which were used +% between the 1st and 15th centuries. The later book-hands formed the basis of the +% fonts used by the early printers, which in turn form the basis of the printing +% fonts in use today. +% +% The manuscript book-hands were written with a broad nibbed reed or quill +% pen. Among the distinguishing characteristics of a hand, apart from the +% actual shape of the letters, are the angle of the pen (which controls the +% variation between thick and thin strokes) and the height of a letter compared +% to the width of the nib. The lower the ratio of the letter height to nib +% width, the more condensed is the script. The scripts also varied in their +% typical height. +% +% Table~\ref{tab:1} gives an `average' x-height for each +% script, which I obtained by measuring a sample of photographs of +% manuscripts written in the various hands. About a dozen examples +% of each book-hand were measured. This figure should not be taken too +% seriously. +% +% There was not a sharp division between the use of one hand and another. +% Many manuscripts exhibit a variety of hands in the same document. For example, +% the scribe writing in an Uncial hand may have used Roman Rustic letters +% for capitals. Usually the same pen was used for the two different scripts. +% +% Generally speaking, as a hand got older it became more embelished, and +% therefore took longer to write. As this happened a new hand would appear that +% was faster, and which would eventually make the earlier one obsolete. +% +% Many of the book-hands were single-cased; that is, they did not have an +% upper- and lower-case as we do nowadays in Western scripts. On the other +% hand, a script might be majuscule or minuscule. A \textit{majuscule} script +% is one, like our upper-case, where the letters are drawn between two lines +% and are of a uniform height with no ascenders or descenders. +% A \textit{minuscule} script, like our lower-case, is drawn between four lines +% and has ascenders and descenders. +% +% \begin{table} +% \centering +% \caption{The main manuscript book-hands} \label{tab:1} +% \begin{tabular}{lccccc} \hline +% Name & Century & x-height & Height & Pen & Normalised \\ +% & & (mm) & (nib widths) & angle & height \\ \hline +% Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\ +% Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\ +% Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\ +% Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\ +% Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\ +% Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\ +% Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\ +% Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\ +% Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\ +% Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\ +% Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\ +% Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline +% \end{tabular} +% \end{table} +% +% During the period under consideration arabic numerals were effectively +% not used. At the beginning they were unknown and even though some knew +% of them towards the end, the glyphs used for them are not recognisable --- +% to me they look somewhat like cryllic letters --- and each locality +% and time had its own highly individualistic rendering. The general rule +% when using one of these book-hands is to write all numbers using +% roman numerals. +% +% The Roman alphabet consisted of 23 capital letters --- the J, U and W +% were absent. The book-hands initially used both a `u' and a `v' interchangeably +% but by the 10th century the practice had become to use the `v' before a vowel +% and the `u' otherwise. The letter corresponding to the W sound appeared +% in England around the 7th century in +% the form of the runic \textit{wen} character and by about the 11th century +% the `w' chacter was generally used. The `J' is the newest letter of all, not +% appearing until about the mid 16th century. +% +% In the first century punctuation was virtually unknown, and typically +% would not even be any additional space between individual words, never +% mind denoting ends of sentences. Sometimes a dot at mid-height would be +% used as a word seperator, or to mark off the end of a paragraph. Effectively +% a text was a continuous stream of letters. By the time that printing was +% invented, though, all of our modern punctuation marks were being used. +% +% Among all these manuscript hands, the Carolingian minuscule is the +% most important as our modern fonts are based on its letter shapes, and it is +% also at this point in time where the division occured between the black letter +% scripts as used even today in Germany, and the lighter fonts used elesewhere. +% The Rotunda and Humanist minuscule hands were developed in Italy and were +% essentially a rediscovery of the Carolingian minusucle. Guthenberg took the +% Gothic scripts as the model for his types. Later printers, +% such as Nicholas Jenson of Venice, +% took the Humanist scripts as their models. +% +% +% \subsection{The \thisfont{} script} +% +% The \thisfont{} hand has been in use from the sixth century. +% It was originally developed in Ireland by St.~Patrick's monks +% as a less formal and faster hand than the Insular majuscule, +% the most famous example of which is the \textit{Book of Kells}. +% +% Although the letter shapes in this book-hand are principally of +% a lower-case form, there are a few that are shaped like capital letters. +% For example, the `n' appeared as both an `n' and as an `N', +% while the `f' and `r' were written like `F' and `R'. +% Some letters had multiple forms. As well as the `n' the `r' could be written +% as either `r' or `R'. +% +% The letters were written very close together and the scibes used many +% adhoc ligatures. A favourite was using a long `e' before a letter +% with a bar at the x-height, and joining the crossbar of the `e' to +% the bar of the following letter, for instance the pair `eg'. +% I have only provided the ampersand, `\&', as a ligature, standing for +% `et' which is the Latin for `and'. +% Letters were also stretched if a line +% needed some filling. For example, the capital form of the `N' might be +% stretched to 2 or 3 times its normal width. +% +% Usually the +% lettering in a manuscript was all one size. If the scribe felt the need +% for `capital' letters then, using the same pen, would either write a larger +% \thisfont{} letter or a letter from one of the more formal book-hands. +% I have provided a set of `capital' letters that are only a little larger +% than the normal letters for use in running text. +% During the time the \thisfont{} script was used the alphabet only had 24 +% letters. I have included the missing J. +% +% Arabic numerals were unknown at this time, so all numbers were written +% using the roman numbering system. I have provided \thisfont{} versions of +% the arabic digits. +% +% Punctuation was used, but not with the frequency of today. +% A sentence might be ended with +% a dot at mid-height or a paragraph ended with a colon, also at mid-height. +% The comma was was a small +% slash; the semi-colon was known, as was the single quotation +% mark which was represented by a raised comma. +% +% +% \section{The \Lpack{inslrmin} and \Lpack{allimin} packages} \label{sec:usc} +% +% The \thisfont{} font family is called |imin|. The font is supplied in both +% OT1 and T1 encodings. +% +% \subsection{The \Lpack{inslrmin} package} +% +% This is intended for the occasions when some short pieces of text have +% to be written in \thisfont{} while the majority of the document is in another +% font. The normal baselineskips are used. +% +% \DescribeMacro{\iminfamily} +% The |\iminfamily| declaration starts typesetting with the \thisfont{} fonts. +% Use of the \thisfont{} font will continue until either there is another |\...family| +% declaration or the current group (e.g., environment) is closed. +% +% \DescribeMacro{\textimin} +% The command |\textimin{|\meta{text}|}| will typeset \meta{text} using the +% \thisfont{} fonts. +% +% \subsection{The \Lpack{allimin} package} +% +% +% This package is for when the entire document will be typeset with the +% \thisfont{} font. The baselineskips are set to those appropriate to the +% book-hand. +% +% This is a minimalist package. Apart from declaring \thisfont{} to be the +% default font and setting the baselineskips appropriately, it makes no other +% alterations. +% Vertical spacing +% before and after section titles and before and after lists, etc., will be +% too small as the \LaTeX{} design assumes a font comparable in size to +% normal printing fonts, and the book-hand is much taller. +% To capture more of the flavour of the time, all numbers +% should be written using roman numerals. +% The \Lpack{romannum} package~\cite{ROMANNUM} +% can be used so that \LaTeX{} will typeset the numbers that it generates, +% like sectioning or caption numbers, using roman numerals instead of arabic +% digits. +% +% \DescribeMacro{\cmrfamily} +% \DescribeMacro{\textcmr} +% \DescribeMacro{\cmssfamily} +% \DescribeMacro{\textcmss} +% \DescribeMacro{\cmttfamily} +% \DescribeMacro{\textcmtt} +% The |...family| declarations start typesetting with the Computer Modern Roman +% (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer +% Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}| +% commands will typeset \meta{text} in the corresponding Computer Modern font. +% +% The \Lpack{allimin} package automatically loads the \Lpack{inslrmin} package, +% so its font commands are available if necessary. +% +% \StopEventually{ +% \bibliographystyle{alpha} +% \renewcommand{\refname}{Bibliography} +% \begin{thebibliography}{GMS94} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem[And69]{ANDERSON69} +% Donald M.~Anderson. +% \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}. +% \newblock Holt, Rinehart and Winston, 1969. +% +% \bibitem[Bol95]{BOLOGNA95} +% Giulia Bologna. +% \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}. +% \newblock Crescent Books, 1995. +% +% \bibitem[Day95]{DAY95} +% Lewis F.~Day. +% \newblock {\em Alphabets Old \& New}. +% \newblock (3rd edition originally published by B.~T.~Batsford, 1910) +% \newblock Senate, 1995. +% +% \bibitem[Dro80]{DROGIN80} +% Marc Drogin. +% \newblock {\em Medieval Calligraphy: Its History and Technique}. +% \newblock Allenheld, Osmun \& Co., 1980. +% +% \bibitem[Dru95]{DRUCKER95} +% Johanna Drucker. +% \newblock {\em The Alphabetic Labyrinth}. +% \newblock Thames \& Hudson, 1995. +% +% \bibitem[Fir93]{FIRMAGE93} +% Richard A.~Firmage. +% \newblock {\em The Alphabet Abecedarium}. +% \newblock David R~Goodine, 1993. +% +% \bibitem[Fli98]{LETTRINE} +% Daniel Flipo. +% \newblock {\em The LETTRINE package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1998. +% +% \bibitem[Har95]{HARRIS95} +% David Harris. +% \newblock {\em The Art of Calligraphy}. +% \newblock DK Publishing, 1995. +% +% \bibitem[Jen95]{BETON} +% Frank Jensen. +% \newblock {\em The BETON package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1995. +% +% \bibitem[Joh71]{JOHNSTON75} +% Edward Johnston (ed. Heather Child). +% \newblock {\em Formal Penship and Other Papers}. +% \newblock Penthalic, 1971. +% +% \bibitem[Knu87]{CM} +% Donald E.~Knuth. +% \newblock {\em Computer Modern Typefaces}. +% \newblock Addison-Wesley, 1987. +% +% \bibitem[Knu92]{METAFONT} +% Donald E.~Knuth. +% \newblock {\em The METAFONTbook}. +% \newblock Addison-Wesley, 1992. +% +% \bibitem[GMS94]{GOOSSENS94} +% Michel Goossens, Frank Mittelbach, and Alexander Samarin. +% \newblock {\em The LaTeX Companion}. +% \newblock Addison-Wesley Publishing Company, 1994. +% +% \bibitem[Tho75]{THOMAS75} +% Alan G.~Thomas. +% \newblock {\em Great Books and Book Collectors}. +% \newblock Weidenfield and Nichoson, 1975. +% +% \bibitem[Wil99]{DOCMFP} +% Peter R.~Wilson. +% \newblock {\em The DOCMFP Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \bibitem[Wil99b]{ROMANNUM} +% Peter R.~Wilson. +% \newblock {\em The ROMANNUM Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \end{thebibliography} +% } +% +% \section{The Metafont code} \label{sec:mf} +% +% +% As previously noted, this work is part of a larger project to provide +% fonts covering the main manuscript book-hands. As such, one of the +% aims is to produce a coordinated set of fonts, especially as multiple +% hands might be used in a single document. +% +% Noting that the hands tend to be somewhat larger than the typical 10pt +% size (where the x-height is approximately 1.5mm) used for modern books, +% I have also designed the fonts +% at a larger than normal size, then applied some non-linear factors when reducing +% them down to a 10pt size. +% Further, I have used the height of the Carolingian minuscule as a +% normalising factor when deciding on the absolute height of any particular +% script. The x-height of the Carolingian font is made equal to the +% x-height of the Computer Modern Roman (CMR) font. +% +% Modern fonts are effectively drawn. That is, the outline of the letter is +% drawn carefully and the center is filled with ink. This is shown to good +% effect in the Metafont code for the Computer Modern fonts~\cite{CM}. +% In contrast, the manuscript letters were inked by single pen strokes in +% a calligraphic manner. I have tried to repeat this calligraphic style +% in the Metafont code. +% +% As much as possible I have tried to use parameter values from the +% Computer Modern Roman (CMR) fonts in order to reduce possible +% infelicities if the CM and manuscript fonts are used together. However, +% few of the CMR parameters are applicable to the calligraphic style. +% +% +% \subsection{The parameter file} +% +% We deal with the parameter files first, and start by announcing +% what they are for. The \thisfont{} font comes in three sizes and also as a normal +% and a bold font. +% \begin{macrocode} +%<*base7|base10|base17|base7b|base10b|base17b> +%<base7>%%% IMIN7.MF Insular Minuscule at 7 point design size. +%<base10>%%% IMIN10.MF Insular Minuscule at 10 point design size. +%<base17>%%% IMIN17.MF Insular Minuscule at 17 point design size. +%<base7b>%%% IMINB7.MF Insular Minuscule Bold at 7 point design size. +%<base10b>%%% IMINB10.MF Insular Minuscule Bold at 10 point design size. +%<base17b>%%% IMINB17.MF Insular Minuscule Bold at 17 point design size. +% +% \end{macrocode} +% Parameters from CMR are used as much as possible. We also +% make sure that \Lpack{cmbase} is loaded as well as plain Metafont. +% \begin{macrocode} +if unknown cmbase: input cmbase fi + +%<base7>font_identifier:="IMIN"; font_size 7pt#; +%<base10>font_identifier:="IMIN"; font_size 10pt#; +%<base17>font_identifier:="IMIN"; font_size 17.28pt#; +%<base7b>font_identifier:="IMINB"; font_size 7pt#; +%<base10b>font_identifier:="IMINB"; font_size 10pt#; +%<base17b>font_identifier:="IMINB"; font_size 17.28pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutstretch} +% The CMR scaling for lowercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> jutstretch:=1.19; +%<base10|base10b> jutstretch:=1.152; +%<base17|base17b> jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{stemstretch} +% The CMR scaling for lowercase stem widths wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> stemstretch:=1.50; +%<base10|base10b> stemstretch:=1.31; +%<base17|base17b> stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{caprat} +% The scaling for `capitals' wrt `lowercase'. This is pretty much a guess +% (the ratio for CMR10 is 1.59). +% \begin{macrocode} + caprat:=1.5; % ratio of capital height to minuscule height +% \end{macrocode} +% +% \DescribeVariable{cap_jutstretch} +% The CMR scaling for uppercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_jutstretch:=1.3; +%<base10|base10b> cap_jutstretch:=1.2; +%<base17|base17b> cap_jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{cap_stemstretch} +% The CMR scaling for uppercase stem width wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_stemstretch:=1.45; +%<base10|base10b> cap_stemstretch:=1.31; +%<base17|base17b> cap_stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{bfudge} +% Letter width scaling for bold font wrt normal font. +% \begin{macrocode} +%<base7|base10|base17> bfudge:=1.0; +%<base7b|base10b|base17b> bfudge:=1.2; +% \end{macrocode} +% +% \DescribeVariable{szfudge} +% Width scaling wrt 17pt letter width. +% \begin{macrocode} +%<base7|base7b> szfudge:=1.18; +%<base10|base10b> szfudge:=1.0; +%<base17|base17b> szfudge:=1.0; +% \end{macrocode} +% +% \DescribeVariable{hstretch} +% Horizontal stretching factor wrt 17pt size letter width. +% \begin{macrocode} + hstretch:=szfudge*bfudge; +% \end{macrocode} +% +% \DescribeVariable{carol_height} +% The x-height of the Carolingian minuscule font. +% \begin{macrocode} +%<base7|base7b> carol_height#:=108.5/36pt#; +%<base10|base10b> carol_height#:=155/36pt#; +%<base17|base17b> carol_height#:=268/36pt#; +% \end{macrocode} +% +% \DescribeVariable{vstretch} +% The height of this font wrt the Carolingian font. +% \begin{macrocode} + vstretch:=1.37; + +% \end{macrocode} +% +% \DescribeVariable{x_height} +% The x-height of lower case letters. Scaled from the Carolingian font. +% \begin{macrocode} + x_height#:=vstretch*carol_height#; +% \end{macrocode} +% +% \DescribeVariable{u} +% The unit width. The CMR values are used. +% \begin{macrocode} +%<base7> u#:=15.5/36pt#; +%<base10> u#:=20/36pt#; +%<base17> u#:=32.5/36pt#; +%<base7b> u#:=17.9/36pt#; +%<base10b> u#:=23/36pt#; +%<base17b> u#:=37/36pt#; +% \end{macrocode} +% +% \DescribeVariable{width_adj} +% \DescribeVariable{serif_fit} +% \DescribeVariable{cap_serif_fit} +% \DescribeVariable{letter_fit} +% The majority of these parameters and values are constant. +% They are for fine adjustements of characters. The CM values are used. +% \begin{macrocode} + width_adj#:=0pt#; % width adjustment for certain characters + serif_fit#:=0pt#; % extra sidebar near lowercase serifs +%<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs +%<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +%<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs +%<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars +% \end{macrocode} +% +% \DescribeVariable{sb} +% A length used for adjusting the side bearings of characters. +% \begin{macrocode} +%<base7|base7b> sb#:=1/2u#; % unit for side bearings +%<base10|base10b> sb#:=1/2u#; % unit for side bearings +%<base17|base17b> sb#:=1/2u#; % unit for side bearings + +% \end{macrocode} +% +% \DescribeVariable{cap_height} +% The height of capital letters. +% \begin{macrocode} +%<base7|base7b> cap_height#:=172.2/36pt#; % height of caps +%<base10|base10b> cap_height#:=246/36pt#; % height of caps +%<base17|base17b> cap_height#:=425/36pt#; % height of caps +% \end{macrocode} +% +% \DescribeVariable{thickfudge} +% The reciprocal of the font height in nib widths. Normal font height +% is 6 nib widths and the bold font height is 5 nib widths. +% \begin{macrocode} +%<base7|base10|base17> thickfudge:=1/6; +%<base7b|base10b|base17b> thickfudge:=1/5; +% \end{macrocode} +% +% \DescribeVariable{thinfudge} +% The nib sharpness. +% \begin{macrocode} +thinfudge:=1/6; +% \end{macrocode} +% +% \DescribeVariable{thick} +% The maximum nib width. +% That is, the width of the thickest line that can be penned. +% \begin{macrocode} +thick#:=stemstretch*thickfudge*x_height#; % max pen breadth +% \end{macrocode} +% +% \DescribeVariable{thin} +% The nib thinness. +% That is, the width of the thinnest line that can be penned. +% \begin{macrocode} +thin#:=thinfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{pangle} +% The pen angle (in degrees). +% \begin{macrocode} +pangle:=45; % pen angle +% \end{macrocode} +% +% \DescribeVariable{ascratio} +% The height of lower case ascenders wrt |x_height|. +% \begin{macrocode} + ascratio:=6/4; +% \end{macrocode} +% +% \DescribeVariable{asc_height} +% The height of lower case ascenders. +% \begin{macrocode} + asc_height#:=ascratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{descratio} +% The depth of lower case descenders wrt |x_height|. +% \begin{macrocode} + descratio:=5/4; +% \end{macrocode} +% +% \DescribeVariable{desc_depth} +% The depth of lower case descenders. +% \begin{macrocode} + desc_depth#:=descratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_height} +% The height of numerals. Make these midway between normal and capital +% letters. +% \begin{macrocode} + fig_height#:=(0.5[1,caprat])*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_width} +% The width of numerals. All numerals are the same width (roughly, an `o'). +% \begin{macrocode} + fig_width#:=hstretch*(x_height#); +% \end{macrocode} +% +% \DescribeVariable{body_height} +% The height of the tallest character. +% \begin{macrocode} + body_height#:=caprat*asc_height#; +% \end{macrocode} +% +% \DescribeVariable{body_depth} +% The depth of the lowest character. +% \begin{macrocode} + body_depth#:=caprat*desc_depth#; +% \end{macrocode} +% +% \DescribeVariable{half_height} +% Half the normal letter height. +% \begin{macrocode} + half_height#:=1/2x_height#; % half the height of x height letters + +% \end{macrocode} +% +% \DescribeVariable{side} +% We might be using a square for the character design. +% \begin{macrocode} +side#:=x_height#; +% \end{macrocode} +% +% \DescribeVariable{rule_thickness} +% Thickness of rules (in math symbols). The CMR values are used. +% \begin{macrocode} +%<base7|base7b> rule_thickness#:=.34pt#; +%<base10|base10b> rule_thickness#:=.4pt#; +%<base17|base17b> rule_thickness#:=.6pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutfudge} +% Controls the protrusion of serifs. +% \begin{macrocode} +jutfudge:= 3/4; +%%%%jutfudge:= 1/2; +% \end{macrocode} +% +% \DescribeVariable{jut} +% The lowercase serif protrusion. +% \begin{macrocode} +jut#:=jutstretch*jutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{srad} +% |srad| with |0 < srad < 1| controls the serif radius. +% \begin{macrocode} +srad:=0.8; % was 0.5 +% \end{macrocode} +% +% \DescribeVariable{trijut} +% The lowercase triangular serif protrusion. +% \begin{macrocode} +trijut#:=0.75jutstretch*thick#; +% \end{macrocode} +% +% \DescribeVariable{clubjut} +% The fractional protusion of the club base. +% \begin{macrocode} +clubjut:=5/12; +% \end{macrocode} +% +% \DescribeVariable{o} +% Amount of overshoot for curves (as in an `o'). Use CMR values. +% \begin{macrocode} +%<base7|base7b> o#:=5/36pt#; +%<base10|base10b> o#:=8/36pt#; +%<base17|base17b> o#:=10/36pt#; + +% \end{macrocode} +% +% \DescribeVariable{slant} +% |slant| is the amount the font slopes to the right. +% \begin{macrocode} +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ + +% \end{macrocode} +% +% \DescribeVariable{monospace} +% We are generating a variable-width font. +% \begin{macrocode} +monospace:=false; % should all characters have the same width? + +% \end{macrocode} +% +% \DescribeVariable{dot_size} +% The size of (punctuation) dots. +% \begin{macrocode} +dot_size#:=5thin#; % size of dots +% \end{macrocode} +% +% \DescribeVariable{comma_width} +% The horizontal width of a comma. +% \begin{macrocode} +comma_width#:=2.5dot_size#; + +% \end{macrocode} +% +% Finally, call the driver file for the font. +% \begin{macrocode} +generate imintitle %% switch to the driver file + +% \end{macrocode} +% +% The end of this code section. +% \begin{macrocode} +%</base7|base10|base17|base7b|base10b|base17b> +% \end{macrocode} +% +% +% \subsection{The driver file} +% +% The driver file sets up the font parameters and also contains +% the macros used in the definition of the characters. +% +% \begin{macrocode} +%<*mfd> +% This is IMINTITLE.MF for the Insular Minuscule font. +% This makes a short font. +% This file also contains special macros universally needed in the +% font but either not in the cmbase.mf file or modifications of these. +% +% \end{macrocode} +% +% \begin{routine}{makebox} +% This is a new version of the \Lpack{cmbase.mf} |makebox| macro. +% Essentially, as we are only generating a single case font, we don't +% need all the horizontals for the CMR characters. +% +% \begin{macrocode} +% A new version of cmbase.mf makebox macro +def makebox(text rule) = + for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth: + rule((l,y)t_,(r,y)t_); endfor % horizontals + for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals + for x=u*(1+floor(1/u)) step u until r-1: + rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals + if charic<>0: + rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{proofpcbb} +% The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the +% square, and at the bottom and top midpoints, where the point |zS| is at +% position |(xoff,yoff)| in the square. +% \begin{macrocode} + +% A macro to delineate a letter's bounding square in proof mode. +% Point z$ is at (xoff,yoff) in the bounding square. +def proofpcbb(suffix $)(expr xoff, yoff) = +if proofing > 0: + x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner + z$br = (x$bl+side, y$bl); % BRHC + z$tr = (x$bl+side, y$bl+side); % TRHC + z$tl = (x$bl, y$bl+side); % TLHC + z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points + pair hc, vc; + hc = (2u,0); vc = (0,2u); + pickup pensquare scaled 2; + for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc: + draw s-hc--s+hc; + draw s-vc--s+vc; + endfor +fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{inslrmin_font_setup} +% This macro contains the set up for the \thisfont{} fonts. +% \begin{macrocode} + +def inslrmin_font_setup= % contains special stuff for inslrmin fonts + define_pixels(side,half_height,carol_height,comma_width); + define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit, + cap_serif_fit,jut,cap_jut,trijut); + define_pixels(fig_width); + define_whole_pixels(letter_fit,sb); + define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height, + desc_depth,body_depth,fig_height); + define_corrected_pixels(o); + define_blacker_pixels(thick,thin); + let adjust_fit = normal_adjust_fit; +% \end{macrocode} +% \DescribeVariable{stylus} +% The pen for drawing the thinnest lines is |stylus|. +% \begin{macrocode} + pickup pencircle scaled thin; + stylus:=savepen; +% \end{macrocode} +% \DescribeVariable{thickstylus} +% The pen for drawing lines a bit thicker than the thinnest is |thickstylus|. +% \begin{macrocode} + pickup pencircle scaled (1.5thin); + thickstylus:=savepen; +% \end{macrocode} +% \DescribeVariable{quill} +% The normal calligraphic pen is |quill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated pangle; + quill:=savepen; + numeric pcshiftx#; % x value of LHS of box wrt origin of char box + define_pixels(pcshiftx); + numeric sqxside#; % x size of the square + numeric sqyside#; % y size of the square + define_pixels(sqxside,sqyside); + +enddef; % end of inslrmin_font_setup + +% \end{macrocode} +% \end{routine} +% +% +% \DescribeVariable{ductus} +% A boolean to control drawing the ductus (TRUE) or the full letter (FALSE). +% \begin{macrocode} +boolean ductus; +ductus:=false; +% \end{macrocode} +% +% \DescribeVariable{qhor} +% \DescribeVariable{qvert} +% The cosine and sine of the pen angle. +% \begin{macrocode} +numeric qhor, qvert; +qhor:=cosd(pangle); qvert:=sind(pangle); +% \end{macrocode} +% +% \DescribeVariable{pdir} +% The vector corresponding to the pen angle. +% \begin{macrocode} +pair pdir; pdir=dir(pangle); +% \end{macrocode} +% +% \DescribeVariable{ppdir} +% The vector that is perpendicular (anticlockwise) to the pen angle. +% \begin{macrocode} +pair ppdir; ppdir=dir(pangle+90); +% \end{macrocode} +% +% \begin{routine}{draw_serif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_serif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; + z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + top_serif:=false; + z$c=z$b shifted (bjut*pdir); + fi +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_serif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_roundserif} +% The |draw_serif| routine can leave a bump at the end of the stem. +% The |draw_roundserif| routine, which takes the same arguments, +% is meant to eliminate the bump. +% \begin{macrocode} + +def draw_roundserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); + undraw z$--z$a; +enddef; % end of draw_roundserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flatserif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. This produces a serif like |draw_serif| except +% that one side of the seerif is flat. +% \begin{macrocode} + +def draw_flatserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; +%%% z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-jut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (jut*pdir); + fi + z$b = fr[z$,z$c]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$a--z$; + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_flatserif + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{draw_triserif} +% A macro to draw a triangular top left serif. +% |draw_triserif(1,tj)| draws a serif at |z1| with its leftmost x +% value at |x1-tj|, where it is assumed that the +% top point on the stem is at |z1| and the stem was drawn with |quill|. +% \begin{macrocode} + +def draw_triserif(suffix $)(expr tj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$ts1'=lft x$; y$ts1'=bot y$; + pickup stylus; + lft x$ts1=x$ts1'; bot y$ts1=y$ts1'; + x$ts2=x$ts1-tj; z$ts2=whatever[z$,z$ts1]; + x$ts3=x$ts1; y$ts3=y$ts2-tj; + pickup stylus; +%% filldraw z$ts1--z$ts2--z$ts3--cycle; + filldraw z$--z$ts2--z$ts3--cycle; + pickup oldpen; + labels($ts1,$ts2,$ts3); +enddef; % end of draw_triserif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_istem} +% A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs +% are of extent |jut|. There is a top left and bottom right serif. +% The serif radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_istem(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % top serif + draw_serif($$, $, fr); % bottom serif + draw z$a--z$$a; % the stem +enddef; % end of draw_istem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tstem} +% A macro to draw the shape of the stem of a `t'. |draw_tstem(1,2,f)| draws a +% stem whose +% top is at |z1| and bottom at |z2| with a right serif at |z2|. The radius +% is controlled by |f|, with $0 < f < 1$. +% It draws with the current pen and the serif is of extent |jut|. +% NOTE: for the IMIN font, just the stem is drawn --- no serif! +% \begin{macrocode} + +def draw_tstem(suffix $, $$)(expr fr)= +%% draw_serif($$, $, fr); % the serif +%% draw z$--z$$a; % the stem + draw z$--z$$; +enddef; % end of draw_tstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tlserif} +% A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serif +% is of extent |jut|. It also draws the stem to the point |z2|. The serif +% radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_tlserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % the serif + draw z$a--z$$; % the stem +enddef; % end of draw_tlserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flick} +% A macro to draw a flick (like an eyebrow). +% |draw_flick(1,rise,fall,fjut)| draws a stroke starting at |z1| rising up by +% |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is +% |fjut| to the right of |z1|. It is drawn with the current pen. +% \begin{macrocode} + +def draw_flick(suffix $)(expr rise, fall, fjut)= +% \end{macrocode} +% The points |z$a| and |z$b|, together with |z$| make up three points on the +% ductus. +% \begin{macrocode} + rt x$b = x1+fjut; top y$b=y$-fall; + x$a=0.5[x$,x$b]; top y$a=y$+rise; +% \end{macrocode} +% Draw the part, and finish off. +% \begin{macrocode} + draw z$..z$a..z$b; + labels($a,$b); +enddef; % end of draw_flick + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_wave} +% A macro to draw a (horizontal) stroke with a flick at each end +% (down at the left and up at the right). |draw_wave(1,2,f)| uses the current +% pen to draw from |z1wl| to |z1wr|, where |x1wl=x1|, |y1wl=y1-f|, and +% |x1wr=x2|, |y1wr=y2+f|, with |z1| assumed to be at the left of |z2|. +% \begin{macrocode} + +def draw_wave(suffix $,$$)(expr f)= + x$wl=x$; y$wl=y$-f; + x$wr=x$$; y$wr=y$$+f; + z$wc=0.5[z$wl,z$wr]; + draw z$wl{pdir}..z$wc{right}..{pdir}z$wr; + labels($wl,$wc,$wr); +enddef; % end of draw_wave +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tail} +% A macro to draw a tail at the bottom of a (vertical) stem. +% |draw_tail(1,fjut)| draws a tail at the bottom of the stem which ends at |z1|. +% The depth is controlled by the |desc_depth| value and the jut by |fjut|. +% \begin{macrocode} + +def draw_tail(suffix $)(expr fj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$tl' = lft x$; y$tl=bot y$; + pickup stylus; + lft x$tl=x$tl'; + x$tb=x$tl-fj; bot y$tb=y$tl-1/2desc_depth; + filldraw z${down}..{-pdir}z$tb & z$tb{pdir}..{up}z$tl--cycle; + pickup oldpen; + labels($tb,$tl); +enddef; % end of draw_tail +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_triangle} +% A macro to draw a downward pointing equilateral triangle. +% |draw_triangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_triangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$-0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_triangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_utriangle} +% A macro to draw an upward pointing equilateral triangle. +% |draw_utriangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_utriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$+0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_utriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rtriangle} +% A macro to draw a downward pointing right angled triangle. +% |draw_rtriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rtriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$-sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rtriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rutriangle} +% A macro to draw an upward pointing right angled triangle. +% |draw_rutriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rutriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$+sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rutriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_fork} +% A macro to draw a forked line. +% |draw_fork(1,2,sz)| draws a graduated line from |z1| to |z2| with a forked +% end of size |sz|. +% \begin{macrocode} + +def draw_fork(suffix $, $$)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$f1'=lft x$; y$f1'=bot y$; + x$f3'=rt x$; y$f3'=top y$; + pickup stylus; + lft x$f1=x$f1'; bot y$f1=y$f1'; + rt x$f3=x$f3'; y$f3-y$=2*(y$-y$f1); + rt x$f2=x$$-sz; bot y$f2=y$$; + rt x$f4= rt x$f5=x$$; + bot y$f5=y$$-sz; top y$f4=y$$+1/2sz; + filldraw z$f1--z$f2--z$f3--cycle; % the line + draw z$f2{right}..z$f4; % upper fork + draw z$f2{right}..z$f5; % lower fork + pickup oldpen; + labels($f1,$f2,$f3,$f4,$f5); +enddef; % end of draw_fork +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_urswish} +% A macro to draw a line up and to the right with an under curl at the end. +% |draw_urswish(1,2)| draws from |z1| towards |z2|, which is the max upper right +% of a bounding box, where the curl is. +% \begin{macrocode} + +def draw_urswish(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + pickup quill; + rt x$$s1=x$$-thick; top y$$s1=y$$; + rt x$$s2=x$$; +%% x$$s3=x$$-thick; + lft x$$s3=x$$s1; + bot y$$s3=y$$-thick; y$$s2=0.5[y$$s1,y$$s3]; +%% draw z$---z$$s1{right}..z$$s2{down}..{-pdir}z$$s3; + draw z$..z$$s1{pdir}..z$$s2{down}; + labels($$s1,$$s2,$$s3); +enddef; % end of draw_urswish +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{bowl_stem} +% Calculate where a bowl should meet a stem so that the pen is moving in the +% pen direction. +% |bowl_stem(1,2)| calculates the point |z1i|, where |z1| is on the bowl and +% there is a vertical line at |x2|. +% +% \begin{macrocode} + +def bowl_stem(suffix $, $$)= + x$'=0.5[x$,x$$]; y$'=y$; % the mid-point + z$''=z$' shifted (thick*pdir); + x$i=x$$; z$i=whatever[z$',z$'']; + labels($',$i); +enddef; % end of bowl_stem +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_clubbase} +% Draw a clubbed bottom of a vertical stem for the IMIN font. +% |draw_clubbase(1, 2, st, left, right)| draws from |st[z2,z1]| to |z2|. +% At |z2| the pen +% is shifted |left| fraction of the pen width and |right| fraction of the +% pen width, both in the direction of the pen angle. Pen draws smoothly the +% path |z1|, |left|, |right|, |z1|. +% \begin{macrocode} + +% draw clubbed bottom of vertical stem for IMIN font. +def draw_clubbase(suffix $, $$)(expr st, lft, rt)= + z$$l = z$$ shifted (lft*thick*(-pdir)); + z$$r = z$$ shifted (rt*thick*(pdir)); + z$$t = st[z$$,z$]; + draw z$$t{z$$-z$}..z$$l--z$$r..{z$-z$$}z$$t; + labels($$t,$$l,$$r); +enddef; % end of draw_clubbase + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pdot} +% A macro to draw a period dot. +% |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|. +% \begin{macrocode} + +def draw_pdot(suffix $)(expr sz)= +% \end{macrocode} +% Draw a square rotated 45 degrees. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$ shifted (0.5sz*up); + z$u = z$s shifted (sz*right); + z$v = z$t shifted (sz*down); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pdot + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pcomma} +% A macro to draw a period comma. +% |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. The pen is |stylus|. +% \begin{macrocode} + +def draw_pcomma(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping back and down at 45 degrees +% for a total width of |ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s-ar; y$v=y$s-ar; + z$u = z$v shifted (sz*right); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; +%% filldraw z$s--z$t--z$u--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pcomma + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_plq} +% A macro to draw a period left quote. +% |draw_pcomma(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. +% \begin{macrocode} + +def draw_plq(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping forward and down at 45 degrees +% for a total width of |ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s+ar; y$v=y$s-ar; + z$u = z$v shifted (sz*right); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; +%% filldraw z$s--z$t--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_plq + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{offsetbowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for a non-centered letter `o'. |offsetbowl($, sx, sy, fx, fy)| +% calculates the paths for an `o' +% enclosed in a rectangle size |sx| by |sy| with its bottom lefthand corner +% located at |z$|, where the center of the o is at |(fx*sx, fy*sy)| in the +% bounding rectangle. +% +% Two construction paths, namely |obfirst| and |obsecond| are also +% available. They should be identical. +% +% All paths have points listed in a clockwise direction, starting with +% |z$nh| or |z$minl| as appropriate. +% +% |offsetbowl($, sx, sy, 1/2, 1/2)| gives the same results as |obowl($, sx, sy)|. +% \begin{macrocode} + +path obouter, obinner, obfirst, obsecond; +def offsetbowl(suffix $)(expr sx, sy, fx, fy)= + numeric inx, iny, cx, cy; + pair pt[]; + path pth[]; + inx := 1/2thick*cosd(pangle); iny := 1/2thick*sind(pangle); + cx := x$+fx*sx; cy := y$+fy*sy; + z$obc = (cx,cy); +% \end{macrocode} +% Calulate points on the centre path of the pen. These are offset by |inx| +% from the rectangles vertical sides and by |iny| from the horizontal sides. +% If the pen is parallel to a side, offset the point by half the pen's +% dimension. First do the West, East, North and South points. +% \begin{macrocode} + if pangle = 90: + z$wt=(x$+1/2thin, cy); + z$et=(x$+sx-1/2thin, cy); + else: + z$wt=(x$+inx, cy); + z$et=(x$+sx-inx, cy); + penpos$wt(thick,pangle); + penpos$et(thick,pangle); + fi + if pangle = 0: + z$nh=(cx, y$+sy-1/2thin); + z$sh=(cx, y$+1/2thin); + else: + z$nh=(cx, y$+sy-iny); + z$sh=(cx, y$+iny); + penpos$nh(thick,pangle); + penpos$sh(thick,pangle); + fi + obfirst := z$nh{right}..z$et{down}..z$sh{left}..z$wt{up}..cycle; +% \end{macrocode} +% Now calculate the points on the path |obfirst| where the pen will +% draw the min width lines (i.e., the points where the pen will be +% moving parallel to |pangle|). +% \begin{macrocode} + if pangle = 90: + z$minl = z$wt; z$maxr = z$nh; z$minr = z$et; z$maxl = z$sh; + else: + if pangle = 0: + z$minl = z$nh; z$maxr = z$et; z$minr = z$sh; z$maxl = z$wt; + else: + z$minl = directionpoint dir(pangle) of obfirst; + z$minr = directionpoint -dir(pangle) of obfirst; +% \end{macrocode} +% The max points are roughly where the inner and outer diverge +% the most. These are simple for 0 and 90 degree pens and have +% been calculated above. It's not so simple for intermediate +% angles. For a reasonable looking result, we pick the max +% points to be halfway between the min points. This involves +% calculating some angles, paths and intersections. +% \begin{macrocode} + pt1 := z$minr - z$minl; % direction + pt2 := (- ypart pt1, xpart pt1); % perpendicular + pt3 := 1/2[z$minl, z$minr]; + pt4 := pt3 shifted pt2; + pt5 := pt3 shifted -pt2; + pth1 := pt3--pt4; + pth2 := pt3--pt5; + z$maxr = pth1 intersectionpoint obfirst; + z$maxl = pth2 intersectionpoint obfirst; + \fi + \fi +% \end{macrocode} +% Place the pen at each of these points to get the outer and inner points. +% \begin{macrocode} + penpos$minl(thin,pangle+90); + penpos$maxr(thick,pangle); + penpos$minr(thin,pangle+90); + penpos$maxl(thick,pangle); +% \end{macrocode} +% Finally, the outer and inner paths. +% \begin{macrocode} + obsecond := z$minl..z$maxr..z$minr..z$maxl..cycle; + z$minlo = z$minl.r; z$maxro = z$maxr.r; + z$minro = z$minr.l; z$maxlo = z$maxl.l; + obouter := z$minlo{dir(pangle)}...z$maxro...z$minro{-dir(pangle)}...z$maxlo...cycle; + z$minli = z$minl.l; z$maxri = z$maxr.l; + z$minri = z$minr.r; z$maxli = z$maxl.r; + obinner := z$minli...z$maxri...z$minri...z$maxli...cycle; + labels($obc, $nh, $et, $sh, $wt); + labels($minl, $maxr, $minr, $maxl); + labels($minlo, $maxro, $minro, $maxlo); + labels($minli, $maxri, $minri, $maxli); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{obowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for the letter `o'. |obowl($, sx, sy)| calculates the paths for an `o' +% centered and enclosed in a rectangle size |sx| by |sy| with its bottom +% lefthand corner located at |z$|. +% \begin{macrocode} + +def obowl(suffix $)(expr sx, sy)= + offsetbowl($, sx, sy, 1/2, 1/2); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{scalarprod} +% |v scalarprod w| calulates the scalar product between the +% two vectors |v| and |w|. +% \begin{macrocode} + +primarydef v scalarprod w = + (xpart v * ypart w - ypart v * xpart w) +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{tangentpoint} +% |tangentpoint($, path)| calculates the point |z$tan| on the |path| +% so that |z$tan--z$| is tangent to the path. It uses a binary search +% to find a point on the path such that the path direction is +% (anti-) parallel to the dirction from that point to the given point. +% \begin{macrocode} + +def tangentpoint(suffix $)(expr pth)= + pair vecll, veclr, veclm; % "tangent" line directions + numeric pl, pr, pm; % path parameter values + pair vecpl, vecpr, vecpm; % path directions + pair ptl, ptr, ptm; % path points + numeric sl, sr, sm; % scalar products of path/line directions + numeric stpsize; % size of current binary step + numeric tantol; % tolerance + boolean wtest; % a boolean + + tantol := eps; +% \end{macrocode} +% Initialise using the left right and middle points on the path. +% \begin{macrocode} + pl:=0; pr:=length pth; pm:=0.5(pl+pr); stpsize:=pr-pl; + ptl := point pl of pth; + ptm := point pm of pth; + ptr := point pr of pth; +% \end{macrocode} +% Now the various vectors, and make sure they are unit vectors to +% have a consistent measure scale when we take the scalar products. +% \begin{macrocode} + vecll := unitvector (z$-ptl); + veclm := unitvector (z$-ptm); + veclr := unitvector (z$-ptr); + vecpl := unitvector (direction pl of pth); + vecpm := unitvector (direction pm of pth); + vecpr := unitvector (direction pr of pth); + sl := vecll scalarprod vecpl; + sm := veclm scalarprod vecpm; + sr := veclr scalarprod vecpr; +% \end{macrocode} +% We stop if any of the points is the tangent point, or if the step +% size is too small, or if the signs of the left and right scalar +% products are the same. +% \begin{macrocode} + wtest := (stpsize < tantol) or (sl*sr > 0) or + (abs sl < tantol) or (abs sm < tantol) or (abs sr < tantol); + if wtest: + if (stpsize < tantol): + z$tan=(0,0); + errmessage("No tangent; path too short"); + else: + if (sl*sr > 0): + z$tan=(0,0); + errmessage("No tangent; end products have the same sign"); + else: + if (abs sl < tantol): + z$tan=ptl; + else: + if (abs sm < tantol): + z$tan=ptm; + else: + z$tan=ptr; + fi + fi + fi + fi + else: +% \end{macrocode} +% There should be a tangent and we iterate to find it, using +% bisection. If there is one to be found it will be at the +% current middle point. The tangent point will be somewhere +% between the two points that lead to opposite signed scalar +% products. +% \begin{macrocode} + forever: + if (sl*sm < 0): % opposite signs, look between pl & pm + pr:=pm; pm:=0.5(pr+pl); + vecpr := vecpm; veclr := veclm; sr:=sm; + else: + pl:=pm; pm:=0.5(pr+pl); + vecpl:=vecpm; vecll:=veclm; sl:=sm; + fi + stpsize:=pr-pl; + ptm := point pm of pth; + veclm := unitvector (z$-ptm); + vecpm := unitvector (direction pm of pth); + sm := veclm scalarprod vecpm; +% \end{macrocode} +% We stop the iteration if the step size is too small or the +% middle point is the tangent point. In either case, the +% middle point is the best guess that can be made. +% \begin{macrocode} + wtest := (stpsize < tantol) or (abs sm < tantol); + if wtest: + if (abs sm < tantol): + z$tan = ptm; + else: + z$tan = ptm; +%%%%%% errmessage("Warning: tangent approximated"); + fi + fi + exitif wtest; + endfor + fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% Set the mode and font setup. +% \begin{macrocode} + +font_coding_scheme:="ASCII minuscules and punctuation"; +mode_setup; +inslrmin_font_setup; + +% \end{macrocode} +% +% +% We generate letters, together with some punctuation and +% analphabetics. +% \begin{macrocode} + +input iminl; % lower case +input iminu; % capitals +input iminpunct; % punctuation +input iminlig; % the several dashes +input imindig; % arabic digits + +% \end{macrocode} +% +% Set up the spacings, stretches and shrinks. +% +% \begin{macrocode} + +font_slant slant; font_x_height x_height#; +if monospace: + font_normal_space vstretch*9u#; % no stretching or shrinking + font_quad vstretch*18u#; + font_extra_space vstretch*9u#; +else: + font_normal_space vstretch*6u#+2letter_fit#; + font_normal_stretch vstretch*3u#; font_normal_shrink vstretch*2u#; + font_quad vstretch*18u#+4letter_fit#; + font_extra_space vstretch*2u#; + +% \end{macrocode} +% +% Finally, do the ligtables, but I don't think they are needed (yet?). +% +% \begin{macrocode} +fi + +bye. + +% \end{macrocode} +% +% \begin{macrocode} + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + kks#:=-4u#; kkx#:=-1.5u#; kkj#:=-2u#; kkr#:=-5u#; kkrs#:=-2u#; kkrl#:=-8u#; + ligtable "s": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "S": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "x": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "X": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "a": "A": + "b": "B": + "c": "C": + "d": "D": + "e": "E": + "h": "H": + "i": "I": + "k": "K": + "l": "L": + "m": "M": + "n": "N": + "o": "O": + "p": "P": + "t": "T": + "u": "U": + "v": "V": + "w": "W": + "z": "Z": + "j" kern kkj#, "J" kern kkj#; + + ligtable "r": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + ligtable "R": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + +fi + +bye. + +%</mfd> +% \end{macrocode} +% +% \subsection{The code for normal letters} +% +% The following code is for the lower case characters. +% +% \begin{macrocode} +%<*min> +% IMINL.MF Program file for Insular Minuscule lower case +% + +% \end{macrocode} +% +% +% \begin{routine}{a} +% The letter `a'. +% \begin{macrocode} +cmchar "IMIN letter a"; +beginchar("a", 2sb#+hstretch*(3/4x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup quill; +n1 := w - 2pcshiftx -jut; % effective letter width +% "stem" +x1 = pcshiftx + 2/3n1; top y1=h; +rt x2 = pcshiftx + n1; bot y2=0; +z16 = 1/6[z2,z1]; +rt x6 = x16; y6=y16; +lft x4 = pcshiftx; y4 = 1/2h; +% stem path +pth1 := z1{down}..z2; +pr1 := direction 1 of pth1; +z20 = z2 shifted -10pr1; +%%ductus:=true; +if ductus: + pickup stylus; +else: + % draw stem + draw pth1; + draw_roundserif(2,20,srad); + % draw bowl + draw z1{-pdir}..z4{down}..z6{pdir}; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "a" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{b} +% The letter `b'. +% \begin{macrocode} +cmchar "IMIN letter b"; +beginchar("b", 2sb#+hstretch*(3/4x_height#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=h/ascratio; % top of bowl +%%ductus:=true; +lft x1 = pcshiftx+jut; top y1=h; +lft x3 = pcshiftx; y3=1/2n2; +rt x5 = w-pcshiftx; y5=y3; +x4 = 1/2[x3,x5]; bot y4=0; +x6=x4; top y6=n2; +pth1 := z1..z3{down}..z4{right}.. z5{up}; +z98=(0,3/4n2); z99=(w,y98); +pth2 := z98--z99; +z7 = pth1 intersectionpoint pth2; +if ductus: + pickup stylus; +fi +draw z1..z3{down}..z4{right}..z5{up}..z6{left}..z7{-pdir}; +draw_flatserif(1,7,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "b" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{c} +% The letter `c'. +% \begin{macrocode} +cmchar "IMIN letter c"; +beginchar("c", 2sb#+hstretch*(5/8x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z24..z1{left}..z2{down}..z3{right}..z4{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "c" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{d} +% The letter `d'. There is a choice between a curved and straight stem. +% I have done the straight one. +% \begin{macrocode} +cmchar "IMIN letter d"; +beginchar("d", 2sb#+hstretch*(3/4x_height#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx; top y1=h; +rt x3 = w-pcshiftx; y3 = 1/2h/ascratio; +x4 = 1/2[x1,x3]; bot y4 = 0; +z5=(x1,y3); +z98=(0,h/ascratio); z99=(w,y98); pth2 := z98--z99; +pth1 := z1{-ppdir}..z3{down}..z4{left}; +z6 = pth1 intersectionpoint pth2; +if ductus: + pickup stylus; +fi +draw z1{-ppdir}..z3{down}..z4{left}..z5{up}..z6{pdir}; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "d" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{e} +% The letter `e'. +% \begin{macrocode} +cmchar "IMIN letter e"; +beginchar("e", sb#+hstretch*(5/4x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-pcshiftx; % actual letter width +n2 := 4/8n1; % width of bowl +x1 = pcshiftx + 5/8n2; top y1=h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = pcshiftx + 1/2n2; bot y3 = 0; +rt x4 = pcshiftx + n2; y4 = 1/4h; +z98=(0,3/8h); z99=(w,y98); +pth1 := z98--z99; +pth2 := z1{left}..z2{down}..z3{right}; +z7 = pth1 intersectionpoint pth2; +rt x9 = w-pcshiftx; y9 = 3/4h; +z8=1/2[z7,z9]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z7{pdir}..z1{left}..z2{down}..z3{right}..z4{pdir}; +draw z7{pdir}..z8{right}..z9{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{f} +% The letter `f'. +% \begin{macrocode} +cmchar "IMIN letter f"; +beginchar("f", 2sb#+hstretch*(3/4x_height#+jut#), + (x_height#), desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; y2=-1/2d; +lft x20=0; bot y20=-d; +%% bottom bar +z4=(rt x1,-thin); rt x6=w-pcshiftx; y6=y4+2thin; z5=1/2[z4,z6]; +%% top bar +x7= x1; bot y7 = 1/2h; +rt x9= w-pcshiftx; y9 = 1/2[y7,y1]; +x8 = 2/3[x7,x9]; top y8 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw z2{down}..z20{-pdir}; +draw_flatserif(1,2,srad); +draw z4{dir(45)}..z5{right}..z6{dir(45)}; % bottom bar +%%draw_flick(7, 2thin, thin, (w-pcshiftx-x7+1/2thick)); % top bar +draw z7..z8..z9; % top bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "f" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{g} +% The letter `g'. +% \begin{macrocode} +cmchar "IMIN letter g"; +beginchar("g", 2sb#+hstretch*(x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +path pth[]; +pair vec[]; +pcshiftx := sb; +pickup quill; +%% top bar +lft x1=pcshiftx; top y1=h; rt x2=w-pcshiftx; top y2=h; +x3=1/2[x1,x2]; bot y3=1/8h; +rt x5 = w-pcshiftx; y5 = -1/2d; +x6 = x3; bot y6 = -d; +x7 = 1/2[x1,x3]; y7 = y5; +x8=x3; y8 = -y3; +%%ductus:=true; +if ductus: + pickup stylus; + draw z1--z2; % top bar + draw pth1; draw pth2; % curves + draw rt z8--z9; % diagonal +else: + draw z1--z2; + draw z2--z3; + draw z3{pdir}..z5{down}..z6{left}..z7{up}..z8{pdir}; + draw_roundserif(1,2,srad); +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "g" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{h} +% The letter `h'. +% \begin{macrocode} +cmchar "IMIN letter h"; +beginchar("h", 2sb#+hstretch*(7/8x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% bowl +z3=1/2[z2,z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h/ascratio; +lft x6=x4; bot y6=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3{pdir}..z4..z5..z6{-pdir}; + +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "h" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{i} +% The letter `i'. +% \begin{macrocode} +cmchar "IMIN letter i"; +beginchar("i", 2sb#+hstretch*(thick#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +ductus:=false; +penlabels(1,2,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{j} +% The letter `j'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "IMIN letter j"; +beginchar("j", sb#+hstretch*(3/8x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +rt x1 = w-pcshiftx; top y1 = h; +x2=x1; y2=-1/2d; +%% bottom hook +lft x3 = 0; bot y3 = -d; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw_flatserif(1,2,srad); +draw z2{down}..z3{-pdir}; % hook +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "j" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{k} +% The letter `k'. +% \begin{macrocode} +cmchar "IMIN letter k"; +beginchar("k", 2sb#+hstretch*(x_height#+jut#), + asc_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; y2=-1/2d; +lft x20=pcshiftx; bot y20=-d; +%% top arm +z3=(x1,1/2h/ascratio); +rt x5=w-pcshiftx; y5=1/2[y3,y4]; +x4=1/2[x3,x5]; top y4=h/ascratio; +%% lower arm +x7=x5; bot y7=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw z2{down}..z20{-pdir}; +draw_flatserif(1,2,srad); +draw z3..z4{right}..z5; % upper arm +draw z3..{right}z7; % lower arm +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "k" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{l} +% The letter `l'. +% \begin{macrocode} +cmchar "IMIN letter l"; +beginchar("l", 2sb#+hstretch*(3/4x_height#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x2=pcshiftx; y2=1/5h; +x1=x2+jut; top y1=h; +rt x4=w-pcshiftx; y4=1/5h; +x3=1/2[x2,x4]; bot y3=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}..z2..z3{right}..z4; +draw_flatserif(1,2,srad); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "l" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{m} +% The letter `m'. +% \begin{macrocode} +cmchar "IMIN letter m"; +beginchar("m", 2sb#+hstretch*(x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +%% start of bowl +x13=x1; y13=3/4h; +%% bottom of right and middle stems +rt x6 = w -pcshiftx - jut; y6=y2; +z4 = 1/2[z2,z6]; +%% top of middle and right stems +x3=x4; y3=y1; +x5=x6; y5=y13; +%% top of bowls +x14=2/3[x13,x3]; top y14 = h; +x33=x4; y33=y13; +x34=2/3[x33,x5]; y34 = y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left half +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z13{pdir}..z14{right}..z33{down}--z4; +draw_roundserif(4,3,srad); +draw z33{pdir}..z34{right}..z5{down}--z6; +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100); +endchar; % end "m" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{n} +% The letter `n'. This could be like a capital `N' or a lower-case `n'. +% I have chosen to do the second form. +% \begin{macrocode} +cmchar "IMIN letter n"; +beginchar("n", 2sb#+hstretch*(5/8x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +% start of bowl +x13=x1; y13=3/4h; +%% right stem +rt x4 = w-pcshiftx-jut; y4=y2; +x3 = x4; y3 = y13; +% top of bowl +x14 = 2/3[x13,x3]; top y14 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z13{pdir}..z14{right}..z3{down}--z4; +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "n" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{o} +% The letter `o'. +% \begin{macrocode} +cmchar "IMIN letter o"; +beginchar("o", 2sb#+hstretch*(3/4x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +draw z1..z2..z3..z4..cycle; +z5=(pcshiftx,-o); +obowl(5, w-2pcshiftx, h+2o); +%%ductus:=true; +if ductus: + pickup stylus; + draw obfirst; draw obsecond; draw obouter; draw obinner; +else: +%% fill obouter; unfill obinner; +fi +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "o" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{p} +% The letter `p'. +% \begin{macrocode} +cmchar "IMIN letter p"; +beginchar("p", 2sb#+hstretch*(3/4x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=-1/2d; +lft x20 = pcshiftx; bot y20 = -d; +%% bowl % from "h" +z3=3/4[(x1,0),z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h; +lft x6=x4; bot y6=0; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw z2{down}..z20{-pdir}; +draw z3{pdir}..z4..z5..z6{-pdir}; % bowl (from h) +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "p" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{q} +% The letter `q'. +% \begin{macrocode} +cmchar "IMIN letter q"; +beginchar("q", 2sb#+hstretch*(3/4x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% right stem +rt x1=w-pcshiftx; top y1=h; +x2=x1; bot y2=-1/2d; +x20 = x1-jut; bot y20=-d; +%% bowl +z3=1/4[(x1,0),z1]; +lft x5=pcshiftx; y5=y3; +x4=1/2[x3,x5]; bot y4=0; +x6=x1-jut; top y6=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +draw z2{down}..z20{-pdir}; % stem +draw_flatserif(1,2,srad); +draw z3{-pdir}..z4{left}..z5{up}..z6{pdir}; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{r} +% The letter `r'. +% \begin{macrocode} +cmchar "IMIN letter r"; +beginchar("r", sb#+hstretch*(7/8x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=-1/2d; +lft x20 = pcshiftx; bot y20 = -d; +%% bowl +z3=3/4[(x1,0),z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw z2{down}..z20{-pdir}; + +draw z3{pdir}..z4{right}..z5{pdir}; + +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "r" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{s} +% The letter `s'. This is a `long' S. +% \begin{macrocode} +cmchar "IMIN letter s"; +beginchar("s", 2sb#+hstretch*(3/4x_height#+jut#), + asc_height#, desc_depth#); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; top y1=h/ascratio; bot y2=-1/2d; +lft x20=pcshiftx; bot y20=-d; +%% flick +x4=x2; y4 = 1/2h/ascratio; +rt x6=w-pcshiftx; y6 = 2/3h; +x5 = 2/3[x4,x6]; top y5=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw z2{down}..z20{-pdir}; +draw_flatserif(1,2,srad); +draw z4{up}...z5{right}...z6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100); +endchar; % end "s" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{t} +% The letter `t'. +% \begin{macrocode} +cmchar "IMIN letter t"; +beginchar("t", 2sb#+hstretch*(5/4x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% bar +lft x1 = pcshiftx; top y1=h; rt x2=w-pcshiftx; bot y2=h; +n1 := w; % width of bowl +n2 := h; % height of bowl +z3=1/2[z1,z2]; +lft x4 = pcshiftx + 1/8n1; y4 = 1/2h; +x5=x3; bot y5 = 0; +rt x6 = pcshiftx + 3/4n1; top y6 = 1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{pdir}..z3..z2{pdir}; % bar +draw z3..z4{down}..z5{right}..z6{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "t" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{u} +% The letter `u'. +% \begin{macrocode} +cmchar "IMIN letter u"; +beginchar("u", 2sb#+hstretch*(5/8x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-jut; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; +draw_flatserif(1,13,srad); +draw_tstem(3,4,srad); % right stem +draw_flatserif(3,4,srad); +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "u" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{v} +% The letter `v'. +% \begin{macrocode} +cmchar "IMIN letter v"; +beginchar("v", 2sb#+hstretch*(3/4x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-jut; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +rt x23=w-pcshiftx; y23=3/4h; +lft x26=x14; top y26=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}; % left stem +draw_flatserif(1,13,srad); +draw z14{pdir}..z23{up}..z26; + +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "v" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{w} +% The letter `w'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "IMIN letter w"; +beginchar("w", 2sb#+hstretch*(x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x5=w-pcshiftx-jut; y5=y1; +x6=x5; bot y6=0; +z53=1/4[z6,z5]; % start of bowl +% middle stem +z3 = 1/2[z1,z5]; +z33=(x3,y13); +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +% middle of right bowl +x34=1/3[x3,x5]; y34=y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; % left +draw_flatserif(1,13,srad); +draw z3--z33{down}..z34{right}..z53{pdir}; % middle +draw_flatserif(3,33,srad); +draw_tstem(5,6,srad); % right stem +draw_flatserif(5,6,srad); +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "w" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{x} +% The letter `x'. +% \begin{macrocode} +cmchar "IMIN letter x"; +beginchar("x", 2sb#+hstretch*(x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := w-2pcshiftx; % total width +n2 := thick; % triangle side +%% diag top left to bottom right +lft x1=pcshiftx; bot y1=2/3h; +x2=pcshiftx+1/7n1; top y2=h; +x5=pcshiftx+11/14n1; bot y5=-1/4d; +rt x6=pcshiftx+n1; top y6=1/6h; +z25 = 1/3[z2,z5]; +%% diag bottom left to top right +lft x10 = -w + 2pcshiftx; bot y10=-d; +x50=x5; top y50=h; +rt x60 = w -pcshiftx; bot y60=2/3h; +x40=pcshiftx+8/14n1; y40=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z5{right}..z6; % top left to bottom right +draw z10{1/2pdir}..z25..z50{right}..z60; % bottom left to top right +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,40,50,60,100); +endchar; % end "x" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{y} +% The letter `y'. Modern, but with a dot on top. +% \begin{macrocode} +cmchar "IMIN letter y"; +beginchar("y", 2sb#+hstretch*(5/8x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +z50=(x3,-1/2d); +x60=x14; bot y60=-d; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; +draw_flatserif(1,13,srad); +draw_tstem(3,50,srad); % right stem +draw z50{down}..z60{-pdir}; +draw_flatserif(3,4,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{z} +% The letter `z'. +% \begin{macrocode} +cmchar "IMIN letter z"; +beginchar("z", 2sb#+hstretch*(x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +%% top bar +n10 := w-2pcshiftx; % letter width +lft x1=pcshiftx; top y1=h; +rt x2= w-pcshiftx; bot y2=y1; +%% diagonal +x3=x1; bot y3=0; +%% bowl +x4=3/4[x1,x2]; top y4 = 1/2h; +x6=x4; bot y6 = 0; +rt x5 = w-pcshiftx; y5 = 1/2[y4,y6]; +x7=1/2[x3,x5]; y7 = 1/2[y6,y5]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{right}..z2{right}; % top bar +draw_roundserif(1,2,srad); +draw z2--z3; % diagonal +draw z3..z4{right}..z5{down}..z6{left}..z7; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "z" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file +% \begin{macrocode} +%</min> +% \end{macrocode} +% +% +% \subsection{The code for capital letters} +% +% \thisfont{} `capitals' were drawn with the same pen as for the minuscules, +% and the letters were merely larger versions of the minuscules. +% +% \begin{macrocode} +%<*maj> +% IMINU.MF Program file for Insular Minuscule `capitals' +% + +% \end{macrocode} +% +% +% +% \begin{routine}{A} +% The letter `A'. +% \begin{macrocode} +cmchar "IMIN letter A"; +beginchar("A", 2sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup quill; +n1 := w - 2pcshiftx -jut; % effective letter width +% "stem" +x1 = pcshiftx + 2/3n1; top y1=h; +rt x2 = pcshiftx + n1; bot y2=0; + +z16 = 1/6[z2,z1]; +rt x6 = x16; y6=y16; + +lft x4 = pcshiftx; y4 = 1/2h; + +% stem path +pth1 := z1{down}..z2; +pr1 := direction 1 of pth1; +z20 = z2 shifted -10pr1; + +%%ductus:=true; +if ductus: + pickup stylus; +else: + % draw stem + draw pth1; + draw_roundserif(2,20,srad); + % draw bowl + draw z1{-pdir}..z4{down}..z6{pdir}; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "A" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{B} +% The letter `B'. +% \begin{macrocode} +cmchar "IMIN letter B"; +beginchar("B", 2sb#+caprat*hstretch*(3/4x_height#), + caprat*asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=h/ascratio; % top of bowl +lft x1 = pcshiftx+jut; top y1=h; +lft x3 = pcshiftx; y3=1/2n2; +rt x5 = w-pcshiftx; y5=y3; +x4 = 1/2[x3,x5]; bot y4=0; +x6=x4; top y6=n2; +pth1 := z1..z3{down}..z4{right}.. z5{up}; +z98=(0,3/4n2); z99=(w,y98); +pth2 := z98--z99; +z7 = pth1 intersectionpoint pth2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z3{down}..z4{right}..z5{up}..z6{left}..z7{-pdir}; +draw_flatserif(1,7,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "B" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{C} +% The letter `C'. +% \begin{macrocode} +cmchar "IMIN letter C"; +beginchar("C", 2sb#+caprat*hstretch*(5/8x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z24..z1{left}..z2{down}..z3{right}..z4{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "C" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{D} +% The letter `D'. There is a choice between a curved and straight stem. +% I have done the straight one. +% \begin{macrocode} +cmchar "IMIN letter D"; +beginchar("D", 2sb#+caprat*hstretch*(3/4x_height#), + caprat*asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx; top y1=h; +rt x3 = w-pcshiftx; y3 = 1/2h/ascratio; +x4 = 1/2[x1,x3]; bot y4 = 0; +z5=(x1,y3); +z98=(0,h/ascratio); z99=(w,y98); pth2 := z98--z99; +pth1 := z1{-ppdir}..z3{down}..z4{left}; +z6 = pth1 intersectionpoint pth2; +if ductus: + pickup stylus; +fi +draw z1{-ppdir}..z3{down}..z4{left}..z5{up}..z6{pdir}; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "D" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{E} +% The letter `E'. +% \begin{macrocode} +cmchar "IMIN letter E"; +beginchar("E", sb#+caprat*hstretch*(5/4x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-pcshiftx; % actual letter width +n2 := 4/8n1; % width of bowl +x1 = pcshiftx + 5/8n2; top y1=h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = pcshiftx + 1/2n2; bot y3 = 0; +rt x4 = pcshiftx + n2; y4 = 1/4h; +z98=(0,3/8h); z99=(w,y98); +pth1 := z98--z99; +pth2 := z1{left}..z2{down}..z3{right}; +z7 = pth1 intersectionpoint pth2; +rt x9 = w-pcshiftx; y9 = 3/4h; +z8=1/2[z7,z9]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z7{pdir}..z1{left}..z2{down}..z3{right}..z4{pdir}; +draw z7{pdir}..z8{right}..z9{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{F} +% The letter `F'. +% \begin{macrocode} +cmchar "IMIN letter F"; +beginchar("F", 2sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*(x_height#), desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; y2=-1/2d; +lft x20=0; bot y20=-d; +%% bottom bar +z4=(rt x1,-thin); rt x6=w-pcshiftx; y6=y4+2thin; z5=1/2[z4,z6]; +%% top bar +x7= x1; bot y7 = 1/2h; +rt x9= w-pcshiftx; y9 = 1/2[y7,y1]; +x8 = 2/3[x7,x9]; top y8 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw z2{down}..z20{-pdir}; +draw_flatserif(1,2,srad); +draw z4{dir(45)}..z5{right}..z6{dir(45)}; % bottom bar +draw z7..z8..z9; % top bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "F" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{G} +% The letter `G'. +% \begin{macrocode} +cmchar "IMIN letter G"; +beginchar("G", 2sb#+caprat*hstretch*(x_height#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +path pth[]; +pair vec[]; +pcshiftx := sb; +pickup quill; +%% top bar +lft x1=pcshiftx; top y1=h; rt x2=w-pcshiftx; top y2=h; +x3=1/2[x1,x2]; bot y3=1/8h; +rt x5 = w-pcshiftx; y5 = -1/2d; +x6 = x3; bot y6 = -d; +x7 = 1/2[x1,x3]; y7 = y5; +x8=x3; y8 = -y3; +%%ductus:=true; +if ductus: + pickup stylus; + draw z1--z2; % top bar + draw pth1; draw pth2; % curves + draw rt z8--z9; % diagonal +else: + draw z1--z2; + draw z2--z3; + draw z3{pdir}..z5{down}..z6{left}..z7{up}..z8{pdir}; + draw_roundserif(1,2,srad); +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "G" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{H} +% The letter `H'. +% \begin{macrocode} +cmchar "IMIN letter H"; +beginchar("H", 2sb#+caprat*hstretch*(7/8x_height#+jut#), + caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% bowl +z3=1/2[z2,z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h/ascratio; +lft x6=x4; bot y6=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z3{pdir}..z4..z5..z6{-pdir}; + +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "H" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{I} +% The letter `I'. +% \begin{macrocode} +cmchar "IMIN letter I"; +beginchar("I", 2sb#+caprat*hstretch*(thick#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +ductus:=false; +penlabels(1,2,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{J} +% The letter `J'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "IMIN letter J"; +beginchar("J", sb#+caprat*hstretch*(3/8x_height#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +rt x1 = w-pcshiftx; top y1 = h; +x2=x1; y2=-1/2d; +%% bottom hook +lft x3 = 0; bot y3 = -d; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw_flatserif(1,2,srad); +draw z2{down}..z3{-pdir}; % hook +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "J" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{K} +% The letter `K'. +% \begin{macrocode} +cmchar "IMIN letter K"; +beginchar("K", 2sb#+caprat*hstretch*(x_height#+jut#), + caprat*asc_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; y2=-1/2d; +lft x20=pcshiftx; bot y20=-d; +%% top arm +z3=(x1,1/2h/ascratio); +rt x5=w-pcshiftx; y5=1/2[y3,y4]; +x4=1/2[x3,x5]; top y4=h/ascratio; +%% lower arm +x7=x5; bot y7=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw z2{down}..z20{-pdir}; +draw_flatserif(1,2,srad); +draw z3..z4{right}..z5; % upper arm +draw z3..{right}z7; % lower arm +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "K" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{L} +% The letter `L'. +% \begin{macrocode} +cmchar "IMIN letter L"; +beginchar("L", 2sb#+caprat*hstretch*(3/4x_height#), + caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x2=pcshiftx; y2=1/5h; +x1=x2+jut; top y1=h; +rt x4=w-pcshiftx; y4=1/5h; +x3=1/2[x2,x4]; bot y3=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}..z2..z3{right}..z4; +draw_flatserif(1,2,srad); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "L" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{M} +% The letter `M'. +% \begin{macrocode} +cmchar "IMIN letter M"; +beginchar("M", 2sb#+caprat*hstretch*(x_height#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +%% start of bowl +x13=x1; y13=3/4h; +%% bottom of right and middle stems +rt x6 = w -pcshiftx - jut; y6=y2; +z4 = 1/2[z2,z6]; +%% top of middle and right stems +x3=x4; y3=y1; +x5=x6; y5=y13; +%% top of bowls +x14=2/3[x13,x3]; top y14 = h; +x33=x4; y33=y13; +x34=2/3[x33,x5]; y34 = y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left half +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z13{pdir}..z14{right}..z33{down}--z4; +draw_roundserif(4,3,srad); +draw z33{pdir}..z34{right}..z5{down}--z6; +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100); +endchar; % end "M" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{N} +% The letter `N'. This could be like a capital `N' or a lower-case `n'. +% I have chosen to do the first form. +% \begin{macrocode} +cmchar "IMIN letter N"; +beginchar("N", 2sb#+caprat*hstretch*(3/4x_height#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +%% right stem +rt x3=w-pcshiftx-jut; y3=y1; +z4=(x3,y2); +%% bar +z5=3/8[lft z2, lft z1]; z6=2/8[rt z4,rt z3]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw_tstem(3,4,srad); % right stem +draw_flatserif(3,4,srad); +draw_roundserif(4,3,srad); +draw z5{right}..z6{right}; % bar +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "N" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{O} +% The letter `O'. +% \begin{macrocode} +cmchar "IMIN letter O"; +beginchar("O", 2sb#+caprat*hstretch*(3/4x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +draw z1..z2..z3..z4..cycle; +z5=(pcshiftx,-o); +obowl(5, w-2pcshiftx, h+2o); +%%ductus:=true; +if ductus: + pickup stylus; + draw obfirst; draw obsecond; draw obouter; draw obinner; +else: +%% fill obouter; unfill obinner; +fi +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "O" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{P} +% The letter `P'. +% \begin{macrocode} +cmchar "IMIN letter P"; +beginchar("P", 2sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=-1/2d; +lft x20 = pcshiftx; bot y20 = -d; +%% bowl % from "h" +z3=3/4[(x1,0),z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h; +lft x6=x4; bot y6=0; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw z2{down}..z20{-pdir}; +draw z3{pdir}..z4..z5..z6{-pdir}; % bowl (from h) +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "P" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Q} +% The letter `Q'. +% \begin{macrocode} +cmchar "IMIN letter Q"; +beginchar("Q", 2sb#+caprat*hstretch*(3/4x_height#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% right stem +rt x1=w-pcshiftx; top y1=h; +x2=x1; bot y2=-1/2d; +x20 = x1-jut; bot y20=-d; +%% bowl +z3=1/4[(x1,0),z1]; +lft x5=pcshiftx; y5=y3; +x4=1/2[x3,x5]; bot y4=0; +x6=x1-jut; top y6=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +draw z2{down}..z20{-pdir}; % stem +draw_flatserif(1,2,srad); +draw z3{-pdir}..z4{left}..z5{up}..z6{pdir}; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "Q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{R} +% The letter `R'. +% \begin{macrocode} +cmchar "IMIN letter R"; +beginchar("R", sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=-1/2d; +lft x20 = pcshiftx; bot y20 = -d; +%% bowl % almost a "p" bowl +z3=3/4[(x1,0),z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h; +x100=x1; bot y100 = 0; +lft x6= rt x100; y6=y100; + +rt x26=w-pcshiftx; y26=-1/6d; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw z2{down}..z20{-pdir}; +draw z3{pdir}..z4..z5..z6{-pdir}; % bowl (from h) +draw z6{-ppdir}..z26{pdir}; % leg +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "R" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{S} +% The letter `S'. This is a `long' S. +% \begin{macrocode} +cmchar "IMIN letter S"; +beginchar("S", 2sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*asc_height#, desc_depth#); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; top y1=h/ascratio; bot y2=-1/2d; +lft x20=pcshiftx; bot y20=-d; +%% flick +x4=x2; y4 = 1/2h/ascratio; +rt x6=w-pcshiftx; y6 = 2/3h; +x5 = 2/3[x4,x6]; top y5=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw z2{down}..z20{-pdir}; +draw_flatserif(1,2,srad); +draw z4{up}...z5{right}...z6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100); +endchar; % end "S" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{T} +% The letter `T'. +% \begin{macrocode} +cmchar "IMIN letter T"; +beginchar("T", 2sb#+caprat*hstretch*(5/4x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% bar +lft x1 = pcshiftx; top y1=h; rt x2=w-pcshiftx; bot y2=h; +n1 := w; % width of bowl +n2 := h; % height of bowl +z3=1/2[z1,z2]; +lft x4 = pcshiftx + 1/8n1; y4 = 1/2h; +x5=x3; bot y5 = 0; +rt x6 = pcshiftx + 3/4n1; top y6 = 1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{pdir}..z3..z2{pdir}; % bar +draw z3..z4{down}..z5{right}..z6{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "T" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{U} +% The letter `U'. +% \begin{macrocode} +cmchar "IMIN letter U"; +beginchar("U", 2sb#+caprat*hstretch*(5/8x_height#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-jut; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; +draw_flatserif(1,13,srad); +draw_tstem(3,4,srad); % right stem +draw_flatserif(3,4,srad); +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "U" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{V} +% The letter `V'. +% \begin{macrocode} +cmchar "IMIN letter V"; +beginchar("V", 2sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-jut; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +rt x23=w-pcshiftx; y23=3/4h; +lft x26=x14; top y26=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}; % left stem +draw_flatserif(1,13,srad); +draw z14{pdir}..z23{up}..z26; +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "V" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{W} +% The letter `W'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "IMIN letter W"; +beginchar("W", 2sb#+caprat*hstretch*(x_height#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x5=w-pcshiftx-jut; y5=y1; +x6=x5; bot y6=0; +z53=1/4[z6,z5]; % start of bowl +% middle stem +z3 = 1/2[z1,z5]; +z33=(x3,y13); +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +% middle of right bowl +x34=1/3[x3,x5]; y34=y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; % left +draw_flatserif(1,13,srad); +draw z3--z33{down}..z34{right}..z53{pdir}; % middle +draw_flatserif(3,33,srad); +draw_tstem(5,6,srad); % right stem +draw_flatserif(5,6,srad); +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "W" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{X} +% The letter `X'. +% \begin{macrocode} +cmchar "IMIN letter X"; +beginchar("X", 2sb#+caprat*hstretch*(x_height#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := w-2pcshiftx; % total width +n2 := thick; % triangle side +%% diag top left to bottom right +lft x1=pcshiftx; bot y1=2/3h; +x2=pcshiftx+1/7n1; top y2=h; +x5=pcshiftx+11/14n1; bot y5=-1/4d; +rt x6=pcshiftx+n1; top y6=1/6h; +z25 = 1/3[z2,z5]; +%% diag bottom left to top right +%%x10=x1; bot y10=-d; +lft x10 = -w + 2pcshiftx; bot y10=-d; +x50=x5; top y50=h; +%%rt x60=x5; bot y60=2/3h; +rt x60 = w -pcshiftx; bot y60=2/3h; +x40=pcshiftx+8/14n1; y40=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z5{right}..z6; % top left to bottom right +draw z10{1/2pdir}..z25..z50{right}..z60; % bottom left to top right +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,40,50,60,100); +endchar; % end "X" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Y} +% The letter `Y'. Modern style. +% \begin{macrocode} +cmchar "IMIN letter Y"; +beginchar("Y", 2sb#+caprat*hstretch*(5/8x_height#+jut#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +z50=(x3,-1/2d); +x60=x14; bot y60=-d; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; +draw_flatserif(1,13,srad); +draw_tstem(3,50,srad); % right stem +draw z50{down}..z60{-pdir}; +draw_flatserif(3,4,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "Y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{Z} +% The letter `Z'. +% \begin{macrocode} +cmchar "IMIN letter Z"; +beginchar("Z", 2sb#+caprat*hstretch*(x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +%% top bar +n10 := w-2pcshiftx; % letter width +lft x1=pcshiftx; top y1=h; +rt x2= w-pcshiftx; bot y2=y1; +%% diagonal +x3=x1; bot y3=0; +%% bowl +x4=3/4[x1,x2]; top y4 = 1/2h; +x6=x4; bot y6 = 0; +rt x5 = w-pcshiftx; y5 = 1/2[y4,y6]; +x7=1/2[x3,x5]; y7 = 1/2[y6,y5]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{right}..z2{right}; % top bar +draw_roundserif(1,2,srad); +draw z2--z3; % diagonal +draw z3..z4{right}..z5{down}..z6{left}..z7; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "Z" + +% \end{macrocode} +% \end{routine} +% +% +% +% The end of this file +% \begin{macrocode} +%</maj> +% \end{macrocode} +% +% +% +% \subsection{The punctuation file} +% +% The main punctuation marks are defined in this file. +% +% \begin{macrocode} +%<*punct> +% IMINPUNCT.MF This file contains punctuation marks + +% \end{macrocode} +% +% +% \begin{routine}{!} +% The `!' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Exclamation mark"; +beginchar("!", 2sb#+hstretch*(thick#+trijut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +x1=w/2; top y1 = h; +z3=(x1, 1/2dot_size); +z2=(x1, y3+3/2dot_size); +draw z1--z2; +draw_pdot(3,dot_size); +penlabels(1,2,3); + +endchar; % end of "!" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{?} +% The `?' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Question mark"; +beginchar("?", 2sb#+hstretch*(3/4x_height#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-2pcshiftx; % actual character width +n2 := 1/3h; % height of top bowl +n3 := n2; % height of bottom bowl +z5=(1/2w,1/2dot_size); +x4 = x5; y4=y5+3/2dot_size; +lft x1 = pcshiftx; y1 = 3/4h; +x2 = 1/2w; top y2 = h; +rt x3 = w-pcshiftx; y3 = 2/3h; + +%%ductus:= true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{down}..z4{down}; +draw_pdot(5, dot_size); +penlabels(1,2,3,4,5); +endchar; % end of "?" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{,} +% The `,' character. +% \begin{macrocode} + +cmchar "Comma"; +beginchar(",",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=1/2dot_size; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "," + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{.} +% The `.' character. +% \begin{macrocode} + +cmchar "Period"; +beginchar(".",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +z1=(w/2, 1/2dot_size); +draw_pdot(1,dot_size); +penlabels(1); +endchar; % end of "." + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{:} +% The `:' character. +% \begin{macrocode} + +cmchar "Colon"; +beginchar(":",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +x1=x2=w/2; y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pdot(2,dot_size); +penlabels(1,2); +endchar; % end ":" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{;} +% The `;' character. +% \begin{macrocode} + +cmchar "Semicolon"; +beginchar(";",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pcomma(2,dot_size,comma_width); +penlabels(1,2); +endchar; % end of ";" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{'} +% The `'' character. +% \begin{macrocode} + +cmchar "Apostrophe"; +beginchar("'",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "'" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{`} +% The ``' character. +% \begin{macrocode} + +cmchar "Reverse apostrophe"; +beginchar("`",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=h; +draw_plq(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "`" + +% \end{macrocode} +% \end{routine} +% +% The end of this file. +% \begin{macrocode} +%</punct> +% \end{macrocode} +% +% +% \subsection{The ligatures and dashes file} +% +% The ligatured letters, punctuation marks and dashes are defined in this file. +% \begin{macrocode} +%<*lig> +% IMINLIG.MF Uncial ligatured letters, punctation and dashes + +% \end{macrocode} +% First the ligtables. +% \begin{macrocode} + +ligtable "`": "`"=:oct"134"; +ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#; + +ligtable "-": "-"=:oct"173"; +ligtable oct"173": "-"=:oct"174"; + +%%%%ligtable "f": "i"=:oct"014"; + +% \end{macrocode} +% +% \begin{routine}{''} +% The `''' ligature. +% \begin{macrocode} + +cmchar "Closing quotes"; +beginchar(oct"042",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h; +x2=x1-(2hstretch*dot_size); +draw_pcomma(1,dot_size,comma_width); % right +draw_pcomma(2,dot_size,comma_width); % left +penlabels(1,2); +endchar; % end of "''" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{``} +% The ```' ligature. +% \begin{macrocode} + +cmchar "Opening quotes"; +beginchar(oct"134",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h; +x2=x1+(2hstretch*dot_size); +draw_plq(1,dot_size,comma_width); % left +draw_plq(2,dot_size,comma_width); % right +penlabels(1,2); +endchar; % end of "``" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{-} +% The `-' (hyphen) character. +% \begin{macrocode} + +cmchar "Hyphen"; +beginchar("-",sb#+hstretch*(0.8x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +%%pickup quill; +%%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +%%x11=lft x1+alpha/2; y11=top y1-0.5thin; +%%x12=rt x2; y12=bot y1+0.5thin; +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +pickup thickstylus; +lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=1/2h; +draw z21--z22; +draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "-" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{--} +% The `--' (en-dash) ligature. +% \begin{macrocode} + +cmchar "En dash"; +beginchar(oct"173",sb#+hstretch*(x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +pickup quill; +%%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +%%x11=lft x1+alpha/2; y11=top y1-0.5thin; +%%x12=rt x2; y12=bot y1+0.5thin; +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +pickup thickstylus; +lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=1/2h; +draw z21--z22; +draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "--" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{---} +% The `---' (em dash) ligature. The em dash is twice the width of the en dash. +% \begin{macrocode} + +cmchar "Em dash"; +beginchar(oct"174",sb#+hstretch*(2x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +pickup quill; +%%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +%%x11=lft x1+alpha/2; y11=top y1-0.5thin; +%%x12=rt x2; y12=bot y1+0.5thin; +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +pickup thickstylus; +lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=1/2h; +draw z21--z22; +draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "---" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{&} +% The ampersand (which is really an `et' ligature). +% \begin{macrocode} + +cmchar "IMIN ampersand"; +beginchar("&", 2sb#+hstretch*(5/4x_height#), asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx:=sb; +pickup quill; +%% E part +n1 := w-pcshiftx; % actual letter width +n2 := 4/8n1; % width of bowl +x1 = pcshiftx + 5/8n2; top y1=h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = pcshiftx + 1/2n2; bot y3 = 0; +rt x4 = pcshiftx + n2; y4 = 1/4h; +z98=(0,3/8h); z99=(w,y98); +pth1 := z98--z99; +pth2 := z1{left}..z2{down}..z3{right}; +z7 = pth1 intersectionpoint pth2; +rt x9 = w-pcshiftx; y9 = 3/4h; +z8=6/8[z7,z9]; + +%% T part +x18=x8; bot y18=0; +x19=5/8[x18,x9]; +y19=1/8h; + + +%%ductus:=true; +if ductus: + pickup stylus; +fi +%% E part +draw z7{pdir}..z1{left}..z2{down}..z3{right}..z4{up}..z8{right}; +draw z7{pdir}..z8{right}..z9{pdir}; +%% T bowl +draw z8{left}..z4{down}..z18{right}..z19{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,16,17,18,19,31,32,33); +endchar; % end of "&" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</lig> +% \end{macrocode} +% +% \subsection{The digits file} +% +% These are arabic digits in the style of the book-hand. They are a +% modern invention. +% +% \begin{macrocode} +%<*dig> +% IMINDIG.MF Program file for Insular Minuscule digits +% + +% \end{macrocode} +% +% +% +% \begin{routine}{1} +% The digit `1'. +% \begin{macrocode} +cmchar "Uncial digit 1"; +beginchar("1", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=x2=w/2; +y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,100); +endchar; % end "1" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{2} +% The digit `2'. +% \begin{macrocode} +cmchar "Uncial digit 2"; +beginchar("2", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=pcshiftx+o; top y1=h-2thin; +x2=1/2w; top y2= h+o; +rt x3=w-pcshiftx-o; y3=3/4h; +% foot +lft x5=pcshiftx; bot y5=0; +rt x6=w-pcshiftx; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(5,6,thin); % foot +draw z1..z2{right}..z3{down}..{-pdir}z5wl; % curve +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "2" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{3} +% The digit `3'. +% \begin{macrocode} +cmchar "Uncial digit 3"; +beginchar("3", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% x values +lft x3=pcshiftx; x10=x3; +rt x5=w-pcshiftx; x8=x5-3thin; +x4=0.5[x3,x5]; +x9=0.5[x10,x8]; +%%lft x6=pcshiftx+3thin; x7=x6; +x6=1/2[x3,x9]; x7=x6; +% y values +bot y3=thin; top y10=h-2thin; +y6=0.5[y3,y10]; y7=y6; +bot y4=-thin; top y9=h+thin; +y5=0.5[y3,y6]; +y8=11/12[y7,y10]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw z3..z4{right}..z5{up}...{-pdir}z6; % bottom bowl +%%draw z7{pdir}..z8{up}..z9{left}..z10; % top bowl +draw z3..z4{right}..z5{up}...{left}z6; % bottom bowl +draw z7{right}..z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "3" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{4} +% The digit `4'. +% \begin{macrocode} +cmchar "Uncial digit 4"; +beginchar("4", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the stem +x1=x2=w-pcshiftx-jut; +y1=h; bot y2=0; +% the crossbar +lft x3=pcshiftx; y3=0.33h; +rt x4=w-pcshiftx; y4=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % main stem +draw_wave(3,4,thin); % crossbar +draw z3wl--z1; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "4" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{5} +% The digit `5'. +% \begin{macrocode} +cmchar "Uncial digit 5"; +beginchar("5", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% for the top +rt x1=w-pcshiftx; top y1=h; +lft x2=pcshiftx; y2=y1; +% the S curve +x3=x2; y3=0.5h+thin; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +rt x5=w-pcshiftx; y5=0.3h; +x6=w/2; bot y6=0; +lft x7=pcshiftx; bot y7=2thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(2,1,thin); % top squiggle +draw z3{pdir}..z5{down}..z6{left}..z7; % curve +draw z2wl--z3; % vertical +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "5" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{6} +% The digit `6'. +% \begin{macrocode} +cmchar "Uncial digit 6"; +beginchar("6", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx; top y1=h-2thin; +x2=1/2w; top y2= h; +lft x3=pcshiftx; y3=1/2h; +x4=x2; bot y4=0; +rt x5=w-pcshiftx; y5=1/4h; +lft x6=rt x3; bot y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{left}..z3{down}..z4{right}..z5{up}..{-pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "6" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{7} +% The digit `7'. +% \begin{macrocode} +cmchar "Uncial digit 7"; +beginchar("7", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% top bar +lft x1=pcshiftx; +rt x2=w-pcshiftx; +top y1=top y2=h; +% bowed leg +x4=w/2; bot y4=0; +x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(1,2,thin); % top bar +draw z1wr..z3..z4; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "7" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{8} +% The digit `8'. +% \begin{macrocode} +cmchar "Uncial digit 8"; +beginchar("8", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=1; +pickup quill; +lft x1=alpha*pcshiftx+o; rt x3=w-alpha*pcshiftx-o; y1=y3=3/4h; +x2=x4=w/2; top y2=h+o; bot y4=-o; +x5=x2; y5=h/2+2o; +lft x11=pcshiftx; rt x13=w-pcshiftx; y11=y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z5..z11..z4..z13..z5..cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,100); +endchar; % end "8" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{9} +% The digit `9'. +% \begin{macrocode} +cmchar "Uncial digit 9"; +beginchar("9", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; bot y1=2thin; +x2=1/2w; bot y2= 0; +rt x3=w-pcshiftx; y3=1/2h; +x4=x2; top y4=h; +lft x5=pcshiftx; y5=3/4h; +rt x6=lft x3; top y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{up}..z4{left}..z5{down}..{pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "9" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{0} +% The digit `0'. +% \begin{macrocode} +cmchar "Uncial digit 0"; +beginchar("0", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "0" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</dig> +% \end{macrocode} +% +% +% \section{The font definition files} \label{sec:fd} +% +% The font comes in normal and bold weights only. +% +% \begin{macrocode} +%<*fdot1> +\DeclareFontFamily{OT1}{imin}{} + \DeclareFontShape{OT1}{imin}{m}{n}{ <-8.5> imin7 <8.5-15> imin10 <15-> imin17 }{} + \DeclareFontShape{OT1}{imin}{m}{sl}{ <-> sub * imin/m/n }{} + \DeclareFontShape{OT1}{imin}{m}{it}{ <-> sub * imin/m/n }{} + \DeclareFontShape{OT1}{imin}{m}{sc}{ <-> sub * imin/m/n }{} + \DeclareFontShape{OT1}{imin}{m}{u}{ <-> sub * imin/m/n }{} + \DeclareFontShape{OT1}{imin}{bx}{n}{ <-8.5> iminb7 <8.5-15> iminb10 <15-> iminb17 }{} + \DeclareFontShape{OT1}{imin}{bx}{it}{ <-> sub * imin/bx/n }{} + \DeclareFontShape{OT1}{imin}{bx}{sl}{ <-> sub * imin/bx/n }{} + \DeclareFontShape{OT1}{imin}{b}{n}{ <-> sub * imin/bx/n }{} +%</fdot1> +% \end{macrocode} +% +% +% \begin{macrocode} +%<*fdt1> +\DeclareFontFamily{T1}{imin}{} + \DeclareFontShape{T1}{imin}{m}{n}{ <-8.5> imin7 <8.5-15> imin10 <15-> imin17 }{} + \DeclareFontShape{T1}{imin}{m}{sl}{ <-> sub * imin/m/n }{} + \DeclareFontShape{T1}{imin}{m}{it}{ <-> sub * imin/m/n }{} + \DeclareFontShape{T1}{imin}{m}{sc}{ <-> sub * imin/m/n }{} + \DeclareFontShape{T1}{imin}{m}{u}{ <-> sub * imin/m/n }{} + \DeclareFontShape{T1}{imin}{bx}{n}{ <-8.5> iminb7 <8.5-15> iminb10 <15-> iminb17 }{} + \DeclareFontShape{T1}{imin}{bx}{it}{ <-> sub * imin/bx/n }{} + \DeclareFontShape{T1}{imin}{bx}{sl}{ <-> sub * imin/bx/n }{} + \DeclareFontShape{T1}{imin}{b}{n}{ <-> sub * imin/bx/n }{} +%</fdt1> +% \end{macrocode} +% +% \section{The package code} \label{sec:code} +% +% \subsection{The \Lpack{inslrmin} package} +% +% The \Lpack{inslrmin} package is for typesetting short pieces of text +% in the \thisfont{} fonts. +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. +% \begin{macrocode} +%<*usc> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{inslrmin}[2002/12/30 v1.0 package for Insular Minuscule fonts] +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\iminfamily} +% Selects the \thisfont{} font family in the OT1 or T1 encoding. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \newcommand{\iminfamily}{\usefont{T1}{imin}{m}{n}} +\else + \newcommand{\iminfamily}{\usefont{OT1}{imin}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textimin} +% Text command for the \thisfont{} font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textimin}{\iminfamily} +% \end{macrocode} +% \end{macro} +% +% The end of this package. +% \begin{macrocode} +%</usc> +% \end{macrocode} +% +% \subsection{The \Lpack{allimin} package} +% +% The \Lpack{allimin} package is intended for use when the entire document +% will be typeset in the book-hand. This is a minimal package. Because the +% book-hand should not contain arabic digits a fuller package would redefine +% anything numbered in \LaTeX{} to use roman instead of arabic numbering. +% Also, because of the large |\baselineskip| many other aspects of \LaTeX{} +% to do with vertical positioning should also be redefined. +% +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. It also uses the \Lpack{inslrmin} package. +% \begin{macrocode} +%<*uscall> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{allimin}[2002/12/30 v1.0 package for all Insular Minuscule fonts] +\RequirePackage{inslrmin} +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% Redefine the default fonts to be \thisfont, which has only one family +% member. +% \begin{macro}{\rmdefault} +% \begin{macro}{\sfdefault} +% \begin{macro}{\ttdefault} +% \begin{macrocode} +\renewcommand{\rmdefault}{imin} +\renewcommand{\sfdefault}{imin} +\renewcommand{\ttdefault}{imin} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The `leading' in the book-hands is a function of the |x-height|, which is +% normally much +% greater than for the CMR fonts. I have borrowed code from Frank Jensen's +% \Lpack{beton} package~\cite{BETON} to do this. The |x-height| (in points) +% for the CMR +% fonts is given in Table~\ref{tab:cmrx}. Note that the CMR design sizes are +% 5--10, 12, and 17.28 points. The other values given are scaled from these +% figures. +% +% \begin{table} +% \centering +% \caption{The x heights of the CMR and \thisfont{} fonts} \label{tab:cmrx} +% \begin{tabular}{ccc} \hline +% Design & CMR & \thisfont \\ +% Size & X Height & X Height \\ \hline +% 5 & 2.14 & 3.00 \\ ^^A CMR skip = 6pt = 2.8 times +% 6 & 2.58 & 3.61 \\ ^^A CMR skip = 7pt = 2.7 times +% 7 & 3.00 & 4.20 \\ ^^A CMR skip = 8pt = 2.7 times +% 8 & 3.44 & 4.81 \\ ^^A CMR skip = 9.5pt = 2.8 times +% 9 & 3.86 & 5.40 \\ ^^A CMR skip = 11pt = 2.8 times +% 10 & 4.31 & 6.03 \\ ^^A CMR skip = 12pt = 2.8 times +% 11 & 4.74 & 6.64 \\ ^^A CMR skip = 13.6pt = 2.8 times +% 12 & 5.17 & 7.24 \\ ^^A CMR skip = 14.5pt = 2.8 times +% 14 & 6.03 & 8.44 \\ ^^A CMR skip = 18pt = 3.0 times +% 17 & 7.44 & 10.41 \\ ^^A CMR skip = 22pt = 3.0 times +% 20 & 8.75 & 12.25 \\ ^^A CMR skip = 25pt = 2.9 times +% 25 & 10.94 & 15.32 \\ ^^A CMR skip = 30pt = 2.7 times +% \hline +% \end{tabular} +% \end{table} +% +% \begin{macro}{\imin@baselineskip@table} +% A table of the normal font sizes and the corresponding baselineskip. +% The distance between baselines for \thisfont{} is over twice +% the |x-height|. ^^A actually 2.5 times to nearest half point +% +% \begin{macrocode} +\newcommand{\imin@baselineskip@table}{% + <\@vpt>7.5% + <\@vipt>9.0% + <\@viipt>10.5% + <\@viiipt>12.0% + <\@ixpt>13.5% + <\@xpt>15.0% + <\@xipt>16.5% + <\@xiipt>18.0% + <\@xivpt>21.0% + <\@xviipt>26.0% + <\@xxpt>30.5% + <\@xxvpt>38.5} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\imin@new@setfontsize} +% This is a macro that replaces the |\@setfontsize| macro which is called by +% the font size changing commands. +% \begin{macrocode} +\newcommand{\imin@new@setfontsize}[3]{% + \edef\@tempa{\def\noexpand\@tempb####1<#2}% + \@tempa>##2<##3\@nil{\def\imin@baselineskip@value{##2}}% + \edef\@tempa{\noexpand\@tempb\imin@baselineskip@table<#2}% + \@tempa><\@nil + \ifx\imin@baselineskip@value\@empty + \def\imin@baselineskip@value{#3}% + \fi + \imin@old@setfontsize{#1}{#2}\imin@baselineskip@value} +% \end{macrocode} +% \end{macro} +% +% We had better give an author a means of using The Computer Modern fonts +% if necessary. +% +% \begin{macro}{\cmrfamily} +% \begin{macro}{\cmssfamily} +% \begin{macro}{\cmttfamily} +% These macros select the Computer Modern Roman, Sans, and Typewriter +% font families in either the T1 or OT1 encodings. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}} +\else + \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcmr} +% Text command for the Computer Modern Roman font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmr}{\cmrfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmss} +% Text command for the Computer Modern Sans font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmss}{\cmssfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmtt} +% Text command for the Computer Modern Typewriter font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmtt}{\cmttfamily} +% \end{macrocode} +% \end{macro} +% +% +% At the start of the document, change the |\@setfontsize| macro and call +% the normal font to implement the change. +% \begin{macrocode} +\AtBeginDocument{% + \let\imin@old@setfontsize=\@setfontsize + \let\@setfontsize=\imin@new@setfontsize} +\AtBeginDocument{\normalsize} +% \end{macrocode} +% +% +% The end of this package. +% \begin{macrocode} +%</uscall> +% \end{macrocode} +% +% +% +% +% +% \Finale +% \PrintIndex +% +\endinput + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + diff --git a/Master/texmf-dist/source/latex/bookhands/inslrmin/inslrmin.ins b/Master/texmf-dist/source/latex/bookhands/inslrmin/inslrmin.ins new file mode 100644 index 00000000000..a02ee5e2706 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/inslrmin/inslrmin.ins @@ -0,0 +1,101 @@ +%% +%% inslrmin.ins +%% Copyright 1999 Peter R. Wilson +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Peter Wilson (CUA) +%% now at: peter.r.wilson@boeing.com +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{inslrmin.ins} +\input docstrip.tex +\preamble + + Copyright 1999 Peter R. Wilson + + This program is provided under the terms of the + LaTeX Project Public License distributed from CTAN + archives in directory macros/latex/base/lppl.txt. + +Author: Peter Wilson (CUA) + now at: peter.r.wilson@boeing.com + +\endpreamble + +\keepsilent + +%%% \Msg{*** Generating the driver file ***} +%%% \generateFile{inslrmin.drv}{t}{\from{inslrmin.dtx}{driver}} + +\Msg{*** Generating the Metafont files ***} + +\usepostamble\empty +\generateFile{imin7.mf}{t}{\from{inslrmin.dtx}{base7}} +\generateFile{imin10.mf}{t}{\from{inslrmin.dtx}{base10}} +\generateFile{imin17.mf}{t}{\from{inslrmin.dtx}{base17}} +\generateFile{iminb7.mf}{t}{\from{inslrmin.dtx}{base7b}} +\generateFile{iminb10.mf}{t}{\from{inslrmin.dtx}{base10b}} +\generateFile{iminb17.mf}{t}{\from{inslrmin.dtx}{base17b}} +\generateFile{iminl.mf}{t}{\from{inslrmin.dtx}{min}} +\generateFile{iminu.mf}{t}{\from{inslrmin.dtx}{maj}} +\generateFile{imintitle.mf}{t}{\from{inslrmin.dtx}{mfd}} +\generateFile{iminpunct.mf}{t}{\from{inslrmin.dtx}{punct}} +\generateFile{iminlig.mf}{t}{\from{inslrmin.dtx}{lig}} +\generateFile{imindig.mf}{t}{\from{inslrmin.dtx}{dig}} + +\Msg{*** Generating the Font Definition files ***} +\usepostamble\defaultpostamble + +\generateFile{ot1imin.fd}{t}{\from{inslrmin.dtx}{fdot1}} +\generateFile{t1imin.fd}{t}{\from{inslrmin.dtx}{fdt1}} + +\Msg{*** Generating the LaTeX2e package files ***} + +\generateFile{inslrmin.sty}{t}{\from{inslrmin.dtx}{usc}} +\generateFile{allimin.sty}{t}{\from{inslrmin.dtx}{uscall}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into directories searched by TeX:} +\Msg{*} +\Msg{* Move these into the font source area:} +\Msg{* \space\space imin7.mf} +\Msg{* \space\space imin10.mf} +\Msg{* \space\space imin17.mf} +\Msg{* \space\space iminb7.mf} +\Msg{* \space\space iminb10.mf} +\Msg{* \space\space iminb17.mf} +\Msg{* \space\space iminl.mf} +\Msg{* \space\space iminu.mf} +\Msg{* \space\space imintitle.mf} +\Msg{* \space\space iminpunct.mf} +\Msg{* \space\space iminlig.mf} +\Msg{* \space\space imindig.mf} +\Msg{*} +\Msg{* Move these into the LaTeX macro area:} +\Msg{* \space\space ot1imin.fd} +\Msg{* \space\space t1imin.fd} +\Msg{* \space\space inslrmin.sty} +\Msg{* \space\space allimin.sty} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{* Process any name.idx file by:} +\Msg{* \space\space\space\space makeindex -s gind.ist name} +\Msg{* Process any name.glo file by:} +\Msg{* \space\space\space\space makeindex -s gglo.ist -o name.gls name.glo} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/bookhands/pgothic/pgothic.dtx b/Master/texmf-dist/source/latex/bookhands/pgothic/pgothic.dtx new file mode 100644 index 00000000000..5e9a6e3bb38 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/pgothic/pgothic.dtx @@ -0,0 +1,5484 @@ +% \iffalse meta-comment +% +% pgothic.dtx +% Copyright 1999 Peter R. Wilson +% +% This program is provided under the terms of the +% LaTeX Project Public License distributed from CTAN +% archives in directory macros/latex/base/lppl.txt. +% +% Author: Peter Wilson (CUA) (now at: peter.r.wilson@boeing.com) +% +% If you do not have the docmfp package (available from CTAN in +% tex-archive/macros/latex/contrib/supported), comment out the +% \usepackage{docmfp} line below and uncomment the line following it. +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{docmfp} +%%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{} +\EnableCrossrefs +\CodelineIndex +%% comment out the next line to show the code +\OnlyDescription +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{pgothic.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{134} +% +% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} +% \DoNotIndex{\@centercr,\@cite} +% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} +% \DoNotIndex{\@input,\@ixpt,\@m} +% \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} +% \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} +% \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} +% \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} +% \DoNotIndex{\advance,\Alph,\alph} +% \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\bullet} +% \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} +% \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} +% \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} +% \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +% \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} +% \DoNotIndex{\fbox} +% \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} +% \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +% \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} +% \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} +% \DoNotIndex{\input} +% \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} +% \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} +% \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +% \DoNotIndex{\NeedsTeXFormat,\newdimen} +% \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} +% \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} +% \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} +% \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +% \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +% \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +% \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} +% \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} +% \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} +% \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} +% \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} +% \DoNotIndex{\viipt,\vipt,\vskip,\vspace} +% \DoNotIndex{\wd,\xiipt,\year,\z@} +% +% \changes{v1.0}{2002/12/30}{First public release} +% +% \def\fileversion{v1.0} +% \def\filedate{2002/12/30} +% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package +% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option +% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file +% \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter +% \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle +% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment +% \newcommand*{\AD}{\textsc{ad}} +% \newcommand*{\thisfont}{Gothic Textura Prescius} +% +% \title{The \Lpack{Gothic Textura Prescius} fonts\thanks{This +% file has version number \fileversion, last revised +% \filedate.}} +% +% \author{% +% Peter Wilson\\ +% Catholic University of America \\ +% Now at \texttt{peter.r.wilson@boeing.com} +% } +% \date{\filedate} +% \maketitle +% \begin{abstract} +% The \Lpack{pgothic} and \Lpack{allpgoth} packages provide a set of +% Metafont \thisfont{} book-hands +% as used +% for manuscripts in the 13th century onwards. This is one in a series +% of manuscript fonts. +% \end{abstract} +% \tableofcontents +% \listoftables +% +% +% +% +% \section{Introduction} +% +% The \Lpack{pgothic} and \Lpack{allpgoth} packages provide a Metafont~\cite{METAFONT} version +% of the \thisfont{} manuscript book-hand that was in use from about the +% thirteenth century~\AD{} onwards. It is part of a project to provide fonts +% covering the major manuscript hands between the first century~\AD{} and +% the invention of printing. The principal resources used in this project +% are listed in the Bibliography. +% +% This manual is typeset according to the conventions of the +% \LaTeX{} \textsc{docstrip} utility which enables the automatic +% extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. +% The \Lpack{docmfp} package is used for documenting the Metafont portions +% of the distribution~\cite{DOCMFP}. +% +% Section~\ref{sec:usc} describes the usage of the package. +% Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} +% and source code for the package is in Section~\ref{sec:code}. +% +% \subsection{Manuscript book-hands} +% +% Before the invention of printing all books were written by hand. The book-hands +% used by the scribes and copyists for the manuscripts changed as time +% went on. Table~\ref{tab:1} lists some of the common book-hands which were used +% between the 1st and 15th centuries. The later book-hands formed the basis of the +% fonts used by the early printers, which in turn form the basis of the printing +% fonts in use today. +% +% The manuscript book-hands were written with a broad nibbed reed or quill +% pen. Among the distinguishing characteristics of a hand, apart from the +% actual shape of the letters, are the angle of the pen (which controls the +% variation between thick and thin strokes) and the height of a letter compared +% to the width of the nib. The lower the ratio of the letter height to nib +% width, the more condensed is the script. The scripts also varied in their +% typical height. +% +% Table~\ref{tab:1} gives an `average' x-height for each +% script, which I obtained by measuring a sample of photographs of +% manuscripts written in the various hands. About a dozen examples +% of each book-hand were measured. This figure should not be taken too +% seriously. +% +% There was not a sharp division between the use of one hand and another. +% Many manuscripts exhibit a variety of hands in the same document. For example, +% the scribe writing in an Uncial hand may have used Roman Rustic letters +% for capitals. Usually the same pen was used for the two different scripts. +% +% Generally speaking, as a hand got older it became more embelished, and +% therefore took longer to write. As this happened a new hand would appear that +% was faster, and which would eventually make the earlier one obsolete. +% +% Many of the book-hands were single-cased; that is, they did not have an +% upper- and lower-case as we do nowadays in Western scripts. On the other +% hand, a script might be majuscule or minuscule. A \textit{majuscule} script +% is one, like our upper-case, where the letters are drawn between two lines +% and are of a uniform height with no ascenders or descenders. +% A \textit{minuscule} script, like our lower-case, is drawn between four lines +% and has ascenders and descenders. +% +% \begin{table} +% \centering +% \caption{The main manuscript book-hands} \label{tab:1} +% \begin{tabular}{lccccc} \hline +% Name & Century & x-height & Height & Pen & Normalised \\ +% & & (mm) & (nib widths) & angle & height \\ \hline +% Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\ +% Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\ +% Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\ +% Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\ +% Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\ +% Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\ +% Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\ +% Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\ +% Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\ +% Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\ +% Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\ +% Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline +% \end{tabular} +% \end{table} +% +% During the period under consideration arabic numerals were effectively +% not used. At the beginning they were unknown and even though some knew +% of them towards the end, the glyphs used for them are not recognisable --- +% to me they look somewhat like cryllic letters --- and each locality +% and time had its own highly individualistic rendering. The general rule +% when using one of these book-hands is to write all numbers using +% roman numerals. +% +% The Roman alphabet consisted of 23 capital letters --- the J, U and W +% were absent. The book-hands initially used both a `u' and a `v' interchangeably +% but by the 10th century the practice had become to use the `v' before a vowel +% and the `u' otherwise. The letter corresponding to the W sound appeared +% in England around the 7th century in +% the form of the runic \textit{wen} character and by about the 11th century +% the `w' chacter was generally used. The `J' is the newest letter of all, not +% appearing until about the mid 16th century. +% +% In the first century punctuation was virtually unknown, and typically +% would not even be any additional space between individual words, never +% mind denoting ends of sentences. Sometimes a dot at mid-height would be +% used as a word seperator, or to mark off the end of a paragraph. Effectively +% a text was a continuous stream of letters. By the time that printing was +% invented, though, all of our modern punctuation marks were being used. +% +% Among all these manuscript hands, the Carolingian minuscule is the +% most important as our modern fonts are based on its letter shapes, and it is +% also at this point in time where the division occured between the black letter +% scripts as used even today in Germany, and the lighter fonts used elesewhere. +% The Rotunda and Humanist minuscule hands were developed in Italy and were +% essentially a rediscovery of the Carolingian minusucle. Guthenberg took the +% Gothic Textura Quadrata script as the model for his types. Later printers, +% such as Nicholas Jenson of Venice, +% took the Humanist scripts as their models. +% +% +% \subsection{The \thisfont{} script} +% +% With the Gothic hands, used from the thirteenth century, the attention of +% the scribes moved from the individual letter to the word. The scripts +% changed to accomodate this interest so the appearance of the letters +% became subordinate to the overall appearance of the words they formed. +% Many of the letters appear to be indistinguishable today but the contemporary +% reading public seemed to have no difficulty. +% +% It was during the heyday of the Gothic scripts that separate capital +% letters were introduced. Also, as a small concession to legibility, +% the lowecase `i' acquired a small mark above it. Ligatures were similar +% to those in Early Gothic. The letter `w' was added to the hand early on +% and `j' started to appear after 1400, providing the full 26 letter alphabet +% for the first time. +% +% The Gothic Textura Prescius is a version of the Gothic scripts that was +% popular in England. Caxton used it as the basis for his printing types. +% +% \section{The \Lpack{pgothic} and \Lpack{allpgoth} packages} \label{sec:usc} +% +% The \thisfont{} font family is called |pgoth|. The font is supplied in both +% OT1 and T1 encodings. +% +% \subsection{The \Lpack{pgothic} package} +% +% This is intended for the occasions when some short pieces of text have +% to be written in \thisfont{} while the majority of the document is in another +% font. The normal baselineskips are used. +% +% \DescribeMacro{\pgothfamily} +% The |\pgothfamily| declaration starts typesetting with the \thisfont{} fonts. +% Use of the \thisfont{} font will continue until either there is another |\...family| +% declaration or the current group (e.g., environment) is closed. +% +% \DescribeMacro{\textpgoth} +% The command |\textpgoth{|\meta{text}|}| will typeset \meta{text} using the +% \thisfont{} fonts. +% +% \subsection{The \Lpack{allpgoth} package} +% +% +% This package is for when the entire document will be typeset with the +% \thisfont{} font. The baselineskips are set to those appropriate to the +% book-hand. +% +% This is a minimalist package. Apart from declaring \thisfont{} to be the +% default font and setting the baselineskips appropriately, it makes no other +% alterations. +% Vertical spacing +% before and after section titles and before and after lists, etc., will be +% too small as the \LaTeX{} design assumes a font comparable in size to +% normal printing fonts, and the book-hand is much taller. +% To capture more of the flavour of the time, all numbers +% should be written using roman numerals. +% The \Lpack{romannum} package~\cite{ROMANNUM} +% can be used so that \LaTeX{} will typeset the numbers that it generates, +% like sectioning or caption numbers, using roman numerals instead of arabic +% digits. +% +% \DescribeMacro{\cmrfamily} +% \DescribeMacro{\textcmr} +% \DescribeMacro{\cmssfamily} +% \DescribeMacro{\textcmss} +% \DescribeMacro{\cmttfamily} +% \DescribeMacro{\textcmtt} +% The |...family| declarations start typesetting with the Computer Modern Roman +% (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer +% Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}| +% commands will typeset \meta{text} in the corresponding Computer Modern font. +% +% The \Lpack{allpgoth} package automatically loads the \Lpack{pgothic} package, +% so its font commands are available if necessary. +% +% \StopEventually{ +% \bibliographystyle{alpha} +% \renewcommand{\refname}{Bibliography} +% \begin{thebibliography}{GMS94} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem[And69]{ANDERSON69} +% Donald M.~Anderson. +% \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}. +% \newblock Holt, Rinehart and Winston, 1969. +% +% \bibitem[Bol95]{BOLOGNA95} +% Giulia Bologna. +% \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}. +% \newblock Crescent Books, 1995. +% +% \bibitem[Day95]{DAY95} +% Lewis F.~Day. +% \newblock {\em Alphabets Old \& New}. +% \newblock (3rd edition originally published by B.~T.~Batsford, 1910) +% \newblock Senate, 1995. +% +% \bibitem[Dro80]{DROGIN80} +% Marc Drogin. +% \newblock {\em Medieval Calligraphy: Its History and Technique}. +% \newblock Allenheld, Osmun \& Co., 1980. +% +% \bibitem[Dru95]{DRUCKER95} +% Johanna Drucker. +% \newblock {\em The Alphabetic Labyrinth}. +% \newblock Thames \& Hudson, 1995. +% +% \bibitem[Fir93]{FIRMAGE93} +% Richard A.~Firmage. +% \newblock {\em The Alphabet Abecedarium}. +% \newblock David R~Goodine, 1993. +% +% \bibitem[Fli98]{LETTRINE} +% Daniel Flipo. +% \newblock {\em The LETTRINE package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1998. +% +% \bibitem[Har95]{HARRIS95} +% David Harris. +% \newblock {\em The Art of Calligraphy}. +% \newblock DK Publishing, 1995. +% +% \bibitem[Jen95]{BETON} +% Frank Jensen. +% \newblock {\em The BETON package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1995. +% +% \bibitem[Joh71]{JOHNSTON75} +% Edward Johnston (ed. Heather Child). +% \newblock {\em Formal Penship and Other Papers}. +% \newblock Penthalic, 1971. +% +% \bibitem[Knu87]{CM} +% Donald E.~Knuth. +% \newblock {\em Computer Modern Typefaces}. +% \newblock Addison-Wesley, 1987. +% +% \bibitem[Knu92]{METAFONT} +% Donald E.~Knuth. +% \newblock {\em The METAFONTbook}. +% \newblock Addison-Wesley, 1992. +% +% \bibitem[GMS94]{GOOSSENS94} +% Michel Goossens, Frank Mittelbach, and Alexander Samarin. +% \newblock {\em The LaTeX Companion}. +% \newblock Addison-Wesley Publishing Company, 1994. +% +% \bibitem[Tho75]{THOMAS75} +% Alan G.~Thomas. +% \newblock {\em Great Books and Book Collectors}. +% \newblock Weidenfield and Nichoson, 1975. +% +% \bibitem[Wil99]{DOCMFP} +% Peter R.~Wilson. +% \newblock {\em The DOCMFP Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \bibitem[Wil99b]{ROMANNUM} +% Peter R.~Wilson. +% \newblock {\em The ROMANNUM Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \end{thebibliography} +% } +% +% \section{The Metafont code} \label{sec:mf} +% +% +% As previously noted, this work is part of a larger project to provide +% fonts covering the main manuscript book-hands. As such, one of the +% aims is to produce a coordinated set of fonts, especially as multiple +% hands might be used in a single document. +% +% Noting that the hands tend to be somewhat larger than the typical 10pt +% size (where the x-height is approximately 1.5mm) used for modern books, +% I have also designed the fonts +% at a larger than normal size, then applied some non-linear factors when reducing +% them down to a 10pt size. +% Further, I have used the height of the Carolingian minuscule as a +% normalising factor when deciding on the absolute height of any particular +% script. The x-height of the Carolingian font is made equal to the +% x-height of the Computer Modern Roman (CMR) font. +% +% Modern fonts are effectively drawn. That is, the outline of the letter is +% drawn carefully and the center is filled with ink. This is shown to good +% effect in the Metafont code for the Computer Modern fonts~\cite{CM}. +% In contrast, the manuscript letters were inked by single pen strokes in +% a calligraphic manner. I have tried to repeat this calligraphic style +% in the Metafont code. +% +% As much as possible I have tried to use parameter values from the +% Computer Modern Roman (CMR) fonts in order to reduce possible +% infelicities if the CM and manuscript fonts are used together. However, +% few of the CMR parameters are applicable to the calligraphic style. +% +% +% \subsection{The parameter file} +% +% We deal with the parameter files first, and start by announcing +% what they are for. The \thisfont{} font comes in three sizes and also as a normal +% and a bold font. +% \begin{macrocode} +%<*base7|base10|base17|base7b|base10b|base17b> +%<base7>%%% PGOTH7.MF Gothic Textura Prescius at 7 point design size. +%<base10>%%% PGOTH10.MF Gothic Textura Prescius at 10 point design size. +%<base17>%%% PGOTH17.MF Gothic Textura Prescius at 17 point design size. +%<base7b>%%% PGOTHB7.MF Gothic Textura Prescius Bold at 7 point design size. +%<base10b>%%% PGOTHB10.MF Gothic Textura Prescius Bold at 10 point design size. +%<base17b>%%% PGOTHB17.MF Gothic Textura Prescius Bold at 17 point design size. +% +% \end{macrocode} +% Parameters from CMR are used as much as possible. We also +% make sure that \Lpack{cmbase} is loaded as well as plain Metafont. +% \begin{macrocode} +if unknown cmbase: input cmbase fi + +%<base7>font_identifier:="PGOTH"; font_size 7pt#; +%<base10>font_identifier:="PGOTH"; font_size 10pt#; +%<base17>font_identifier:="PGOTH"; font_size 17.28pt#; +%<base7b>font_identifier:="PGOTHB"; font_size 7pt#; +%<base10b>font_identifier:="PGOTHB"; font_size 10pt#; +%<base17b>font_identifier:="PGOTHB"; font_size 17.28pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutstretch} +% The CMR scaling for lowercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> jutstretch:=1.19; +%<base10|base10b> jutstretch:=1.152; +%<base17|base17b> jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{stemstretch} +% The CMR scaling for lowercase stem widths wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> stemstretch:=1.50; +%<base10|base10b> stemstretch:=1.31; +%<base17|base17b> stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{caprat} +% The scaling for capitals wrt lowercase. +% (the ratio for CMR10 is 1.59). +% \begin{macrocode} + caprat:=7/5; % ratio of capital height to minuscule height +% \end{macrocode} +% +% \DescribeVariable{cap_jutstretch} +% The CMR scaling for uppercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_jutstretch:=1.3; +%<base10|base10b> cap_jutstretch:=1.2; +%<base17|base17b> cap_jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{cap_stemstretch} +% The CMR scaling for uppercase stem width wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_stemstretch:=1.45; +%<base10|base10b> cap_stemstretch:=1.31; +%<base17|base17b> cap_stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{bfudge} +% Letter width scaling for bold font wrt normal font. We don't really +% need to change this for bold fonts as the letter width is in terms +% of the pen, not the x-height. +% +% \begin{macrocode} +%<base7|base10|base17> bfudge:=1.0; +%<base7b|base10b|base17b> bfudge:=1.0; %% normally 1.2 +% \end{macrocode} +% +% \DescribeVariable{szfudge} +% Width scaling wrt 17pt letter width. +% \begin{macrocode} +%<base7|base7b> szfudge:=1.18; +%<base10|base10b> szfudge:=1.0; +%<base17|base17b> szfudge:=1.0; +% \end{macrocode} +% +% \DescribeVariable{hstretch} +% Horizontal stretching factor wrt 17pt size letter width. +% \begin{macrocode} + hstretch:=szfudge*bfudge; +% \end{macrocode} +% +% \DescribeVariable{carol_height} +% The x-height of the Carolingian gothic font. +% \begin{macrocode} +%<base7|base7b> carol_height#:=108.5/36pt#; +%<base10|base10b> carol_height#:=155/36pt#; +%<base17|base17b> carol_height#:=268/36pt#; +% \end{macrocode} +% +% \DescribeVariable{vstretch} +% The height of this font wrt the Carolingian font. +% \begin{macrocode} + vstretch:=1.3; + +% \end{macrocode} +% +% \DescribeVariable{x_height} +% The x-height of lower case letters. Scaled from the Carolingian font. +% \begin{macrocode} + x_height#:=vstretch*carol_height#; +% \end{macrocode} +% +% \DescribeVariable{u} +% The unit width. The CMR values are used. +% \begin{macrocode} +%<base7> u#:=15.5/36pt#; +%<base10> u#:=20/36pt#; +%<base17> u#:=32.5/36pt#; +%<base7b> u#:=17.9/36pt#; +%<base10b> u#:=23/36pt#; +%<base17b> u#:=37/36pt#; +% \end{macrocode} +% +% \DescribeVariable{width_adj} +% \DescribeVariable{serif_fit} +% \DescribeVariable{cap_serif_fit} +% \DescribeVariable{letter_fit} +% The majority of these parameters and values are constant. +% They are for fine adjustements of characters. The CM values are used. +% \begin{macrocode} + width_adj#:=0pt#; % width adjustment for certain characters + serif_fit#:=0pt#; % extra sidebar near lowercase serifs +%<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs +%<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +%<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs +%<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars +% \end{macrocode} +% +% \DescribeVariable{sb} +% A length used for adjusting the side bearings of characters. +% Normally this is |1/2u| but reduce it by 1/2 for the Gothic. +% \begin{macrocode} +%<base7|base7b> sb#:=1/4u#; % unit for side bearings +%<base10|base10b> sb#:=1/4u#; % unit for side bearings +%<base17|base17b> sb#:=1/4u#; % unit for side bearings + +% \end{macrocode} +% +% \DescribeVariable{cap_sb} +% A length used for adjusting the side bearings of uppercase characters. +% \begin{macrocode} +%<base7|base7b> cap_sb#:=2sb#; % unit for uppercase side bearings +%<base10|base10b> cap_sb#:=2sb#; % unit for uppercase side bearings +%<base17|base17b> cap_sb#:=2sb#; % unit for uppercase side bearings + +% \end{macrocode} +% +% \DescribeVariable{cap_height} +% The height of capital letters. +% \begin{macrocode} +%<base7|base7b> cap_height#:=172.2/36pt#; % height of caps +%<base10|base10b> cap_height#:=246/36pt#; % height of caps +%<base17|base17b> cap_height#:=425/36pt#; % height of caps +% \end{macrocode} +% +% \DescribeVariable{thickfudge} +% The reciprocal of the font height in nib widths. Normal font height +% is 5 nib widths and the bold font height is 4 nib widths. +% \begin{macrocode} +%<base7|base10|base17> thickfudge:=1/5; +%<base7b|base10b|base17b> thickfudge:=1/4; +% \end{macrocode} +% +% \DescribeVariable{thinfudge} +% The nib sharpness. +% \begin{macrocode} +thinfudge:=1/6; +% \end{macrocode} +% +% \DescribeVariable{thick} +% The maximum nib width. +% That is, the width of the thickest line that can be penned. +% \begin{macrocode} +thick#:=stemstretch*thickfudge*x_height#; % max pen breadth +% \end{macrocode} +% +% \DescribeVariable{thin} +% The nib thinness. +% That is, the width of the thinnest line that can be penned. +% \begin{macrocode} +thin#:=thinfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{pangle} +% The pen angle (in degrees). +% \begin{macrocode} +pangle:=45; % pen angle +% \end{macrocode} +% +% \DescribeVariable{stem_width} +% The width of a vertical stem. +% \begin{macrocode} +stem_width#:= thick#*(cosd pangle); +% \end{macrocode} +% +% \DescribeVariable{perpdec} +% \DescribeVariable{angdec} +% The perpendicular shift between pairs of thin decorative lines in capitals +% is |perpdec| and between angled lines is |angdec|. +% \begin{macrocode} +perpdec#:= 3thin#; +angdec#:= perpdec#/(cosd pangle); +% \end{macrocode} +% +% +% \DescribeVariable{ascratio} +% The height of lower case ascenders wrt |x_height|. +% \begin{macrocode} + ascratio:=5/4; +% \end{macrocode} +% +% \DescribeVariable{asc_height} +% The height of lower case ascenders. +% \begin{macrocode} + asc_height#:=ascratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{descratio} +% The depth of lower case descenders wrt |x_height|. +% \begin{macrocode} + descratio:=2/4; +% \end{macrocode} +% +% \DescribeVariable{desc_depth} +% The depth of lower case descenders. +% \begin{macrocode} + desc_depth#:=descratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{body_height} +% The height of the tallest character. +% \begin{macrocode} + body_height#:=caprat*asc_height#; +% \end{macrocode} +% +% \DescribeVariable{body_depth} +% The depth of the lowest character. +% \begin{macrocode} + body_depth#:=caprat*desc_depth#; +% \end{macrocode} +% +% \DescribeVariable{half_height} +% Half the normal letter height. +% \begin{macrocode} + half_height#:=1/2x_height#; % half the height of x height letters + +% \end{macrocode} +% +% \DescribeVariable{side} +% We might be using a square for the character design. +% \begin{macrocode} +side#:=x_height#; +% \end{macrocode} +% +% \DescribeVariable{rule_thickness} +% Thickness of rules (in math symbols). The CMR values are used. +% \begin{macrocode} +%<base7|base7b> rule_thickness#:=.34pt#; +%<base10|base10b> rule_thickness#:=.4pt#; +%<base17|base17b> rule_thickness#:=.6pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutfudge} +% Controls the protrusion of serifs. +% \begin{macrocode} +%%%jutfudge:= 3/4; +jutfudge:= 1/2; +% \end{macrocode} +% +% \DescribeVariable{jut} +% The lowercase serif protrusion. +% \begin{macrocode} +jut#:=jutstretch*jutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{srad} +% |srad| with |0 < srad < 1| controls the serif radius. +% \begin{macrocode} +srad:=0.8; % was 0.5 +% \end{macrocode} +% +% \DescribeVariable{trijut} +% The lowercase triangular serif protrusion. +% \begin{macrocode} +trijut#:=0.75jutstretch*thick#; +% \end{macrocode} +% +% \DescribeVariable{clubjutfudge} +% The fractional protusion of a club serif. +% \begin{macrocode} +clubjutfudge:=1/2; +% \end{macrocode} +% +% \DescribeVariable{clubjut} +% The lowercase club serif protrusion. +% \begin{macrocode} +clubjut#:=jutstretch*clubjutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{wided} +% \DescribeVariable{widedmin} +% Default juts of wide (touching) diamonds. +% \begin{macrocode} +wided:= 0.75; +widedmin := 1.05 - wided; +% \end{macrocode} +% +% \DescribeVariable{narrowd} +% \DescribeVariable{narrowdmin} +% Default juts of narrow (non-touching) diamonds. +% \begin{macrocode} +narrowd:= 0.5; +narrowdmin := 0.7 - narrowd; +% \end{macrocode} +% +% \DescribeVariable{diawd} +% \DescribeVariable{diang} +% Default width and angle of diamonds. +% \begin{macrocode} +diawd := 1.0; +diang := 30; +% \end{macrocode} +% +% \DescribeVariable{fig_height} +% The height of numerals. Make these midway between normal and capital +% letters. +% \begin{macrocode} + fig_height#:=(0.5[1,caprat])*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_width} +% The width of numerals. All numerals are the same width (roughly, an `o'). +% \begin{macrocode} + fig_width#:=hstretch*(4+wided+widedmin)*stem_width#; +% \end{macrocode} +% +% +% +% \DescribeVariable{o} +% Amount of overshoot for curves (as in an `o'). Use CMR values. +% \begin{macrocode} +%<base7|base7b> o#:=5/36pt#; +%<base10|base10b> o#:=8/36pt#; +%<base17|base17b> o#:=10/36pt#; + +% \end{macrocode} +% +% \DescribeVariable{slant} +% |slant| is the amount the font slopes to the right. \\ +% 5 degrees = 9/100; 10 degrees = 11/50. +% \begin{macrocode} +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +%%%%%%slant:= sind 10/cosd 10; %% 10 degree slant + +% \end{macrocode} +% +% \DescribeVariable{monospace} +% We are generating a variable-width font. +% \begin{macrocode} +monospace:=false; % should all characters have the same width? + +% \end{macrocode} +% +% \DescribeVariable{dot_size} +% The size of (punctuation) dots. +% \begin{macrocode} +dot_size#:=5thin#; % size of dots +% \end{macrocode} +% +% \DescribeVariable{comma_width} +% The horizontal width of a comma. +% \begin{macrocode} +comma_width#:=5/4dot_size#; + +% \end{macrocode} +% +% Finally, call the driver file for the font. +% \begin{macrocode} +generate pgothtitle %% switch to the driver file + +% \end{macrocode} +% +% The end of this code section. +% \begin{macrocode} +%</base7|base10|base17|base7b|base10b|base17b> +% \end{macrocode} +% +% +% \subsection{The driver file} +% +% The driver file sets up the font parameters and also contains +% the macros used in the definition of the characters. +% +% \begin{macrocode} +%<*mfd> +% This is PGOTHTITLE.MF for the Gothic Textura Prescius font. +% This makes a short font. +% This file also contains special macros universally needed in the +% font but either not in the cmbase.mf file or modifications of these. +% +% \end{macrocode} +% +% \begin{routine}{makebox} +% This is a new version of the \Lpack{cmbase.mf} |makebox| macro. +% Essentially, as we are only generating a single case font, we don't +% need all the horizontals for the CMR characters. +% +% \begin{macrocode} +% A new version of cmbase.mf makebox macro +def makebox(text rule) = + for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth: + rule((l,y)t_,(r,y)t_); endfor % horizontals + for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals + for x=u*(1+floor(1/u)) step u until r-1: + rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals + if charic<>0: + rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{proofpcbb} +% The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the +% square, and at the bottom and top midpoints, where the point |zS| is at +% position |(xoff,yoff)| in the square. +% \begin{macrocode} + +% A macro to delineate a letter's bounding square in proof mode. +% Point z$ is at (xoff,yoff) in the bounding square. +def proofpcbb(suffix $)(expr xoff, yoff) = +if proofing > 0: + x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner + z$br = (x$bl+side, y$bl); % BRHC + z$tr = (x$bl+side, y$bl+side); % TRHC + z$tl = (x$bl, y$bl+side); % TLHC + z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points + pair hc, vc; + hc = (2u,0); vc = (0,2u); + pickup pensquare scaled 2; + for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc: + draw s-hc--s+hc; + draw s-vc--s+vc; + endfor +fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{pgothic_font_setup} +% This macro contains the set up for the \thisfont{} fonts. +% \begin{macrocode} + +def pgothic_font_setup= % contains special stuff for pgothic fonts + define_pixels(side,half_height,carol_height,comma_width); + define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit, + cap_serif_fit,jut,clubjut,cap_jut,trijut); + define_pixels(fig_width); + define_whole_pixels(letter_fit,sb,cap_sb); + define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height, + desc_depth,body_depth,fig_height); + define_corrected_pixels(o); + define_blacker_pixels(thick,thin); + define_pixels(stem_width); + define_pixels(perpdec,angdec); + let adjust_fit = normal_adjust_fit; +% \end{macrocode} +% \DescribeVariable{stylus} +% The pen for drawing the thinnest lines is |stylus|. +% \begin{macrocode} + pickup pencircle scaled thin; + stylus:=savepen; +% \end{macrocode} +% \DescribeVariable{thickstylus} +% The pen for drawing lines a bit thicker than the thinnest is |thickstylus|. +% \begin{macrocode} + pickup pencircle scaled (1.5thin); + thickstylus:=savepen; +% \end{macrocode} +% \DescribeVariable{quill} +% The normal calligraphic pen is |quill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated pangle; + quill:=savepen; + +% \end{macrocode} +% +% \DescribeVariable{threequarterquill} +% A pen with 3/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 3/4thick yscaled thin rotated pangle; + threequarterquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{halfquill} +% A pen with 1/2 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/2thick yscaled thin rotated pangle; + halfquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{quarterquill} +% A pen with 1/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/4thick yscaled thin rotated pangle; + quarterquill := savepen; + +% \end{macrocode} +% +% +% \begin{macrocode} + numeric pcshiftx#; % x value of LHS of box wrt origin of char box + define_pixels(pcshiftx); + numeric sqxside#; % x size of the square + numeric sqyside#; % y size of the square + define_pixels(sqxside,sqyside); + +enddef; % end of pgothic_font_setup + +% \end{macrocode} +% \end{routine} +% +% +% \DescribeVariable{ductus} +% A boolean to control drawing the ductus (TRUE) or the full letter (FALSE). +% \begin{macrocode} +boolean ductus; +ductus:=false; +% \end{macrocode} +% +% \DescribeVariable{qhor} +% \DescribeVariable{qvert} +% The cosine and sine of the pen angle. +% \begin{macrocode} +numeric qhor, qvert; +qhor:=cosd(pangle); qvert:=sind(pangle); +% \end{macrocode} +% +% \DescribeVariable{pdir} +% The vector corresponding to the pen angle. +% \begin{macrocode} +pair pdir; pdir=dir(pangle); +% \end{macrocode} +% +% \DescribeVariable{ppdir} +% The vector that is perpendicular (anticlockwise) to the pen angle. +% \begin{macrocode} +pair ppdir; ppdir=dir(pangle+90); +% \end{macrocode} +% +% \begin{routine}{draw_upforkstem} +% A macro to draw a vertical stem with a fork at the top. +% |draw_upforkstem(1,2)| uses the current pen to draw a vertical line, whose absolute +% top and bottom are at |z1| and |z2|. The top (|z1|) has a wedge shaped slit. +% \begin{macrocode} + +def draw_upforkstem(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + x$a=x$; top y$a = bot y$; % top of straight stem + draw z$a--z$$; % straight part + z$b = (rt x$, y$); z$c = (x$b, top y$a); + z$d = (lft x$, bot y$a); z$e = (x$d, y$); + pickup stylus; + rt x$cc = x$c; y$cc = y$c; + lft x$bb = x$b; y$bb = y$b; + lft x$dd = x$d; y$dd = y$d; + rt x$ee = x$e; y$ee = y$e; + filldraw z$a--z$bb..z$cc--cycle; % fork + filldraw z$a--z$dd..z$ee--cycle; + pickup oldpen; + labels($a,$b,$c,$d,$e); +enddef; % end of draw_upforkstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_downforkstem} +% A macro to draw a vertical stem with a fork at the bottom. +% |draw_downforkstem(1,2)| uses the current pen to draw a vertical line, whose absolute +% top and bottom are at |z1| and |z2|. The bottom (|z2|) has a wedge shaped slit. +% \begin{macrocode} + +def draw_downforkstem(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + x$$a=x$$; bot y$$a = top y$$; % bottom of straight stem + draw z$--z$$a; % straight part + z$$b = (rt x$$, y$$); z$$c = (x$$b, top y$$a); + z$$d = (lft x$$, bot y$$a); z$$e = (x$$d, y$$); + pickup stylus; + rt x$$cc = x$$c; y$$cc = y$$c; + lft x$$bb = x$$b; y$$bb = y$$b; + lft x$$dd = x$$d; y$$dd = y$$d; + rt x$$ee = x$$e; y$$ee = y$$e; + filldraw z$$a--z$$bb..z$$cc--cycle; % fork + filldraw z$$a--z$$dd..z$$ee--cycle; + pickup oldpen; + labels($$a,$$b,$$c,$$d,$$e); +enddef; % end of draw_downforkstem + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_upcurlstem} +% A macro to draw a vertical stem with a curl to the left at the top. +% |draw_upcurlstem(1,2)| uses the current pen to draw a vertical line, whose absolute +% top and bottom are at |z1| and |z2|. The top (|z1|) has a fancy curl to the left, +% jutting out 3 stem widths. +% \begin{macrocode} + +def draw_upcurlstem(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + path curlp[]; numeric curln[]; + x$a=x$; top y$a = y$; % top of straight stem + draw z$a--z$$; % straight part + curln1 := rt x$a - lft x$a; % stem width + x$b = x$a - 4/2curln1; y$b = y$a; % left jut + curlp1 := z$a{-pdir}..{left}z$b; + draw curlp1; + + x$c = x$a-3curln1; top y$c = bot y$a-1/2curln1; + x$f = x$b; y$f = 1/3[y$c,y$b]; + x$tb = rt x$b; y$tb = top y$b; + x$bb = lft x$b; y$bb = bot y$b; + curlp2 := z$tb--z$bb..{down}z$c..{ppdir}z$f; + pickup stylus; + draw curlp2; + pickup oldpen; + labels($a,$b,$c,$d,$e,$f); +enddef; % end of draw_upcurlstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_updiamondstem} +% A macro to draw a vertical stem with a diamond at the top. +% |draw_updiamondstem(1,2,fr,minfr,wd,ang)| uses the quill pen to draw a vertical line, +% whose absolute +% top and bottom are at |z1| and |z2|. The top (|z1|) has a leftward diamond, whose +% left jut is |fr| times the width of the stem, right jut is |minfr*stem_width|, width +% is |wd*stem_width| and angle above the horizontal is |ang|. +% \begin{macrocode} + +def draw_updiamondstem(suffix $, $$)(expr fr, minfr, wd, phi)= + pen oldpen; oldpen:=currentpen; + numeric sj; sj := fr*stem_width; % jut distance + numeric sjr; sjr := minfr*stem_width; % right jut distance + numeric jw; jw := wd*stem_width; % jut width + %% $b is bottom left of jut, on LHS of stem + %% $c is leftmost point on jut + %% $d is topmost point on jut + %% $g is topmost point on stem + %% $e is on exprapolation of line from $d through $g + %% i.e., the rightmost point on jut + %% $f is on RHS of stem + pickup quill; + x$b = lft x$; + x$c = x$b - sj; y$c = y$ - jw*(cosd phi); % $c done + y$b = y$c - sj*(sind phi); % $b done + x$d = x$c + jw*(sind phi); y$d = y$; % $d done + x$g = x$f = rt x$; + y$g = y$ - (x$g-x$d)*(sind phi)/(cosd phi); % $g done + x$a = x$; top y$a = y$g; % $a done + x$e = x$g + sjr; z$e = whatever[z$d,z$g]; % $e done + z$f-z$e = whatever*(z$c-z$d); % $f done + x$h = x$b; y$h = bot y$a; + draw z$a--z$$; % straight part + pickup stylus; + lft x$cc = x$c; y$cc = y$c; + x$dd = x$d; top y$dd = y$d; + rt x$ee = x$e; bot y$ee=y$e; + filldraw z$b--z$cc--z$dd--z$ee--z$f--cycle; % diamond + if y$b > y$h: + lft x$hh = x$h; y$hh=y$h; + filldraw z$b--z$hh--z$g--cycle; + fi + pickup oldpen; + labels($a,$b,$c,$d,$e,$f); +enddef; % end of draw_updiamondstem + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_downdiamondstem} +% A macro to draw a vertical stem with a diamond at the bottom. +% |draw_downdiamondstem(1,2,fr,minfr,wd,ang)| uses the quill pen to draw a vertical line, +% whose absolute +% top and bottom are at |z1| and |z2|. The bottom (|z2|) has a rightward diamond, whose +% right jut is |fr| times the width of the stem, left jut is |minfr*stem_width|, +% width is |wd*stem_width| and is at |ang| degrees below the horizontal. +% \begin{macrocode} + +def draw_downdiamondstem(suffix $, $$)(expr fr, minfr, wd, phi)= + pen oldpen; oldpen:=currentpen; + numeric sj; sj := fr*stem_width; % (left) jut distance + numeric sjr; sjr := minfr*stem_width;; % right jut distance + numeric jw; jw := wd*stem_width; % jut width + %% $$b is top right of jut, on RHS of stem + %% $$c is rightmost point on jut + %% $$d is bottommost point on jut + %% $$g is bottommost point on stem + %% $$e is on exprapolation of line from $d through $g + %% i.e., the leftmost point on jut + %% $$f is on LHS of stem + pickup quill; + x$$b = rt x$$; + x$$c = x$$b + sj; y$$c = y$$ + jw*(cosd phi); % $$c done + y$$b = y$$c + sj*(sind phi); % $$b done + x$$d = x$$c - jw*(sind phi); y$$d = y$$; % $$d done + x$$g = x$$f = lft x$$; + y$$g = y$$ + (x$$d-x$$g)*(sind phi)/(cosd phi); % $$g done + x$$a = x$$; bot y$$a = y$$g; % $$a done + x$$e = x$$g - sjr; z$$e = whatever[z$$d,z$$g]; % $$e done + z$$f-z$$e = whatever*(z$$c-z$$d); % $$f done + x$$h = x$$b; y$$h = top y$$a; + draw z$--z$$a; % straight part + pickup stylus; + rt x$$cc = x$$c; y$$cc=y$$c; + x$$dd = x$$d; bot y$$dd = y$$d; + lft x$$ee = x$$e; top y$$ee = y$$e; + filldraw z$$b--z$$cc--z$$dd--z$$ee--z$$f--cycle; % diamond + if y$$b < y$$h: + rt x$$hh = x$$h; y$$hh=y$$h; + filldraw z$$b--z$$hh--z$$g--cycle; + fi + pickup oldpen; + labels($$a,$$b,$$c,$$d,$$e,$$f); +enddef; % end of draw_downdiamondstem + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flat_head} +% A macro to draw a squared off top of a vertical stroke. +% |draw_flat_head(1)| draws at the top of the stem ending at |z1|. +% \begin{macrocode} + +def draw_flat_head(suffix $)= + pen oldpen; oldpen:=currentpen; +%% pickup quill; + x$bl'' = lft x$; y$bl'' = bot y$; + x$tr'' = rt x$; y$tr'' = top y$; + pickup stylus; + lft x$blfh = x$bl''; y$blfh = y$bl''; + rt x$trfh = x$tr''; top y$trfh = y$tr''; + x$tlfh = x$blfh; y$tlfh = y$trfh; + filldraw z$blfh--z$tlfh--z$trfh--cycle; + pickup oldpen; + labels($tlfh); +enddef; % end of draw_flat_head +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_flat_foot} +% A macro to draw a squared off bottom of a vertical stroke. +% |draw_flat_foot(1)| draws at the bottom of the stem ending at |z1|. +% \begin{macrocode} + +def draw_flat_foot(suffix $)= + pen oldpen; oldpen:=currentpen; +%% pickup quill; + x$bl'' = lft x$; y$bl'' = bot y$; + x$tr'' = rt x$; y$tr'' = top y$; + pickup stylus; + lft x$blff = x$bl''; bot y$blff = y$bl''; + rt x$trff = x$tr''; y$trff = y$tr''; + x$brff = x$trff; y$brff = y$blff; + filldraw z$blff--z$trff--z$brff--cycle; + pickup oldpen; + labels($brff); +enddef; % end of draw_flat_foot +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{draw_serif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_serif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; + z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + top_serif:=false; + z$c=z$b shifted (bjut*pdir); + fi +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_serif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_roundserif} +% The |draw_serif| routine can leave a bump at the end of the stem. +% The |draw_roundserif| routine, which takes the same arguments, +% is meant to eliminate the bump. +% \begin{macrocode} + +def draw_roundserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); + undraw z$--z$a; +enddef; % end of draw_roundserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flatserif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. This produces a serif like |draw_serif| except +% that one side of the seerif is flat. +% \begin{macrocode} + +def draw_flatserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; +%%% z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-jut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (jut*pdir); + fi + z$b = fr[z$,z$c]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$a--z$; + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_flatserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_clubserif} +% A macro to draw a clubbed serif. |draw_clubserif(1,2,f)| uses the current +% pen to +% draw a clubbed serif of extent |clubjut| at |z1| to the left of the line +% from |z2| +% to |z1|. The serif matches |z1| like the flatserif does and ends at the +% point |f[z1,z2]|. +% \begin{macrocode} + +def draw_clubserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| controls the length of the serif. +% \begin{macrocode} +%% beta=1-fr; + ajut=clubjut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem, |fr| between |$| and |$$|. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); +%% vec2=ajut*vec1; +%% z$a=z$ shifted vec2; + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-clubjut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (clubjut*pdir); + fi + z$a = fr[z$,z$$]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$c..z$a{vec1}; + labels($a,$b,$c); +enddef; % end of draw_clubserif + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{draw_triserif} +% A macro to draw a triangular top left serif. +% |draw_triserif(1,tj)| draws a serif at |z1| with its leftmost x +% value at |x1-tj|, where it is assumed that the +% top point on the stem is at |z1| and the stem was drawn with |quill|. +% \begin{macrocode} + +def draw_triserif(suffix $)(expr tj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$ts1'=lft x$; y$ts1'=bot y$; + pickup stylus; + lft x$ts1=x$ts1'; bot y$ts1=y$ts1'; + x$ts2=x$ts1-tj; z$ts2=whatever[z$,z$ts1]; + x$ts3=x$ts1; y$ts3=y$ts2-tj; + pickup stylus; +%% filldraw z$ts1--z$ts2--z$ts3--cycle; + filldraw z$--z$ts2--z$ts3--cycle; + pickup oldpen; + labels($ts1,$ts2,$ts3); +enddef; % end of draw_triserif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_istem} +% A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs +% are of extent |jut|. There is a top left and bottom right serif. +% The serif radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_istem(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % top serif + draw_serif($$, $, fr); % bottom serif + draw z$a--z$$a; % the stem +enddef; % end of draw_istem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tstem} +% A macro to draw the shape of the stem of a `t'. |draw_tstem(1,2,f)| draws a +% stem whose +% top is at |z1| and bottom at |z2| with a right serif at |z2|. The radius +% is controlled by |f|, with $0 < f < 1$. +% It draws with the current pen and the serif is of extent |jut|. +% NOTE: for the PGOTH font, just the stem is drawn --- no serif! +% \begin{macrocode} + +def draw_tstem(suffix $, $$)(expr fr)= +%% draw_serif($$, $, fr); % the serif +%% draw z$--z$$a; % the stem + draw z$--z$$; +enddef; % end of draw_tstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tlserif} +% A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serif +% is of extent |jut|. It also draws the stem to the point |z2|. The serif +% radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_tlserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % the serif + draw z$a--z$$; % the stem +enddef; % end of draw_tlserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flick} +% A macro to draw a flick (like an eyebrow). +% |draw_flick(1,rise,fall,fjut)| draws a stroke starting at |z1| rising up by +% |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is +% |fjut| to the right of |z1|. It is drawn with the current pen. +% \begin{macrocode} + +def draw_flick(suffix $)(expr rise, fall, fjut)= +% \end{macrocode} +% The points |z$a| and |z$b|, together with |z$| make up three points on the +% ductus. +% \begin{macrocode} + rt x$b = x1+fjut; top y$b=y$-fall; + x$a=0.5[x$,x$b]; top y$a=y$+rise; +% \end{macrocode} +% Draw the part, and finish off. +% \begin{macrocode} + draw z$..z$a..z$b; + labels($a,$b); +enddef; % end of draw_flick + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_wave} +% A macro to draw a (horizontal) stroke with a flick at each end +% (down at the left and up at the right). |draw_wave(1,2,f)| uses the current +% pen to draw from |z1wl| to |z1wr|, where |x1wl=x1|, |y1wl=y1-f|, and +% |x1wr=x2|, |y1wr=y2+f|, with |z1| assumed to be at the left of |z2|. +% \begin{macrocode} + +def draw_wave(suffix $,$$)(expr f)= + x$wl=x$; y$wl=y$-f; + x$wr=x$$; y$wr=y$$+f; + z$wc=0.5[z$wl,z$wr]; + draw z$wl{pdir}..z$wc{right}..{pdir}z$wr; + labels($wl,$wc,$wr); +enddef; % end of draw_wave +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tail} +% A macro to draw a tail at the bottom of a (vertical) stem. +% |draw_tail(1,fjut)| draws a tail at the bottom of the stem which ends at |z1|. +% The depth is controlled by the |desc_depth| value and the jut by |fjut|. +% \begin{macrocode} + +def draw_tail(suffix $)(expr fj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$tl' = lft x$; y$tl=bot y$; + pickup stylus; + lft x$tl=x$tl'; + x$tb=x$tl-fj; bot y$tb=y$tl-1/2desc_depth; + filldraw z${down}..{-pdir}z$tb & z$tb{pdir}..{up}z$tl--cycle; + pickup oldpen; + labels($tb,$tl); +enddef; % end of draw_tail +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_triangle} +% A macro to draw a downward pointing equilateral triangle. +% |draw_triangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_triangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$-0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_triangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_utriangle} +% A macro to draw an upward pointing equilateral triangle. +% |draw_utriangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_utriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$+0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_utriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rtriangle} +% A macro to draw a downward pointing right angled triangle. +% |draw_rtriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rtriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$-sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rtriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rutriangle} +% A macro to draw an upward pointing right angled triangle. +% |draw_rutriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rutriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$+sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rutriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_fork} +% A macro to draw a forked line. +% |draw_fork(1,2,sz)| draws a graduated line from |z1| to |z2| with a forked +% end of size |sz|. +% \begin{macrocode} + +def draw_fork(suffix $, $$)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$f1'=lft x$; y$f1'=bot y$; + x$f3'=rt x$; y$f3'=top y$; + pickup stylus; + lft x$f1=x$f1'; bot y$f1=y$f1'; + rt x$f3=x$f3'; y$f3-y$=2*(y$-y$f1); + rt x$f2=x$$-sz; bot y$f2=y$$; + rt x$f4= rt x$f5=x$$; + bot y$f5=y$$-sz; top y$f4=y$$+1/2sz; + filldraw z$f1--z$f2--z$f3--cycle; % the line + draw z$f2{right}..z$f4; % upper fork + draw z$f2{right}..z$f5; % lower fork + pickup oldpen; + labels($f1,$f2,$f3,$f4,$f5); +enddef; % end of draw_fork +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_urswish} +% A macro to draw a line up and to the right with an under curl at the end. +% |draw_urswish(1,2)| draws from |z1| towards |z2|, which is the max upper right +% of a bounding box, where the curl is. +% \begin{macrocode} + +def draw_urswish(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + pickup quill; + rt x$$s1=x$$-thick; top y$$s1=y$$; + rt x$$s2=x$$; +%% x$$s3=x$$-thick; + lft x$$s3=x$$s1; + bot y$$s3=y$$-thick; y$$s2=0.5[y$$s1,y$$s3]; +%% draw z$---z$$s1{right}..z$$s2{down}..{-pdir}z$$s3; + draw z$..z$$s1{pdir}..z$$s2{down}; + labels($$s1,$$s2,$$s3); +enddef; % end of draw_urswish +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{bowl_stem} +% Calculate where a bowl should meet a stem so that the pen is moving in the +% pen direction. +% |bowl_stem(1,2)| calculates the point |z1i|, where |z1| is on the bowl and +% there is a vertical line at |x2|. +% +% \begin{macrocode} + +def bowl_stem(suffix $, $$)= + x$'=0.5[x$,x$$]; y$'=y$; % the mid-point + z$''=z$' shifted (thick*pdir); + x$i=x$$; z$i=whatever[z$',z$'']; + labels($',$i); +enddef; % end of bowl_stem +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_clubbase} +% Draw a clubbed bottom of a vertical stem for the PGOTH font. +% |draw_clubbase(1, 2, st, left, right)| draws from |st[z2,z1]| to |z2|. +% At |z2| the pen +% is shifted |left| fraction of the pen width and |right| fraction of the +% pen width, both in the direction of the pen angle. Pen draws smoothly the +% path |z1|, |left|, |right|, |z1|. +% \begin{macrocode} + +% draw clubbed bottom of vertical stem for TGOTH font. +def draw_clubbase(suffix $, $$)(expr st, lft, rt)= + z$$l = z$$ shifted (lft*thick*(-pdir)); + z$$r = z$$ shifted (rt*thick*(pdir)); + z$$t = st[z$$,z$]; + draw z$$t{z$$-z$}..z$$l--z$$r..{z$-z$$}z$$t; + labels($$t,$$l,$$r); +enddef; % end of draw_clubbase + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pdot} +% A macro to draw a period dot. +% |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|. +% \begin{macrocode} + +def draw_pdot(suffix $)(expr sz)= +% \end{macrocode} +% Draw a square rotated 45 degrees. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$ shifted (0.5sz*up); + z$u = z$s shifted (sz*right); + z$v = z$t shifted (sz*down); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pdot + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pcomma} +% A macro to draw a period comma. +% |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. The pen is |stylus|. +% \begin{macrocode} + +def draw_pcomma(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping back and down +% for a total width of |ar| and deptrh of |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s-ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu--z$uv--z$vu--z$v--z$sv--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pcomma + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_plq} +% A macro to draw a period left quote. +% |draw_pcomma(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. +% \begin{macrocode} + +def draw_plq(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping forward and down +% for a total width of |ar| and depth |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s+ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu--z$uv--z$vu--z$v--z$sv--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_plq + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{offsetbowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for a non-centered letter `o'. |offsetbowl($, sx, sy, fx, fy)| +% calculates the paths for an `o' +% enclosed in a rectangle size |sx| by |sy| with its bottom lefthand corner +% located at |z$|, where the center of the o is at |(fx*sx, fy*sy)| in the +% bounding rectangle. +% +% Two construction paths, namely |obfirst| and |obsecond| are also +% available. They should be identical. +% +% All paths have points listed in a clockwise direction, starting with +% |z$nh| or |z$minl| as appropriate. +% +% |offsetbowl($, sx, sy, 1/2, 1/2)| gives the same results as |obowl($, sx, sy)|. +% \begin{macrocode} + +path obouter, obinner, obfirst, obsecond; +def offsetbowl(suffix $)(expr sx, sy, fx, fy)= + numeric inx, iny, cx, cy; + pair pt[]; + path pth[]; + inx := 1/2thick*cosd(pangle); iny := 1/2thick*sind(pangle); + cx := x$+fx*sx; cy := y$+fy*sy; + z$obc = (cx,cy); +% \end{macrocode} +% Calulate points on the centre path of the pen. These are offset by |inx| +% from the rectangles vertical sides and by |iny| from the horizontal sides. +% If the pen is parallel to a side, offset the point by half the pen's +% dimension. First do the West, East, North and South points. +% \begin{macrocode} + if pangle = 90: + z$wt=(x$+1/2thin, cy); + z$et=(x$+sx-1/2thin, cy); + else: + z$wt=(x$+inx, cy); + z$et=(x$+sx-inx, cy); + penpos$wt(thick,pangle); + penpos$et(thick,pangle); + fi + if pangle = 0: + z$nh=(cx, y$+sy-1/2thin); + z$sh=(cx, y$+1/2thin); + else: + z$nh=(cx, y$+sy-iny); + z$sh=(cx, y$+iny); + penpos$nh(thick,pangle); + penpos$sh(thick,pangle); + fi + obfirst := z$nh{right}..z$et{down}..z$sh{left}..z$wt{up}..cycle; +% \end{macrocode} +% Now calculate the points on the path |obfirst| where the pen will +% draw the min width lines (i.e., the points where the pen will be +% moving parallel to |pangle|). +% \begin{macrocode} + if pangle = 90: + z$minl = z$wt; z$maxr = z$nh; z$minr = z$et; z$maxl = z$sh; + else: + if pangle = 0: + z$minl = z$nh; z$maxr = z$et; z$minr = z$sh; z$maxl = z$wt; + else: + z$minl = directionpoint dir(pangle) of obfirst; + z$minr = directionpoint -dir(pangle) of obfirst; +% \end{macrocode} +% The max points are roughly where the inner and outer diverge +% the most. These are simple for 0 and 90 degree pens and have +% been calculated above. It's not so simple for intermediate +% angles. For a reasonable looking result, we pick the max +% points to be halfway between the min points. This involves +% calculating some angles, paths and intersections. +% \begin{macrocode} + pt1 := z$minr - z$minl; % direction + pt2 := (- ypart pt1, xpart pt1); % perpendicular + pt3 := 1/2[z$minl, z$minr]; + pt4 := pt3 shifted pt2; + pt5 := pt3 shifted -pt2; + pth1 := pt3--pt4; + pth2 := pt3--pt5; + z$maxr = pth1 intersectionpoint obfirst; + z$maxl = pth2 intersectionpoint obfirst; + \fi + \fi +% \end{macrocode} +% Place the pen at each of these points to get the outer and inner points. +% \begin{macrocode} + penpos$minl(thin,pangle+90); + penpos$maxr(thick,pangle); + penpos$minr(thin,pangle+90); + penpos$maxl(thick,pangle); +% \end{macrocode} +% Finally, the outer and inner paths. +% \begin{macrocode} + obsecond := z$minl..z$maxr..z$minr..z$maxl..cycle; + z$minlo = z$minl.r; z$maxro = z$maxr.r; + z$minro = z$minr.l; z$maxlo = z$maxl.l; + obouter := z$minlo{dir(pangle)}...z$maxro...z$minro{-dir(pangle)}...z$maxlo...cycle; + z$minli = z$minl.l; z$maxri = z$maxr.l; + z$minri = z$minr.r; z$maxli = z$maxl.r; + obinner := z$minli...z$maxri...z$minri...z$maxli...cycle; + labels($obc, $nh, $et, $sh, $wt); + labels($minl, $maxr, $minr, $maxl); + labels($minlo, $maxro, $minro, $maxlo); + labels($minli, $maxri, $minri, $maxli); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{obowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for the letter `o'. |obowl($, sx, sy)| calculates the paths for an `o' +% centered and enclosed in a rectangle size |sx| by |sy| with its bottom +% lefthand corner located at |z$|. +% \begin{macrocode} + +def obowl(suffix $)(expr sx, sy)= + offsetbowl($, sx, sy, 1/2, 1/2); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{scalarprod} +% |v scalarprod w| calulates the scalar product between the +% two vectors |v| and |w|. +% \begin{macrocode} + +primarydef v scalarprod w = + (xpart v * ypart w - ypart v * xpart w) +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{tangentpoint} +% |tangentpoint($, path)| calculates the point |z$tan| on the |path| +% so that |z$tan--z$| is tangent to the path. It uses a binary search +% to find a point on the path such that the path direction is +% (anti-) parallel to the dirction from that point to the given point. +% \begin{macrocode} + +def tangentpoint(suffix $)(expr pth)= + pair vecll, veclr, veclm; % "tangent" line directions + numeric pl, pr, pm; % path parameter values + pair vecpl, vecpr, vecpm; % path directions + pair ptl, ptr, ptm; % path points + numeric sl, sr, sm; % scalar products of path/line directions + numeric stpsize; % size of current binary step + numeric tantol; % tolerance + boolean wtest; % a boolean + + tantol := eps; +% \end{macrocode} +% Initialise using the left right and middle points on the path. +% \begin{macrocode} + pl:=0; pr:=length pth; pm:=0.5(pl+pr); stpsize:=pr-pl; + ptl := point pl of pth; + ptm := point pm of pth; + ptr := point pr of pth; +% \end{macrocode} +% Now the various vectors, and make sure they are unit vectors to +% have a consistent measure scale when we take the scalar products. +% \begin{macrocode} + vecll := unitvector (z$-ptl); + veclm := unitvector (z$-ptm); + veclr := unitvector (z$-ptr); + vecpl := unitvector (direction pl of pth); + vecpm := unitvector (direction pm of pth); + vecpr := unitvector (direction pr of pth); + sl := vecll scalarprod vecpl; + sm := veclm scalarprod vecpm; + sr := veclr scalarprod vecpr; +% \end{macrocode} +% We stop if any of the points is the tangent point, or if the step +% size is too small, or if the signs of the left and right scalar +% products are the same. +% \begin{macrocode} + wtest := (stpsize < tantol) or (sl*sr > 0) or + (abs sl < tantol) or (abs sm < tantol) or (abs sr < tantol); + if wtest: + if (stpsize < tantol): + z$tan=(0,0); + errmessage("No tangent; path too short"); + else: + if (sl*sr > 0): + z$tan=(0,0); + errmessage("No tangent; end products have the same sign"); + else: + if (abs sl < tantol): + z$tan=ptl; + else: + if (abs sm < tantol): + z$tan=ptm; + else: + z$tan=ptr; + fi + fi + fi + fi + else: +% \end{macrocode} +% There should be a tangent and we iterate to find it, using +% bisection. If there is one to be found it will be at the +% current middle point. The tangent point will be somewhere +% between the two points that lead to opposite signed scalar +% products. +% \begin{macrocode} + forever: + if (sl*sm < 0): % opposite signs, look between pl & pm + pr:=pm; pm:=0.5(pr+pl); + vecpr := vecpm; veclr := veclm; sr:=sm; + else: + pl:=pm; pm:=0.5(pr+pl); + vecpl:=vecpm; vecll:=veclm; sl:=sm; + fi + stpsize:=pr-pl; + ptm := point pm of pth; + veclm := unitvector (z$-ptm); + vecpm := unitvector (direction pm of pth); + sm := veclm scalarprod vecpm; +% \end{macrocode} +% We stop the iteration if the step size is too small or the +% middle point is the tangent point. In either case, the +% middle point is the best guess that can be made. +% \begin{macrocode} + wtest := (stpsize < tantol) or (abs sm < tantol); + if wtest: + if (abs sm < tantol): + z$tan = ptm; + else: + z$tan = ptm; +%%%%%% errmessage("Warning: tangent approximated"); + fi + fi + exitif wtest; + endfor + fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% Set the mode and font setup. +% \begin{macrocode} + +font_coding_scheme:="ASCII minuscules and punctuation"; +mode_setup; +pgothic_font_setup; + +% \end{macrocode} +% +% +% We generate letters, together with some punctuation and +% analphabetics. +% \begin{macrocode} + +input pgothl; % lower case +input pgothu; % capitals +input pgothpunct; % punctuation +input pgothlig; % the several dashes +input pgothdig; % arabic digits + +% \end{macrocode} +% +% Set up the spacings, stretches and shrinks. +% +% \begin{macrocode} + +font_slant slant; font_x_height x_height#; +if monospace: + font_normal_space 2vstretch*stem_width#; % no stretching or shrinking + font_quad vstretch*18u#; + font_extra_space vstretch*9u#; +else: + font_normal_space 2vstretch*stem_width#+2letter_fit#; + font_normal_stretch vstretch*3u#; font_normal_shrink vstretch*2u#; + font_quad vstretch*18u#+4letter_fit#; + font_extra_space vstretch*2u#; + +% \end{macrocode} +% +% Finally, do the ligtables, but I don't think they are needed (yet?). +% +% \begin{macrocode} + +fi + +bye. + + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + kks#:=-4u#; kkx#:=-1.5u#; kkj#:=-2u#; kkr#:=-5u#; kkrs#:=-2u#; kkrl#:=-8u#; + ligtable "s": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "S": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "x": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "X": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "a": "A": + "b": "B": + "c": "C": + "d": "D": + "e": "E": + "h": "H": + "i": "I": + "k": "K": + "l": "L": + "m": "M": + "n": "N": + "o": "O": + "p": "P": + "t": "T": + "u": "U": + "v": "V": + "w": "W": + "z": "Z": + "j" kern kkj#, "J" kern kkj#; + + ligtable "r": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + ligtable "R": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + +fi + +bye. + +%</mfd> +% \end{macrocode} +% +% \subsection{The code for normal letters} +% +% The following code is for the lower case characters. +% +% \begin{macrocode} +%<*min> +% PGOTHL.MF Program file for Gothic Textura Prescius lower case +% + +% \end{macrocode} +% +% +% \begin{routine}{a} +% The letter `a'. +% \begin{macrocode} +cmchar "PGOTH letter a"; +beginchar("a", 2sb#+hstretch*((3+widedmin+wided)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup quill; +%% left hand +lft x1 = pcshiftx + widedmin*stem_width; y1 = 1/2h; +x2 = x1; y2 = 0; +draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); +%% right stem +rt x3 = w - pcshiftx - wided*stem_width; y3=h; +x4=x3; bot y4=0; +z34=1/2[z3,z4]; +draw_updiamondstem(3,34,1.0,0.1,diawd,diang); +%draw_downdiamondstem(34,4,wided,widedmin,diawd,diang); +draw z34--z4; draw_flat_foot(4); +%% swirl +x11=rt x1; y11 = top y1; +pickup stylus; +draw z3d--z3c..{-ppdir}z11; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +endchar; % end "a" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{b} +% The letter `b'. +% \begin{macrocode} +cmchar "PGOTH letter b"; +beginchar("b", 2sb#+hstretch*((3 + widedmin + narrowdmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=h/ascratio; % top of bowl +%%ductus:=true; +lft x1 = pcshiftx + widedmin*st; y1=h; +x2 = x1; y2=0; +z3=1/2[z1,z2]; +draw_upforkstem(1,3); +draw_downdiamondstem(3,2,1.0,widedmin,diawd,diang); +lft x6 = x2c; bot y6 = y2c; +x4 = x6; y4=n2; +draw_updiamondstem(4,6,narrowd,narrowdmin,diawd,diang); +x7 = x1; z7 = whatever[z4d,z4c]; +pickup stylus; +draw z4d--z7; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "b" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{c} +% The letter `c'. +% \begin{macrocode} +cmchar "PGOTH letter c"; +beginchar("c", 2sb#+hstretch*((3+wided)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; +st := stem_width; +pcshiftx := sb; +pickup quill; +%% left +lft x1 = pcshiftx+wided*st; y1 = 3/4h; +x2 = x1; y2 = 0; +draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); +%% top +lft x3 = rt x1; bot y3 = top y1; +rt x4 = w - pcshiftx; +z3 - z4 = -whatever*ppdir; +draw z3--z4; +z11-z2c = z2c - z2d; +pickup stylus; +draw z2d--z11; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "c" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{d} +% The letter `d'. +% \begin{macrocode} +cmchar "PGOTH letter d"; +beginchar("d", 2sb#+hstretch*((3+widedmin+narrowdmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := sb; +pickup quill; +n1 = h/ascratio; % x-height +%% left +n2 := st*(cosd diang); +lft x1 = pcshiftx + widedmin*st; top y1 = 12/16n1; +x2=x1; y2=0; +draw_downdiamondstem(1,2, 1.0, widedmin, diawd,diang); +%% right +rt x3 = w-pcshiftx-narrowdmin*st; y3=h; +x4 = x3; bot y4 = y2c; +draw_updiamondstem(3,4, 2.0, narrowdmin, diawd,diang); +x31 = lft x1; y31 = bot y1; +x32 = rt x1; y32 = top y1; +z33 = whatever[z31,z32] = whatever[z3e,z3c]; +pickup stylus; +draw z31--z33; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "d" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{e} +% The letter `e'. +% \begin{macrocode} +cmchar "PGOTH letter e"; +beginchar("e", 2sb#+hstretch*((3+wided)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; +st := stem_width; +path pth[]; +pickup quill; +%% left +lft x1 = pcshiftx+wided*st; y1 = 3/4h; +x2 = x1; y2 = 0; +draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); +%% top +lft x3 = rt x1; bot y3 = top y1; +rt x4 = w - pcshiftx; +z3 - z4 = -whatever*ppdir; +draw z3--z4; +x5 = x1; +z4-z5 = whatever*pdir; +pickup stylus; +draw z4--z5; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,17,27,34,70,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{f} +% The letter `f'. +% \begin{macrocode} +cmchar "PGOTH letter f"; +beginchar("f", 2sb#+hstretch*((3+widedmin)*stem_width#), + (asc_height#), 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +pcshiftx := sb; +pickup quill; +n1 := h/ascratio; % x-height +%% stem +lft x1=lft x2=pcshiftx+widedmin*st; y2=0; top y1 = h - (top y2 - bot y2); +%draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); +draw z1--z2; draw_flat_foot(2); +%% top bar +lft x3 = rt x1; rt x5 = w-pcshiftx; bot y3 = top y1; y5=y3; +draw z3--z5; +%% middle bar +lft x7 = pcshiftx; rt x9 = x5; +y7 = y9 = 10/16h; +draw z7--z9; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,14,15,16,100); +endchar; % end "f" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{g} +% The letter `g'. +% \begin{macrocode} +cmchar "PGOTH letter g"; +beginchar("g", 2sb#+hstretch*((4)*stem_width#), + x_height#, desc_depth#); +adjust_fit(0,0); +path pth[]; +pair vec[]; +numeric n[]; +numeric st; st := stem_width; +pcshiftx := sb; +pickup quill; +%% left +lft x1 = pcshiftx; +x2 = x1; bot y2 = 0; top y1 = h - (top y2 - bot y2); +draw z1--z2; +x3 = x4 = x1 + 2st; y4 = y2; +lft x13 = rt x1; bot y13 = top y1; +(z3-z13) = whatever*(dir -diang); +draw z13--z3--z4; +z34 = 1/2[z13,z3]; rt x37 = w-pcshiftx; top y37 = h; +draw z34{right}..{pdir}z37; +pickup stylus; +bot y5 = -d; +(z4-z5) = whatever*pdir; +draw z4--z5; +pickup quill; +%% bottom loop +z21 = z2; +lft x25 = x5; bot y25=-d; +x29 = 1/2[x3,x37]; +(z29-z21) = whatever*(dir -diang); +x23 = x29; y23 = 1/2[y29,y25]; +draw z21{dir - diang}..z23{down}..{left}z25; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,12,13,31,32,33,34,35,36,100); +endchar; % end "g" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{h} +% The letter `h'. +% \begin{macrocode} +cmchar "PGOTH letter h"; +beginchar("h", 2sb#+hstretch*((3 + narrowd + narrowdmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +n1 = h/ascratio; +%% stem +lft x1=lft x2=pcshiftx + narrowdmin*stem_width; +y1=h; bot y2=0; +z12 = 1/2[z1,z2]; +draw_upforkstem(1,12); +%draw_downdiamondstem(12,2,narrowd,narrowdmin,diawd,diang); +draw z12--z2; +draw_flat_foot(2); +%% bowl +x3 = x1 + 2stem_width; x4 = x3; +y3 = n1; bot y4=0; +z34 = 1/2[z3,z4]; +draw_updiamondstem(3,34,narrowd,narrowdmin,diawd,diang); +%draw_downdiamondstem(34,4,narrowd,narrowdmin,diawd,diang); +draw z34--z4; draw_flat_foot(4); +x7 = x1; z7 = whatever[z3d,z3c]; +pickup stylus; +draw z3d--z7; +penlabels(1,2,3,4,5,6,100); +endchar; % end "h" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{i} +% The letter `i'. +% \begin{macrocode} +cmchar "PGOTH letter i"; +beginchar("i", 2sb#+hstretch*(2stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +x1 = x2 = 1/2w; y1 = h; bot y2 = 0; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,1/2,1/2,diawd,diang); +%draw_downdiamondstem(12,2,1/2,1/2,diawd,diang); +draw z12--z2; draw_flat_foot(2); +x3= x1-thin; bot y3 = h + 1/2stem_width; +z4 = (x3+3thin,y3); +pickup halfquill; +draw z3--z4; +penlabels(1,2,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{j} +% The letter `j'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "PGOTH letter j"; +beginchar("j", sb#+hstretch*(5/2stem_width#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +rt x1 = w-pcshiftx - 1/2stem_width; y1 = h; +x2=x1; y2=-1/2d; +%% bottom hook +lft x3 = pcshiftx; bot y3 = -d; +draw_updiamondstem(1,2,narrowd,narrowdmin,diawd,diang); +draw z2{down}..z3{-pdir}; % hook +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "j" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{k} +% The letter `k'. +% \begin{macrocode} +cmchar "PGOTH letter k"; +beginchar("k", 2sb#+hstretch*((3 + narrowd + narrowdmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +n1 = h/ascratio; % x-height +lft x1=lft x2=pcshiftx + narrowdmin*st; +y1=h; bot y2=0; +z12 = 1/2[z1,z2]; +draw_upforkstem(1,12); +%draw_downdiamondstem(12,2, narrowd, narrowdmin, diawd,diang); +draw z12--z2; draw_flat_foot(2); +%% right leg +x3 = x1 + 2st; y3 = 8/16n1; +x4 = x3; bot y4 = 0; +z34 = 1/2[z3,z4]; +%draw_downdiamondstem(34,4, narrowd, narrowdmin, diawd,diang); +draw z3--z4; draw_flat_foot(4); +draw z3--z34; +lft x5 = rt x1; +(z3-z5) = whatever*(dir -diang); +draw z5--z3; + +%% top arm +x6 = 1/2[x3, rt x3]; +(z6-z5) = whatever*(pdir); +rt x8 = lft x5; top y8 = bot y5+thick; +(z7-z8) = whatever*(z6-z5); +(z7-z6)=whatver*(z5-z3); +draw z6--z7; +pickup stylus; +draw z5--z6--z7--z8; + +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,100); +endchar; % end "k" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{l} +% The letter `l'. +% \begin{macrocode} +cmchar "PGOTH letter l"; +%beginchar("l", 2sb#+hstretch*((2 + widedmin)*stem_width#), +% asc_height#, 0); +beginchar("l", 2sb#+hstretch*((1 + widedmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +numeric st; st := stem_width; +pcshiftx := sb; +pickup quill; +%lft x1=pcshiftx + widedmin*st; y1=h; +x1 = 1/2w; y1=h; +x2=x1; bot y2 =0; +z3 = 1/2[z1,z2]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_upforkstem(1,3); +%draw_downdiamondstem(3,2,1.0,widedmin,diawd,diang); +draw z3--z2; draw_flat_foot(2); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "l" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{m} +% The letter `m'. +% \begin{macrocode} +cmchar "PGOTH letter m"; +beginchar("m", 2sb#+hstretch*((5+wided+narrowd)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+wided*stem_width; y1 = y3 = y5 = h; +x2=x1; bot y2 = 0; y2 = y4 = y6; +z12=1/2[z1,z2]; +draw_updiamondstem(1,12,wided,widedmin,diawd,diang); +%draw_downdiamondstem(12,2,narrowd,narrowdmin,diawd,diang); +draw z12--z2; draw_flat_foot(2); +%% right stem +rt x5 = rt x6 = w-pcshiftx-narrowd*stem_width; +z56 = 1/2[z5,z6]; +draw_updiamondstem(5,56,wided,widedmin,diawd,diang); +%draw_downdiamondstem(56,6,narrowd,narrowdmin,diawd,diang); +draw z56--z6; draw_flat_foot(6); +%% middle stem +z3=1/2[z1,z5]; z4 = 1/2[z2,z6]; z34=1/2[z3,z4]; +draw_updiamondstem(3,34,wided,widedmin,diawd,diang); +%draw_downdiamondstem(34,4,narrowd,narrowdmin,diawd,diang); +draw z34--z4; draw_flat_foot(4); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100); +endchar; % end "m" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{n} +% The letter `n'. +% \begin{macrocode} +cmchar "PGOTH letter n"; +beginchar("n", 2sb#+hstretch*((3+wided+narrowd)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% left stem +lft x1 = pcshiftx + wided*stem_width; y1 = h; +x2 = x1; bot y2 = 0; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,wided,widedmin,diawd,diang); +%draw_downdiamondstem(12,2,narrowd,narrowdmin,diawd,diang); +draw z12--z2; draw_flat_foot(2); +%% right stem +rt x3 = w-pcshiftx - narrowd*stem_width; y3=y1; +x4=x3;y4=y2; +z34=1/2[z3,z4]; +draw_updiamondstem(3,34,wided,widedmin,diawd,diang); +%draw_downdiamondstem(34,4,narrowd,narrowdmin,diawd,diang); +draw z34--z4; draw_flat_foot(4); +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "n" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{o} +% The letter `o'. +% \begin{macrocode} +cmchar "PGOTH letter o"; +beginchar("o", 2sb#+hstretch*((3 + narrowdmin + narrowdmin)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% bottom left +lft x12 = pcshiftx + narrowdmin*st; y12 = 1/2h; +x2 = x12; y2 = 0; +draw_downdiamondstem(12,2, 1.0, narrowdmin, diawd,diang); +%% right +rt x3 = w - pcshiftx - narrowdmin*st; x4=x3; +y3 = h; bot y4 = y2c; +draw_updiamondstem(3,4, 1.0, narrowdmin, diawd,diang); +%% top left +x1 = x12; top y1 = y3c; +draw z1--z12; +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "o" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{p} +% The letter `p'. +% \begin{macrocode} +cmchar "PGOTH letter p"; +beginchar("p", 2sb#+hstretch*((3 + wided + widedmin)*stem_width#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+wided*st; +y1=h; y2=-d; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,wided,widedmin,diawd,diang); +%draw_downforkstem(12,2); +draw z12--z2; +%% bowl +x3 = x4 = x1 + 2st; +y3 = y1; bot y4 = 0; +draw_updiamondstem(3,4,wided,widedmin,diawd,diang); +lft x5 = pcshiftx; y5 = y4; +draw z5--z4; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "p" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{q} +% The letter `q'. +% \begin{macrocode} +cmchar "PGOTH letter q"; +beginchar("q", 2sb#+hstretch*((3 + widedmin)*stem_width#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% left/bottom of bowl +y99 = 0; +lft x1 = pcshiftx +widedmin*st; top y1 = h - (top y99 - bot y99); +x2 = x1; y2 = 0; +draw_downdiamondstem(1,2, 1.0, widedmin,diawd,diang); +%% rest +x3 = x1 + 2st; x4 = x3; y3 = y1; y4 = -d; +lft x5 = rt x1; bot y5 = top y1; +%draw_downforkstem(3,4); +draw z3--z4; +draw z5--z3; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{r} +% The letter `r'. +% \begin{macrocode} +cmchar "PGOTH letter r"; +beginchar("r", 2sb#+hstretch*((3+wided)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx + wided*st; +y1=h; bot y2=0; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,wided,widedmin,diawd,diang); +%draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +draw z12--z2; draw_flat_foot(2); +%% bar +lft x3 = rt x1; rt x4 = w-pcshiftx; top y3 = top y4 = h; +draw z3--z4; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "r" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{s} +% The letter `s'. This is a short S. +% \begin{macrocode} +cmchar "PGOTH letter s"; +beginchar("s", 2sb#+hstretch*((4)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +pcshiftx := sb; +pickup stylus; +%% the diagonal +lft x2 = pcshiftx; bot y2 = 0; +rt x1 = w-pcshiftx; top y1 = h; +draw z1--z2; +pickup quill; +z211 = 13/32[z2,z1]; %% 10/32 too small, 16/32 too large +z213 = 24/32[z2,z1]; %% 26/32 too large +z212 = 1/2[z211,z213]; +%% bottom bowl +lft x21 = x2; bot y21 = 0; +rt x22 = w - pcshiftx; bot y22 = 0; +x23 = x22; z24 = z212; +(z24-z23) = whatever*(dir (180-diang)); +draw z21{pdir}..z22--z23--z24; +%% top bowl +z14 = z211; z11 = z213; +lft x12 = lft x13 = pcshiftx; +(z13-z14) = whatever*(dir (180-diang)); +(z12-z11) = whatever*(dir (180-diang)); +draw z11--z12--z13--z14; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,12,13,14,15,16,17,20,21,22,23,24,25,26,27,28,100); +endchar; % end "s" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{t} +% The letter `t'. +% \begin{macrocode} +cmchar "PGOTH letter t"; +beginchar("t", 2sb#+hstretch*((2+1.0)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% bar +lft x3 = pcshiftx; top y1 = h; +top y3 = bot y1; +rt x4 = w-pcshiftx; y4=y3; +draw z3--z4; +%% stem +lft x1 = rt x3; +x2 = x1; +bot y2 = 0; +%draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); +draw z1--z2; draw_flat_foot(2); +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "t" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{u} +% The letter `u'. +% \begin{macrocode} +cmchar "PGOTH letter u"; +beginchar("u", 2sb#+hstretch*((3+narrowd+wided)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% left stem +lft x1 = pcshiftx + narrowd*stem_width; y1 = h; +x2 = x1; y2 = 0; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,narrowd,narrowdmin,diawd,diang); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +rt x3 = w - pcshiftx - wided*stem_width; y3=y1; +x4=x3; +%y4=y2; +bot y4 = 0; +z34=1/2[z3,z4]; +draw_updiamondstem(3,34,narrowd,narrowdmin,diawd,diang); +%draw_downdiamondstem(34,4,wided,widedmin,diawd,diang); +draw z34--z4; draw_flat_foot(4); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "u" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{v} +% The letter `v'. +% \begin{macrocode} +cmchar "PGOTH letter v"; +beginchar("v", 2sb#+hstretch*((4 + narrowdmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; numeric st; +pcshiftx := sb; +st := stem_width; +n1 := h/ascratio; % x-height +pickup quill; +%% bottom left stem +%% right and bottom left stems +rt x23 = w - pcshiftx - narrowdmin*st; y23 = n1; x24=x23; +x1 = x23 - 2st; y1 = 1/2n1; +x2 = x1; y2 = 0; +draw_downdiamondstem(1,2, 1.0, widedmin, diawd, diang); +bot y24 = y2c; +draw_updiamondstem(23, 24, narrowd, narrowdmin, diawd, diang); +%% curly bit +%x11=x1; top y11 = h; +%lft x12 = pcshiftx; y12 = 1/2[y11,y1]; +%draw z11{down}..z12{down}..{down}z1; +x11 = x1; y11 = n1; +draw_updiamondstem(11,1,narrowd,narrowdmin,diawd,diang); +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "v" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{w} +% The letter `w'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "PGOTH letter w"; +beginchar("w", 2sb#+hstretch*((5+wided+narrowd)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + narrowd*stem_width; y1 = y3 = y5 = h; +x2 = x1; y2 = y4 = 0; bot y6 = 0; +z12=1/2[z1,z2]; +draw_updiamondstem(1,12, narrowd, narrowdmin, diawd, diang); +draw_downdiamondstem(12,2, wided, widedmin, diawd, diang); +%% right stem +rt x5 = w -pcshiftx-wided*stem_width; x6 = x5; +z56 = 1/2[z5,z6]; +draw_updiamondstem(5,56, narrowd, narrowdmin, diawd, diang); +%draw_downdiamondstem(56,6, wided, widedmin, diawd, diang); +draw z56--z6; +%% middle stem +z3 = 1/2[z1,z5]; +x4 = 1/2[x2,x6]; +z34 = 1/2[z3,z4]; +draw_updiamondstem(3,34, narrowd, narrowdmin, diawd, diang); +draw_downdiamondstem(34,4, wided, widedmin, diawd, diang); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "w" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{x} +% The letter `x'. +% \begin{macrocode} +cmchar "PGOTH letter x"; +beginchar("x", 2sb#+hstretch*((4)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +path pth[]; +numeric n[]; +numeric st; st := stem_width; +pcshiftx := sb; +pickup quill; +%% upright +x1 = 1/2w; y1 = h; +x2 = x1; y2 = 0; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12, 1.5, widedmin,diawd,2/3diang); +draw_downdiamondstem(12,2, 1.5, widedmin,diawd,2/3diang); +%% top right bar +lft x3 = rt x1; top y3 = h; +rt x4 = w - pcshiftx; y4=y3; +draw z3--z4; +%% middle bar +n1 := h-y3; +lft x5 = pcshiftx; rt x6 = w - pcshiftx; +y5 = 1/2h - n1; y6 = 1/2h; +z56 = 1/2[z5,z6]; +draw z5{pdir}..z56..{pdir}z6; +%% bottom left +pickup stylus; +lft x11 = pcshiftx; bot y11 = 0; +draw z2e--z11; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,150,60,160,100); +endchar; % end "x" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{y} +% The letter `y'. Modern, but with a dot on top. +% \begin{macrocode} +cmchar "PGOTH letter y"; +beginchar("y", 2sb#+hstretch*((3 + narrowd+ narrowdmin)*stem_width#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +numeric st; st = stem_width; +pickup quill; +%% right side +rt x3 = w - pcshiftx - narrowdmin*st; y3 = h; +x33 = x3; y33 = 0; +%%draw_updiamondstem(3,4,narrowd,narrowdmin, diawd,diang); +%% left side +x1 = x3 - 2st; y1 = y3; +x2 = x1; y2 = 0; +n1 := top y2 - y2; +draw_updiamondstem(1,2,narrowd,narrowdmin, diawd,diang); +%% tail +x11 = rt x2; y11 = top y2; +x12 = lft x2; y12 = bot y2; +pickup stylus; +lft x14 = x1 - 2st; y14 = -d + n1; +x15 = x14+n1; bot y15 = -d; +z4 = whatever[z11,z12] = whatever[z3,z33]; +x10=x4; bot y10 = y4; +draw z10--z11--z12..{down}z14..{-ppdir}z15; +pickup quill; +draw_updiamondstem(3,4,narrowd,narrowdmin, diawd,diang); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,14,15,33,100); +endchar; % end "y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{z} +% The letter `z'. +% \begin{macrocode} +cmchar "PGOTH letter z"; +beginchar("z", 2sb#+hstretch*(3stem_width#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := sb; +pickup quill; +%% top bar ends +top y12 = h; +n1 := h - y12; +lft x1 = pcshiftx; rt x2 = w-pcshiftx; +%%y1 = y12-n1; y2=y12+n1; +y1 = y12-n1/2; y2=y12; +x12 = 1/2[x1,x2]; +pth1 := z1{pdir}..z12{right}..z2{pdir}; +%% bottom bar ends +bot y34 = 0; +x3=x1; x4=x2; +%%y3=y34-n1; y4=y34+n1; +y3=y34-n1/2; y4=y34; +x34 = 1/2[x3,x4]; +pth2 := z3{pdir}..z34{right}..z4{pdir}; +%% centre bar +z5 = 1/2[z1,z3]; z6 = 1/2[z2,z4]; z56 = 1/2[z5,z6]; +pth3 := z5{pdir}..z56{right}..z6{pdir}; +draw pth1; draw pth2; draw pth3; % bars +draw z2--z3; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "z" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file +% \begin{macrocode} +%</min> +% \end{macrocode} +% +% +% \subsection{The code for capital letters} +% +% \thisfont{} `capitals' were drawn with the same pen as for the minuscules. +% The letters are pretty fancy. +% +% \begin{macrocode} +%<*maj> +% PGOTHU.MF Program file for Gothic Prescius capitals +% + +% \end{macrocode} +% +% +% \begin{routine}{A} +% The letter `A'. +% \begin{macrocode} +cmchar "PGOTH letter A"; +beginchar("A", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pair pr[]; +pickup quill; +%% stem +rt x1 = w - pcshiftx - wided*st; y1 = h; +x2 = x1; y2 = 0; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +%% leg +x21 = x1; top y21 = h; +lft x22 = pcshiftx + widedmin*st; bot y22 = 0; +draw z21--z22; +draw (x22-widedmin*st, y22)--(x22+wided*st, y22); +%% bar +z13 = z12; +y16 = y13; z16 = whatever[z21,z22]; +x14 = 1/2[x13,x16]; (z13-z14) = whatever*pdir; +pickup threequarterquill; +draw z13--z14; +draw z14{ppdir}..{left}z16; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +endchar; % end "A" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{B} +% The letter `B'. +% \begin{macrocode} +cmchar "PGOTH letter B"; +beginchar("B", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% stem +lft x1 = pcshiftx; bot y1 = 0; +n1 := top y1; +lft x99 = 2/5w; bot y99 = 12/16h; +rt x12 = lft x99; top y12 = bot y99; +x14 = x1; y14 = y12; +x13 = 1/2[x14,x12]; y13 = 1/2[y12,(h-n1/2)]; +pth1 := z1{pdir}..z12..{left}z13..{-pdir}z14; +%% stem decoration +z101=z99; +z181 = (x99,-h); +z102 = (x101,y1); +z112 = 1/2[z101,z102]; +lft x8 = x112; y8 = y112; +%% lower bowl +x113 = w-pcshiftx; +(z113-z112) = whatever*(pdir); +rt x5 = w-pcshiftx; y5 = 6/16y113; +x3 = 10/16[x1,x5]; y3 = y1; +z7 = 2/16[z8,z113]; +pth2 := z1{pdir}..{right}z3..{up}z5..{-pdir}z7--z8; + +%% upper bowl +x10 = 1/2[x7,x5]; y10 = 1/2[y12,y99]; +x19 = 1/2[x99,x10]; top y19 = h; +pth3 := z8--z7{pdir}..{up}z10..{left}z19..{-pdir}z99; +%% angled decoration + +z105 = 1/4[z102,z112]; +x185 = 2w; +(z185-z105) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth2; + +z107 = 1/4[z112,z101]; +x187 = 2w; +(z187-z107) = whatever*(pdir); +z108 = (z107--z187) intersectionpoint pth3; + +if ductus: + pickup stylus; +fi +draw pth1; +draw pth2; +draw pth3; +pickup stylus; +draw z101--z102; +draw z105--z106; draw z107--z108; + +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,19,99,100); +endchar; % end "B" + + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{C} +% The letter `C'. +% \begin{macrocode} +cmchar "PGOTH letter C"; +beginchar("C", 2cap_sb#+hstretch*((5)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% bowl +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +pth1 := z24..z1{left}..z2{down}..z3{right}..z4{pdir}; +%% decoration +z101 = (x1,y1); z102 = (x1,y3); +z103 = (x1+perpdec, y1); z104 = (x103,y102+thin); +z105 = 1/2[z101,z102]; z107 = (x105,y105+angdec); +x185 = -w; (z105-z185) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth1; +x187 = -w; (z107-z187) = whatever*(pdir); +z108 = (z107--z187) intersectionpoint pth1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; %% bowl +pickup stylus; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100,101,102,103,104,105,106,107,108,185); +endchar; % end "C" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{D} +% The letter `D'. +% \begin{macrocode} +cmchar "PGOTH letter D"; +beginchar("D", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% bowl +lft x1 = pcshiftx; bot y1 = 0; +rt x5 = w-pcshiftx; y5 = 1/2h; +x3 = 10/16[x1,x5]; y3 = y1; +x7 = x3; top y7 = h; +lft x9 = 2/5w; bot y9 = 12/16h; +pth1 := z1{pdir}..{right}z3..{up}z5..{left}z7..{-pdir}z9; +%% stem +rt x12 = lft x9; top y12 = bot y9; +x14 = x1; y14 = y12; +x13 = 1/2[x14,x12]; y13 = 1/2[y12,y7]; +pth2 := z1{pdir}..z12..{left}z13..{-pdir}z14; +%% vertical decoration +z101=z9; +z181 = (x9,-h); +z102 = ((x101,h/2)--z181) intersectionpoint pth1; +z103a=(x101+perpdec,h); z103b=(x103a,h/2); z103c=(x103a,-h); +z103 = (z103a--z103b) intersectionpoint pth1; +z104 = (z103b--z103c) intersectionpoint pth1; +%% angled decoration +z106 = (lft x5, y5); +x105 = x103; (z106-z105) = whatever*(pdir); +z107 = (x105, y105+angdec); +x108a = 2w; (z108a-z107) = whatever*(pdir); +z108 = (z108a--z107) intersectionpoint pth1; +if ductus: + pickup stylus; +fi +draw pth1; +draw pth2; +pickup stylus; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,100); +endchar; % end "D" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{E} +% The letter `E'. +% \begin{macrocode} +cmchar "PGOTH letter E"; +beginchar("E", 2cap_sb#+hstretch*((6)*stem_width#), %% (5) too small + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% bowl +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +pth1 := z24..z1{left}..z2{down}..z3{right}..z4{pdir}; +%% decoration +z101 = (x1,y1); z102 = (x1,y3); +z103 = (x1+perpdec, y1); z104 = (x103,y102+thin); +z105 = 1/2[z101,z102]; z107 = (x105,y105+angdec); +x185 = -w; (z105-z185) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth1; +x187 = -w; (z107-z187) = whatever*(pdir); +z108 = (z107--z187) intersectionpoint pth1; +%% bar +lft x31 = x103; top y31 = y105; +rt x32 = w-pcshiftx; y32=y31; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; %% bowl +draw z31--z32; %% bar +pickup stylus; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100,105,185,106); +endchar; % end "E" + + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{F} +% The letter `F'. +% \begin{macrocode} +cmchar "PGOTH letter F"; +beginchar("F", 2cap_sb#+hstretch*((5)*stem_width#), + 5/4caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% stem (1--2) and top bar (21--22) +lft x1=lft x2=pcshiftx+widedmin*st; y2 = 0; +top y21 = top y22 = h - (top y2 - bot y2); x22 = w-pcshiftx-st; +lft x21 = rt x1; top y1 = bot y21; +z12 = 1/3[z1,z2]; +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +draw z1--z12; +draw z21--z22; +%% vertical decoration +z102 = 2/3[z2b,z2c]; +x101 = x102; y101 = y21; +%% bar +lft x14 = x101; y14 = y12; +rt x16 = w-pcshiftx; y16 = y14; +draw z14--z16; +z16tr = (rt x16, top y16); +pickup stylus; +draw z101--z102; +%% Other decoration +%% bottom bar +rt x201 = x16tr; top y201 = y16tr; +y202 = y201 - 2st; (z201-z202) = whatever*pdir; +draw z201--z202; +%% top bar +pickup quill; +z22tb = (rt x22, top y22); +x22bb - x22 = x22 - x22tb; y22bb - y22 = y22 - y22tb; +x22c = x22 + st; bot y22c = top y22 + 1/2st; +x22f = x22; y22f = 1/3[y22c, y22]; +pickup stylus; +x22br = x22bb; bot y22br = y22bb; +pth3 := z22br--z22tb..{up}z22c..{-ppdir}z22f; +draw pth3; + +penlabels(1,2,3,4,5,6,7,14,15,16,21,22,100); +endchar; % end "F" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{G} +% The letter `G'. +% \begin{macrocode} +cmchar "PGOTH letter G"; +beginchar("G", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pickup quill; +%% bar +top y3=h; n3 := h - top y3; +lft x1 = pcshiftx; rt x2=w-pcshiftx; +y1 = y3-n3; y2=y3; +x3=1/2[x1,x2]; +pth1 := z1{pdir}..z3..z2{pdir}; +%% bowl +n1 := w; % width of bowl +n2 := h; % height of bowl +lft x4 = pcshiftx; y4 = 1/2h; +x5=x3; bot y5 = 0; +rt x6 = w-pcshiftx; y6 = 6/16h; +%% decoration +x101 = lft x3; y101=y3; +x181 = x101; y181=-h/4; z191 = 1/2[z101,z181]; +z102=(x101,y5); +z103 = (x101+3thin, y101); z104 = (x103,y102); +lft x7 = x104; y7 = 10/16[y104,y103]; +%%pth2 := z3..z4{down}..z5{right}..z6{up}..{-pdir}z7; +%%pth2 := z2{-pdir}..z3..z4{down}..z5{right}..z6{up}..{-pdir}z7; +pth2 := z2--z3..z4{down}..z5{right}..z6{up}..{-pdir}z7; +z105 = (x104,y104+4thin); z107=(x105,y105+3thin); +x185 = 2w; (z185-z105) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth2; +z108 = (x106,y106+3thin); +%% fork +z2tr = (rt x2, top y2); +x2a = x2tr; y2a = y2tr + thin; +x2b = x2a; y2b - y2 = y2 - y2a; +x2d = x2 - thick; y2d = y2; +pickup stylus; +% finish off the fork +x2c = x2d = x2e; +top y2e = y2tr; y2c - y2d = y2d - y2e; +%%filldraw z2d--z2c{right}..z2b--cycle; +%%filldraw z2d--z2a..{left}z2e--cycle; +filldraw z2e--z2c{right}..z2b--cycle; +filldraw z2c--z2a..{left}z2e--cycle; +pth9 := (rt x2a,y2a)--(rt x2b,y2b)--(rt x2d,y2d)--cycle; +unfill pth9; +unfill pth9; +unfill pth9; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw pth1; %% bar +draw pth2; %% bowl +ductus:=false; +penlabels(1,2,2a,2b,2c,2d,2e,3,4,5,6,11,12,100,101,102,103,104,181,191); +endchar; % end "G" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{H} +% The letter `H'. +% \begin{macrocode} +cmchar "PGOTH letter H"; +beginchar("H", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric st; st := stem_width; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+3st; y1=h; +x2=x1; y2=0; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +% start of bowl +n1 := 12/16h; %% take this as the top of the bowl +x13=x1; y13=3/4n1; +rt x3 = w-pcshiftx; y3 = 8/16n1; +x14 = 8/16[x13,x3]; top y14 = n1; +x4 = 1/2[x14,x3]; bot y4=0; +pth1 := z13{pdir}..{right}z14..{down}z3..{-pdir}z4; +%% bottom curl +z21 = z4; +x24 = x3; top y24 = 0; +x23 = 1/2[x21,x24]; top y23 = bot y24; +pth2 := z21{-pdir}..z23..{ppdir}z24; +%% vertical decoration +z102 = 2/3[z2b,z2c]; +z182 = (x102,h); +z101 = (z102--z182) intersectionpoint pth1; +z105 = 1/2[z102,z101]; +x185 = 2w; +(z185-z105) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth1; +z107 = (x105, y105-angdec); z187 = (x185, y185-angdec); +z108 = (z107--z187) intersectionpoint pth1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +pickup stylus; +draw pth2; +draw z101--z102; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "H" + + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{I} +% The letter `I'. +% \begin{macrocode} +cmchar "PGOTH letter I"; +beginchar("I", 2cap_sb#+hstretch*((4+wided)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric st; st := stem_width; +pickup quill; +lft x1=lft x2=pcshiftx+3st; +y1=h; y2=0; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided, widedmin,diawd,diang); +%% vertical decoration +z102 = 2/3[z2b,z2c]; +pickup stylus; +x101=x102; top y101 = h; +draw z101--z102; +ductus:=false; +penlabels(1,2,101,102,100); +endchar; % end "I" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{J} +% The letter `J'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "PGOTH letter J"; +beginchar("J", cap_sb#+hstretch*((4+wided)*stem_width#), + caprat*x_height#, 1/2caprat*x_height#); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +lft x1 = pcshiftx+3st; y1 = h; +x2=x1; y2=-d + (top y1 - bot y1); +%% bottom hook +lft x3 = pcshiftx; bot y3 = -d; +draw_upcurlstem(1,2); +draw z2{ppdir}..{-pdir}z3; +%% vertical decoration +x201 = rt x1; +x101 = x201 + 2/3wided*st; +pickup stylus; +top y101 = h; y201=y101; +z102=(x101,0); +draw z201--z101--z102; +ductus:=false; +penlabels(1,2,3,101,102,100); +endchar; % end "J" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{K} +% The letter `K'. +% \begin{macrocode} +cmchar "PGOTH letter K"; +beginchar("K", 2cap_sb#+hstretch*((8+wided)*stem_width#), + 5/4caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +n1 = 4/5h; % x-height +lft x1=lft x2=pcshiftx+3st; +y1=h; y2=0; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +%% top arm +%%z3=(x1,1/2n1); +x3 = x1; top y3 = 14/16n1; +z7c = 1/2[z2,z3]; +top y3a = n1; (z3a-z3) = whatever*pdir; +rt x7a = w - pcshiftx - 2st; (z7a-z7c) = whatever*pdir; +x4 = 1/2[x3a,x7a]; y4 = y3a; +x5 = x7a; y5 = 1/2[y3a, y7a]; +z7 = (rt x7c, y7c); +pth1 := z3{pdir}..z4..z5..{-pdir}z7; +%% lower arm +z21=z7; +z24=(x5+st,y2a); +x23 = x24; y23 = 1/2[y21,y24]; +rt x25 = w-pcshiftx; bot y25 = 0; +pth2 := z21{pdir}..{down}z23..z24..{pdir}z25; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; % upper bowl +draw pth2; % lower half +%% decorations +z1tr = (rt x1, top y1); +pickup stylus; +z102 = 2/3[z2b,z2c]; x101 = x102; top y101 = h; +x103 = x1tr; y103 = y101; +draw z103--z101--z102; +x105 = x101; y105 = 1/2[y7,y3]; +y185 = 2w; (z185-z105) = whatever*pdir; +z106 = (z105--z185) intersectionpoint pth1; +x107 = x105; y107 = y105-angdec; +x187 = x185; y187-y185 = y107-y105; +%%z108 = (z107--z187) intersectionpoint pth1; +draw z105--z106; +%%draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,21,22,23,24,25,100); +endchar; % end "K" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{L} +% The letter `L'. +% \begin{macrocode} +cmchar "PGOTH letter L"; +beginchar("L", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric st; st := stem_width; +pickup quill; +lft x1=pcshiftx+3st; y1=h; +x2=x1; bot y2 =0; +draw_upcurlstem(1,2); +rt x4 = w-pcshiftx; bot y4 = 0; +draw z2{right}..{pdir}z4; +%% vertical decoration +x201 = rt x1; +x101 = x201+2/3wided*st; +pickup stylus; +top y101 = h; y201 = y101; +x102 = x101; bot y102=0; +draw z201--z101--z102; +ductus:=false; +penlabels(1,2,3,4,101,102,201,100); +endchar; % end "L" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{M} +% The letter `M'. +% \begin{macrocode} +cmchar "PGOTH letter M"; +beginchar("M", 2cap_sb#+hstretch*((11)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric st; st := stem_width; +path pth[]; +pickup quill; +%%% left part +lft x301 = pcshiftx+3st; y301 = h; +x302 = x301; y302 = 0; +z312 = 1/2[z301,z302]; +draw_upcurlstem(301,312); +draw_downdiamondstem(312,302,wided,widedmin,diawd,diang); + +%% left N stem (and N part) +%%%lft x1=pcshiftx+3st; y1=h; +x1 = x301 + 3st; y1 = h; +x2=x1; y2=0; +z12 = 1/2[z1,z2]; +%%draw_upcurlstem(1,12); +%%draw_updiamondstem(1,12,wided,widedmin,diawd,diang); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +% start of bowl +x13=x1; y13=3/4h; +rt x3 = w-pcshiftx; y3 = 8/16h; +x14 = 8/16[x13,x3]; top y14 = h; +x4 = 1/2[x14,x3]; bot y4=0; +pth1 := z13{pdir}..{right}z14..{down}z3..{-pdir}z4; +%% bottom curl +z21 = z4; +x24 = x3; top y24 = 0; +x23 = 1/2[x21,x24]; top y23 = bot y24; +pth2 := z21{-pdir}..z23..{ppdir}z24; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +pickup stylus; +draw pth2; +pickup quill; +%% finish off the left part +x3011 = 1/2[x301,x1]; top y3011 = h; +z3123 = (x301,3/4h); z123 = (x1,y3123); +draw z3123--z3011--z123--z12; +%% vertical decorations + %% left part +z402 = 2/3[z302b,z302c]; +x401 = x402; z401 = whatever[z3123,z3011]; + %% right part +z102 = 2/3[z2b,z2c]; +z182 = (x102,h); +z101 = (z102--z182) intersectionpoint pth1; +%% angled decorations + %% left part +z406 = z13; +x405 = x402; (z406-z405) = whatever*pdir; +z407 = (x405, y405-angdec); z408 = (x406, y406-angdec); + %% right part +z105 = (x102,y405); +x185 = 2w; +(z185-z105) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth1; +z107 = (x105, y105-angdec); z187 = (x185, y185-angdec); +z108 = (z107--z187) intersectionpoint pth1; +pickup stylus; +draw z401--z402; +draw z405--z406; draw z407--z408; +draw z101--z102; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,101,102,105,106,107,108,301,302,100); +endchar; % end "M" + + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{N} +% The letter `N'. +% \begin{macrocode} +cmchar "PGOTH letter N"; +beginchar("N", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric st; st := stem_width; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+3st; y1=h; +x2=x1; y2=0; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +% start of bowl +x13=x1; y13=3/4h; +rt x3 = w-pcshiftx; y3 = 8/16h; +x14 = 8/16[x13,x3]; top y14 = h; +x4 = 1/2[x14,x3]; bot y4=0; +pth1 := z13{pdir}..{right}z14..{down}z3..{-pdir}z4; +%% bottom curl +z21 = z4; +x24 = x3; top y24 = 0; +x23 = 1/2[x21,x24]; top y23 = bot y24; +pth2 := z21{-pdir}..z23..{ppdir}z24; +%% vertical decoration +z102 = 2/3[z2b,z2c]; +z182 = (x102,h); +z101 = (z102--z182) intersectionpoint pth1; +z105 = 1/2[z102,z101]; +x185 = 2w; +(z185-z105) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth1; +z107 = (x105, y105-angdec); z187 = (x185, y185-angdec); +z108 = (z107--z187) intersectionpoint pth1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +pickup stylus; +draw pth2; +draw z101--z102; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "N" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{O} +% The letter `O'. +% \begin{macrocode} +cmchar "PGOTH letter O"; +beginchar("O", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +pth1 := z1..z2..z3..z4..cycle; +%% vertical decoration +z101=z2; z102=z4; +z103 = (x101-perpdec, y101); z104 = (x103,y102); +%% angled decoration +z108 = (lft x3,y3); +x107 = x101; (z108-z107) = whatever*(pdir); +z105 = (x107, y107+angdec); +x106a = 2w; (z106a-z105) = whatever*(pdir); +z106 = (z105--z106a) intersectionpoint pth1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +pickup stylus; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "O" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{P} +% The letter `P'. +% \begin{macrocode} +cmchar "PGOTH letter P"; +beginchar("P", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 1/2caprat*x_height#); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+3st; +y1=h; y2=-d; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +%% vertical decoration +z1tr = (rt x1, top y1); +z102 = 2/3[z2b,z2c]; +pickup stylus; +x101 = x102; top y101 = h; +x103 = x1tr; y103 = y101; +draw z103--z101--z102; +pickup quill; +%% bowl +lft x22 = x101; top y22 = h; +x21 = x1; (z22-z21) = whatever*pdir; +rt x24 = w - pcshiftx; y24 = 1/2h; +x25 = 1/2[x22,x24]; bot y25 = 0; +pth1 := z21--z22{down}..{down}z24..{-pdir}z25; +z31 = z25; +lft x33 = pcshiftx; bot y33 = 0; +pth2 := z33{pdir}..{right}z31; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw pth2; +%% angled decoration +x105 = x101; y105 = 1/3h; +x185 = 2w; +(z185-z105) = whatever*pdir; +z106 = (z105--z185) intersectionpoint pth1; +z107 = (x105,y105-angdec); +x187 = x185; y107 - y105 = y187 - y185; +z108 = (z107--z187) intersectionpoint pth1; +pickup stylus; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "P" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Q} +% The letter `Q'. +% \begin{macrocode} +cmchar "PGOTH letter Q"; +beginchar("Q", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx-stem_width; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +pth1 := z1..z2..z3..z4..cycle; +%% tail +pth2 := z1..z4..z3; +z11 = directionpoint pdir of pth2; +rt x13 = w-pcshiftx; bot y13 = 0; +pth3 := z11{pdir}..{pdir}z13; +%% vertical decoration +z101=z2; z102=z4; +z103 = (x101-perpdec, y101); z104 = (x103,y102); +%% angled decoration +z108 = (lft x3,y3); +x107 = x101; (z108-z107) = whatever*(pdir); +z105 = (x107, y107+angdec); +x106a = 2w; (z106a-z105) = whatever*(pdir); +z106 = (z105--z106a) intersectionpoint pth1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw pth3; +pickup stylus; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "Q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{R} +% The letter `R'. +% \begin{macrocode} +cmchar "PGOTH letter R"; +beginchar("R", 2cap_sb#+hstretch*((8+wided)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +n1 = h; % x-height +lft x1=lft x2=pcshiftx+3st; +y1=h; y2=0; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +%% top arm +%%z3=(x1,1/2n1); +x3 = x1; top y3 = 14/16n1; +z7c = 1/2[z2,z3]; +top y3a = n1; (z3a-z3) = whatever*pdir; +rt x7a = w - pcshiftx - 2st; (z7a-z7c) = whatever*pdir; +x4 = 1/2[x3a,x7a]; y4 = y3a; +x5 = x7a; y5 = 1/2[y3a, y7a]; +z7 = (rt x7c, y7c); +pth1 := z3{pdir}..z4..z5..{-pdir}z7; +%% lower arm +z21=z7; +z24=(x5,y2a); +x23 = x24; y23 = 1/2[y21,y24]; +rt x25 = w-pcshiftx; bot y25 = 0; +pth2 := z21{pdir}..{down}z23..z24..{pdir}z25; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; % upper bowl +draw pth2; % lower half +%% decorations +z1tr = (rt x1, top y1); +pickup stylus; +z102 = 2/3[z2b,z2c]; x101 = x102; top y101 = h; +x103 = x1tr; y103 = y101; +draw z103--z101--z102; +x105 = x101; y105 = 1/2[y7,y3]; +y185 = 2w; (z185-z105) = whatever*pdir; +z106 = (z105--z185) intersectionpoint pth1; +x107 = x105; y107 = y105-angdec; +x187 = x185; y187-y185 = y107-y105; +%%z108 = (z107--z187) intersectionpoint pth1; +draw z105--z106; +%%draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,21,22,23,24,25,100); +endchar; % end "R" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{S} +% The letter `S'. +% \begin{macrocode} +cmchar "PGOTH letter S"; +beginchar("S", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +pickup threequarterquill; +%% top +n1 := 1; +lft x1 = pcshiftx + n1*st; top y1 = h; +rt x3 = w - pcshiftx; y3 = y1; +x2 = 1/2[x1,x3]; top y2 = y1; +pth1 := z1..z2..{pdir}z3; +draw pth1; +%% bottom +lft x4 = pcshiftx; bot y4 = 0; +rt x6 = w -pcshiftx - n1*st; y6 = y4; +x5 = 1/2[x4,x6]; bot y5 = y4; +pth2 := z4{pdir}..z5..z6; +draw pth2; +%% top path +z100 = (1/2w, 1/2h); +z11 = z1; z15 = z6; +x13 = x100; y13 = y100 + st; +pth3 := z11..{right}z13{right}..z15; +draw pth3; +%% bottom path +z21 = z11; z25 = z6; +x23 = x100; y100 - y23 = y13 - y100; +pth4 := z21..{right}z23{right}..z25; +draw pth4; +%% decorations + %% top +z101 = (x2+angdec,y2); y181 = 0; (z101-z181) = whatever*pdir; +z102 = (z101--z181) intersectionpoint pth3; +z103 = (x101-angdec, y101); x183-x181 = x103-x101; y183 = 0; +z104 = (z103--z183) intersectionpoint pth3; + %% bottom +z201 = (x5,y5); y281 = h; (z201-z281) = whatever*pdir; +z202 = (z201--z281) intersectionpoint pth4; +z203 = (x201-angdec, y201); x283-x281 = x203-x201; y283 = h; +z204 = (z203--z283) intersectionpoint pth4; +pickup stylus; +draw z101--z102; draw z103--z104; +draw z201--z202; draw z203--z204; + + +%%ductus:=true; +if ductus: + pickup stylus; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100,101,102,103,104,201,202,203,204); +endchar; % end "S" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{T} +% The letter `T'. +% \begin{macrocode} +cmchar "PGOTH letter T"; +beginchar("T", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pickup quill; +%% bar +top y3=h; n3 := h - top y3; +lft x1 = pcshiftx; rt x2=w-pcshiftx; +y1 = y3-n3; y2=y3; +x3=1/2[x1,x2]; +pth1 := z1{pdir}..z3..z2{pdir}; +%% bowl +n1 := w; % width of bowl +n2 := h; % height of bowl +lft x4 = pcshiftx; y4 = 1/2h; +x5=x3; bot y5 = 0; +rt x6 = w-pcshiftx; y6 = 6/16h; +%%pth2 := z3..z4{down}..z5{right}..z6{pdir}; +%% decoration +x101 = lft x3; y101=y3; +x181 = x101; y181=-h/4; z191 = 1/2[z101,z181]; +%%z102 = z191--z181 intersectionpoint pth2; %%% ???? NO INTERSECTION!!!!!! +z102=(x101,y5); +z103 = (x101+3thin, y101); z104 = (x103,y102); +lft x7 = x104; y7 = 10/16[y104,y103]; +pth2 := z3..z4{down}..z5{right}..z6{up}..{-pdir}z7; +z105 = (x104,y104+4thin); z107=(x105,y105+3thin); +x185 = 2w; (z185-z105) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth2; +z108 = (x106,y106+3thin); +pickup stylus; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; %% bar +draw pth2; %% bowl +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100,101,102,103,104,181,191); +endchar; % end "T" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{U} +% The letter `U'. +% \begin{macrocode} +cmchar "PGOTH letter U"; +beginchar("U", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pickup quill; +%% stem tops +lft x1 = pcshiftx + 3st; y1 = h; +rt x3 = w - pcshiftx - widedmin*st; y3 = h; +% bottom of bowl +x7 = x1 - 3/2st; bot y7 = 0; +rt x9 = lft x3; bot y9 = 0; +pth1 := z7{pdir}..{pdir}z9; +draw pth1; +%% stem bottoms +z2 = (z1 -- (x1,-h)) intersectionpoint pth1; +x4 = x3; bot y4 = top y9; +draw_upcurlstem(1,2); +draw_updiamondstem(3,4,wided,widedmin,diawd,diang); +%% decorations +z1tr = (rt x1, top y1); +pickup stylus; +z99 = 2/3[z3b,z3c]; +x101 - x1 = x3 - x99; top y101 = h; +x102 = x101; y102 = y2; +x103 = x1tr; y103 = y101; +draw z103--z101--z102; +x105 = x101; y105 = 1/3h; +x106 = x3; (z106-z105) = whatever*pdir; +z107 = (x105, y105-angdec); x108 = x106; y108-y106 = y107-y105; +draw z105--z106; draw z107--z108; +%%ductus:=true; +if ductus: + pickup stylus; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "U" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{V} +% The letter `V'. +% \begin{macrocode} +cmchar "PGOTH letter V"; +beginchar("V", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% left stem top +lft x1 = pcshiftx + 3st; y1 = h; +% bottom of bowl +x7 = x1 - 3/2st; bot y7 = 0; +x9 = w/2; bot y9 = 0; +pth1 := z7{pdir}..{right}z9; +draw pth1; +%% left stem bottom +x81 = x1; y81 = - h; +z2 = (z1--z81) intersectionpoint pth1; +draw_upcurlstem(1,2); +%% right stem +z6 = z9; +rt x5 = w - pcshiftx; top y5 = 3/4h; +x3 = 1/2[rt x1, lft x5]; +x4 = 1/2[x3,x5]; top y4 = h; +y3 = 1/2[y4,y5]; +pth2 := z6{pdir}..{up}z5..{left}z4..{-pdir}z3; +draw pth2; +pth3 := pth1 & pth2; +%% decoration +z1tr = (rt x1, top y1); +x101 = x1tr + 2/3wided*st; +pickup stylus; +top y101 = h; +z103 = (x1tr,y101); +z181 = (x101,-w); +z102 = (z101--z181) intersectionpoint pth3; +draw z103--z101--z102; +x105 = x101; y105 = 1/3[y102,y101]; +x185 = 2w; (z185-z105) = whatever*pdir; +z106 = (z105--z185) intersectionpoint pth2; +z107 = (x105, y105-angdec); +x187 = x185; y187-y185 = y107-y105; +z108 = (z107--z187) intersectionpoint pth2; +draw z105--z106; draw z107--z108; + +%%ductus:=true; +if ductus: + pickup stylus; +fi + +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "V" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{W} +% The letter `W'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "PGOTH letter W"; +beginchar("W", 2cap_sb#+hstretch*((12)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% top of stems +lft x1 = pcshiftx + 3st; y1 = h; +rt x999 = w - pcshiftx; +x3 = 1/2[x1,x999]; y3 = h; +%% bowl bottoms +x21 = x1 - 3/2st; bot y21 = 0; +rt x23 = lft x3; bot y23 = 0; +pth1 := z21{pdir}..z23; +draw pth1; +lft x31 = rt x23; bot y31 = top y23; +x33 = 1/2[x31,x999]; bot y33 = 0; +pth2 := z31{pdir}..z33; +draw pth2; +%% bottom of stems +z2 = (z1--(x1,0)) intersectionpoint pth1; +x4 = x3; bot y4 = top y23; +draw_upcurlstem(1,2); +draw_updiamondstem(3,4,wided,widedmin,diawd,diang); +%% right V stem +z16 = z33; +x15 = x999; top y15 = 3/4h; +x13 = 1/2[rt x3, lft x15]; +x14 = 1/2[x13,x15]; top y14 = h; +y13 = 1/2[y14,y15]; +pth3 = z16{pdir}..{up}z15..{left}z14..{-pdir}z13; +draw pth3; +%% decorations +z1tr = (rt x1, top y1); +z3tr = (rt x3, top y3); +pickup stylus; +%% for U +z99 = 2/3[z3b,z3c]; +x101 - x1 = x3 - x99; top y101 = h; +x102 = x101; y102 = y2; +x103 = x1tr; y103 = y101; +draw z103--z101--z102; +x105 = x101; y105 = 1/3h; +x106 = x3; (z106-z105) = whatever*pdir; +z107 = (x105, y105-angdec); x108 = x106; y108-y106 = y107-y105; +draw z105--z106; draw z107--z108; +%% for V + +x301 = x3tr+2/3wided*st; top y301 = y3e; +z381 = (x301,-w); +z302 = (z301--z381) intersectionpoint pth2; +draw z3e--z301--z302; +x305 = x301; y305 = 1/3[y302,y301]; +x385 = 2w; (z385-z305) = whatever*pdir; +z306 = (z305--z385) intersectionpoint pth3; +z307 = (x305, y305-angdec); +x387 = x385; y387-y385 = y307-y305; +z308 = (z307--z387) intersectionpoint pth3; +draw z305--z306; draw z307--z308; + + + +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "W" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{X} +% The letter `X'. +% \begin{macrocode} +cmchar "PGOTH letter X"; +beginchar("X", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +path pth[]; +numeric n[]; +numeric st; st := stem_width; +pcshiftx := cap_sb; +pickup quill; +%% center stem +lft x1 = lft x2 = pcshiftx + 3st; +y1 = 3/4h; y2 = 1/4h; +draw z1--z2; +%% top right +z21 = z1; top y22 = h; (z22-z21) = whatever*pdir; +rt x24 = w-pcshiftx; y24 = y21; +pth1 := z21--z22{-ppdir}..{pdir}z24; +draw pth1; +%% bottom right +z31 = z2; +rt x33 = w-pcshiftx; bot y33 = 0; +pth2 := z31{-ppdir}..{pdir}z33; +draw pth2; +%% bottom left +z41 = z2; +bot y43 = -1/4h; (z41-z43) = whatever*pdir; +x45 = x43 + st; y45=y43; +pth3 := z41--z43{-pdir}..{pdir}z45; +pickup stylus; +draw pth3; +pickup quill; +%% top left +x11 = x1; y11 = h; +draw_upcurlstem(11,1); +%% decoration +x81 = rt x1; +pickup stylus; +x101 = x102 = x81 + 2/3wided*st; +z101 = whatever[z1,z22]; +z102 = (z101--(x101,0)) intersectionpoint pth2; +draw z101--z102; +pickup quill; +%% middle arms +z120 = 1/2[z1,z2]; +z51 = z120; +lft x53 = pcshiftx; top y53 = y51; +x52 = 1/2[x51,x53]; y52 = y51; +pth5 := z51--z52{left}..{-pdir}z53; +draw pth5; +lft x61 = x101; y61 = y120; +rt x63 = w-pcshiftx; bot y63 = y61; +x62 = 1/2[x61,x63]; y62 = y61; +pth6 := z61--z62{right}..{pdir}z63; +draw pth6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,51,52,53,61,62,63,101,102,150,60,160,100); +endchar; % end "X" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Y} +% The letter `Y'. +% \begin{macrocode} +cmchar "PGOTH letter Y"; +beginchar("Y", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 1/2caprat*x_height#); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% stem tops +lft x1 = pcshiftx + 3st; y1 = h; +rt x3 = w - pcshiftx - widedmin*st; y3 = h; +% bottom of bowl +x7 = x1 - 3/2st; bot y7 = 0; +x9 = 1/2[x1,x3]; bot y9 = 0; +pth1 := z7{pdir}..{right}z9; +draw pth1; +%% left stem bottom +x81 = x1; y81 = - h; +z2 = (z1--z81) intersectionpoint pth1; +draw_upcurlstem(1,2); +%% right stem +x4 = x3; y4 = 0; +x5 = x4; y5 = -1/4d; +lft x6 = x9; bot y6 = -d; +draw_updiamondstem(3,4,wided,widedmin,diawd,diang); +draw z6{pdir}..{up}z5--z4; +z3cd = 1/2[z3c,z3d]; +pth2 = z5--z3a--z3cd; +%% fill bowl bottom +x91 = x3; (z91-z9) = whatever*pdir; +draw z9--z91; + +%% decoration +z1tr = (rt x1, top y1); +x101 = x1tr + 2/3wided*st; +pickup stylus; +top y101 = h; +z103 = (x1tr,y101); +z181 = (x101,-w); +z102 = (z101--z181) intersectionpoint pth1; +draw z103--z101--z102; +x105 = x101; y105 = 1/3[y102,y101]; +x185 = 2w; (z185-z105) = whatever*pdir; +z106 = (z105--z185) intersectionpoint pth2; +z107 = (x105, y105-angdec); +x187 = x185; y187-y185 = y107-y105; +z108 = (z107--z187) intersectionpoint pth2; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100,101,102,181); +endchar; % end "Y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{Z} +% The letter `Z'. +% \begin{macrocode} +cmchar "PGOTH letter Z"; +beginchar("Z", 2cap_sb#+hstretch*((5)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% top bar ends +top y12 = h; +n1 := h - y12; +lft x1 = pcshiftx; rt x2 = w-pcshiftx-perpdec; +%%y1 = y12-n1; y2=y12+n1; +y1 = y12-n1/2; y2=y12; +x12 = 1/2[x1,x2]; +pth1 := z1{pdir}..z12{right}..z2{pdir}; +x102 = rt x2; y102 = top y2; x202 = x102+perpdec; y202=y102; +%% bottom bar ends +bot y34 = 0; +x3=x1+perpdec; rt x4= w-pcshiftx; +y3=y34-n1/2; y4=y34; +x34 = 1/2[x3,x4]; +pth2 := z3{pdir}..z34{right}..z4{pdir}; +x203 = lft x3; y203 = bot y3; x103 = x203-perpdec; y103=y203; +%% centre bar +z5 = (x1,1/2[y1,y3]); z6 = (x4,1/2[y2,y4]); z56 = 1/2[z5,z6]; +pth3 := z5{pdir}..z56{right}..z6{pdir}; +draw pth1; draw pth2; % bars +draw pth3; +%% decorations +pickup stylus; +draw z102--z103; draw z202--z203; +unfill z102--z103--z203--z202--cycle; +draw z102--z103; draw z202--z203; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "Z" + +% \end{macrocode} +% \end{routine} +% +% +% +% The end of this file +% \begin{macrocode} +%</maj> +% \end{macrocode} +% +% +% +% \subsection{The punctuation file} +% +% The main punctuation marks are defined in this file. +% +% \begin{macrocode} +%<*punct> +% PGOTHPUNCT.MF This file contains punctuation marks + +% \end{macrocode} +% +% +% \begin{routine}{!} +% The `!' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Exclamation mark"; +beginchar("!", 2sb#+hstretch*(thick#+trijut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +x1=w/2; top y1 = h; +z3=(x1, 1/2dot_size); +z2=(x1, y3+3/2dot_size); +draw z1--z2; +draw_pdot(3,dot_size); +penlabels(1,2,3); + +endchar; % end of "!" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{?} +% The `?' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Question mark"; +beginchar("?", 2sb#+hstretch*((3+wided+widedmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-2pcshiftx; % actual character width +n2 := 1/3h; % height of top bowl +n3 := n2; % height of bottom bowl +z5=(1/2w,1/2dot_size); +x45 = x5; y45=y5+3/2dot_size; +lft x1 = pcshiftx; y1 = 3/4h; +x2 = 1/2w; top y2 = h; +rt x3 = w-pcshiftx; y3 = 11/16h; + +x4 = x45; +(z3-z4) = whatever*pdir; + +%%ductus:= true; +if ductus: + pickup stylus; +fi +%%draw z1..z2{right}..z3{down}..z4{down}; +draw z1--z2--z3--z4--z45; +draw_pdot(5, dot_size); +penlabels(1,2,3,4,45,5); +endchar; % end of "?" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{,} +% The `,' character. +% \begin{macrocode} + +cmchar "Comma"; +beginchar(",",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=1/2dot_size; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "," + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{.} +% The `.' character. +% \begin{macrocode} + +cmchar "Period"; +beginchar(".",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +z1=(w/2, 1/2dot_size); +draw_pdot(1,dot_size); +penlabels(1); +endchar; % end of "." + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{:} +% The `:' character. +% \begin{macrocode} + +cmchar "Colon"; +beginchar(":",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +x1=x2=w/2; y1=3/4h; y2=1/4h; +draw_pdot(1,dot_size); +draw_pdot(2,dot_size); +penlabels(1,2); +endchar; % end ":" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{;} +% The `;' character. +% \begin{macrocode} + +cmchar "Semicolon"; +beginchar(";",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=3/4h; y2=1/2dot_size; +draw_pdot(1,dot_size); +draw_pcomma(2,dot_size,comma_width); +penlabels(1,2); +endchar; % end of ";" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{'} +% The `'' character. +% \begin{macrocode} + +cmchar "Apostrophe"; +beginchar("'",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "'" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{`} +% The ``' character. +% \begin{macrocode} + +cmchar "Reverse apostrophe"; +beginchar("`",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=h; +draw_plq(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "`" + +% \end{macrocode} +% \end{routine} +% +% The end of this file. +% \begin{macrocode} +%</punct> +% \end{macrocode} +% +% +% \subsection{The ligatures and dashes file} +% +% The ligatured letters, punctuation marks and dashes are defined in this file. +% \begin{macrocode} +%<*lig> +% PGOTHLIG.MF Gothic Prescius ligatured letters, punctation and dashes + +% \end{macrocode} +% First the ligtables. +% \begin{macrocode} + +ligtable "`": "`"=:oct"134"; +ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#; + +ligtable "-": "-"=:oct"173"; +ligtable oct"173": "-"=:oct"174"; + +%%%%ligtable "c": "t"=:oct"014"; +ligtable "s": "t"=:oct"015"; + +% \end{macrocode} +% +% +% +% \begin{routine}{st} +% The `st' ligature. +% \begin{macrocode} + +cmchar "PGOTH st ligature"; +beginchar(oct"015", 2sb#+hstretch*((1 + narrowd + 3)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +n1 := h/ascratio; % x-height +pickup quill; +%% the S (long) +lft x1 = pcshiftx + narrowd*st; +x2 = x1; y2 = 0; y1 = h - (top y2 - bot y2); +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,narrowd, 1/4narrowdmin, diawd, diang); +%draw_downdiamondstem(12,2,narrowd, narrowdmin, diawd, diang); +draw z12--z2; draw_flat_foot(2); +%% the T +%% bar +lft x23 = rt x1 + pcshiftx; top y23 = n1; +rt x24 = w-pcshiftx; y24=y23; +draw z23--z24; +%% stem +lft x21 = rt x23; top y21 = h; +x22 = x21; y22 = 0; +%draw_downdiamondstem(21,22,narrowd,narrowdmin,diawd,diang); +draw z21--z22; draw_flat_foot(22); +%% the ligature +x11=x1; top y11=h; +draw z12--z11--z21; +ductus:=false; +penlabels(1,2,3,4,5,11,21,22,23,24,100); +%% end "t" +endchar; %% end st ligature + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{''} +% The `''' ligature. +% \begin{macrocode} + +cmchar "Closing quotes"; +beginchar(oct"042",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h; +x2=x1-(2hstretch*dot_size); +draw_pcomma(1,dot_size,comma_width); % right +draw_pcomma(2,dot_size,comma_width); % left +penlabels(1,2); +endchar; % end of "''" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{``} +% The ```' ligature. +% \begin{macrocode} + +cmchar "Opening quotes"; +beginchar(oct"134",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h; +x2=x1+(2hstretch*dot_size); +draw_plq(1,dot_size,comma_width); % left +draw_plq(2,dot_size,comma_width); % right +penlabels(1,2); +endchar; % end of "``" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{-} +% The `-' (hyphen) character. +% \begin{macrocode} + +cmchar "Hyphen"; +beginchar("-",sb#+hstretch*((2)*stem_width#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +pickup threequarterquill; +lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=1/2h; +draw z21--z22; +%%draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "-" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{--} +% The `--' (en-dash) ligature. +% \begin{macrocode} + +cmchar "En dash"; +beginchar(oct"173",sb#+hstretch*((3)*stem_width#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +pickup threequarterquill; +lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=1/2h; +draw z21--z22; +%%draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "--" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{---} +% The `---' (em dash) ligature. The em dash is twice the width of the en dash. +% \begin{macrocode} + +cmchar "Em dash"; +beginchar(oct"174",sb#+hstretch*((6)*stem_width#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +pickup threequarterquill; +lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=1/2h; +draw z21--z22; +%%draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "---" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{&} +% The ampersand (which is really an `et' ligature). +% In this case, a `t' with one thin bar. +% \begin{macrocode} + +cmchar "PGOTH ampersand"; +beginchar("&", 2sb#+hstretch*((7/2)*stem_width#), asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% bar +lft x3 = pcshiftx; top y1 = h; +top y3 = bot y1; +rt x4 = w-pcshiftx; y4=y3; +draw z3--z4; +%% stem +lft x1 = rt x3; +x2 = x1; y2 = 0; +%draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); +draw z1--z2; draw_flat_foot(2); +%% E bars +n1 = 1/2[y3,y2a] + 1/2angdec; +pickup halfquill; +lft x11 = pcshiftx; rt x12 = w-pcshiftx; +%y11=y12=n1; +y11 = y12 = 1/2h; +x13 = x11; x14=x12; y13 = y14 = n1-angdec; +draw z11--z12; +%%draw z13--z14; +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,13,14,100); +endchar; % end "&" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</lig> +% \end{macrocode} +% +% \subsection{The digits file} +% +% These are arabic digits in the style of the book-hand. They are a +% modern invention. +% +% \begin{macrocode} +%<*dig> +% PGOTHDIG.MF Program file for Gothic Prescius digits +% + +% \end{macrocode} +% +% +% +% \begin{routine}{1} +% The digit `1'. +% \begin{macrocode} +cmchar "PGOTH digit 1"; +beginchar("1", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +x1 = x2 = 1/2w; y1 = h; y2 = 0; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,1/2,1/2,diawd,diang); +%draw_downdiamondstem(12,2,1/2,1/2,diawd,diang); +draw z12--z2; draw_flat_foot(2); +penlabels(1,2,100); +endchar; % end "1" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{2} +% The digit `2'. +% \begin{macrocode} +cmchar "PGOTH digit 2"; +beginchar("2", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric st; st := stem_width; +numeric n[]; +n1 := 1/2st; +pickup quill; +% stem +lft x1=pcshiftx+n1; top y1=h-2n1; +rt x3=w-pcshiftx-n1; y3=3/4h; +x2=1/2[x1,x3]; top y2= h; +% foot +x5= lft x1; bot y5=0; +x6= rt x3; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(5,6,thin); % foot +draw z1--z2--z3--z5wl; % curve +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "2" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{3} +% The digit `3'. +% \begin{macrocode} +cmchar "PGOTH digit 3"; +beginchar("3", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +n1 := st; +pcshiftx := u; +pickup quill; +%% top +lft x1 = pcshiftx + n1; rt x3 = w - pcshiftx - n1; +x2 = 1/2[x1,x3]; x4 = 1/2[x1,x2]; +top y2 = h; y3 = 12/16h; +(z2-z1) = whatever*pdir; +(z3-z4) = whatever*pdir; +%% bottom +x5 = 12/16[x4, rt x4]; x6 = x3; x7 = x2; +x18 = x1-n1; x17 = x7; +bot y7 = thin; +y5 = 12/16[y4, top y4]; +(z5-z6) = whatever*(z2-z3); +bot y18 = 0; bot y17 = 0; + +draw z1--z2--z3--z4; % top +draw_wave(18,17,thin); +draw z5--z6--z18wr; % bottom +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,17,18,100); +endchar; % end "3" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{4} +% The digit `4'. +% \begin{macrocode} +cmchar "PGOTH digit 4"; +beginchar("4", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +numeric st; st := stem_width; +numeric n[]; +pcshiftx := u; +pickup quill; +% the stem +x1=x2=w-pcshiftx-(wided+widedmin)*st; +y1=h; y2=0; +% the crossbar +lft x3=pcshiftx; y3=7/16h; +rt x4=w-pcshiftx; y4=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); % stem +draw z1--z2; draw_flat_foot(2); +draw z3--z4; % horizontal +draw z1--z3; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "4" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{5} +% The digit `5'. +% \begin{macrocode} +cmchar "PGOTH digit 5"; +beginchar("5", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric n[]; +numeric st; st := stem_width; +n1 := st; +pickup quill; +% for the top +rt x1=w-pcshiftx; top y1=h; +lft x2=pcshiftx+n1; y2=y1; +% the S curve +x3=x2; y3=0.5h; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +rt x5=w-pcshiftx; y5=1/2[thick,y3]; +x6=w/2; bot y6=0; +%%x16 = 12/16[x3,x5]; +x16 = lft x5; +bot y16 = 0; +lft x17=pcshiftx; bot y17=0; +z167 = 1/2[z16,z17]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(2,1,thin); % top squiggle +draw z2wl--z3; % vertical +%%draw_wave(17,16,thin); % foot +draw z17{pdir}..{pdir}z16; % foot +draw z3{pdir}..z5{down}..z16; % curve +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "5" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{6} +% The digit `6'. +% \begin{macrocode} +cmchar "PGOTH digit 6"; +beginchar("6", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +n1 := 24/16st; +pickup quill; +%% bottom left +x1 = x4 = w/2; top y1 = h - thick; bot y4 = 0; +x2 = x3 = x1 + n1; x5 = x6 = x1 - n1; +n2 = top y1; +y2 = y6 = 3/4[y4,y1]; +y3 = y5 = 1/4[y4,y1]; +%% bowl +draw z1--z2--z3--z4--z5--z6--cycle; +%% head +x11 = x5; top y11 = h; +x12 = x2; y12 = y11; +draw_wave(11,12,thin); +x16 = x11; y16 = y11-thin; +draw z6--z16; +penlabels(1,2,3,4,5,6,12,100); +endchar; % end "6" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{7} +% The digit `7'. +% \begin{macrocode} +cmchar "PGOTH digit 7"; +beginchar("7", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% top bar +lft x1=pcshiftx; +rt x2=w-pcshiftx; +top y1=top y2=h; +% bowed leg +x4=w/2; bot y4=0; +x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(1,2,thin); % top bar +draw z1wr..z3..z4; +draw_flat_foot(4); +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "7" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{8} +% The digit `8'. +% \begin{macrocode} +cmchar "PGOTH digit 8"; +beginchar("8", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=1; +pickup quill; +lft x1= pcshiftx; rt x3=w-pcshiftx; top y1 = y3 = 3/4h; +rt x2 = lft x4 = w/2; top y2=h; bot y4=0; +x5=x2; y5=h/2+2o; +lft x11=pcshiftx; rt x13=w-pcshiftx; y11 = bot y13 = 1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw z1..z2..z3..z5..z11..z4..z13..z5..cycle; +draw z1--z2--z3--z11--z4--z13--cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,100); +endchar; % end "8" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{9} +% The digit `9'. +% \begin{macrocode} +cmchar "PGOTH digit 9"; +beginchar("9", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +n1 := 24/16st; +pickup quill; +%% bottom left +x1 = x4 = w/2; top y1 = h; bot y4 = thick; +x2 = x3 = x1 + n1; x5 = x6 = x1 - n1; +y2 = y6 = 3/4[y4,y1]; +y3 = y5 = 1/4[y4,y1]; +%% bowl +draw z1--z2--z3--z4--z5--z6--cycle; +%% foot +x11 = x5; bot y11 = 0; +x12 = x2; y12 = y11; +draw_wave(11,12,thin); +x13 = x12; y13 = y12+thin; +draw z3--z13; +penlabels(1,2,3,4,5,6,12,100); +endchar; % end "9" + + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{0} +% The digit `0'. +% \begin{macrocode} +cmchar "PGOTH digit 0"; +beginchar("0", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +n1 := 24/16st; +pickup quill; +%% bottom left +x1 = x4 = w/2; top y1 = h; bot y4 = 0; +x2 = x3 = x1 + n1; x5 = x6 = x1 - n1; +y2 = y6 = 3/4h; +y3 = y5 = 1/4h; + +draw z1--z2--z3--z4--z5--z6--cycle; + +penlabels(1,2,3,4,5,6,12,100); +endchar; % end "0" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</dig> +% \end{macrocode} +% +% +% \section{The font definition files} \label{sec:fd} +% +% The font comes in normal and bold weights only. +% +% \begin{macrocode} +%<*fdot1> +\DeclareFontFamily{OT1}{pgoth}{} + \DeclareFontShape{OT1}{pgoth}{m}{n}{ <-8.5> pgoth7 <8.5-15> pgoth10 <15-> pgoth17 }{} + \DeclareFontShape{OT1}{pgoth}{m}{sl}{ <-> sub * pgoth/m/n }{} + \DeclareFontShape{OT1}{pgoth}{m}{it}{ <-> sub * pgoth/m/n }{} + \DeclareFontShape{OT1}{pgoth}{m}{sc}{ <-> sub * pgoth/m/n }{} + \DeclareFontShape{OT1}{pgoth}{m}{u}{ <-> sub * pgoth/m/n }{} + \DeclareFontShape{OT1}{pgoth}{bx}{n}{ <-15> pgothb10 <15-> pgothb17 }{} + \DeclareFontShape{OT1}{pgoth}{bx}{it}{ <-> sub * pgoth/bx/n }{} + \DeclareFontShape{OT1}{pgoth}{bx}{sl}{ <-> sub * pgoth/bx/n }{} + \DeclareFontShape{OT1}{pgoth}{b}{n}{ <-> sub * pgoth/bx/n }{} +%</fdot1> +% \end{macrocode} +% +% +% \begin{macrocode} +%<*fdt1> +\DeclareFontFamily{T1}{pgoth}{} + \DeclareFontShape{T1}{pgoth}{m}{n}{ <-8.5> pgoth7 <8.5-15> pgoth10 <15-> pgoth17 }{} + \DeclareFontShape{T1}{pgoth}{m}{sl}{ <-> sub * pgoth/m/n }{} + \DeclareFontShape{T1}{pgoth}{m}{it}{ <-> sub * pgoth/m/n }{} + \DeclareFontShape{T1}{pgoth}{m}{sc}{ <-> sub * pgoth/m/n }{} + \DeclareFontShape{T1}{pgoth}{m}{u}{ <-> sub * pgoth/m/n }{} + \DeclareFontShape{T1}{pgoth}{bx}{n}{ <-15> pgothb10 <15-> pgothb17 }{} + \DeclareFontShape{T1}{pgoth}{bx}{it}{ <-> sub * pgoth/bx/n }{} + \DeclareFontShape{T1}{pgoth}{bx}{sl}{ <-> sub * pgoth/bx/n }{} + \DeclareFontShape{T1}{pgoth}{b}{n}{ <-> sub * pgoth/bx/n }{} +%</fdt1> +% \end{macrocode} +% +% \section{The package code} \label{sec:code} +% +% \subsection{The \Lpack{pgothic} package} +% +% The \Lpack{pgothic} package is for typesetting short pieces of text +% in the \thisfont{} fonts. +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. +% \begin{macrocode} +%<*usc> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{pgothic}[2002/12/30 v1.0 package for Gothic Prescius fonts] +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\pgothfamily} +% Selects the \thisfont{} font family in the OT1 or T1 encoding. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \newcommand{\pgothfamily}{\usefont{T1}{pgoth}{m}{n}} +\else + \newcommand{\pgothfamily}{\usefont{OT1}{pgoth}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textpgoth} +% Text command for the \thisfont{} font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textpgoth}{\pgothfamily} +% \end{macrocode} +% \end{macro} +% +% The end of this package. +% \begin{macrocode} +%</usc> +% \end{macrocode} +% +% \subsection{The \Lpack{allpgoth} package} +% +% The \Lpack{allpgoth} package is intended for use when the entire document +% will be typeset in the book-hand. This is a minimal package. Because the +% book-hand should not contain arabic digits a fuller package would redefine +% anything numbered in \LaTeX{} to use roman instead of arabic numbering. +% Also, because of the large |\baselineskip| many other aspects of \LaTeX{} +% to do with vertical positioning should also be redefined. +% +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. It also uses the \Lpack{pgothic} package. +% \begin{macrocode} +%<*uscall> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{allpgoth}[2002/12/30 v1.0 package for all Gothic Prescius fonts] +\RequirePackage{pgothic} +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% Redefine the default fonts to be \thisfont, which has only one family +% member. +% \begin{macro}{\rmdefault} +% \begin{macro}{\sfdefault} +% \begin{macro}{\ttdefault} +% \begin{macrocode} +\renewcommand{\rmdefault}{pgoth} +\renewcommand{\sfdefault}{pgoth} +\renewcommand{\ttdefault}{pgoth} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The `leading' in the book-hands is a function of the |x-height|, which is +% normally much +% greater than for the CMR fonts. I have borrowed code from Frank Jensen's +% \Lpack{beton} package~\cite{BETON} to do this. The |x-height| (in points) +% for the CMR +% fonts is given in Table~\ref{tab:cmrx}. Note that the CMR design sizes are +% 5--10, 12, and 17.28 points. The other values given are scaled from these +% figures. +% +% \begin{table} +% \centering +% \caption{The x heights of the CMR and \thisfont{} fonts} \label{tab:cmrx} +% \begin{tabular}{ccc} \hline +% Design & CMR & \thisfont \\ +% Size & X Height & X Height \\ \hline +% 5 & 2.14 & 3.00 \\ ^^A CMR skip = 6pt = 2.8 times +% 6 & 2.58 & 3.61 \\ ^^A CMR skip = 7pt = 2.7 times +% 7 & 3.00 & 4.20 \\ ^^A CMR skip = 8pt = 2.7 times +% 8 & 3.44 & 4.81 \\ ^^A CMR skip = 9.5pt = 2.8 times +% 9 & 3.86 & 5.40 \\ ^^A CMR skip = 11pt = 2.8 times +% 10 & 4.31 & 6.03 \\ ^^A CMR skip = 12pt = 2.8 times +% 11 & 4.74 & 6.64 \\ ^^A CMR skip = 13.6pt = 2.8 times +% 12 & 5.17 & 7.24 \\ ^^A CMR skip = 14.5pt = 2.8 times +% 14 & 6.03 & 8.44 \\ ^^A CMR skip = 18pt = 3.0 times +% 17 & 7.44 & 10.41 \\ ^^A CMR skip = 22pt = 3.0 times +% 20 & 8.75 & 12.25 \\ ^^A CMR skip = 25pt = 2.9 times +% 25 & 10.94 & 15.32 \\ ^^A CMR skip = 30pt = 2.7 times +% \hline +% \end{tabular} +% \end{table} +% +% \begin{macro}{\pgoth@baselineskip@table} +% A table of the normal font sizes and the corresponding baselineskip. +% The distance between baselines for \thisfont{} is over twice +% the |x-height|. ^^A actually 2.5 times to nearest half point +% +% \begin{macrocode} +\newcommand{\pgoth@baselineskip@table}{% + <\@vpt>7.5% + <\@vipt>9.0% + <\@viipt>10.5% + <\@viiipt>12.0% + <\@ixpt>13.5% + <\@xpt>15.0% + <\@xipt>16.5% + <\@xiipt>18.0% + <\@xivpt>21.0% + <\@xviipt>26.0% + <\@xxpt>30.5% + <\@xxvpt>38.5} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\pgoth@new@setfontsize} +% This is a macro that replaces the |\@setfontsize| macro which is called by +% the font size changing commands. +% \begin{macrocode} +\newcommand{\pgoth@new@setfontsize}[3]{% + \edef\@tempa{\def\noexpand\@tempb####1<#2}% + \@tempa>##2<##3\@nil{\def\pgoth@baselineskip@value{##2}}% + \edef\@tempa{\noexpand\@tempb\pgoth@baselineskip@table<#2}% + \@tempa><\@nil + \ifx\pgoth@baselineskip@value\@empty + \def\pgoth@baselineskip@value{#3}% + \fi + \pgoth@old@setfontsize{#1}{#2}\pgoth@baselineskip@value} +% \end{macrocode} +% \end{macro} +% +% We had better give an author a means of using The Computer Modern fonts +% if necessary. +% +% \begin{macro}{\cmrfamily} +% \begin{macro}{\cmssfamily} +% \begin{macro}{\cmttfamily} +% These macros select the Computer Modern Roman, Sans, and Typewriter +% font families in either the T1 or OT1 encodings. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}} +\else + \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcmr} +% Text command for the Computer Modern Roman font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmr}{\cmrfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmss} +% Text command for the Computer Modern Sans font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmss}{\cmssfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmtt} +% Text command for the Computer Modern Typewriter font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmtt}{\cmttfamily} +% \end{macrocode} +% \end{macro} +% +% +% At the start of the document, change the |\@setfontsize| macro and call +% the normal font to implement the change. +% \begin{macrocode} +\AtBeginDocument{% + \let\pgoth@old@setfontsize=\@setfontsize + \let\@setfontsize=\pgoth@new@setfontsize} +\AtBeginDocument{\normalsize} +% \end{macrocode} +% +% +% The end of this package. +% \begin{macrocode} +%</uscall> +% \end{macrocode} +% +% +% +% +% +% \Finale +% \PrintIndex +% +\endinput + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + diff --git a/Master/texmf-dist/source/latex/bookhands/pgothic/pgothic.ins b/Master/texmf-dist/source/latex/bookhands/pgothic/pgothic.ins new file mode 100644 index 00000000000..dc0ee1705c5 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/pgothic/pgothic.ins @@ -0,0 +1,101 @@ +%% +%% pgothic.ins +%% Copyright 1999 Peter R. Wilson +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Peter Wilson (CUA) +%% now at: peter.r.wilson@boeing.com +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{pgothic.ins} +\input docstrip.tex +\preamble + + Copyright 1999 Peter R. Wilson + + This program is provided under the terms of the + LaTeX Project Public License distributed from CTAN + archives in directory macros/latex/base/lppl.txt. + +Author: Peter Wilson (CUA) + now at: peter.r.wilson@boeing.com + +\endpreamble + +\keepsilent + +%%% \Msg{*** Generating the driver file ***} +%%% \generateFile{pgothic.drv}{t}{\from{pgothic.dtx}{driver}} + +\Msg{*** Generating the Metafont files ***} + +\usepostamble\empty +\generateFile{pgoth7.mf}{t}{\from{pgothic.dtx}{base7}} +\generateFile{pgoth10.mf}{t}{\from{pgothic.dtx}{base10}} +\generateFile{pgoth17.mf}{t}{\from{pgothic.dtx}{base17}} +\generateFile{pgothb7.mf}{t}{\from{pgothic.dtx}{base7b}} +\generateFile{pgothb10.mf}{t}{\from{pgothic.dtx}{base10b}} +\generateFile{pgothb17.mf}{t}{\from{pgothic.dtx}{base17b}} +\generateFile{pgothl.mf}{t}{\from{pgothic.dtx}{min}} +\generateFile{pgothu.mf}{t}{\from{pgothic.dtx}{maj}} +\generateFile{pgothtitle.mf}{t}{\from{pgothic.dtx}{mfd}} +\generateFile{pgothpunct.mf}{t}{\from{pgothic.dtx}{punct}} +\generateFile{pgothlig.mf}{t}{\from{pgothic.dtx}{lig}} +\generateFile{pgothdig.mf}{t}{\from{pgothic.dtx}{dig}} + +\Msg{*** Generating the Font Definition files ***} +\usepostamble\defaultpostamble + +\generateFile{ot1pgoth.fd}{t}{\from{pgothic.dtx}{fdot1}} +\generateFile{t1pgoth.fd}{t}{\from{pgothic.dtx}{fdt1}} + +\Msg{*** Generating the LaTeX2e package files ***} + +\generateFile{pgothic.sty}{t}{\from{pgothic.dtx}{usc}} +\generateFile{allpgoth.sty}{t}{\from{pgothic.dtx}{uscall}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into directories searched by TeX:} +\Msg{*} +\Msg{* Move these into the font source area:} +\Msg{* \space\space pgoth7.mf} +\Msg{* \space\space pgoth10.mf} +\Msg{* \space\space pgoth17.mf} +\Msg{* \space\space pgothb7.mf} +\Msg{* \space\space pgothb10.mf} +\Msg{* \space\space pgothb17.mf} +\Msg{* \space\space pgothl.mf} +\Msg{* \space\space pgothu.mf} +\Msg{* \space\space pgothtitle.mf} +\Msg{* \space\space pgothpunct.mf} +\Msg{* \space\space pgothlig.mf} +\Msg{* \space\space pgothdig.mf} +\Msg{*} +\Msg{* Move these into the LaTeX macro area:} +\Msg{* \space\space ot1pgoth.fd} +\Msg{* \space\space t1pgoth.fd} +\Msg{* \space\space pgothic.sty} +\Msg{* \space\space allpgoth.sty} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{* Process any name.idx file by:} +\Msg{* \space\space\space\space makeindex -s gind.ist name} +\Msg{* Process any name.glo file by:} +\Msg{* \space\space\space\space makeindex -s gglo.ist -o name.gls name.glo} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/bookhands/rotunda/rotunda.dtx b/Master/texmf-dist/source/latex/bookhands/rotunda/rotunda.dtx new file mode 100644 index 00000000000..abd34224644 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/rotunda/rotunda.dtx @@ -0,0 +1,4959 @@ +% \iffalse meta-comment +% +% rotunda.dtx +% Copyright 1999 Peter R. Wilson +% +% This program is provided under the terms of the +% LaTeX Project Public License distributed from CTAN +% archives in directory macros/latex/base/lppl.txt. +% +% Author: Peter Wilson (CUA) (now at: peter.r.wilson@boeing.com) +% +% If you do not have the docmfp package (available from CTAN in +% tex-archive/macros/latex/contrib/supported), comment out the +% \usepackage{docmfp} line below and uncomment the line following it. +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{docmfp} +%%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{} +\EnableCrossrefs +\CodelineIndex +%% comment out next line to show code +\OnlyDescription +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{rotunda.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{134} +% +% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} +% \DoNotIndex{\@centercr,\@cite} +% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} +% \DoNotIndex{\@input,\@ixpt,\@m} +% \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} +% \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} +% \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} +% \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} +% \DoNotIndex{\advance,\Alph,\alph} +% \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\bullet} +% \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} +% \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} +% \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} +% \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +% \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} +% \DoNotIndex{\fbox} +% \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} +% \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +% \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} +% \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} +% \DoNotIndex{\input} +% \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} +% \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} +% \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +% \DoNotIndex{\NeedsTeXFormat,\newdimen} +% \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} +% \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} +% \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} +% \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +% \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +% \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +% \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} +% \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} +% \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} +% \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} +% \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} +% \DoNotIndex{\viipt,\vipt,\vskip,\vspace} +% \DoNotIndex{\wd,\xiipt,\year,\z@} +% +% \changes{v1.0}{2002/12/30}{First public release} +% +% \def\fileversion{v1.0} +% \def\filedate{2002/12/30} +% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package +% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option +% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file +% \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter +% \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle +% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment +% \newcommand*{\AD}{\textsc{ad}} +% \newcommand*{\thisfont}{Rotunda} +% +% \title{The \Lpack{Rotunda} fonts\thanks{This +% file has version number \fileversion, last revised +% \filedate.}} +% +% \author{% +% Peter Wilson\\ +% Catholic University of America \\ +% Now at \texttt{peter.r.wilson@boeing.com} +% } +% \date{\filedate} +% \maketitle +% \begin{abstract} +% The \Lpack{rotunda} and \Lpack{allrtnd} packages provide a set of +% Metafont \thisfont{} book-hands +% as used +% for manuscripts in the 13th to 15th centuries. This is one in a series +% of manuscript fonts. +% \end{abstract} +% \tableofcontents +% \listoftables +% +% +% +% +% \section{Introduction} +% +% The \Lpack{rotunda} and \Lpack{allrtnd} packages provide a Metafont~\cite{METAFONT} version +% of the \thisfont{} manuscript book-hand that was in use between about the +% eleventh and twelfth centuries~\AD. It is part of a project to provide fonts +% covering the major manuscript hands between the first century~\AD{} and +% the invention of printing. The principal resources used in this project +% are listed in the Bibliography. +% +% This manual is typeset according to the conventions of the +% \LaTeX{} \textsc{docstrip} utility which enables the automatic +% extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. +% The \Lpack{docmfp} package is used for documenting the Metafont portions +% of the distribution~\cite{DOCMFP}. +% +% Section~\ref{sec:usc} describes the usage of the package. +% Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} +% and source code for the package is in Section~\ref{sec:code}. +% +% \subsection{Manuscript book-hands} +% +% Before the invention of printing all books were written by hand. The book-hands +% used by the scribes and copyists for the manuscripts changed as time +% went on. Table~\ref{tab:1} lists some of the common book-hands which were used +% between the 1st and 15th centuries. The later book-hands formed the basis of the +% fonts used by the early printers, which in turn form the basis of the printing +% fonts in use today. +% +% The manuscript book-hands were written with a broad nibbed reed or quill +% pen. Among the distinguishing characteristics of a hand, apart from the +% actual shape of the letters, are the angle of the pen (which controls the +% variation between thick and thin strokes) and the height of a letter compared +% to the width of the nib. The lower the ratio of the letter height to nib +% width, the more condensed is the script. The scripts also varied in their +% typical height. +% +% Table~\ref{tab:1} gives an `average' x-height for each +% script, which I obtained by measuring a sample of photographs of +% manuscripts written in the various hands. About a dozen examples +% of each book-hand were measured. This figure should not be taken too +% seriously. +% +% There was not a sharp division between the use of one hand and another. +% Many manuscripts exhibit a variety of hands in the same document. For example, +% the scribe writing in an Uncial hand may have used Roman Rustic letters +% for capitals. Usually the same pen was used for the two different scripts. +% +% Generally speaking, as a hand got older it became more embelished, and +% therefore took longer to write. As this happened a new hand would appear that +% was faster, and which would eventually make the earlier one obsolete. +% +% Many of the book-hands were single-cased; that is, they did not have an +% upper- and lower-case as we do nowadays in Western scripts. On the other +% hand, a script might be majuscule or minuscule. A \textit{majuscule} script +% is one, like our upper-case, where the letters are drawn between two lines +% and are of a uniform height with no ascenders or descenders. +% A \textit{minuscule} script, like our lower-case, is drawn between four lines +% and has ascenders and descenders. +% +% \begin{table} +% \centering +% \caption{The main manuscript book-hands} \label{tab:1} +% \begin{tabular}{lccccc} \hline +% Name & Century & x-height & Height & Pen & Normalised \\ +% & & (mm) & (nib widths) & angle & height \\ \hline +% Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\ +% Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\ +% Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\ +% Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\ +% Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\ +% Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\ +% Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\ +% Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\ +% Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\ +% Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\ +% Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\ +% Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline +% \end{tabular} +% \end{table} +% +% During the period under consideration arabic numerals were effectively +% not used. At the beginning they were unknown and even though some knew +% of them towards the end, the glyphs used for them are not recognisable --- +% to me they look somewhat like cryllic letters --- and each locality +% and time had its own highly individualistic rendering. The general rule +% when using one of these book-hands is to write all numbers using +% roman numerals. +% +% The Roman alphabet consisted of 23 capital letters --- the J, U and W +% were absent. The book-hands initially used both a `u' and a `v' interchangeably +% but by the 10th century the practice had become to use the `v' before a vowel +% and the `u' otherwise. The letter corresponding to the W sound appeared +% in England around the 7th century in +% the form of the runic \textit{wen} character and by about the 11th century +% the `w' chacter was generally used. The `J' is the newest letter of all, not +% appearing until about the mid 16th century. +% +% In the first century punctuation was virtually unknown, and typically +% would not even be any additional space between individual words, never +% mind denoting ends of sentences. Sometimes a dot at mid-height would be +% used as a word seperator, or to mark off the end of a paragraph. Effectively +% a text was a continuous stream of letters. By the time that printing was +% invented, though, all of our modern punctuation marks were being used. +% +% Among all these manuscript hands, the Carolingian minuscule is the +% most important as our modern fonts are based on its letter shapes, and it is +% also at this point in time where the division occured between the black letter +% scripts as used even today in Germany, and the lighter fonts used elesewhere. +% The Rotunda and Humanist minuscule hands were developed in Italy and were +% essentially a rediscovery of the Carolingian minusucle. Guthenberg took the +% Gothic scripts as the model for his types. Later printers, +% such as Nicholas Jenson of Venice, +% took the Humanist scripts as their models. +% +% +% \subsection{The \thisfont{} script} +% +% The Italians developed their own version of the Gothic hands which +% was more open than the Textura forms. Their script became to be called +% Rotunda and was in use in Italy until the Humanist hand came along. +% +% Ligatures disappeared, except of course the ampersand. The script +% was basically a miniscule but when capital letters were required each scribe +% seemed to do his own thing --- letters based on uncial, square capitals, or +% Carolingian forms might be used. +% +% \section{The \Lpack{rotunda} and \Lpack{allrtnd} packages} \label{sec:usc} +% +% The \thisfont{} font family is called |rtnd|. The font is supplied in both +% OT1 and T1 encodings. +% +% \subsection{The \Lpack{rotunda} package} +% +% This is intended for the occasions when some short pieces of text have +% to be written in \thisfont{} while the majority of the document is in another +% font. The normal baselineskips are used. +% +% \DescribeMacro{\rtndfamily} +% The |\rtndfamily| declaration starts typesetting with the \thisfont{} fonts. +% Use of the \thisfont{} font will continue until either there is another |\...family| +% declaration or the current group (e.g., environment) is closed. +% +% \DescribeMacro{\textrtnd} +% The command |\textrtnd{|\meta{text}|}| will typeset \meta{text} using the +% \thisfont{} fonts. +% +% \subsection{The \Lpack{allrtnd} package} +% +% +% This package is for when the entire document will be typeset with the +% \thisfont{} font. The baselineskips are set to those appropriate to the +% book-hand. +% +% This is a minimalist package. Apart from declaring \thisfont{} to be the +% default font and setting the baselineskips appropriately, it makes no other +% alterations. +% Vertical spacing +% before and after section titles and before and after lists, etc., will be +% too small as the \LaTeX{} design assumes a font comparable in size to +% normal printing fonts, and the book-hand is much taller. +% To capture more of the flavour of the time, all numbers +% should be written using roman numerals. +% The \Lpack{romannum} package~\cite{ROMANNUM} +% can be used so that \LaTeX{} will typeset the numbers that it generates, +% like sectioning or caption numbers, using roman numerals instead of arabic +% digits. +% +% \DescribeMacro{\cmrfamily} +% \DescribeMacro{\textcmr} +% \DescribeMacro{\cmssfamily} +% \DescribeMacro{\textcmss} +% \DescribeMacro{\cmttfamily} +% \DescribeMacro{\textcmtt} +% The |...family| declarations start typesetting with the Computer Modern Roman +% (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer +% Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}| +% commands will typeset \meta{text} in the corresponding Computer Modern font. +% +% The \Lpack{allrtnd} package automatically loads the \Lpack{rotunda} package, +% so its font commands are available if necessary. +% +% \StopEventually{ +% \bibliographystyle{alpha} +% \renewcommand{\refname}{Bibliography} +% \begin{thebibliography}{GMS94} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem[And69]{ANDERSON69} +% Donald M.~Anderson. +% \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}. +% \newblock Holt, Rinehart and Winston, 1969. +% +% \bibitem[Bol95]{BOLOGNA95} +% Giulia Bologna. +% \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}. +% \newblock Crescent Books, 1995. +% +% \bibitem[Day95]{DAY95} +% Lewis F.~Day. +% \newblock {\em Alphabets Old \& New}. +% \newblock (3rd edition originally published by B.~T.~Batsford, 1910) +% \newblock Senate, 1995. +% +% \bibitem[Dro80]{DROGIN80} +% Marc Drogin. +% \newblock {\em Medieval Calligraphy: Its History and Technique}. +% \newblock Allenheld, Osmun \& Co., 1980. +% +% \bibitem[Dru95]{DRUCKER95} +% Johanna Drucker. +% \newblock {\em The Alphabetic Labyrinth}. +% \newblock Thames \& Hudson, 1995. +% +% \bibitem[Fir93]{FIRMAGE93} +% Richard A.~Firmage. +% \newblock {\em The Alphabet Abecedarium}. +% \newblock David R~Goodine, 1993. +% +% \bibitem[Fli98]{LETTRINE} +% Daniel Flipo. +% \newblock {\em The LETTRINE package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1998. +% +% \bibitem[Har95]{HARRIS95} +% David Harris. +% \newblock {\em The Art of Calligraphy}. +% \newblock DK Publishing, 1995. +% +% \bibitem[Jen95]{BETON} +% Frank Jensen. +% \newblock {\em The BETON package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1995. +% +% \bibitem[Joh71]{JOHNSTON75} +% Edward Johnston (ed. Heather Child). +% \newblock {\em Formal Penship and Other Papers}. +% \newblock Penthalic, 1971. +% +% \bibitem[Knu87]{CM} +% Donald E.~Knuth. +% \newblock {\em Computer Modern Typefaces}. +% \newblock Addison-Wesley, 1987. +% +% \bibitem[Knu92]{METAFONT} +% Donald E.~Knuth. +% \newblock {\em The METAFONTbook}. +% \newblock Addison-Wesley, 1992. +% +% \bibitem[GMS94]{GOOSSENS94} +% Michel Goossens, Frank Mittelbach, and Alexander Samarin. +% \newblock {\em The LaTeX Companion}. +% \newblock Addison-Wesley Publishing Company, 1994. +% +% \bibitem[Tho75]{THOMAS75} +% Alan G.~Thomas. +% \newblock {\em Great Books and Book Collectors}. +% \newblock Weidenfield and Nichoson, 1975. +% +% \bibitem[Wil99]{DOCMFP} +% Peter R.~Wilson. +% \newblock {\em The DOCMFP Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \bibitem[Wil99b]{ROMANNUM} +% Peter R.~Wilson. +% \newblock {\em The ROMANNUM Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \end{thebibliography} +% } +% +% \section{The Metafont code} \label{sec:mf} +% +% +% As previously noted, this work is part of a larger project to provide +% fonts covering the main manuscript book-hands. As such, one of the +% aims is to produce a coordinated set of fonts, especially as multiple +% hands might be used in a single document. +% +% Noting that the hands tend to be somewhat larger than the typical 10pt +% size (where the x-height is approximately 1.5mm) used for modern books, +% I have also designed the fonts +% at a larger than normal size, then applied some non-linear factors when reducing +% them down to a 10pt size. +% Further, I have used the height of the Carolingian minuscule as a +% normalising factor when deciding on the absolute height of any particular +% script. The x-height of the Carolingian font is made equal to the +% x-height of the Computer Modern Roman (CMR) font. +% +% Modern fonts are effectively drawn. That is, the outline of the letter is +% drawn carefully and the center is filled with ink. This is shown to good +% effect in the Metafont code for the Computer Modern fonts~\cite{CM}. +% In contrast, the manuscript letters were inked by single pen strokes in +% a calligraphic manner. I have tried to repeat this calligraphic style +% in the Metafont code. +% +% As much as possible I have tried to use parameter values from the +% Computer Modern Roman (CMR) fonts in order to reduce possible +% infelicities if the CM and manuscript fonts are used together. However, +% few of the CMR parameters are applicable to the calligraphic style. +% +% +% \subsection{The parameter file} +% +% We deal with the parameter files first, and start by announcing +% what they are for. The \thisfont{} font comes in three sizes and also as a normal +% and a bold font. +% \begin{macrocode} +%<*base7|base10|base17|base7b|base10b|base17b> +%<base7>%%% RTND7.MF Early Gothic at 7 point design size. +%<base10>%%% RTND10.MF Early Gothic at 10 point design size. +%<base17>%%% RTND17.MF Early Gothic at 17 point design size. +%<base7b>%%% RTNDB7.MF Early Gothic Bold at 7 point design size. +%<base10b>%%% RTNDB10.MF Early Gothic Bold at 10 point design size. +%<base17b>%%% RTNDB17.MF Early Gothic Bold at 17 point design size. +% +% \end{macrocode} +% Parameters from CMR are used as much as possible. We also +% make sure that \Lpack{cmbase} is loaded as well as plain Metafont. +% \begin{macrocode} +if unknown cmbase: input cmbase fi + +%<base7>font_identifier:="RTND"; font_size 7pt#; +%<base10>font_identifier:="RTND"; font_size 10pt#; +%<base17>font_identifier:="RTND"; font_size 17.28pt#; +%<base7b>font_identifier:="RTNDB"; font_size 7pt#; +%<base10b>font_identifier:="RTNDB"; font_size 10pt#; +%<base17b>font_identifier:="RTNDB"; font_size 17.28pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutstretch} +% The CMR scaling for lowercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> jutstretch:=1.19; +%<base10|base10b> jutstretch:=1.152; +%<base17|base17b> jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{stemstretch} +% The CMR scaling for lowercase stem widths wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> stemstretch:=1.50; +%<base10|base10b> stemstretch:=1.31; +%<base17|base17b> stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{caprat} +% The scaling for `capitals' wrt `lowercase'. This is pretty much a guess +% (the ratio for CMR10 is 1.59). +% \begin{macrocode} + caprat:=1.5; % ratio of capital height to minuscule height +% \end{macrocode} +% +% \DescribeVariable{cap_jutstretch} +% The CMR scaling for uppercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_jutstretch:=1.3; +%<base10|base10b> cap_jutstretch:=1.2; +%<base17|base17b> cap_jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{cap_stemstretch} +% The CMR scaling for uppercase stem width wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_stemstretch:=1.45; +%<base10|base10b> cap_stemstretch:=1.31; +%<base17|base17b> cap_stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{bfudge} +% Letter width scaling for bold font wrt normal font. +% \begin{macrocode} +%<base7|base10|base17> bfudge:=1.0; +%<base7b|base10b|base17b> bfudge:=1.2; +% \end{macrocode} +% +% \DescribeVariable{szfudge} +% Width scaling wrt 17pt letter width. +% \begin{macrocode} +%<base7|base7b> szfudge:=1.18; +%<base10|base10b> szfudge:=1.0; +%<base17|base17b> szfudge:=1.0; +% \end{macrocode} +% +% \DescribeVariable{hstretch} +% Horizontal stretching factor wrt 17pt size letter width. +% \begin{macrocode} + hstretch:=szfudge*bfudge; +% \end{macrocode} +% +% \DescribeVariable{carol_height} +% The x-height of the Carolingian gothic font. +% \begin{macrocode} +%<base7|base7b> carol_height#:=108.5/36pt#; +%<base10|base10b> carol_height#:=155/36pt#; +%<base17|base17b> carol_height#:=268/36pt#; +% \end{macrocode} +% +% \DescribeVariable{vstretch} +% The height of this font wrt the Carolingian font. +% \begin{macrocode} + vstretch:=1.1; + +% \end{macrocode} +% +% \DescribeVariable{x_height} +% The x-height of lower case letters. Scaled from the Carolingian font. +% \begin{macrocode} + x_height#:=vstretch*carol_height#; +% \end{macrocode} +% +% \DescribeVariable{u} +% The unit width. The CMR values are used. +% \begin{macrocode} +%<base7> u#:=15.5/36pt#; +%<base10> u#:=20/36pt#; +%<base17> u#:=32.5/36pt#; +%<base7b> u#:=17.9/36pt#; +%<base10b> u#:=23/36pt#; +%<base17b> u#:=37/36pt#; +% \end{macrocode} +% +% \DescribeVariable{width_adj} +% \DescribeVariable{serif_fit} +% \DescribeVariable{cap_serif_fit} +% \DescribeVariable{letter_fit} +% The majority of these parameters and values are constant. +% They are for fine adjustements of characters. The CM values are used. +% \begin{macrocode} + width_adj#:=0pt#; % width adjustment for certain characters + serif_fit#:=0pt#; % extra sidebar near lowercase serifs +%<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs +%<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +%<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs +%<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars +% \end{macrocode} +% +% \DescribeVariable{sb} +% A length used for adjusting the side bearings of characters. +% This is normally |1/2u| but needs to be half that for this +% font, like the Gothics. +% \begin{macrocode} +%<base7|base7b> sb#:=1/4u#; % unit for side bearings +%<base10|base10b> sb#:=1/4u#; % unit for side bearings +%<base17|base17b> sb#:=1/4u#; % unit for side bearings + +% \end{macrocode} +% +% \DescribeVariable{cap_sb} +% A length used for adjusting the side bearings of uppercase characters. +% \begin{macrocode} +%<base7|base7b> cap_sb#:=2sb#; % unit for uppercase side bearings +%<base10|base10b> cap_sb#:=2sb#; % unit for uppercase side bearings +%<base17|base17b> cap_sb#:=2sb#; % unit for uppercase side bearings + +% \end{macrocode} +% +% \DescribeVariable{cap_height} +% The height of capital letters. +% \begin{macrocode} +%<base7|base7b> cap_height#:=172.2/36pt#; % height of caps +%<base10|base10b> cap_height#:=246/36pt#; % height of caps +%<base17|base17b> cap_height#:=425/36pt#; % height of caps +% \end{macrocode} +% +% \DescribeVariable{thickfudge} +% The reciprocal of the font height in nib widths. Normal font height +% is 6 nib widths and the bold font height is 5 nib widths. +% \begin{macrocode} +%<base7|base10|base17> thickfudge:=1/6; +%<base7b|base10b|base17b> thickfudge:=1/5; +% \end{macrocode} +% +% \DescribeVariable{thinfudge} +% The nib sharpness. +% \begin{macrocode} +thinfudge:=1/6; +% \end{macrocode} +% +% \DescribeVariable{thick} +% The maximum nib width. +% That is, the width of the thickest line that can be penned. +% \begin{macrocode} +thick#:=stemstretch*thickfudge*x_height#; % max pen breadth +% \end{macrocode} +% +% \DescribeVariable{thin} +% The nib thinness. +% That is, the width of the thinnest line that can be penned. +% \begin{macrocode} +thin#:=thinfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{pangle} +% The pen angle (in degrees). +% \begin{macrocode} +pangle:=35; % pen angle +% \end{macrocode} +% +% \DescribeVariable{ascratio} +% The height of lower case ascenders wrt |x_height|. +% \begin{macrocode} + ascratio:=6/4; +% \end{macrocode} +% +% \DescribeVariable{asc_height} +% The height of lower case ascenders. +% \begin{macrocode} + asc_height#:=ascratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{descratio} +% The depth of lower case descenders wrt |x_height|. +% \begin{macrocode} + descratio:=2/4; +% \end{macrocode} +% +% \DescribeVariable{desc_depth} +% The depth of lower case descenders. +% \begin{macrocode} + desc_depth#:=descratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_height} +% The height of numerals. Make these midway between normal and capital +% letters. +% \begin{macrocode} + fig_height#:=(0.5[1,caprat])*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_width} +% The width of numerals. All numerals are the same width (roughly, an `o'). +% \begin{macrocode} + fig_width#:=hstretch*(x_height#); +% \end{macrocode} +% +% \DescribeVariable{body_height} +% The height of the tallest character. +% \begin{macrocode} + body_height#:=caprat*asc_height#; +% \end{macrocode} +% +% \DescribeVariable{body_depth} +% The depth of the lowest character. +% \begin{macrocode} + body_depth#:=caprat*desc_depth#; +% \end{macrocode} +% +% \DescribeVariable{half_height} +% Half the normal letter height. +% \begin{macrocode} + half_height#:=1/2x_height#; % half the height of x height letters + +% \end{macrocode} +% +% \DescribeVariable{side} +% We might be using a square for the character design. +% \begin{macrocode} +side#:=x_height#; +% \end{macrocode} +% +% \DescribeVariable{rule_thickness} +% Thickness of rules (in math symbols). The CMR values are used. +% \begin{macrocode} +%<base7|base7b> rule_thickness#:=.34pt#; +%<base10|base10b> rule_thickness#:=.4pt#; +%<base17|base17b> rule_thickness#:=.6pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutfudge} +% Controls the protrusion of serifs. +% \begin{macrocode} +%%%jutfudge:= 3/4; +jutfudge:= 1/2; +% \end{macrocode} +% +% \DescribeVariable{jut} +% The lowercase serif protrusion. +% \begin{macrocode} +jut#:=jutstretch*jutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{srad} +% |srad| with |0 < srad < 1| controls the serif radius. +% \begin{macrocode} +srad:=0.8; % was 0.5 +% \end{macrocode} +% +% \DescribeVariable{trijut} +% The lowercase triangular serif protrusion. +% \begin{macrocode} +trijut#:=0.75jutstretch*thick#; +% \end{macrocode} +% +% \DescribeVariable{clubjutfudge} +% The fractional protusion of a club serif. +% \begin{macrocode} +clubjutfudge:=1/2; +% \end{macrocode} +% +% \DescribeVariable{clubjut} +% The lowercase club serif protrusion. +% \begin{macrocode} +clubjut#:=jutstretch*clubjutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{o} +% Amount of overshoot for curves (as in an `o'). Use CMR values. +% \begin{macrocode} +%<base7|base7b> o#:=5/36pt#; +%<base10|base10b> o#:=8/36pt#; +%<base17|base17b> o#:=10/36pt#; + +% \end{macrocode} +% +% \DescribeVariable{slant} +% |slant| is the amount the font slopes to the right. \\ +% 5 degrees = 9/100; 10 degrees = 11/50. +% \begin{macrocode} +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +%%%%%%slant:= sind 10/cosd 10; %% 10 degree slant + +% \end{macrocode} +% +% \DescribeVariable{monospace} +% We are generating a variable-width font. +% \begin{macrocode} +monospace:=false; % should all characters have the same width? + +% \end{macrocode} +% +% \DescribeVariable{dot_size} +% The size of (punctuation) dots. +% \begin{macrocode} +dot_size#:=5thin#; % size of dots +% \end{macrocode} +% +% \DescribeVariable{comma_width} +% The horizontal width of a comma. +% \begin{macrocode} +comma_width#:=5/4dot_size#; + +% \end{macrocode} +% +% Finally, call the driver file for the font. +% \begin{macrocode} +generate rtndtitle %% switch to the driver file + +% \end{macrocode} +% +% The end of this code section. +% \begin{macrocode} +%</base7|base10|base17|base7b|base10b|base17b> +% \end{macrocode} +% +% +% \subsection{The driver file} +% +% The driver file sets up the font parameters and also contains +% the macros used in the definition of the characters. +% +% \begin{macrocode} +%<*mfd> +% This is RTNDTITLE.MF for the Early Gothic font. +% This makes a short font. +% This file also contains special macros universally needed in the +% font but either not in the cmbase.mf file or modifications of these. +% +% \end{macrocode} +% +% \begin{routine}{makebox} +% This is a new version of the \Lpack{cmbase.mf} |makebox| macro. +% Essentially, as we are only generating a single case font, we don't +% need all the horizontals for the CMR characters. +% +% \begin{macrocode} +% A new version of cmbase.mf makebox macro +def makebox(text rule) = + for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth: + rule((l,y)t_,(r,y)t_); endfor % horizontals + for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals + for x=u*(1+floor(1/u)) step u until r-1: + rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals + if charic<>0: + rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{proofpcbb} +% The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the +% square, and at the bottom and top midpoints, where the point |zS| is at +% position |(xoff,yoff)| in the square. +% \begin{macrocode} + +% A macro to delineate a letter's bounding square in proof mode. +% Point z$ is at (xoff,yoff) in the bounding square. +def proofpcbb(suffix $)(expr xoff, yoff) = +if proofing > 0: + x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner + z$br = (x$bl+side, y$bl); % BRHC + z$tr = (x$bl+side, y$bl+side); % TRHC + z$tl = (x$bl, y$bl+side); % TLHC + z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points + pair hc, vc; + hc = (2u,0); vc = (0,2u); + pickup pensquare scaled 2; + for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc: + draw s-hc--s+hc; + draw s-vc--s+vc; + endfor +fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{rotunda_font_setup} +% This macro contains the set up for the \thisfont{} fonts. +% \begin{macrocode} + +def rotunda_font_setup= % contains special stuff for rotunda fonts + define_pixels(side,half_height,carol_height,comma_width); + define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit, + cap_serif_fit,jut,clubjut,cap_jut,trijut); + define_pixels(fig_width); + define_whole_pixels(letter_fit,sb,cap_sb); + define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height, + desc_depth,body_depth,fig_height); + define_corrected_pixels(o); + define_blacker_pixels(thick,thin); + let adjust_fit = normal_adjust_fit; +% \end{macrocode} +% \DescribeVariable{stylus} +% The pen for drawing the thinnest lines is |stylus|. +% \begin{macrocode} + pickup pencircle scaled thin; + stylus:=savepen; +% \end{macrocode} +% \DescribeVariable{thickstylus} +% The pen for drawing lines a bit thicker than the thinnest is |thickstylus|. +% \begin{macrocode} + pickup pencircle scaled (1.5thin); + thickstylus:=savepen; +% \end{macrocode} +% \DescribeVariable{quill} +% The normal calligraphic pen is |quill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated pangle; + quill:=savepen; + +% \end{macrocode} +% +% \DescribeVariable{threequarterquill} +% A pen with 3/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 3/4thick yscaled thin rotated pangle; + threequarterquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{halfquill} +% A pen with 1/2 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/2thick yscaled thin rotated pangle; + halfquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{quarterquill} +% A pen with 1/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/4thick yscaled thin rotated pangle; + quarterquill := savepen; + +% \end{macrocode} +% +% +% \begin{macrocode} + numeric pcshiftx#; % x value of LHS of box wrt origin of char box + define_pixels(pcshiftx); + numeric sqxside#; % x size of the square + numeric sqyside#; % y size of the square + define_pixels(sqxside,sqyside); + +enddef; % end of rotunda_font_setup + +% \end{macrocode} +% \end{routine} +% +% +% \DescribeVariable{ductus} +% A boolean to control drawing the ductus (TRUE) or the full letter (FALSE). +% \begin{macrocode} +boolean ductus; +ductus:=false; +% \end{macrocode} +% +% \DescribeVariable{qhor} +% \DescribeVariable{qvert} +% The cosine and sine of the pen angle. +% \begin{macrocode} +numeric qhor, qvert; +qhor:=cosd(pangle); qvert:=sind(pangle); +% \end{macrocode} +% +% \DescribeVariable{pdir} +% The vector corresponding to the pen angle. +% \begin{macrocode} +pair pdir; pdir=dir(pangle); +% \end{macrocode} +% +% \DescribeVariable{ppdir} +% The vector that is perpendicular (anticlockwise) to the pen angle. +% \begin{macrocode} +pair ppdir; ppdir=dir(pangle+90); +% \end{macrocode} +% +% \begin{routine}{draw_serif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_serif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; + z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + top_serif:=false; + z$c=z$b shifted (bjut*pdir); + fi +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_serif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_roundserif} +% The |draw_serif| routine can leave a bump at the end of the stem. +% The |draw_roundserif| routine, which takes the same arguments, +% is meant to eliminate the bump. +% \begin{macrocode} + +def draw_roundserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); + undraw z$--z$a; +enddef; % end of draw_roundserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flatserif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. This produces a serif like |draw_serif| except +% that one side of the seerif is flat. +% \begin{macrocode} + +def draw_flatserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; +%%% z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-jut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (jut*pdir); + fi + z$b = fr[z$,z$c]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$a--z$; + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_flatserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_clubserif} +% A macro to draw a clubbed serif. |draw_clubserif(1,2,f)| uses the current +% pen to +% draw a clubbed serif of extent |clubjut| at |z1| to the left of the line +% from |z2| +% to |z1|. The serif matches |z1| like the flatserif does and ends at the +% point |f[z1,z2]|. +% \begin{macrocode} + +def draw_clubserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| controls the length of the serif. +% \begin{macrocode} +%% beta=1-fr; + ajut=clubjut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem, |fr| between |$| and |$$|. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); +%% vec2=ajut*vec1; +%% z$a=z$ shifted vec2; + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-clubjut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (clubjut*pdir); + fi + z$a = fr[z$,z$$]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$c..z$a{vec1}; + labels($a,$b,$c); +enddef; % end of draw_clubserif + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{draw_triserif} +% A macro to draw a triangular top left serif. +% |draw_triserif(1,tj)| draws a serif at |z1| with its leftmost x +% value at |x1-tj|, where it is assumed that the +% top point on the stem is at |z1| and the stem was drawn with |quill|. +% \begin{macrocode} + +def draw_triserif(suffix $)(expr tj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$ts1'=lft x$; y$ts1'=bot y$; + pickup stylus; + lft x$ts1=x$ts1'; bot y$ts1=y$ts1'; + x$ts2=x$ts1-tj; z$ts2=whatever[z$,z$ts1]; + x$ts3=x$ts1; y$ts3=y$ts2-tj; + pickup stylus; +%% filldraw z$ts1--z$ts2--z$ts3--cycle; + filldraw z$--z$ts2--z$ts3--cycle; + pickup oldpen; + labels($ts1,$ts2,$ts3); +enddef; % end of draw_triserif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_istem} +% A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs +% are of extent |jut|. There is a top left and bottom right serif. +% The serif radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_istem(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % top serif + draw_serif($$, $, fr); % bottom serif + draw z$a--z$$a; % the stem +enddef; % end of draw_istem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tstem} +% A macro to draw the shape of the stem of a `t'. |draw_tstem(1,2,f)| draws a +% stem whose +% top is at |z1| and bottom at |z2| with a right serif at |z2|. The radius +% is controlled by |f|, with $0 < f < 1$. +% It draws with the current pen and the serif is of extent |jut|. +% NOTE: for the RTND font, just the stem is drawn --- no serif! +% \begin{macrocode} + +def draw_tstem(suffix $, $$)(expr fr)= +%% draw_serif($$, $, fr); % the serif +%% draw z$--z$$a; % the stem + draw z$--z$$; +enddef; % end of draw_tstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tlserif} +% A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serif +% is of extent |jut|. It also draws the stem to the point |z2|. The serif +% radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_tlserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % the serif + draw z$a--z$$; % the stem +enddef; % end of draw_tlserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flick} +% A macro to draw a flick (like an eyebrow). +% |draw_flick(1,rise,fall,fjut)| draws a stroke starting at |z1| rising up by +% |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is +% |fjut| to the right of |z1|. It is drawn with the current pen. +% \begin{macrocode} + +def draw_flick(suffix $)(expr rise, fall, fjut)= +% \end{macrocode} +% The points |z$a| and |z$b|, together with |z$| make up three points on the +% ductus. +% \begin{macrocode} + rt x$b = x1+fjut; top y$b=y$-fall; + x$a=0.5[x$,x$b]; top y$a=y$+rise; +% \end{macrocode} +% Draw the part, and finish off. +% \begin{macrocode} + draw z$..z$a..z$b; + labels($a,$b); +enddef; % end of draw_flick + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_wave} +% A macro to draw a (horizontal) stroke with a flick at each end +% (down at the left and up at the right). |draw_wave(1,2,f)| uses the current +% pen to draw from |z1wl| to |z1wr|, where |x1wl=x1|, |y1wl=y1-f|, and +% |x1wr=x2|, |y1wr=y2+f|, with |z1| assumed to be at the left of |z2|. +% \begin{macrocode} + +def draw_wave(suffix $,$$)(expr f)= + x$wl=x$; y$wl=y$-f; + x$wr=x$$; y$wr=y$$+f; + z$wc=0.5[z$wl,z$wr]; + draw z$wl{pdir}..z$wc{right}..{pdir}z$wr; + labels($wl,$wc,$wr); +enddef; % end of draw_wave +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tail} +% A macro to draw a tail at the bottom of a (vertical) stem. +% |draw_tail(1,fjut)| draws a tail at the bottom of the stem which ends at |z1|. +% The depth is controlled by the |desc_depth| value and the jut by |fjut|. +% \begin{macrocode} + +def draw_tail(suffix $)(expr fj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$tl' = lft x$; y$tl=bot y$; + pickup stylus; + lft x$tl=x$tl'; + x$tb=x$tl-fj; bot y$tb=y$tl-1/2desc_depth; + filldraw z${down}..{-pdir}z$tb & z$tb{pdir}..{up}z$tl--cycle; + pickup oldpen; + labels($tb,$tl); +enddef; % end of draw_tail +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_flat_head} +% A macro to draw a squared off top of a vertical stroke. +% |draw_flat_head(1)| draws at the top of the stem ending at |z1|. +% \begin{macrocode} + +def draw_flat_head(suffix $)= + pen oldpen; oldpen:=currentpen; +%% pickup quill; + x$bl'' = lft x$; y$bl'' = bot y$; + x$tr'' = rt x$; y$tr'' = top y$; + pickup stylus; + lft x$blfh = x$bl''; y$blfh = y$bl''; + rt x$trfh = x$tr''; top y$trfh = y$tr''; + x$tlfh = x$blfh; y$tlfh = y$trfh; + filldraw z$blfh--z$tlfh--z$trfh--cycle; + pickup oldpen; + labels($tlfh); +enddef; % end of draw_flat_head +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_flat_foot} +% A macro to draw a squared off bottom of a vertical stroke. +% |draw_flat_foot(1)| draws at the bottom of the stem ending at |z1|. +% \begin{macrocode} + +def draw_flat_foot(suffix $)= + pen oldpen; oldpen:=currentpen; +%% pickup quill; + x$bl'' = lft x$; y$bl'' = bot y$; + x$tr'' = rt x$; y$tr'' = top y$; + pickup stylus; + lft x$blff = x$bl''; bot y$blff = y$bl''; + rt x$trff = x$tr''; y$trff = y$tr''; + x$brff = x$trff; y$brff = y$blff; + filldraw z$blff--z$trff--z$brff--cycle; + pickup oldpen; + labels($brff); +enddef; % end of draw_flat_foot +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_triangle} +% A macro to draw a downward pointing equilateral triangle. +% |draw_triangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_triangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$-0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_triangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_utriangle} +% A macro to draw an upward pointing equilateral triangle. +% |draw_utriangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_utriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$+0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_utriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rtriangle} +% A macro to draw a downward pointing right angled triangle. +% |draw_rtriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rtriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$-sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rtriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rutriangle} +% A macro to draw an upward pointing right angled triangle. +% |draw_rutriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rutriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$+sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rutriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_fork} +% A macro to draw a forked line. +% |draw_fork(1,2,sz)| draws a graduated line from |z1| to |z2| with a forked +% end of size |sz|. +% \begin{macrocode} + +def draw_fork(suffix $, $$)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$f1'=lft x$; y$f1'=bot y$; + x$f3'=rt x$; y$f3'=top y$; + pickup stylus; + lft x$f1=x$f1'; bot y$f1=y$f1'; + rt x$f3=x$f3'; y$f3-y$=2*(y$-y$f1); + rt x$f2=x$$-sz; bot y$f2=y$$; + rt x$f4= rt x$f5=x$$; + bot y$f5=y$$-sz; top y$f4=y$$+1/2sz; + filldraw z$f1--z$f2--z$f3--cycle; % the line + draw z$f2{right}..z$f4; % upper fork + draw z$f2{right}..z$f5; % lower fork + pickup oldpen; + labels($f1,$f2,$f3,$f4,$f5); +enddef; % end of draw_fork +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_urswish} +% A macro to draw a line up and to the right with an under curl at the end. +% |draw_urswish(1,2)| draws from |z1| towards |z2|, which is the max upper right +% of a bounding box, where the curl is. +% \begin{macrocode} + +def draw_urswish(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + pickup quill; + rt x$$s1=x$$-thick; top y$$s1=y$$; + rt x$$s2=x$$; +%% x$$s3=x$$-thick; + lft x$$s3=x$$s1; + bot y$$s3=y$$-thick; y$$s2=0.5[y$$s1,y$$s3]; +%% draw z$---z$$s1{right}..z$$s2{down}..{-pdir}z$$s3; + draw z$..z$$s1{pdir}..z$$s2{down}; + labels($$s1,$$s2,$$s3); +enddef; % end of draw_urswish +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{bowl_stem} +% Calculate where a bowl should meet a stem so that the pen is moving in the +% pen direction. +% |bowl_stem(1,2)| calculates the point |z1i|, where |z1| is on the bowl and +% there is a vertical line at |x2|. +% +% \begin{macrocode} + +def bowl_stem(suffix $, $$)= + x$'=0.5[x$,x$$]; y$'=y$; % the mid-point + z$''=z$' shifted (thick*pdir); + x$i=x$$; z$i=whatever[z$',z$'']; + labels($',$i); +enddef; % end of bowl_stem +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_clubbase} +% Draw a clubbed bottom of a vertical stem for the EGOTH font. +% |draw_clubbase(1, 2, st, left, right)| draws from |st[z2,z1]| to |z2|. +% At |z2| the pen +% is shifted |left| fraction of the pen width and |right| fraction of the +% pen width, both in the direction of the pen angle. Pen draws smoothly the +% path |z1|, |left|, |right|, |z1|. +% \begin{macrocode} + +% draw clubbed bottom of vertical stem for RTND font. +def draw_clubbase(suffix $, $$)(expr st, lft, rt)= + z$$l = z$$ shifted (lft*thick*(-pdir)); + z$$r = z$$ shifted (rt*thick*(pdir)); + z$$t = st[z$$,z$]; + draw z$$t{z$$-z$}..z$$l--z$$r..{z$-z$$}z$$t; + labels($$t,$$l,$$r); +enddef; % end of draw_clubbase + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pdot} +% A macro to draw a period dot. +% |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|. +% \begin{macrocode} + +def draw_pdot(suffix $)(expr sz)= +% \end{macrocode} +% Draw a square rotated 45 degrees. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$ shifted (0.5sz*up); + z$u = z$s shifted (sz*right); + z$v = z$t shifted (sz*down); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pdot + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pcomma} +% A macro to draw a period comma. +% |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. The pen is |stylus|. +% \begin{macrocode} + +def draw_pcomma(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping back and down +% for a total width of |ar| and deptrh of |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s-ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu--z$uv--z$vu--z$v--z$sv--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pcomma + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_plq} +% A macro to draw a period left quote. +% |draw_pcomma(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. +% \begin{macrocode} + +def draw_plq(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping forward and down +% for a total width of |ar| and depth |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s+ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu--z$uv--z$vu--z$v--z$sv--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_plq + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{offsetbowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for a non-centered letter `o'. |offsetbowl($, sx, sy, fx, fy)| +% calculates the paths for an `o' +% enclosed in a rectangle size |sx| by |sy| with its bottom lefthand corner +% located at |z$|, where the center of the o is at |(fx*sx, fy*sy)| in the +% bounding rectangle. +% +% Two construction paths, namely |obfirst| and |obsecond| are also +% available. They should be identical. +% +% All paths have points listed in a clockwise direction, starting with +% |z$nh| or |z$minl| as appropriate. +% +% |offsetbowl($, sx, sy, 1/2, 1/2)| gives the same results as |obowl($, sx, sy)|. +% \begin{macrocode} + +path obouter, obinner, obfirst, obsecond; +def offsetbowl(suffix $)(expr sx, sy, fx, fy)= + numeric inx, iny, cx, cy; + pair pt[]; + path pth[]; + inx := 1/2thick*cosd(pangle); iny := 1/2thick*sind(pangle); + cx := x$+fx*sx; cy := y$+fy*sy; + z$obc = (cx,cy); +% \end{macrocode} +% Calulate points on the centre path of the pen. These are offset by |inx| +% from the rectangles vertical sides and by |iny| from the horizontal sides. +% If the pen is parallel to a side, offset the point by half the pen's +% dimension. First do the West, East, North and South points. +% \begin{macrocode} + if pangle = 90: + z$wt=(x$+1/2thin, cy); + z$et=(x$+sx-1/2thin, cy); + else: + z$wt=(x$+inx, cy); + z$et=(x$+sx-inx, cy); + penpos$wt(thick,pangle); + penpos$et(thick,pangle); + fi + if pangle = 0: + z$nh=(cx, y$+sy-1/2thin); + z$sh=(cx, y$+1/2thin); + else: + z$nh=(cx, y$+sy-iny); + z$sh=(cx, y$+iny); + penpos$nh(thick,pangle); + penpos$sh(thick,pangle); + fi + obfirst := z$nh{right}..z$et{down}..z$sh{left}..z$wt{up}..cycle; +% \end{macrocode} +% Now calculate the points on the path |obfirst| where the pen will +% draw the min width lines (i.e., the points where the pen will be +% moving parallel to |pangle|). +% \begin{macrocode} + if pangle = 90: + z$minl = z$wt; z$maxr = z$nh; z$minr = z$et; z$maxl = z$sh; + else: + if pangle = 0: + z$minl = z$nh; z$maxr = z$et; z$minr = z$sh; z$maxl = z$wt; + else: + z$minl = directionpoint dir(pangle) of obfirst; + z$minr = directionpoint -dir(pangle) of obfirst; +% \end{macrocode} +% The max points are roughly where the inner and outer diverge +% the most. These are simple for 0 and 90 degree pens and have +% been calculated above. It's not so simple for intermediate +% angles. For a reasonable looking result, we pick the max +% points to be halfway between the min points. This involves +% calculating some angles, paths and intersections. +% \begin{macrocode} + pt1 := z$minr - z$minl; % direction + pt2 := (- ypart pt1, xpart pt1); % perpendicular + pt3 := 1/2[z$minl, z$minr]; + pt4 := pt3 shifted pt2; + pt5 := pt3 shifted -pt2; + pth1 := pt3--pt4; + pth2 := pt3--pt5; + z$maxr = pth1 intersectionpoint obfirst; + z$maxl = pth2 intersectionpoint obfirst; + \fi + \fi +% \end{macrocode} +% Place the pen at each of these points to get the outer and inner points. +% \begin{macrocode} + penpos$minl(thin,pangle+90); + penpos$maxr(thick,pangle); + penpos$minr(thin,pangle+90); + penpos$maxl(thick,pangle); +% \end{macrocode} +% Finally, the outer and inner paths. +% \begin{macrocode} + obsecond := z$minl..z$maxr..z$minr..z$maxl..cycle; + z$minlo = z$minl.r; z$maxro = z$maxr.r; + z$minro = z$minr.l; z$maxlo = z$maxl.l; + obouter := z$minlo{dir(pangle)}...z$maxro...z$minro{-dir(pangle)}...z$maxlo...cycle; + z$minli = z$minl.l; z$maxri = z$maxr.l; + z$minri = z$minr.r; z$maxli = z$maxl.r; + obinner := z$minli...z$maxri...z$minri...z$maxli...cycle; + labels($obc, $nh, $et, $sh, $wt); + labels($minl, $maxr, $minr, $maxl); + labels($minlo, $maxro, $minro, $maxlo); + labels($minli, $maxri, $minri, $maxli); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{obowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for the letter `o'. |obowl($, sx, sy)| calculates the paths for an `o' +% centered and enclosed in a rectangle size |sx| by |sy| with its bottom +% lefthand corner located at |z$|. +% \begin{macrocode} + +def obowl(suffix $)(expr sx, sy)= + offsetbowl($, sx, sy, 1/2, 1/2); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{scalarprod} +% |v scalarprod w| calulates the scalar product between the +% two vectors |v| and |w|. +% \begin{macrocode} + +primarydef v scalarprod w = + (xpart v * ypart w - ypart v * xpart w) +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{tangentpoint} +% |tangentpoint($, path)| calculates the point |z$tan| on the |path| +% so that |z$tan--z$| is tangent to the path. It uses a binary search +% to find a point on the path such that the path direction is +% (anti-) parallel to the dirction from that point to the given point. +% \begin{macrocode} + +def tangentpoint(suffix $)(expr pth)= + pair vecll, veclr, veclm; % "tangent" line directions + numeric pl, pr, pm; % path parameter values + pair vecpl, vecpr, vecpm; % path directions + pair ptl, ptr, ptm; % path points + numeric sl, sr, sm; % scalar products of path/line directions + numeric stpsize; % size of current binary step + numeric tantol; % tolerance + boolean wtest; % a boolean + + tantol := eps; +% \end{macrocode} +% Initialise using the left right and middle points on the path. +% \begin{macrocode} + pl:=0; pr:=length pth; pm:=0.5(pl+pr); stpsize:=pr-pl; + ptl := point pl of pth; + ptm := point pm of pth; + ptr := point pr of pth; +% \end{macrocode} +% Now the various vectors, and make sure they are unit vectors to +% have a consistent measure scale when we take the scalar products. +% \begin{macrocode} + vecll := unitvector (z$-ptl); + veclm := unitvector (z$-ptm); + veclr := unitvector (z$-ptr); + vecpl := unitvector (direction pl of pth); + vecpm := unitvector (direction pm of pth); + vecpr := unitvector (direction pr of pth); + sl := vecll scalarprod vecpl; + sm := veclm scalarprod vecpm; + sr := veclr scalarprod vecpr; +% \end{macrocode} +% We stop if any of the points is the tangent point, or if the step +% size is too small, or if the signs of the left and right scalar +% products are the same. +% \begin{macrocode} + wtest := (stpsize < tantol) or (sl*sr > 0) or + (abs sl < tantol) or (abs sm < tantol) or (abs sr < tantol); + if wtest: + if (stpsize < tantol): + z$tan=(0,0); + errmessage("No tangent; path too short"); + else: + if (sl*sr > 0): + z$tan=(0,0); + errmessage("No tangent; end products have the same sign"); + else: + if (abs sl < tantol): + z$tan=ptl; + else: + if (abs sm < tantol): + z$tan=ptm; + else: + z$tan=ptr; + fi + fi + fi + fi + else: +% \end{macrocode} +% There should be a tangent and we iterate to find it, using +% bisection. If there is one to be found it will be at the +% current middle point. The tangent point will be somewhere +% between the two points that lead to opposite signed scalar +% products. +% \begin{macrocode} + forever: + if (sl*sm < 0): % opposite signs, look between pl & pm + pr:=pm; pm:=0.5(pr+pl); + vecpr := vecpm; veclr := veclm; sr:=sm; + else: + pl:=pm; pm:=0.5(pr+pl); + vecpl:=vecpm; vecll:=veclm; sl:=sm; + fi + stpsize:=pr-pl; + ptm := point pm of pth; + veclm := unitvector (z$-ptm); + vecpm := unitvector (direction pm of pth); + sm := veclm scalarprod vecpm; +% \end{macrocode} +% We stop the iteration if the step size is too small or the +% middle point is the tangent point. In either case, the +% middle point is the best guess that can be made. +% \begin{macrocode} + wtest := (stpsize < tantol) or (abs sm < tantol); + if wtest: + if (abs sm < tantol): + z$tan = ptm; + else: + z$tan = ptm; +%%%%%% errmessage("Warning: tangent approximated"); + fi + fi + exitif wtest; + endfor + fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% Set the mode and font setup. +% \begin{macrocode} + +font_coding_scheme:="ASCII minuscules and punctuation"; +mode_setup; +rotunda_font_setup; + +% \end{macrocode} +% +% +% We generate letters, together with some punctuation and +% analphabetics. +% \begin{macrocode} + +input rtndl; % lower case +input rtndu; % capitals +input rtndpunct; % punctuation +input rtndlig; % the several dashes +input rtnddig; % arabic digits + +% \end{macrocode} +% +% Set up the spacings, stretches and shrinks. +% +% \begin{macrocode} + +font_slant slant; font_x_height x_height#; +if monospace: + font_normal_space vstretch*9u#; % no stretching or shrinking + font_quad vstretch*18u#; + font_extra_space vstretch*9u#; +else: + font_normal_space vstretch*6u#+2letter_fit#; + font_normal_stretch vstretch*3u#; font_normal_shrink vstretch*2u#; + font_quad vstretch*18u#+4letter_fit#; + font_extra_space vstretch*2u#; + +% \end{macrocode} +% +% Finally, do the ligtables, but I don't think they are needed (yet?). +% +% \begin{macrocode} + +fi + +bye. + + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + kks#:=-4u#; kkx#:=-1.5u#; kkj#:=-2u#; kkr#:=-5u#; kkrs#:=-2u#; kkrl#:=-8u#; + ligtable "s": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "S": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "x": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "X": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "a": "A": + "b": "B": + "c": "C": + "d": "D": + "e": "E": + "h": "H": + "i": "I": + "k": "K": + "l": "L": + "m": "M": + "n": "N": + "o": "O": + "p": "P": + "t": "T": + "u": "U": + "v": "V": + "w": "W": + "z": "Z": + "j" kern kkj#, "J" kern kkj#; + + ligtable "r": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + ligtable "R": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + +fi + +bye. + +%</mfd> +% \end{macrocode} +% +% \subsection{The code for normal letters} +% +% The following code is for the lower case characters. +% +% \begin{macrocode} +%<*min> +% RTNDL.MF Program file for Early Gothic lower case +% + +% \end{macrocode} +% +% +% \begin{routine}{a} +% The letter `a'. +% \begin{macrocode} +cmchar "RTND letter a"; +beginchar("a", 2sb#+hstretch*(9/16x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup quill; +n1 := w - 2pcshiftx -jut; % effective letter width +% "stem" +x1=1/2w; top y1=h; +rt x2 = w-pcshiftx-jut; top y2 = bot y1; +x3 = x2; bot y3 = 0; +z4 = z3 shifted (jut*pdir); +pth1 := z1--z2--z3--z4; +% bowl +rt x6 = lft x3; bot y6 = 0; +lft x5 = pcshiftx; bot y5 = 1/4h; + +z15 = (lft x5, bot y5); z25 = (rt x5, top y5); +z7 = whatever[z15,z25] = whatever[z2,z3]; +x8 = x25; y8 = y25 + 1/2(y1-y7); + +%%ductus:=true; +if ductus: + pickup stylus; +else: + % draw stem + draw pth1; + % draw bowl + draw z5--z6; + pickup stylus; + draw z5--z7; + draw z1{-pdir}..z8..z7{pdir}; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +endchar; % end "a" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{b} +% The letter `b'. +% \begin{macrocode} +cmchar "RTND letter b"; +beginchar("b", 2sb#+hstretch*(11/16x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=h/ascratio; % top of bowl +%%ductus:=true; +lft x1 = pcshiftx+jut; top y1=h; +x3 = x1; bot y3= thick; +rt x5 = w-pcshiftx; y5=1/2n2; +x4 = 1/2[x3,x5]; bot y4=0; +x6=1/2[x4,x5]; top y6=n2; +pth1 := z1..z3{down}..z4{right}.. z5{up}; +z98=(0,3/4n2); z99=(w,y98); +pth2 := z98--z99; +%z7 = pth1 intersectionpoint pth2; +z7=(x1,6/8n2); +if ductus: + pickup stylus; +fi +%draw z1--z3{down}..z4{right}..z5{up}..z6; +%draw z6--z7; +draw z1--z3--z4; +draw z4{pdir}..z5{up}..{-pdir}z7; +%draw_flatserif(1,3,srad); +draw_flat_head(1); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "b" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{c} +% The letter `c'. +% \begin{macrocode} +cmchar "RTND letter c"; +beginchar("c", 2sb#+hstretch*(9/16x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z24--z1{left}...z2{down}..z3{right}..z4{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "c" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{d} +% The letter `d'. +% \begin{macrocode} +cmchar "RTND letter d"; +beginchar("d", 2sb#+hstretch*(11/16x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +n1 = h/ascratio; % x-height +rt x1=w-pcshiftx-jut; top y1=h; +x2 = x1; bot y2=0; +x3 = x1; y3 = 1/4n1; +lft x5 = pcshiftx; y5=6/8n1; +x4 = 3/8[x3,x5]; bot y4 = 0; +x6=1/2[x4,x5]; top y6 = n1; +x7=x3; top y7=n1; +rt x8 = w-pcshiftx; y8=n1; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw_flatserif(1,2,srad); +%draw_roundserif(2,1,srad); +draw_flat_foot(2); +%%draw z3..z4{left}..z5{up}..z6; +draw z3..z4{left}.. tension 0.8 ..z5{up}..z6; +draw z6..z7..z8; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "d" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{e} +% The letter `e'. +% \begin{macrocode} +cmchar "RTND letter e"; +beginchar("e", sb#+hstretch*(15/16x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-pcshiftx; % actual letter width +n2 := 6/8n1; % width of bowl +x1 = pcshiftx + 5/8n2; top y1=h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = pcshiftx + 1/2n2; bot y3 = 0; +rt x4 = pcshiftx + n2; y4 = 1/4h; +%%z98=(0,3/8h); z99=(w,y98); +z98=(0,2/8h); z99=(w,y98); +pth1 := z98--z99; +pth2 := z1{left}..z2{down}..z3{right}; +z7 = pth1 intersectionpoint pth2; +rt x9 = w-pcshiftx; y9 = 3/4h; +z8=1/2[z7,z9]; + +z70 = z7 shifted 10pdir; +z17 = whatever[z7,z70]; +%%x17 = w-pcshiftx; +top y17 = h; + +rt x27=w-pcshiftx; top y27=h; +pth3 := z7--z27; % diagonal +pth4 := z1--z9; + +z34 = pth3 intersectionpoint pth4; +pth5 := z34--z1{left}...z2{down}..z3{right}..z4{pdir}; % bowl +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw z7{pdir}..z1{left}..z2{down}..z3{right}..z4{pdir}; +%%draw z7{pdir}..z8{right}..z9{pdir}; +%%draw z7--z17; +draw pth5; % bowl +%%draw pth3; % diagonal +draw z34--z7; % daigonal +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,17,27,34,70,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{f} +% The letter `f'. +% \begin{macrocode} +cmchar "RTND letter f"; +beginchar("f", 2sb#+hstretch*(9/16x_height#+jut#), + (asc_height#), 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := h/ascratio; % x-height +%% stem +lft x1 = lft x2 = pcshiftx+jut; bot y2=0; +%% flick +rt x4 = w-pcshiftx; top y4 = h-thick; +top y3 = h; +lft x3 = rt x1; +top y1 = bot y3; +%% bar +lft x5 = pcshiftx; top y5 = n1; +rt x6 = lft x4; y6 = y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw_flat_foot(2); % stem +draw z3--z4; % top +draw z5--z6; % bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,14,15,16,100); +endchar; % end "f" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{g} +% The letter `g'. +% \begin{macrocode} +cmchar "RTND letter g"; +beginchar("g", 2sb#+hstretch*(11/16x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +%%n1 = h/ascratio; % x-height +rt x1=w-pcshiftx-jut; top y1=h; +rt x2 = x1; y2=1/2h; +x3 = x1; y3 = 0; +rt x4 = w-pcshiftx; y4 = -1/2d; +x5 = 1/2w; bot y5 = -d; +lft x6 = pcshiftx; y6 = top y5; +x13 = x1; y13 = 1/4h; +lft x15 = pcshiftx; y15=6/8h; +x14 = 3/8[x13,x15]; bot y14 = 0; +x16=1/2[x14,x15]; top y16 = h; +x17=x13; top y17=h; +rt x18 = w-pcshiftx; y18=h; +if ductus: + pickup stylus; +fi +% stem +%draw z1..z3..z4{down}..z5{left}..z6; +draw z1..z13..z4{down}..z5{left}..z6; +draw z6--z13; +%% top bowl +draw z13..z14{left}..z15{up}..z16; +draw z16..z17..z18; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,13,14,15,16,17,18,100); +endchar; % end "g" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{h} +% The letter `h'. +% \begin{macrocode} +cmchar "RTND letter h"; +beginchar("h", 2sb#+hstretch*(11/16x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% bowl +z3=1/2[z2,z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=9/16[x3,x5]; top y4 = h/ascratio; +%%lft x6=x4; bot y6=0; +x6=9/16[x4,x5]; +bot y6=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%draw_tstem(1,2,srad); % stem +%draw_flatserif(1,2,srad); +%%draw_roundserif(2,1,srad); +draw z1--z2; +draw_flat_head(1); draw_flat_foot(2); +draw z3--z4{right}...z5{down}...z6{-pdir}; + +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "h" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{i} +% The letter `i'. +% \begin{macrocode} +cmchar "RTND letter i"; +beginchar("i", 2sb#+hstretch*(thick#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2= thick; +bot y3 = 0; rt x3 = w-pcshiftx; +x8 = x1; y8 = h + 3/2thick; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +%draw_roundserif(2,1,srad); +draw z2--z3; +draw_pdot(8, dot_size); +ductus:=false; +penlabels(1,2,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{j} +% The letter `j'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "RTND letter j"; +beginchar("j", sb#+hstretch*(3/8x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +rt x1 = w-pcshiftx; top y1 = h; +x2=x1; y2=-1/2d; +%% bottom hook +lft x3 = 0; bot y3 = -d; +x8 = x1; y8 = h + 3/2thick; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw_flatserif(1,2,srad); +draw z2{down}..z3{-pdir}; % hook +draw_pdot(8, dot_size); +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "j" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{k} +% The letter `k'. +% \begin{macrocode} +cmchar "RTND letter k"; +beginchar("k", 2sb#+hstretch*(13/16x_height#+jut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +%% stem +n1 = h/ascratio; % x-height +lft x1=lft x2=pcshiftx+jut; +y1=h; bot y2=0; +%% top arm +%%z3=(x1,1/2n1); +x3 = x1; top y3 = 1/2n1; +rt x5=5/8[x1,w-pcshiftx]; top y5=n1; +x4=1/2[x3,x5]; top y4=n1; +pth1 := z3{pdir}..z5{up}; +%% lower arm +pth2 := (rt x1,0)--(rt x1,h); +z13 = pth1 intersectionpoint pth2; +pickup threequarterquill; +lft x14 = x13; bot y14 = y13; +rt x7=w-pcshiftx; bot y7=0; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +%draw_roundserif(2,1,srad); +draw_flat_foot(2); +draw pth1; % upper arm +pickup threequarterquill; +%%draw z14{down}..z7{-ppdir}; % lower arm +%%draw z14{down}..z7; % lower arm +draw z14{-ppdir}..z7{right}; % lower arm +pickup quill; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,100); +endchar; % end "k" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{l} +% The letter `l'. +% \begin{macrocode} +cmchar "RTND letter l"; +beginchar("l", 2sb#+hstretch*(thick#+2jut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx+jut; top y1=h; +x2=x1; +bot y2 = thick; +rt x3 = w-pcshiftx; bot y3 = 0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +%draw_roundserif(2,1,srad); +draw z2--z3; +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "l" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{m} +% The letter `m'. +% \begin{macrocode} +cmchar "RTND letter m"; +beginchar("m", 2sb#+hstretch*(15/16x_height#+2jut#), % 12/16 too narrow, 14 a bit + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +%% start of bowl +x13=x1; y13=3/4h; +%% bottom of right and middle stems +rt x6 = w -pcshiftx - jut; y6=y2; +z4 = 1/2[z2,z6]; +%% top of middle and right stems +x3=x4; y3=y1; +x5=x6; y5=y13; +%% top of bowls +x14=2/3[x13,x3]; top y14 = h; +x33=x4; y33=y13; +x34=2/3[x33,x5]; y34 = y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left half +draw_flatserif(1,2,srad); +%draw_roundserif(2,1,srad); +draw_flat_foot(2); +draw z13--z14{right}..z33{down}--z4; +%draw_roundserif(4,3,srad); +draw_flat_foot(4); +draw z33--z34{right}..z5{down}--z6; +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100); +endchar; % end "m" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{n} +% The letter `n'. +% \begin{macrocode} +cmchar "RTND letter n"; +beginchar("n", 2sb#+hstretch*(9/16x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +% start of bowl +x13=x1; y13=3/4h; +%% right stem +rt x4 = w-pcshiftx-jut; y4=y2; +x3 = x4; y3 = y13; +% top of bowl +x14 = 2/3[x13,x3]; top y14 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left stem +draw_flatserif(1,2,srad); +%draw_roundserif(2,1,srad); +draw_flat_foot(2); +draw z13--z14{right}..z3{down}--z4; +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "n" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{o} +% The letter `o'. +% \begin{macrocode} +cmchar "RTND letter o"; +beginchar("o", 2sb#+hstretch*(7/8x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +draw z2..z3..z4{left}.. tension 0.8 ..{up}z1..cycle; +%z5=(pcshiftx,-o); +%obowl(5, w-2pcshiftx, h+2o); +%%ductus:=true; +if ductus: + pickup stylus; + draw obfirst; draw obsecond; draw obouter; draw obinner; +else: +%% fill obouter; unfill obinner; +fi +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "o" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{p} +% The letter `p'. +% \begin{macrocode} +cmchar "RTND letter p"; +beginchar("p", 2sb#+hstretch*(14/16x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=-d; +%% bowl % from "d" +z3=3/4[(x1,0),z1]; +rt x5 = w-pcshiftx; y5=1/2h; +x4=1/2[x3,x5]; top y4 = h; +x6=x4; bot y6=0; +z7=1/4[(x1,0),z1]; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +%draw_roundserif(2,1,srad) +draw_flat_foot(2); +draw z3--z4; draw z4..z5{down}..z6{left}..z7; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "p" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{q} +% The letter `q'. +% \begin{macrocode} +cmchar "RTND letter q"; +beginchar("q", 2sb#+hstretch*(7/8x_height#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% right stem +rt x1=w-pcshiftx; top y1=h; +x2=x1; bot y2=-d; +%% bowl +z3=1/4[(x1,0),z1]; +lft x5=pcshiftx; y5=1/2h; +x4=1/2[x3,x5]; bot y4=0; +x6=x4; top y6=h; +%%z7=3/4[(x1,0),z1]; +z7=z1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +%%draw_flatserif(1,2,srad); +%%draw_roundserif(2,1,srad); +draw_flat_foot(2); +draw z3{-pdir}..z4{left}..z5{up}..z6{right}..z7{pdir}; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{r} +% The letter `r'. +% \begin{macrocode} +cmchar "RTND letter r"; +beginchar("r", 2sb#+hstretch*(11/16x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+jut; +top y1=h; bot y2=0; +%% bowl +z3=3/4[z2,z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_flat_foot(2); +%%draw_roundserif(2,1,srad); +draw z3{pdir}..z4{right}..z5{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "r" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{s} +% The letter `s'. +% \begin{macrocode} +cmchar "RTND letter s"; +beginchar("s", 2sb#+hstretch*(7/8x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; + +% center +z50=(1/2w, 1/2h); +x60 = w-pcshiftx; z60 = z50 shifted (whatever*pdir); +x40 = pcshiftx; z40 = z50 shifted (whatever*pdir); +rt x5 = x50; top y5 = y50; +z54 = (lft x5, bot y5); +lft x6 = x50; bot y6 = y50; +z56 = (rt x6, top y6); + +% top bowl +z1 = 1/2[z56,z60]; +x3 = 1/2[x5,x1]; top y3 = h; + +% bottom bowl +z10 = 1/2[z54,z40]; +%x8 = 1/4[x6,x10]; +x8 = x56; +bot y8 = 0; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +% top bowl +draw z5{ppdir}..z3..z1{-ppdir}; + +% bottom bowl +draw z6..z8{left}..z10{ppdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,11,17,20,26,27,28,40,50,54,56,60,100); +endchar; % end "s" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{t} +% The letter `t'. +% \begin{macrocode} +cmchar "RTND letter t"; +beginchar("t", 2sb#+hstretch*(10/16x_height#+jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% bar +lft x1 = pcshiftx; top y1 = h; +rt x2 = w - pcshiftx; y2 = y1; +%% stem +lft x3 = rt x1; bot y3 = top y1; +rt x5 = x2; bot y5 = 0; +x4 = x3; bot y4 = thick; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % bar +draw z3--z4--z5; % stem +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "t" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{u} +% The letter `u'. +% \begin{macrocode} +cmchar "RTND letter u"; +beginchar("u", 2sb#+hstretch*(9/16x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-jut; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw z1--z13{down}...z14{right}...z33{pdir}; +draw z1--z13--z14{right}...z33{pdir}; +draw_flatserif(1,13,srad); +draw_tstem(3,4,srad); % right stem +draw_flatserif(3,4,srad); +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "u" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{v} +% The letter `v'. +% \begin{macrocode} +cmchar "RTND letter v"; +beginchar("v", 2sb#+hstretch*(11/16x_height#+jut#), % 13/16 too wide + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +%% right stem +rt x5=w-pcshiftx; top y5 = h; +bot y3 = 0; +x3 = 1/2[x1,x5]; +z51 = (x1,0); z55=(x5,0); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}..z3; % left stem +draw_flatserif(1,51,srad); +draw z5{down}..z3; % right stem +draw_flatserif(5,55,srad); +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "v" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{w} +% The letter `w'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "RTND letter w"; +beginchar("w", 2sb#+hstretch*(15/16x_height#+2jut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x5=w-pcshiftx-jut; y5=y1; +x6=x5; bot y6=0; +z53=1/4[z6,z5]; % start of bowl +% middle stem +z3 = 1/2[z1,z5]; +z33=(x3,y13); +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +% middle of right bowl +x34=1/3[x3,x5]; y34=y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13--z14{right}...z33{pdir}; % left +draw_flatserif(1,13,srad); +draw z3--z33--z34{right}...z53{pdir}; % middle +draw_flatserif(3,33,srad); +draw_tstem(5,6,srad); % right stem +draw_flatserif(5,6,srad); +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "w" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{x} +% The letter `x'. +% \begin{macrocode} +cmchar "RTND letter x"; +beginchar("x", 2sb#+hstretch*(7/2thick#), + x_height#, 0); +adjust_fit(0,0); +path pth[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +n1 := w-2pcshiftx; % total width +n2 := thick; % triangle side +%% diag top left to bottom right +lft x1 = pcshiftx; top y1 = h; +rt x4 = w-pcshiftx; bot y4 = 0; +x2 = x3 = 1/2w; +top y5 = h; lft x5 = rt x2; +top y2 = bot y5; +rt x6 = w - pcshiftx; y6 = y2; +y3 = h - y2; +lft x8 = lft x1; bot y8 = 0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2--z3--z4; % top left to bottom right +draw z5--z6; % top right +draw z3--z8; % bottom left +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,150,60,160,100); +endchar; % end "x" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{y} +% The letter `y'. +% \begin{macrocode} +cmchar "RTND letter y"; +beginchar("y", 2sb#+hstretch*(11/16x_height#+jut#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +%% left stem top +lft x1 = pcshiftx + jut; top y1 = h; +bot y3 = 0; +%% right stem +rt x5=w-pcshiftx; top y5 = h; +%%lft x9=-1/2w; bot y9 = -d; +lft x9 = 0; bot y9 = -d; +pth1 := z9{right}..z5{up}; +pth2 := (0,y3)--(w,y3); +z99 = pth1 intersectionpoint pth2; +x3 = x99; +z51 = (x1,0); z55=(x5,0); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}..z3; % left stem +draw_flatserif(1,51,srad); +draw pth1; % right stem +draw_flatserif(5,55,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{z} +% The letter `z'. +% \begin{macrocode} +cmchar "RTND letter z"; +beginchar("z", 2sb#+hstretch*(12/16x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +%% top bar ends +lft x1 = pcshiftx; rt x2 = w-pcshiftx; +top y1 = top y2 = h; +%% bottom bar ends +lft x3 = pcshiftx; rt x4 = w-pcshiftx; +bot y3 = bot y4 = 0; +%% middle bar ends +lft x5 = x1; rt x6 = x2; +y5 = y6 = 1/2h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; draw z5--z6; % bars +draw z2--z3; % diagonal +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "z" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file +% \begin{macrocode} +%</min> +% \end{macrocode} +% +% +% \subsection{The code for capital letters} +% +% \thisfont{} `capitals' were drawn with the same pen as for the minuscules, +% and the letters were merely larger versions of the minuscules. +% +% \begin{macrocode} +%<*maj> +% RTNDU.MF Program file for Early Gothic `capitals' +% + +% \end{macrocode} +% +% +% \begin{routine}{A} +% The letter `A'. +% \begin{macrocode} +cmchar "RTND letter A"; +beginchar("A", 2cap_sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup quill; +n1 := w - 2pcshiftx -jut; % effective letter width +% right leg +x1 = pcshiftx + 6/8n1; top y1=h; +rt x2 = pcshiftx + n1; bot y2=0; +pth1 := z1{down}..z2; +z20 = 7/8[z1,z2]; + +% left leg +rt x4 = lft x1; top y4 = y1; + +lft x8 = pcshiftx; top y8 = -thin; + +x6 = 3/8w; y6 = 1/2h; +pth2 := z4..{down}z6..{-pdir}z8; + +% top +lft x11 = pcshiftx; top y11 = h - thick; + +x14 = x1; y14 = y1; + +x13 = 1/2[x11,x14]; y13 = y14; +pth3 := z11{pdir}.. z13..z14; + +%%ductus:=true; +if ductus: + pickup stylus; +else: + % draw stem + draw pth1; +% draw_roundserif(1,2,srad); + draw_roundserif(2,20,srad); + % draw bowl +% draw z11{-pdir}..z13{down}..z15{pdir}; + % left leg + draw pth2; + % top + draw pth3; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,20,100); +endchar; % end "A" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{B} +% The letter `B'. +% \begin{macrocode} +cmchar "RTND letter B"; +beginchar("B", 2cap_sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=h/ascratio; % top of bowl +%%ductus:=true; +lft x1 = pcshiftx+2jut; top y1=7/8h; +lft x13 = pcshiftx; top y13 = y1; +x2 = x1; bot y2 = 0; +z3 = 9/16[z2,z1]; +pth1 := z1--z2; % stem + +rt x6 = w-pcshiftx; y6 = 2/3[y2,y3]; + +pth2 := z2{right}..z6...{-pdir}z3; % bottom bowl + +rt x8 = lft x6; y8 = 13/16[y3,y1]; + +pth3 := z3{pdir}...z8..{-pdir}z13; % top bowl +if ductus: + pickup stylus; +fi +draw pth1; +draw pth2; +draw pth3; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "B" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{C} +% The letter `C'. +% \begin{macrocode} +cmchar "RTND letter C"; +beginchar("C", 2cap_sb#+caprat*hstretch*(5/8x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := cap_sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z24..z1{left}..z2{down}..z3{right}..z4{pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "C" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{D} +% The letter `D'. +% \begin{macrocode} +cmchar "RTND letter D"; +beginchar("D", 2cap_sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+2jut; +top y1=h; bot y2=0; +%% bowl +rt x5 = w-pcshiftx; +x4=1/2[x1,x5]; top y4 = h; +x6'=x4; bot y6' = 5/16h; +y5=1/2[y4,y6']; +x7 = x2; y7 = y2; +x6 = 1/2[x6',x5]; y6 = 1/2[y6',y7]; +lft x3 = pcshiftx; top y3 = y1; +pth1 := z3{pdir}..z4..{down}z5..z6..{-pdir}z7; % bowl +z14 = point 0.75 of pth1; +pth2 := z2{pdir}..{up}z14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%draw z1--z2; +%draw_roundserif(2,1,srad) +draw pth2; +draw pth1; +ductus:=false; +penlabels(1,2,3,4,5,6,6',7,8,100); +endchar; % end "D" + + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{E} +% The letter `E'. +% \begin{macrocode} +cmchar "RTND letter E"; +beginchar("E", 2cap_sb#+caprat*hstretch*(5/8x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup quill; +%% bowl +n1 := w-2pcshiftx; % actual letter width +n2 := 6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +pth1 := z24..z1{left}..z2{down}..z3{right}..z4{pdir}; +% cross bar +x31 = x2; y31 = y2; +x32 = x4; y32 = y31; +pth2 = z31--z32; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +draw pth2; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,24,31,32,100); +endchar; % end "E" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{F} +% The letter `F'. +% \begin{macrocode} +cmchar "RTND letter F"; +beginchar("F", 2cap_sb#+caprat*hstretch*(10/16x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := cap_sb; +pickup quill; +n1 := h/ascratio; % x-height +%% stem +lft x1=lft x2=pcshiftx+jut; top y1=n1; bot y2=0; +%% flick +x4=x2; y4 = 1/2n1; +rt x6=w-pcshiftx; y6 = 2/3h; +x5 = 2/3[x4,x6]; top y5=h; +%% bar +z14=1/2[z4,z1]; +rt x16 = w -pcshiftx; top y16 = 1/2[y14,y6]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z4{up}...z5{right}...z6; % top +draw z14{right}..z16{pdir}; % bar +ductus:=false; +ductus:=false; +penlabels(1,2,3,4,5,6,7,14,15,16,100); +endchar; % end "F" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{G} +% The letter `G'. +% \begin{macrocode} +cmchar "RTND letter G"; +beginchar("G", 2cap_sb#+caprat*hstretch*(5/8x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup quill; +%% bowl +n1 := w-2pcshiftx; % actual letter width +n2 := 6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +pth1 := z24..z1{left}..z2{down}..z3{right}..z4{pdir}; +% cross bar +x31 = x2; y31 = y2; +x32 = x4; y32 = y31; +pth2 = z31--z32; +% upright +z41 = 5/8[z31,z32]; +z42 = z32; +z43 = z4; +lft x45 = x3; top y45 = - thick; +pth3 := z41--z42--z43..{-pdir}z45; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +%draw pth2; +draw pth3; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,24,31,32,100); +endchar; % end "G" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{H} +% The letter `H'. +% \begin{macrocode} +cmchar "RTND letter H"; +beginchar("H", 2cap_sb#+caprat*hstretch*(5/8x_height#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +pickup quill; +numeric n[]; +%% stem +lft x1=lft x2=pcshiftx+3jut; +top y1=h; bot y2=0; +% twiddle +lft x16 = pcshiftx; top y16 = h; +x18 = x1; y18 = y1; +pth1 := z16{pdir}..{pdir}z18; + +%% bowl +z3=1/2[z2,z1]; +rt x5 = w-pcshiftx; y5=y3; +x4=1/2[x3,x5]; top y4 = h/ascratio; +%%lft x6=x4; bot y6=0; +x6=1/2[x4,x5]; +%bot y6=0; +top y6 = 0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +%%draw_flatserif(1,2,srad); +%draw_clubserif(1,2,0.5); +draw_roundserif(2,1,srad); +draw pth1; +draw z3{pdir}..z4..z5..z6{-pdir}; + +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "H" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{I} +% The letter `I'. +% \begin{macrocode} +cmchar "RTND letter I"; +beginchar("I", 2cap_sb#+caprat*hstretch*(thick#+3jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +pickup quill; +rt x1 = w - pcshiftx - jut; +x2 = x1; +top y1=h; bot y2=0; +% bar +lft x6 = pcshiftx; top y6 = h; +x8 = x1; y8 = y1; +pth1 := z6{pdir}..{pdir}z8; +%ductus:=true; +draw_tstem(1,2,srad); +%%draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw pth1; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "I" + + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{J} +% The letter `J'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "RTND letter J"; +beginchar("J", cap_sb#+caprat*hstretch*(thick#+2jut#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup quill; +%% stem +rt x1 = w-pcshiftx; top y1 = h; +x2=x1; y2=-1/2d; +%% bottom hook +lft x3 = 0; bot y3 = -d; +pth1 := z1--z2..z3{-pdir}; +% bar +lft x6 = pcshiftx; top y6 = h; +x8 = x1; y8 = y1; +pth2 := z6{pdir}..{pdir}z8; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; % stem +draw pth2; % bar +ductus:=false; +penlabels(1,2,3,6,7,8,100); +endchar; % end "J" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{K} +% The letter `K'. +% \begin{macrocode} +cmchar "RTND letter K"; +beginchar("K", 2cap_sb#+caprat*hstretch*(7/8x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +numeric n[]; +pickup quill; +%% stem +n1 = h; % x-height +lft x1=lft x2=pcshiftx+2jut; +top y1=h; bot y2=0; +% bar +lft x26 = pcshiftx; top y26 = h; +x28 = x1; y28 = y1; +pth22 := z26{pdir}..{pdir}z28; +%% top arm +%%z3=(x1,1/2n1); +x3 = x1; top y3 = 1/2n1; +rt x5=5/8[x1,w-pcshiftx]; top y5=n1; +x4=1/2[x3,x5]; top y4=n1; +pth1 := z3{pdir}..z5{up}; +%% lower arm +pth2 := (rt x1,0)--(rt x1,h); +z13 = pth1 intersectionpoint pth2; +pickup threequarterquill; +lft x14 = x13; bot y14 = y13; +rt x7=w-pcshiftx; bot y7=0; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % stem +%draw_clubserif(1,2,0.5); +draw_roundserif(2,1,srad); +draw pth22; +draw pth1; % upper arm +pickup threequarterquill; +draw z14{-ppdir}..z7{right}; % lower arm +pickup quill; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,100); +endchar; % end "K" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{L} +% The letter `L'. +% \begin{macrocode} +cmchar "RTND letter L"; +beginchar("L", 2cap_sb#+caprat*hstretch*(thick#+5jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +pickup quill; +% stem +lft x1= pcshiftx + 3jut; top y1=h; +lft x2= pcshiftx; bot y2 =0; +pth1 := z1{down}..{-pdir}z2; +% bar +lft x6 = pcshiftx; top y6 = h; +x8 = x1; y8 = y1; +pth2 := z6{pdir}..{pdir}z8; +% foot +x3 = x2; y3 = y2; +rt x5 = w - pcshiftx; bot y5 = 0; +pth3 := z3{pdir}..{pdir}z5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; % stem +draw pth2; % bar +draw pth3; % foot +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "L" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{M} +% The letter `M'. +% \begin{macrocode} +cmchar "RTND letter M"; +beginchar("M", 2cap_sb#+caprat*hstretch*(x_height#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2'=x1; bot y2'=0; +%% start of bowl +x13=x1; y13=3/4h; +%% bottom of left, right and middle stems +rt x6' = w -pcshiftx - jut; y6'=y2'; +z4 = 1/2[z2',z6']; +x6 = 1/2[x4,x6']; bot y6 = -thick; +rt x2 = lft x4; bot y2 = 0; +%% top of middle and right stems +x3=x4; y3=y1; +x5=x6'; y5=y13; +%% top of bowls +x14=2/3[x13,x3]; top y14 = h; +x33=x4; y33=y13; +x34=2/3[x33,x5]; y34 = y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%draw_tstem(1,2,srad); % left half +%draw_flatserif(1,2,srad); +%draw_roundserif(2,1,srad); +%draw z13{pdir}..z14{right}..z33{down}--z4; % middle +draw z2..z13..{right}z14..z33{down}--z4; +draw_roundserif(4,3,srad); +%%draw z33{pdir}..z34{right}..z5{down}--z6; +%%draw_roundserif(6,5,srad); +draw z33{pdir}..z34{right}..z5{down}..{-pdir}z6; % rightmost +ductus:=false; +penlabels(1,2,2',3,4,5,6,6',7,8,9,13,14,33,34,100); +endchar; % end "M" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{N} +% The letter `N'. +% \begin{macrocode} +cmchar "RTND letter N"; +beginchar("N", 2cap_sb#+caprat*hstretch*(5/8x_height#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +pickup quill; +%% left stem +lft x1=pcshiftx+jut; top y1=h; +x2=x1; bot y2=0; +% start of bowl +x13=x1; y13=3/4h; +%% right stem +rt x4 = w-pcshiftx-jut; y4=y2; +x3 = x4; y3 = y13; +% top of bowl +x14 = 2/3[x13,x3]; top y14 = h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % left stem +draw_flatserif(1,2,srad); +draw_roundserif(2,1,srad); +draw z13{pdir}..z14{right}..z3{down}--z4; +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "N" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{O} +% The letter `O'. +% \begin{macrocode} +cmchar "RTND letter O"; +beginchar("O", 2cap_sb#+caprat*hstretch*(7/8x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +pth1 := z2..z3..z4{left}.. tension 0.8 ..{up}z1..cycle; +%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "O" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{P} +% The letter `P'. +% \begin{macrocode} +cmchar "RTND letter P"; +beginchar("P", 2cap_sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+2jut; +top y1=h; bot y2=0; +%% bowl +rt x5 = w-pcshiftx; +x4=1/2[x1,x5]; top y4 = h; +x6=x4; bot y6 = 5/16h; +y5=1/2[y4,y6]; +x7 = x1; y7 = 1/2[y6,y5]; +lft x3 = pcshiftx; top y3 = y1; +pth1 := z3{pdir}..z4..{down}z5..{left}z6..z7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw_roundserif(2,1,srad) +draw pth1; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "P" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Q} +% The letter `Q'. +% \begin{macrocode} +cmchar "RTND letter Q"; +beginchar("Q", 2cap_sb#+caprat*hstretch*(7/8x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx-jut; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +pth1 := z2..z3..z4{left}.. tension 0.8 ..{up}z1..cycle; +% foot +z5 = point 1.5 of pth1; +rt x7 = w - pcshiftx; bot y7 = 0; +pth2 := z5..{right}z7; +%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +draw pth2; +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "Q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{R} +% The letter `R'. +% \begin{macrocode} +cmchar "RTND letter R"; +beginchar("R", 2cap_sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +path pth[]; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+2jut; +top y1=h; bot y2=0; +%% bowl +rt x5 = w-pcshiftx; +x4=1/2[x1,x5]; top y4 = h; +x6=x4; bot y6 = 6/16h; +y5=1/2[y4,y6]; +x7 = x1; +%y7 = 1/8[y6,y5]; +y7 = y6; +lft x3 = pcshiftx; top y3 = y1; +pth1 := z3{pdir}..z4..{down}z5..{left}z6..z7; +%% leg +x16 = x6; y16 = y6; +rt x18 = w - pcshiftx; bot y18 = 0; +pth2 := z16..{right}z18; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw_roundserif(2,1,srad) +draw pth1; +draw pth2; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "R" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{S} +% The letter `S'. +% \begin{macrocode} + +cmchar "RTND letter S"; +beginchar("S", 2cap_sb#+caprat*hstretch*(7/8x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := cap_sb; +pickup quill; + +% center +z50=(1/2w, 1/2h); +x60 = w-pcshiftx; z60 = z50 shifted (whatever*pdir); +x40 = pcshiftx; z40 = z50 shifted (whatever*pdir); +rt x5 = x50; top y5 = y50; +z54 = (lft x5, bot y5); +lft x6 = x50; bot y6 = y50; +z56 = (rt x6, top y6); + +% top bowl +z1 = 1/2[z56,z60]; +x3 = 1/2[x5,x1]; top y3 = h; + +% bottom bowl +z10 = 1/2[z54,z40]; +%x8 = 1/4[x6,x10]; +x8 = x56; +bot y8 = 0; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +% top bowl +draw z5{ppdir}..z3..z1{-ppdir}; + +% bottom bowl +draw z6..z8{left}..z10{ppdir}; +pickup stylus; +draw z60--z10; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,11,17,20,26,27,28,40,50,54,56,60,100); +endchar; % end "S" + + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{T} +% The letter `T'. +% \begin{macrocode} +cmchar "RTND letter T"; +beginchar("T", 2cap_sb#+caprat*hstretch*(x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +pickup quill; +%% bar +top y3=h; n3 := h - top y3; +lft x1 = pcshiftx; rt x2=w-pcshiftx; +%%top y1 = y3-n3; bot y2=y3+n3; +y1 = y3-n3; y2=y3; +n1 := w; % width of bowl +n2 := h; % height of bowl +x3=1/2[x1,x2]; +lft x4 = pcshiftx + 1/8n1; y4 = 1/2h; +x5=x3; bot y5 = 0; +rt x6 = pcshiftx + 3/4n1; top y6 = 1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{pdir}..z3..z2{pdir}; % bar +%draw z3..z4{down}..z5{right}..z6{pdir}; +draw z3--z5; +draw_roundserif(5,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "T" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{U} +% The letter `U'. +% \begin{macrocode} +cmchar "RTND letter U"; +beginchar("U", 2cap_sb#+caprat*hstretch*(5/8x_height#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-jut; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; +draw_flatserif(1,13,srad); +draw_tstem(3,4,srad); % right stem +draw_flatserif(3,4,srad); +draw_roundserif(4,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "U" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{V} +% The letter `V'. +% \begin{macrocode} +cmchar "RTND letter V"; +beginchar("V", 2cap_sb#+caprat*hstretch*(3/4x_height#+jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x3=w-pcshiftx-jut; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +rt x23=w-pcshiftx; y23=3/4h; +lft x26=x14; top y26=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}; % left stem +draw_flatserif(1,13,srad); +draw z14{pdir}..z23{up}..z26; + +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "V" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{W} +% The letter `W'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "RTND letter W"; +beginchar("W", 2cap_sb#+caprat*hstretch*(x_height#+2jut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + jut; top y1 = h; +% start of bowl +x13=x1; y13=1/3h; +% right stem +rt x5=w-pcshiftx-jut; y5=y1; +x6=x5; bot y6=0; +z53=1/4[z6,z5]; % start of bowl +% middle stem +z3 = 1/2[z1,z5]; +z33=(x3,y13); +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +% middle of right bowl +x34=1/3[x3,x5]; y34=y14; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z13{down}..z14{right}..z33{pdir}; % left +draw_flatserif(1,13,srad); +draw z3--z33{down}..z34{right}..z53{pdir}; % middle +draw_flatserif(3,33,srad); +draw_tstem(5,6,srad); % right stem +draw_flatserif(5,6,srad); +draw_roundserif(6,5,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "W" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{X} +% The letter `X'. +% \begin{macrocode} +cmchar "RTND letter X"; +beginchar("X", 2cap_sb#+caprat*hstretch*(x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +path pth[]; +numeric n[]; +pcshiftx := cap_sb; +pickup quill; +n1 := w-2pcshiftx; % total width +n2 := thick; % triangle side +%% diag top left to bottom right +lft x1=pcshiftx; bot y1=2/3h; +x2=pcshiftx+1/7n1; top y2=h; +x5=pcshiftx+11/14n1; bot y5=-1/4d; +rt x6=pcshiftx+n1; top y6=1/6h; +z25 = 1/3[z2,z5]; +pth1 := z2{right}..z5{right}; +z251 = point 1/3 of pth1; +z252 = point 2/3 of pth1; +%% diag bottom left to top right +lft x10 = -w + 2pcshiftx; bot y10=-d; +x50=x5; top y50=h; +rt x60 = w -pcshiftx; bot y60=2/3h; +x40=pcshiftx+8/14n1; y40=h; + +x150=x2; bot y150 = 0; +lft x160 = pcshiftx; top y160=1/3h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z5{right}..z6; % top left to bottom right +%%draw z10{1/2pdir}..z25..z50{right}..z60; % bottom left to top right +draw z251..z50{right}..z60; % middle to top right +draw z252..z150{left}..z160; % middle to bottom left +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,150,60,160,100); +endchar; % end "X" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Y} +% The letter `Y'. Modern. +% \begin{macrocode} +cmchar "RTND letter Y"; +beginchar("Y", 2cap_sb#+caprat*hstretch*(7/8x_height#), + caprat*x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +numeric n[]; +pickup quill; +%% left stem top +lft x1 = pcshiftx + jut; top y1 = h; +bot y3 = 0; +%% right stem +rt x5=w-pcshiftx; top y5 = h; +lft x9=-1/2w; bot y9 = -d; +pth1 := z9{right}..z5{up}; +pth2 := (0,y3)--(w,y3); +z99 = pth1 intersectionpoint pth2; +x3 = x99; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}..z3; % left stem +draw_flatserif(1,3,srad); +draw pth1; % right stem +draw_flatserif(5,3,srad); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "Y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{Z} +% The letter `Z'. +% \begin{macrocode} +cmchar "RTND letter Z"; +beginchar("Z", 2cap_sb#+caprat*hstretch*(7/8x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% top bar ends +top y12 = h; +n1 := h - y12; +lft x1 = pcshiftx; rt x2 = w-pcshiftx; +%%y1 = y12-n1; y2=y12+n1; +top y1 = y12-n1; y2=y12; +x12 = 1/2[x1,x2]; +pth1 := z1{pdir}..z12{right}..z2{pdir}; +%% bottom bar ends +bot y34 = 0; +x3=x1; x4=x2; +%%y3=y34-n1; y4=y34+n1; +y3=y34-n1; bot y4=y34; +x34 = 1/2[x3,x4]; +pth2 := z3{pdir}..z34{right}..z4{pdir}; +%% diagonal +z5=z3; +%pth3 := z5--(3/4w,h+jut); +%z6 = pth3 intersectionpoint pth1; +z6 = z2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw pth2; % bars +draw z5--z6; +ductus:=false; +penlabels(1,2,3,4,5,6,12,34,10o,10i,20o,20i,100); +endchar; % end "Z" + +% \end{macrocode} +% \end{routine} +% +% +% +% The end of this file +% \begin{macrocode} +%</maj> +% \end{macrocode} +% +% +% +% \subsection{The punctuation file} +% +% The main punctuation marks are defined in this file. +% +% \begin{macrocode} +%<*punct> +% RTNDPUNCT.MF This file contains punctuation marks + +% \end{macrocode} +% +% +% \begin{routine}{!} +% The `!' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Exclamation mark"; +beginchar("!", 2sb#+hstretch*(thick#+trijut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +x1=w/2; top y1 = h; +z3=(x1, 1/2dot_size); +z2=(x1, y3+3/2dot_size); +draw z1--z2; +draw_pdot(3,dot_size); +penlabels(1,2,3); + +endchar; % end of "!" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{?} +% The `?' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Question mark"; +beginchar("?", 2sb#+hstretch*(3/4x_height#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-2pcshiftx; % actual character width +n2 := 1/3h; % height of top bowl +n3 := n2; % height of bottom bowl +z5=(1/2w,1/2dot_size); +x4 = x5; y4=y5+3/2dot_size; +lft x1 = pcshiftx; y1 = 3/4h; +x2 = 1/2w; top y2 = h; +rt x3 = w-pcshiftx; y3 = 2/3h; + +%%ductus:= true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{down}..z4{down}; +draw_pdot(5, dot_size); +penlabels(1,2,3,4,5); +endchar; % end of "?" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{,} +% The `,' character. +% \begin{macrocode} + +cmchar "Comma"; +beginchar(",",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=1/2dot_size; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "," + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{.} +% The `.' character. +% \begin{macrocode} + +cmchar "Period"; +beginchar(".",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +z1=(w/2, 1/2dot_size); +draw_pdot(1,dot_size); +penlabels(1); +endchar; % end of "." + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{:} +% The `:' character. +% \begin{macrocode} + +cmchar "Colon"; +beginchar(":",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +x1=x2=w/2; y1=3/4h; y2=1/4h; +draw_pdot(1,dot_size); +draw_pdot(2,dot_size); +penlabels(1,2); +endchar; % end ":" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{;} +% The `;' character. +% \begin{macrocode} + +cmchar "Semicolon"; +beginchar(";",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=3/4h; y2=1/2dot_size; +draw_pdot(1,dot_size); +draw_pcomma(2,dot_size,comma_width); +penlabels(1,2); +endchar; % end of ";" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{'} +% The `'' character. +% \begin{macrocode} + +cmchar "Apostrophe"; +beginchar("'",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "'" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{`} +% The ``' character. +% \begin{macrocode} + +cmchar "Reverse apostrophe"; +beginchar("`",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=h; +draw_plq(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "`" + +% \end{macrocode} +% \end{routine} +% +% The end of this file. +% \begin{macrocode} +%</punct> +% \end{macrocode} +% +% +% \subsection{The ligatures and dashes file} +% +% The ligatured letters, punctuation marks and dashes are defined in this file. +% \begin{macrocode} +%<*lig> +% RTNDLIG.MF Uncial ligatured letters, punctation and dashes + +% \end{macrocode} +% First the ligtables. +% \begin{macrocode} + +ligtable "`": "`"=:oct"134"; +ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#; + +ligtable "-": "-"=:oct"173"; +ligtable oct"173": "-"=:oct"174"; + +%%%%ligtable "c": "t"=:oct"014"; +%%%%ligtable "s": "t"=:oct"015"; + +% \end{macrocode} +% +% +% \begin{routine}{''} +% The `''' ligature. +% \begin{macrocode} + +cmchar "Closing quotes"; +beginchar(oct"042",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h; +x2=x1-(2hstretch*dot_size); +draw_pcomma(1,dot_size,comma_width); % right +draw_pcomma(2,dot_size,comma_width); % left +penlabels(1,2); +endchar; % end of "''" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{``} +% The ```' ligature. +% \begin{macrocode} + +cmchar "Opening quotes"; +beginchar(oct"134",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h; +x2=x1+(2hstretch*dot_size); +draw_plq(1,dot_size,comma_width); % left +draw_plq(2,dot_size,comma_width); % right +penlabels(1,2); +endchar; % end of "``" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{-} +% The `-' (hyphen) character. +% \begin{macrocode} + +cmchar "Hyphen"; +beginchar("-",sb#+hstretch*(0.8x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +%%numeric alpha; alpha:=w/8; +%%pickup quill; +%%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +%%x11=lft x1+alpha/2; y11=top y1-0.5thin; +%%x12=rt x2; y12=bot y1+0.5thin; +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +pickup halfquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +draw z21--z22; +draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "-" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{--} +% The `--' (en-dash) ligature. +% \begin{macrocode} + +cmchar "En dash"; +beginchar(oct"173",sb#+hstretch*(x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +%%numeric alpha; alpha:=w/8; +%%pickup quill; +%%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +%%x11=lft x1+alpha/2; y11=top y1-0.5thin; +%%x12=rt x2; y12=bot y1+0.5thin; +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +pickup halfquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +draw z21--z22; +draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "--" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{---} +% The `---' (em dash) ligature. The em dash is twice the width of the en dash. +% \begin{macrocode} + +cmchar "Em dash"; +beginchar(oct"174",sb#+hstretch*(2x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +%%numeric alpha; alpha:=w/8; +%%pickup quill; +%%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +%%x11=lft x1+alpha/2; y11=top y1-0.5thin; +%%x12=rt x2; y12=bot y1+0.5thin; +%%draw_triangle(11,alpha); +%%draw_rutriangle(12,alpha); +pickup halfquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +draw z21--z22; +draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "---" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{&} +% The ampersand (which is really an `et' ligature). +% \begin{macrocode} + +cmchar "RTND ampersand"; +beginchar("&", 2sb#+hstretch*(5/4x_height#+2jut#), asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx:=sb; +pickup quill; +%% alpha looking part +n1 := w-2pcshiftx-jut; % actual letter width +n2 := h/ascratio; % x-height +n3 := 16/16n2; % height of alpha +x1 = w-pcshiftx; bot y1 = 0; +x3 = pcshiftx + 12/16n1; y3 = 1/2n3; +lft x5 = pcshiftx; y5 = y3; +x4 = x6 = 1/2[x5,x3]; +top y4 = n3; bot y6 = 0; +%rt x8 = w-pcshiftx-jut; top y8=h; +rt x8 = w-pcshiftx-jut; +top y8 = h - thick; +x9 = x8-2jut; x10-x8 = x8-x9; +y9=y10=y8; +%pth1 := z1{left}..z3..z4{left}..z5{down}..z6{right}..z3..z8{up}; +pth1 := z1{left}..z3..z4{left}.. tension 0.8 ..z5{down}.. + tension 0.8 ..z6{right}..z3..z8{up}; +%% loop +z21 = z5; +z25 = point 1.5 of pth1; +x23 = 1/2[x21,x25]; +%y23 = 7/8[y4,y8]; +top y23 = h; +pth2 := z21{up}..z23{right}..z25{down}; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw z8--z10; % alpha +draw pth2; % loop +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,16,17,18,19,21,22,23,24,25); +endchar; % end of "&" + +% \end{macrocode} +% \end{routine} +% +% +% +% The end of this file. +% \begin{macrocode} +%</lig> +% \end{macrocode} +% +% \subsection{The digits file} +% +% These are arabic digits in the style of the book-hand. They are a +% modern invention. +% +% \begin{macrocode} +%<*dig> +% RTNDDIG.MF Program file for Early Gothic digits +% + +% \end{macrocode} +% +% +% +% \begin{routine}{1} +% The digit `1'. +% \begin{macrocode} +cmchar "RTND digit 1"; +beginchar("1", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=x2=w/2; +y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +draw_flatserif(1,2,srad); +%draw_roundserif(2,1,srad); +%draw_flatserif(2,1,srad); +draw_flat_foot(2); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,100); +endchar; % end "1" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{2} +% The digit `2'. +% \begin{macrocode} +cmchar "RTND digit 2"; +beginchar("2", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=pcshiftx+o; top y1=h-2thin; +x2=1/2w; top y2= h+o; +rt x3=w-pcshiftx-o; y3=3/4h; +% foot +lft x5=pcshiftx; bot y5=0; +rt x6=w-pcshiftx; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(5,6,thin); % foot +%draw z1..z2{right}..z3{down}..{-pdir}z5wl; % curve +draw z1..z2{right}.. tension 0.8 ..z3{down}..{-pdir}z5wl; % curve +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "2" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{3} +% The digit `3'. +% \begin{macrocode} +cmchar "RTND digit 3"; +beginchar("3", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% x values +lft x3=pcshiftx; x10=x3; +rt x5=w-pcshiftx; x8=x5-3thin; +x4=0.5[x3,x5]; +x9=0.5[x10,x8]; +%%lft x6=pcshiftx+3thin; x7=x6; +x6=1/2[x3,x9]; x7=x6; +% y values +bot y3=thin; top y10=h-2thin; +y6=0.5[y3,y10]; y7=y6; +bot y4=-thin; top y9=h+thin; +y5=0.5[y3,y6]; +y8=11/12[y7,y10]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw z3..z4{right}..z5{up}...{-pdir}z6; % bottom bowl +%%draw z7{pdir}..z8{up}..z9{left}..z10; % top bowl +draw z3..z4{right}..z5{up}...{left}z6; % bottom bowl +draw z7{right}..z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "3" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{4} +% The digit `4'. +% \begin{macrocode} +cmchar "RTND digit 4"; +beginchar("4", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the stem +x1=x2=w-pcshiftx-jut; +y1=h; bot y2=0; +% the crossbar +lft x3=pcshiftx; y3=0.33h; +rt x4=w-pcshiftx; y4=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % main stem +draw_flat_foot(2); +draw_wave(3,4,thin); % crossbar +draw z3wl--z1; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "4" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{5} +% The digit `5'. +% \begin{macrocode} +cmchar "RTND digit 5"; +beginchar("5", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% for the top +rt x1=w-pcshiftx; top y1=h; +lft x2=pcshiftx; y2=y1; +% the S curve +x3=x2; y3=0.5h+thin; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +rt x5=w-pcshiftx; y5=0.3h; +x6=w/2; bot y6=0; +lft x7=pcshiftx; bot y7=2thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(2,1,thin); % top squiggle +%draw z3{pdir}..z5{down}..z6{left}..z7; % curve +draw z3{pdir}..z5{down}.. tension 0.8 ..z6{left}..z7; % curve +draw z2wl--z3; % vertical +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "5" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{6} +% The digit `6'. +% \begin{macrocode} +cmchar "RTND digit 6"; +beginchar("6", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx; top y1=h-2thin; +x2=1/2w; top y2= h; +lft x3=pcshiftx; y3=1/2h; +x4=x2; bot y4=0; +rt x5=w-pcshiftx; y5=1/4h; +lft x6=rt x3; bot y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%draw z1..z2{left}..z3{down}..z4{right}..z5{up}..{-pdir}z6; +draw z1..z2{left}.. tension 0.8 ..z3{down}.. tension 0.8 ..z4{right}.. tension 0.8 + ..z5{up}..{-pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "6" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{7} +% The digit `7'. +% \begin{macrocode} +cmchar "RTND digit 7"; +beginchar("7", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% top bar +lft x1=pcshiftx; +rt x2=w-pcshiftx; +top y1=top y2=h; +% bowed leg +x4=w/2; bot y4=0; +x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(1,2,thin); % top bar +draw z1wr..z3..z4; +draw_flat_foot(4); +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "7" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{8} +% The digit `8'. +% \begin{macrocode} +cmchar "RTND digit 8"; +beginchar("8", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=1; +pickup quill; +lft x1=alpha*pcshiftx+o; rt x3=w-alpha*pcshiftx-o; y1=y3=3/4h; +x2=x4=w/2; top y2=h+o; bot y4=-o; +x5=x2; y5=h/2+2o; +lft x11=pcshiftx; rt x13=w-pcshiftx; y11=y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1.. tension 0.8 ..z2.. tension 0.8 ..z3..z5.. + z11.. tension 0.8 ..z4.. tension 0.8 ..z13..z5..cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,100); +endchar; % end "8" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{9} +% The digit `9'. +% \begin{macrocode} +cmchar "RTND digit 9"; +beginchar("9", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; bot y1=2thin; +x2=1/2w; bot y2= 0; +rt x3=w-pcshiftx; y3=1/2h; +x4=x2; top y4=h; +lft x5=pcshiftx; y5=3/4h; +rt x6=lft x3; top y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%draw z1..z2{right}..z3{up}..z4{left}..z5{down}..{pdir}z6; +draw z1..z2{right}.. tension 0.8 ..z3{up}.. tension 0.8 ..z4{left}.. + tension 0.8 ..z5{down}..{pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "9" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{0} +% The digit `0'. +% \begin{macrocode} +cmchar "RTND digit 0"; +beginchar("0", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%draw z1..z2..z3..z4..cycle; +draw z1.. tension 0.8 ..z2.. tension 0.8 ..z3.. tension 0.8 ..z4.. tension 0.8 ..cycle; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "0" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</dig> +% \end{macrocode} +% +% +% \section{The font definition files} \label{sec:fd} +% +% The font comes in normal and bold weights only. +% +% \begin{macrocode} +%<*fdot1> +\DeclareFontFamily{OT1}{rtnd}{} + \DeclareFontShape{OT1}{rtnd}{m}{n}{ <-8.5> rtnd7 <8.5-15> rtnd10 <15-> rtnd17 }{} + \DeclareFontShape{OT1}{rtnd}{m}{sl}{ <-> sub * rtnd/m/n }{} + \DeclareFontShape{OT1}{rtnd}{m}{it}{ <-> sub * rtnd/m/n }{} + \DeclareFontShape{OT1}{rtnd}{m}{sc}{ <-> sub * rtnd/m/n }{} + \DeclareFontShape{OT1}{rtnd}{m}{u}{ <-> sub * rtnd/m/n }{} + \DeclareFontShape{OT1}{rtnd}{bx}{n}{ <-8.5> rtndb7 <8.5-15> rtndb10 <15-> rtndb17 }{} + \DeclareFontShape{OT1}{rtnd}{bx}{it}{ <-> sub * rtnd/bx/n }{} + \DeclareFontShape{OT1}{rtnd}{bx}{sl}{ <-> sub * rtnd/bx/n }{} + \DeclareFontShape{OT1}{rtnd}{b}{n}{ <-> sub * rtnd/bx/n }{} +%</fdot1> +% \end{macrocode} +% +% +% \begin{macrocode} +%<*fdt1> +\DeclareFontFamily{T1}{rtnd}{} + \DeclareFontShape{T1}{rtnd}{m}{n}{ <-8.5> rtnd7 <8.5-15> rtnd10 <15-> rtnd17 }{} + \DeclareFontShape{T1}{rtnd}{m}{sl}{ <-> sub * rtnd/m/n }{} + \DeclareFontShape{T1}{rtnd}{m}{it}{ <-> sub * rtnd/m/n }{} + \DeclareFontShape{T1}{rtnd}{m}{sc}{ <-> sub * rtnd/m/n }{} + \DeclareFontShape{T1}{rtnd}{m}{u}{ <-> sub * rtnd/m/n }{} + \DeclareFontShape{T1}{rtnd}{bx}{n}{ <-8.5> rtndb7 <8.5-15> rtndb10 <15-> rtndb17 }{} + \DeclareFontShape{T1}{rtnd}{bx}{it}{ <-> sub * rtnd/bx/n }{} + \DeclareFontShape{T1}{rtnd}{bx}{sl}{ <-> sub * rtnd/bx/n }{} + \DeclareFontShape{T1}{rtnd}{b}{n}{ <-> sub * rtnd/bx/n }{} +%</fdt1> +% \end{macrocode} +% +% \section{The package code} \label{sec:code} +% +% \subsection{The \Lpack{rotunda} package} +% +% The \Lpack{rotunda} package is for typesetting short pieces of text +% in the \thisfont{} fonts. +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. +% \begin{macrocode} +%<*usc> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{rotunda}[2002/12/30 v1.0 package for Rotunda fonts] +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\rtndfamily} +% Selects the \thisfont{} font family in the OT1 or T1 encoding. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \newcommand{\rtndfamily}{\usefont{T1}{rtnd}{m}{n}} +\else + \newcommand{\rtndfamily}{\usefont{OT1}{rtnd}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textrtnd} +% Text command for the \thisfont{} font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textrtnd}{\rtndfamily} +% \end{macrocode} +% \end{macro} +% +% The end of this package. +% \begin{macrocode} +%</usc> +% \end{macrocode} +% +% \subsection{The \Lpack{allrtnd} package} +% +% The \Lpack{allrtnd} package is intended for use when the entire document +% will be typeset in the book-hand. This is a minimal package. Because the +% book-hand should not contain arabic digits a fuller package would redefine +% anything numbered in \LaTeX{} to use roman instead of arabic numbering. +% Also, because of the large |\baselineskip| many other aspects of \LaTeX{} +% to do with vertical positioning should also be redefined. +% +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. It also uses the \Lpack{rotunda} package. +% \begin{macrocode} +%<*uscall> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{allrtnd}[2002/12/30 v1.0 package for all Rotunda fonts] +\RequirePackage{rotunda} +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% Redefine the default fonts to be \thisfont, which has only one family +% member. +% \begin{macro}{\rmdefault} +% \begin{macro}{\sfdefault} +% \begin{macro}{\ttdefault} +% \begin{macrocode} +\renewcommand{\rmdefault}{rtnd} +\renewcommand{\sfdefault}{rtnd} +\renewcommand{\ttdefault}{rtnd} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The `leading' in the book-hands is a function of the |x-height|, which is +% normally much +% greater than for the CMR fonts. I have borrowed code from Frank Jensen's +% \Lpack{beton} package~\cite{BETON} to do this. The |x-height| (in points) +% for the CMR +% fonts is given in Table~\ref{tab:cmrx}. Note that the CMR design sizes are +% 5--10, 12, and 17.28 points. The other values given are scaled from these +% figures. +% +% \begin{table} +% \centering +% \caption{The x heights of the CMR and \thisfont{} fonts} \label{tab:cmrx} +% \begin{tabular}{ccc} \hline +% Design & CMR & \thisfont \\ +% Size & X Height & X Height \\ \hline +% 5 & 2.14 & 3.00 \\ ^^A CMR skip = 6pt = 2.8 times +% 6 & 2.58 & 3.61 \\ ^^A CMR skip = 7pt = 2.7 times +% 7 & 3.00 & 4.20 \\ ^^A CMR skip = 8pt = 2.7 times +% 8 & 3.44 & 4.81 \\ ^^A CMR skip = 9.5pt = 2.8 times +% 9 & 3.86 & 5.40 \\ ^^A CMR skip = 11pt = 2.8 times +% 10 & 4.31 & 6.03 \\ ^^A CMR skip = 12pt = 2.8 times +% 11 & 4.74 & 6.64 \\ ^^A CMR skip = 13.6pt = 2.8 times +% 12 & 5.17 & 7.24 \\ ^^A CMR skip = 14.5pt = 2.8 times +% 14 & 6.03 & 8.44 \\ ^^A CMR skip = 18pt = 3.0 times +% 17 & 7.44 & 10.41 \\ ^^A CMR skip = 22pt = 3.0 times +% 20 & 8.75 & 12.25 \\ ^^A CMR skip = 25pt = 2.9 times +% 25 & 10.94 & 15.32 \\ ^^A CMR skip = 30pt = 2.7 times +% \hline +% \end{tabular} +% \end{table} +% +% \begin{macro}{\rtnd@baselineskip@table} +% A table of the normal font sizes and the corresponding baselineskip. +% The distance between baselines for \thisfont{} is over twice +% the |x-height|. ^^A actually 2.5 times to nearest half point +% +% \begin{macrocode} +\newcommand{\rtnd@baselineskip@table}{% + <\@vpt>7.5% + <\@vipt>9.0% + <\@viipt>10.5% + <\@viiipt>12.0% + <\@ixpt>13.5% + <\@xpt>15.0% + <\@xipt>16.5% + <\@xiipt>18.0% + <\@xivpt>21.0% + <\@xviipt>26.0% + <\@xxpt>30.5% + <\@xxvpt>38.5} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\rtnd@new@setfontsize} +% This is a macro that replaces the |\@setfontsize| macro which is called by +% the font size changing commands. +% \begin{macrocode} +\newcommand{\rtnd@new@setfontsize}[3]{% + \edef\@tempa{\def\noexpand\@tempb####1<#2}% + \@tempa>##2<##3\@nil{\def\rtnd@baselineskip@value{##2}}% + \edef\@tempa{\noexpand\@tempb\rtnd@baselineskip@table<#2}% + \@tempa><\@nil + \ifx\rtnd@baselineskip@value\@empty + \def\rtnd@baselineskip@value{#3}% + \fi + \rtnd@old@setfontsize{#1}{#2}\rtnd@baselineskip@value} +% \end{macrocode} +% \end{macro} +% +% We had better give an author a means of using The Computer Modern fonts +% if necessary. +% +% \begin{macro}{\cmrfamily} +% \begin{macro}{\cmssfamily} +% \begin{macro}{\cmttfamily} +% These macros select the Computer Modern Roman, Sans, and Typewriter +% font families in either the T1 or OT1 encodings. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}} +\else + \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcmr} +% Text command for the Computer Modern Roman font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmr}{\cmrfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmss} +% Text command for the Computer Modern Sans font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmss}{\cmssfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmtt} +% Text command for the Computer Modern Typewriter font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmtt}{\cmttfamily} +% \end{macrocode} +% \end{macro} +% +% +% At the start of the document, change the |\@setfontsize| macro and call +% the normal font to implement the change. +% \begin{macrocode} +\AtBeginDocument{% + \let\rtnd@old@setfontsize=\@setfontsize + \let\@setfontsize=\rtnd@new@setfontsize} +\AtBeginDocument{\normalsize} +% \end{macrocode} +% +% +% The end of this package. +% \begin{macrocode} +%</uscall> +% \end{macrocode} +% +% +% +% +% +% \Finale +% \PrintIndex +% +\endinput + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + diff --git a/Master/texmf-dist/source/latex/bookhands/rotunda/rotunda.ins b/Master/texmf-dist/source/latex/bookhands/rotunda/rotunda.ins new file mode 100644 index 00000000000..8bd58e53132 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/rotunda/rotunda.ins @@ -0,0 +1,101 @@ +%% +%% rotunda.ins +%% Copyright 1999 Peter R. Wilson +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Peter Wilson (CUA) +%% now at: peter.r.wilson@boeing.com +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{rotunda.ins} +\input docstrip.tex +\preamble + + Copyright 1999 Peter R. Wilson + + This program is provided under the terms of the + LaTeX Project Public License distributed from CTAN + archives in directory macros/latex/base/lppl.txt. + +Author: Peter Wilson (CUA) + now at: peter.r.wilson@boeing.com + +\endpreamble + +\keepsilent + +%%% \Msg{*** Generating the driver file ***} +%%% \generateFile{rotunda.drv}{t}{\from{rotunda.dtx}{driver}} + +\Msg{*** Generating the Metafont files ***} + +\usepostamble\empty +\generateFile{rtnd7.mf}{t}{\from{rotunda.dtx}{base7}} +\generateFile{rtnd10.mf}{t}{\from{rotunda.dtx}{base10}} +\generateFile{rtnd17.mf}{t}{\from{rotunda.dtx}{base17}} +\generateFile{rtndb7.mf}{t}{\from{rotunda.dtx}{base7b}} +\generateFile{rtndb10.mf}{t}{\from{rotunda.dtx}{base10b}} +\generateFile{rtndb17.mf}{t}{\from{rotunda.dtx}{base17b}} +\generateFile{rtndl.mf}{t}{\from{rotunda.dtx}{min}} +\generateFile{rtndu.mf}{t}{\from{rotunda.dtx}{maj}} +\generateFile{rtndtitle.mf}{t}{\from{rotunda.dtx}{mfd}} +\generateFile{rtndpunct.mf}{t}{\from{rotunda.dtx}{punct}} +\generateFile{rtndlig.mf}{t}{\from{rotunda.dtx}{lig}} +\generateFile{rtnddig.mf}{t}{\from{rotunda.dtx}{dig}} + +\Msg{*** Generating the Font Definition files ***} +\usepostamble\defaultpostamble + +\generateFile{ot1rtnd.fd}{t}{\from{rotunda.dtx}{fdot1}} +\generateFile{t1rtnd.fd}{t}{\from{rotunda.dtx}{fdt1}} + +\Msg{*** Generating the LaTeX2e package files ***} + +\generateFile{rotunda.sty}{t}{\from{rotunda.dtx}{usc}} +\generateFile{allrtnd.sty}{t}{\from{rotunda.dtx}{uscall}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into directories searched by TeX:} +\Msg{*} +\Msg{* Move these into the font source area:} +\Msg{* \space\space rtnd7.mf} +\Msg{* \space\space rtnd10.mf} +\Msg{* \space\space rtnd17.mf} +\Msg{* \space\space rtndb7.mf} +\Msg{* \space\space rtndb10.mf} +\Msg{* \space\space rtndb17.mf} +\Msg{* \space\space rtndl.mf} +\Msg{* \space\space rtndu.mf} +\Msg{* \space\space rtndtitle.mf} +\Msg{* \space\space rtndpunct.mf} +\Msg{* \space\space rtndlig.mf} +\Msg{* \space\space rtnddig.mf} +\Msg{*} +\Msg{* Move these into the LaTeX macro area:} +\Msg{* \space\space ot1rtnd.fd} +\Msg{* \space\space t1rtnd.fd} +\Msg{* \space\space rotunda.sty} +\Msg{* \space\space allrtnd.sty} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{* Process any name.idx file by:} +\Msg{* \space\space\space\space makeindex -s gind.ist name} +\Msg{* Process any name.glo file by:} +\Msg{* \space\space\space\space makeindex -s gglo.ist -o name.gls name.glo} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/bookhands/rustic/rustic.dtx b/Master/texmf-dist/source/latex/bookhands/rustic/rustic.dtx new file mode 100644 index 00000000000..f42b4d0df45 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/rustic/rustic.dtx @@ -0,0 +1,3778 @@ +% \iffalse meta-comment +% +% rustic.dtx +% Copyright 1999 Peter R. Wilson +% +% This program is provided under the terms of the +% LaTeX Project Public License distributed from CTAN +% archives in directory macros/latex/base/lppl.txt. +% +% Author: Peter Wilson (CUA) (now at: peter.r.wilson@boeing.com) +% +% If you do not have the docmfp package (available from CTAN in +% tex-archive/macros/latex/contrib/supported), comment out the +% \usepackage{docmfp} line below and uncomment the line following it. +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{docmfp} +%%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{} +\EnableCrossrefs +\CodelineIndex +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{rustic.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{137} +% +% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} +% \DoNotIndex{\@centercr,\@cite} +% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} +% \DoNotIndex{\@input,\@ixpt,\@m} +% \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} +% \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} +% \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} +% \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} +% \DoNotIndex{\advance,\Alph,\alph} +% \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\bullet} +% \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} +% \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} +% \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} +% \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +% \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} +% \DoNotIndex{\fbox} +% \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} +% \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +% \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} +% \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} +% \DoNotIndex{\input} +% \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} +% \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} +% \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +% \DoNotIndex{\NeedsTeXFormat,\newdimen} +% \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} +% \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} +% \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} +% \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +% \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +% \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +% \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} +% \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} +% \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} +% \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} +% \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} +% \DoNotIndex{\viipt,\vipt,\vskip,\vspace} +% \DoNotIndex{\wd,\xiipt,\year,\z@} +% +% \changes{v1.0}{1999/05/01}{First public release} +% \changes{v1.0a}{2001/01/02}{Fixed missing * in .fd files} +% +% ^^A \def\fileversion{v1.0} +% ^^A \def\filedate{1999/05/01} +% \def\fileversion{v1.0a} +% \def\filedate{2001/01/02} +% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package +% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option +% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file +% \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter +% \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle +% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment +% \newcommand*{\AD}{\textsc{ad}} +% +% \title{The \Lpack{rustic} fonts\thanks{This +% file has version number \fileversion, last revised +% \filedate.}} +% +% \author{% +% Peter Wilson\\ +% Catholic University of America \\ +% Now at \texttt{peter.r.wilson@boeing.com} +% } +% \date{\filedate} +% \maketitle +% \begin{abstract} +% The \Lpack{rustic} and \Lpack{allrust} packages provide a set of +% Metafont Roman Rustic book-hands +% as used +% for manuscripts in the 1st to the 6th century. This is one in a series +% of manuscript fonts. +% \end{abstract} +% \tableofcontents +% +% \StopEventually{} +% +% +% +% \section{Introduction} +% +% The \Lpack{rustic} and \Lpack{allrust} packages provide +% a Metafont~\cite{METAFONT} version +% of the Roman Rustic manuscript book-hand that was in use between about the +% first and sixth centuries~\AD. It is part of a project to provide fonts +% covering the major manuscript hands between the first century~\AD{} and +% the invention of printing. The principal resources used in this project +% are listed in the Bibliography. +% +% This manual is typeset according to the conventions of the +% \LaTeX{} \textsc{docstrip} utility which enables the automatic +% extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. +% The \Lpack{docmfp} package is used for documenting the Metafont portions +% of the distribution~\cite{DOCMFP}. +% +% Section~\ref{sec:usc} describes the usage of the package. +% Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} +% and source code for the packages is in Section~\ref{sec:code}. +% +% \subsection{Manuscript book-hands} +% +% Before the invention of printing all books were written by hand. The book-hands +% used by the scribes and copyists for the manuscripts changed as time +% went on. Table~\ref{tab:1} lists some of the common book-hands which were used +% between the 1st and 15th centuries. The later book-hands formed the basis of the +% fonts used by the early printers, which in turn form the basis of the printing +% fonts in use today. +% +% The manuscript book-hands were written with a broad nibbed reed or quill +% pen. Among the distinguishing characteristics of a hand, apart from the +% actual shape of the letters, are the angle of the pen (which controls the +% variation between thick and thin strokes) and the height of a letter compared +% to the width of the nib. The lower the ratio of the letter height to nib +% width, the more condensed is the script. The scripts also varied in their +% typical height. +% +% Table~\ref{tab:1} gives an `average' x-height for each +% script, which I obtained by measuring a sample of photographs of +% manuscripts written in the various hands. About a dozen examples +% of each book-hand were measured. This figure should not be taken too +% seriously. +% +% There was not a sharp division between the use of one hand and another. +% Many manuscripts exhibit a variety of hands in the same document. For example, +% the scribe writing in an Uncial hand may have used Roman Rustic letters +% for capitals. Usually the same pen was used for the two different scripts. +% +% Generally speaking, as a hand got older it became more embelished and +% calligraphic, and +% therefore took longer to write. As this happened a new hand would appear that +% was faster, and which would eventually make the earlier one obsolete. +% +% Many of the book-hands were single-cased; that is, they did not have an +% upper- and lower-case as we do nowadays in Western scripts. On the other +% hand, a script might be majuscule or minuscule. A \textit{majuscule} script +% is one, like our upper-case, where the letters are drawn between two lines +% and are of a uniform height with no ascenders or descenders. +% A \textit{minuscule} script, like our lower-case, is drawn between four lines +% and has ascenders and descenders. +% +% \begin{table} +% \centering +% \caption{The main manuscript book-hands} \label{tab:1} +% \begin{tabular}{lccccc} \hline +% Name & Century & x-height & Height & Pen & Normalised \\ +% & & (mm) & (nib widths) & angle & height \\ \hline +% Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\ +% Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\ +% Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\ +% Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\ +% Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\ +% Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\ +% Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\ +% Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\ +% Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\ +% Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\ +% Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\ +% Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline +% \end{tabular} +% \end{table} +% +% During the period under consideration arabic numerals were effectively +% not used. At the beginning they were unknown and even though some knew of +% them towards the end, the glyphs used for them are not recognisable --- +% to me they look somewhat like cryllic letters --- and each locality and time +% had its own highly individualistic rendering. The general rule when using +% one of these book-hands is to write all numbers using roman numerals. +% +% In the first century punctuation was virtually unknown, and typically there +% would not even be any additional space between individual words, never mind +% denoting ends of sentences. Sometimes a dot at mid-height would be used as +% a word seperator, or to mark off the end of a paragraph. Effectively a text +% was a continuous stream of letters. By the time that printing was invented, +% though, all of our modern punctuation marks were being used. +% +% Among all these manuscript hands, the Carolingian minuscule is the +% most important as our modern fonts are based on its letter shapes, and it is +% also at this point in time where the division occured between the black letter +% scripts as used even today in Germany, and the lighter fonts used elesewhere. +% The Rotunda and Humanist minuscule hands were developed in Italy and were +% essentially a rediscovery of the Carolingian minusucle. Guthenberg took the +% Gothic scripts as the model for his types. Later printers, +% such as Nicholas Jenson of Venice, +% took the Humanist scripts as their models. +% +% +% \subsection{The Roman Rustic script} +% +% The Roman Rustic hand, which is a majuscule script, was in use for some five +% centuries until it was suceeded by the Uncial book-hands. Usually the +% lettering in a manuscript was all one size. If the scribe felt the need +% for `capital' letters then, using the same pen, would write a slightly larger +% letter. +% During the period when the +% script was used the alphabet only had 23 letters. I have included +% the missing J, U and W. +% +% Arabic numerals were unknown at this time, so all numbers were written +% using the roman numbering system. I have provided Roman Rustic versions of +% the arabic digits. +% +% Punctuation was non-existant. A dot at mid-height might be used as +% a word seperator, but that was all. Paragraphs had no indentation, neither +% was there any extra vertical space between paragraphs. Essentially, the +% script ran continuously with no spaces, even between words. +% +% The `leading' --- the amount of white space between lines --- was about +% the same height as the letters. +% +% +% \section{The \Lpack{rustic} and \Lpack{allrust} package} \label{sec:usc} +% +% The Roman Rustic font family is called |rust|. The font is supplied in both +% OT1 and T1 encodings. +% +% \subsection{The \Lpack{rustic} package} +% +% This is intended for the occasions when some short pieces of text have to be +% written in Roman Rustic while the majority of the document is in another font. +% The normal baselineskips are used. +% +% \DescribeMacro{\rustfamily} +% The |\rustfamily| declaration starts typesetting with the Roman Rustic fonts. +% Use of the Rustic font will continue until either there is another |\...family| +% declaration or the current group (e.g., environment) is closed. +% +% \DescribeMacro{\textrust} +% The command |\textrust{|\meta{text}|}| will typeset \meta{text} using the +% Roman Rustic fonts. +% +% \subsection{The \Lpack{allrust} package} +% +% This package is for when the entire document will be typeset with the +% Roman Rustic font. The baselineskips are set to those appropriate to the +% book-hand. +% +% This is a minimalist package. Apart from declaring Roman Rustic to be the +% default font and setting the baselineskips appropriately, it makes no other +% alterations. +% Vertical spacing +% before and after section titles and before and after lists, etc., will be +% too small as the \LaTeX{} design assumes a font comparable in size to +% normal printing fonts, and the book-hand is much taller. +% To capture more of the flavour of the time, all numbers +% should be written using roman numerals. +% The \Lpack{romannum} package~\cite{ROMANNUM} +% can be used so that \LaTeX{} will typeset the numbers that it generates, +% like sectioning or caption numbers, using roman numerals instead of arabic +% digits. +% +% \DescribeMacro{\cmrfamily} +% \DescribeMacro{\textcmr} +% \DescribeMacro{\cmssfamily} +% \DescribeMacro{\textcmss} +% \DescribeMacro{\cmttfamily} +% \DescribeMacro{\textcmtt} +% The |...family| declarations start typesetting with the Computer Modern Roman +% (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer +% Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}| +% commands will typeset \meta{text} in the corresponding Computer Modern font. +% +% The \Lpack{allrust} package automatically loads the \Lpack{rustic} package, +% so the rustic font commands are available if necessary. +% +% +% +% \section{The Metafont code} \label{sec:mf} +% +% +% As previously noted, this work is part of a larger project to provide +% fonts covering the main manuscript book-hands. As such, one of the +% aims is to produce a coordinated set of fonts, especially as multiple +% hands might be used in a single document. +% +% Noting that the hands tend to be somewhat larger than the typical 10pt +% size (where the x-height is approximately 1.5mm) used for modern books, +% I have also designed the fonts +% at a larger than normal size, then applied some non-linear factors when reducing +% them down to a 10pt size. +% Further, I have used the height of the Carolingian minuscule as a +% normalising factor when deciding on the absolute height of any particular +% script. The x-height of the Carolingian font is made equal to the +% x-height of the Computer Modern Roman (CMR) font. +% +% Modern fonts are effectively drawn. That is, the outline of the letter is +% drawn carefully and the center is filled with ink. This is shown to good +% effect in the Metafont code for the Computer Modern fonts~\cite{CM}. +% In contrast, the manuscript letters were inked by single pen strokes in +% a calligraphic manner. I have tried to repeat this calligraphic style +% in the Metafont code. +% +% As much as possible I have tried to use parameter values from the +% Computer Modern Roman (CMR) fonts in order to reduce possible +% infelicities if the CM and manuscript fonts are used together. However, +% few of the CMR parameters are applicable to the calligraphic style. +% +% +% \subsection{The parameter file} +% +% We deal with the parameter files first, and start by announcing +% what they are for. The Rustic font comes in three sizes and also as a normal +% and a bold font. +% \begin{macrocode} +%<*base7|base10|base17|base7b|base10b|base17b> +%<base7>%%% RUST7.MF Roman Rustic at 7 point design size. +%<base10>%%% RUST10.MF Roman Rustic at 10 point design size. +%<base17>%%% RUST17.MF Roman Rustic at 17 point design size. +%<base7b>%%% RUSTB7.MF Roman Rustic Bold at 7 point design size. +%<base10b>%%% RUSTB10.MF Roman Rustic Bold at 10 point design size. +%<base17b>%%% RUSTB17.MF Roman Rustic Bold at 17 point design size. +% +% \end{macrocode} +% Parameters from CMR are used as much as possible. We also +% make sure that \Lpack{cmbase} is loaded as well as plain Metafont. +% \begin{macrocode} +if unknown cmbase: input cmbase fi + +%<base7>font_identifier:="RUST"; font_size 7pt#; +%<base10>font_identifier:="RUST"; font_size 10pt#; +%<base17>font_identifier:="RUST"; font_size 17.28pt#; +%<base7b>font_identifier:="RUSTB"; font_size 7pt#; +%<base10b>font_identifier:="RUSTB"; font_size 10pt#; +%<base17b>font_identifier:="RUSTB"; font_size 17.28pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutstretch} +% The scaling for minuscule serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> jutstretch:=1.19; +%<base10|base10b> jutstretch:=1.152; +%<base17|base17b> jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{stemstretch} +% The scaling for minuscule stem widths wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> stemstretch:=1.50; +%<base10|base10b> stemstretch:=1.31; +%<base17|base17b> stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{caprat} +% The scaling for `capitals' wrt `lowercase'. This is pretty much a guess. +% \begin{macrocode} + caprat:=1.2; % ratio of capital height to minuscule height +% \end{macrocode} +% +% \DescribeVariable{cap_jutstretch} +% Scaling for majuscule serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_jutstretch:=1.3; +%<base10|base10b> cap_jutstretch:=1.2; +%<base17|base17b> cap_jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{cap_stemstretch} +% Scaling for majuscule stem width wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_stemstretch:=1.45; +%<base10|base10b> cap_stemstretch:=1.31; +%<base17|base17b> cap_stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{bfudge} +% Letter width scaling for bold font wrt normal font. +% \begin{macrocode} +%<base7|base10|base17> bfudge:=1.0; +%<base7b|base10b|base17b> bfudge:=1.2; +% \end{macrocode} +% +% \DescribeVariable{szfudge} +% Width scaling wrt 17pt size letter width. +% \begin{macrocode} +%<base7|base7b> szfudge:=1.18; +%<base10|base10b> szfudge:=1.0; +%<base17|base17b> szfudge:=1.0; +% \end{macrocode} +% +% \DescribeVariable{hstretch} +% Horizontal stretching factor. +% \begin{macrocode} + hstretch:=szfudge*bfudge; +% \end{macrocode} +% +% \DescribeVariable{carol_height} +% The x-height of the Carolingian minuscule font. +% \begin{macrocode} +%<base7|base7b> carol_height#:=108.5/36pt#; +%<base10|base10b> carol_height#:=155/36pt#; +%<base17|base17b> carol_height#:=268/36pt#; +% \end{macrocode} +% +% \DescribeVariable{vstretch} +% The height of this font wrt the Carolingian font. +% \begin{macrocode} + vstretch:=1.9; + +% \end{macrocode} +% +% \DescribeVariable{x_height} +% The x-height of lower case letters. Scaled from the Carolingian font. +% \begin{macrocode} + x_height#:=vstretch*carol_height#; +% \end{macrocode} +% +% \DescribeVariable{thickfudge} +% The reciprocal of the font height in nib widths. Normal font height +% is 6 nib widths and the bold font height is 4.5 nib widths. +% \begin{macrocode} +%<base7|base10|base17> thickfudge:=1/6; +%<base7b|base10b|base17b> thickfudge:=1/4.5; +% \end{macrocode} +% +% \DescribeVariable{thinfudge} +% The nib sharpness. +% \begin{macrocode} +thinfudge:=1/6; +% \end{macrocode} +% +% \DescribeVariable{thick} +% The maximum nib width. +% That is, the width of the thickest line that can be penned. +% \begin{macrocode} +thick#:=stemstretch*thickfudge*x_height#; % max pen breadth +% \end{macrocode} +% +% \DescribeVariable{thin} +% The nib thinness. +% That is, the width of the thinnest line that can be penned. +% \begin{macrocode} +thin#:=thinfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{pangle} +% The pen angle (in degrees). +% \begin{macrocode} +pangle:=45; % pen angle +% \end{macrocode} +% +% \DescribeVariable{u} +% The unit width. The CMR values are used. +% \begin{macrocode} +%<base7> u#:=15.5/36pt#; +%<base7b> u#:=17.9/36pt#; +%<base10> u#:=20/36pt#; +%<base10b> u#:=23/36pt#; +%<base17> u#:=32.5/36pt#; +%<base17b> u#:=37/36pt#; +% \end{macrocode} +% +% \DescribeVariable{width_adj} +% \DescribeVariable{serif_fit} +% \DescribeVariable{cap_serif_fit} +% \DescribeVariable{letter_fit} +% The majority of these parameters and values are constant. +% They are for fine adjustements of characters. The CM values are used. +% \begin{macrocode} + width_adj#:=0pt#; % width adjustment for certain characters + serif_fit#:=0pt#; % extra sidebar near lowercase serifs +%<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs +%<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +%<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs +%<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars + +% \end{macrocode} +% +% +% \DescribeVariable{asc_height} +% The height of lower case ascenders. +% \begin{macrocode} + asc_height#:=6/5x_height#; +% \end{macrocode} +% +% \DescribeVariable{desc_depth} +% The depth of lower case descenders (the tail of the Q). +% \begin{macrocode} + desc_depth#:=2/3thick#; +% \end{macrocode} +% +% \DescribeVariable{fig_height} +% The height of numerals. Make these midway between normal and capital +% letters. +% \begin{macrocode} + fig_height#:=(0.5[1,caprat])*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_width} +% The width of numerals. All numerals are the same width. +% \begin{macrocode} + fig_width#:=hstretch*(3/5x_height#); +% \end{macrocode} +% +% \DescribeVariable{cap_height} +% The height of capital letters. +% \begin{macrocode} + cap_height#:=caprat*asc_height#; % height of caps +% \end{macrocode} +% +% \DescribeVariable{body_height} +% The height of the tallest character. +% \begin{macrocode} + body_height#:=caprat*asc_height#; +% \end{macrocode} +% +% \DescribeVariable{body_depth} +% The depth of the lowest character. +% \begin{macrocode} + body_depth#:=caprat*desc_depth#; +% \end{macrocode} +% +% \DescribeVariable{half_height} +% Half the normal letter height. +% \begin{macrocode} + half_height#:=1/2x_height#; % half the height of x height letters + +% \end{macrocode} +% +% \DescribeVariable{side} +% We might be using a square for the character design. +% \begin{macrocode} +side#:=x_height#; +% \end{macrocode} +% +% +% \DescribeVariable{rule_thickness} +% Thickness of rules (in math symbols). The CMR values are used. +% \begin{macrocode} +%<base7|base7b> rule_thickness#:=.34pt#; +%<base10|base10b> rule_thickness#:=.4pt#; +%<base17|base17b> rule_thickness#:=.6pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutfudge} +% Controls the protrusion of serifs. +% \begin{macrocode} +jutfudge:= 5/8; +% \end{macrocode} +% +% \DescribeVariable{jut} +% The lowercase serif protrusion. +% \begin{macrocode} +jut#:=jutstretch*jutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{hookjut} +% The horizontal protrusion of hook serifs. +% \begin{macrocode} +hookjut#:=1/2jut#; +% \end{macrocode} +% +% \DescribeVariable{footjut} +% Half the horizontal width of a foot stroke, assuming vertical ends. +% \begin{macrocode} +footjut#:=2/20x_height#; +% \end{macrocode} +% +% \DescribeVariable{extra_fhjut} +% Half the extra horizontal width of a foot or head stroke, taking sloped +% ends into account. Thus the maximum overall horizontal width is +% |2(footjut+extra_fhjut)|. +% \begin{macrocode} +extra_fhjut#:=1/3thick#; +% \end{macrocode} +% +% \DescribeVariable{stem_offset} +% The x offset of the center of a left (stem + foot) from the left of the +% character box. +% \begin{macrocode} +stem_offset#:=8/12thick#+thin#; +% \end{macrocode} +% +% \DescribeVariable{srad} +% |srad| with |0 < srad < 1| controls the serif radius. +% \begin{macrocode} +srad:=0.5; +% \end{macrocode} +% +% \DescribeVariable{wiggle} +% Controls the amount of wiggle in a |squiggle|, with |0 <= wiggle <1|. +% \begin{macrocode} +wiggle:= 0.05; +% \end{macrocode} +% +% \DescribeVariable{bowoff} +% Controls the amount of bow in a |bow|, with |0 <= bowoff <1|. +% \begin{macrocode} +bowoff:= 0.05; +% \end{macrocode} +% +% \DescribeVariable{o} +% Amount of overshoot for curves (as in an `o'). Use CMR values. +% \begin{macrocode} +%<base7|base7b> o#:=5/36pt#; +%<base10|base10b> o#:=8/36pt#; +%<base17|base17b> o#:=10/36pt#; + +% \end{macrocode} +% +% \DescribeVariable{thick_tltobr} +% A vector of the slope of thick diagonals from the top left point to the +% bottom right point. Use as: +% |ztl-zbr = whatever*thick_tltobr|. +% \begin{macrocode} +pair thick_tltobr; +thick_tltobr:=(-2,5); + +% \end{macrocode} +% +% \DescribeVariable{slant} +% |slant| is the amount the font slopes to the right. +% \begin{macrocode} +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ + +% \end{macrocode} +% +% \DescribeVariable{monospace} +% We are generating a variable-width font. +% \begin{macrocode} +monospace:=false; % should all characters have the same width? + +% \end{macrocode} +% +% \DescribeVariable{dot_size} +% The size of (punctuation) dots. +% \begin{macrocode} +dot_size#:=5thin#; % size of dots +% \end{macrocode} +% +% \DescribeVariable{comma_width} +% The horizontal width of a comma. +% \begin{macrocode} +comma_width#:=2.5dot_size#; + +% \end{macrocode} +% +% Finally, call the driver file for the font. +% \begin{macrocode} +generate rusttitle %% switch to the driver file + +% \end{macrocode} +% +% The end of this code section. +% \begin{macrocode} +%</base7|base10|base17|base7b|base10b|base17b> +% \end{macrocode} +% +% +% \subsection{The driver file} +% +% The driver file sets up the font parameters and also contains +% the macros used in the definition of the characters. +% +% \begin{macrocode} +%<*mfd> +% This is RUSTTITLE.MF for the Roman Rustic font. +% This makes a short font. +% This file also contains special macros universally needed in the +% font but either not in the cmbase.mf file or modifications of these. +% +% \end{macrocode} +% +% \begin{routine}{makebox} +% This is a new version of the \Lpack{cmbase.mf} |makebox| macro. +% Essentially, as we are only generating a single case font, we don't +% need all the horizontals for the CMR characters. +% +% \begin{macrocode} +% A new version of cmbase.mf makebox macro +def makebox(text rule) = + for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth: + rule((l,y)t_,(r,y)t_); endfor % horizontals + for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals + for x=u*(1+floor(1/u)) step u until r-1: + rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals + if charic<>0: + rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{proofpcbb} +% The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the +% square, and at the bottom and top midpoints, where the point |zS| is at +% position |(xoff,yoff)| in the square. +% \begin{macrocode} + +% A macro to delineate a letter's bounding square in proof mode. +% Point z$ is at (xoff,yoff) in the bounding square. +def proofpcbb(suffix $)(expr xoff, yoff) = +if proofing > 0: + x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner + z$br = (x$bl+side, y$bl); % BRHC + z$tr = (x$bl+side, y$bl+side); % TRHC + z$tl = (x$bl, y$bl+side); % TLHC + z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points + pair hc, vc; + hc = (2u,0); vc = (0,2u); + pickup pensquare scaled 2; + for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc: + draw s-hc--s+hc; + draw s-vc--s+vc; + endfor +fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{rustic_font_setup} +% This macro contains the set up for the fonts. +% \begin{macrocode} + +def rustic_font_setup= + define_pixels(side,half_height,carol_height,comma_width); + define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit, + cap_serif_fit,jut,cap_jut); + define_pixels(hookjut,footjut,stem_offset,extra_fhjut,fig_width); + define_whole_pixels(letter_fit); + define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height, + desc_depth,body_depth,fig_height); + define_corrected_pixels(o); + define_blacker_pixels(thick,thin); + let adjust_fit = normal_adjust_fit; +% \end{macrocode} +% \DescribeVariable{stylus} +% The pen for drawing the thinnest lines is |stylus|. +% \begin{macrocode} + pickup pencircle scaled thin; + stylus:=savepen; +% \end{macrocode} +% \DescribeVariable{quill} +% The normal calligraphic pen is |quill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated pangle; + quill:=savepen; +% \end{macrocode} +% \DescribeVariable{bowpen} +% The pen for drawing a bow is |bowpen|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated ((1/2(pangle+90))); + bowpen:=savepen; + numeric pcshiftx#; % x value of LHS of box wrt origin of char box + define_pixels(pcshiftx); + numeric sqxside#; % x size of the square + numeric sqyside#; % y size of the square + define_pixels(sqxside,sqyside); + +enddef; % end of rustic_font_setup + +% \end{macrocode} +% \end{routine} +% +% +% \DescribeVariable{ductus} +% A boolean to control drawing the ductus (TRUE) or the full letter (FALSE). +% \begin{macrocode} +boolean ductus; +ductus:=false; +% \end{macrocode} +% +% \DescribeVariable{pdir} +% The vector corresponding to the pen angle. +% \begin{macrocode} +pair pdir; pdir=dir(pangle); +% \end{macrocode} +% +% \DescribeVariable{ppdir} +% The vector that is perpendicular (anticlockwise) to the pen angle. +% \begin{macrocode} +pair ppdir; ppdir=dir(pangle+90); +% \end{macrocode} +% +% \begin{routine}{draw_rusticstem} +% A macro to draw a rustic thin vertical stem. +% |draw_rusticstem(1,2)| draws the stem with top at |z1| and bottom at |z2|. +% \begin{macrocode} + +def draw_rusticstem(suffix $, $$)= + numeric alpha, beta; alpha:=0.5thick; + beta:=60; % the ending angle + pair rustic[]; + xpart rustic1=x$$; ypart rustic1=y$$+alpha*sind(beta); + z$a=1/2[z$,rustic1]; + z$b=2/3[z$,rustic1]; + z$c=5/6[z$,rustic1]; + z$d=rustic1; + z$ar=z$a shifted (alpha*up); z$al=z$a shifted (alpha*down); + + rustic2:=z$b shifted (alpha*right); + z$br=rustic2 rotatedaround(z$b,1/4[90,beta]); z$bl=z$br rotatedaround(z$b,180); + + rustic2:=z$c shifted (alpha*right); + z$cr=rustic2 rotatedaround(z$c,1/2[90,beta]); z$cl=z$cr rotatedaround(z$c,180); + + rustic2:=z$d shifted (alpha*right); +%% z$dr=rustic2 rotatedaround(z$d,60); z$dl=z$dr rotatedaround(z$d,180); + rustic3=rustic2 rotatedaround(z$d,beta); + x$dr=xpart rustic3; y$dr=ypart rustic3 - thin; + z$dl=z$dr rotatedaround(z$d,180); + pen oldpen; oldpen:=currentpen; + pickup stylus; + draw z$--z$al; +%% filldraw z$ar..z$br..z$cr..z$dr--z$dl..z$cl..z$bl..z$al--cycle; + filldraw z$ar..z$br..z$cr..z$dr--z$dl..z$bl..z$al--cycle; + pickup oldpen; +%% labels($a,$al,$ar,$b,$bl,$br,$c,$cl,$cr,$dl,$dr); + labels($a,$b,$c,$d,$dl,$dr); +enddef; % end of draw_rusticstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_hserif} +% A macro to draw a hooked serif. |draw_hserif(1,2,f)| uses the |stylus| pen to +% draw a serif of extent |hookjut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_hserif(suffix $, $$)(expr fr)= + pen oldpen; oldpen:=currentpen; + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% +% +% +% +% +% \begin{macrocode} + pair rustic; + numeric tn, ang; ang:=70; + tn:=(sind ang)/(cosd ang); + x$g=x$-hookjut; y$g=y$-(hookjut*tn); % the tip + x$f=x$; y$f=y$g; % on the stem + pickup stylus; +%% filldraw z$g{dir(ang)}..{down}z$f--z$--cycle; + draw z$g--z$; + pickup oldpen; + labels($f,$g); +enddef; % end of draw_hserif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_footstem} +% A macro to draw a rustic stem and its foot. +% |draw_footstem(1,2)| uses the current pen to draw +% the rustic stem with its top at |z1| and a foot at the point |z2|, +% where |z2| is at the bottom of the foot. +% The width of the foot is twice the (global) value of |footjut|. +% \begin{macrocode} + +def draw_footstem(suffix $, $$)= + draw_rusticstem($, $$); + x$$fl=x$dl; bot y$$fl= y$$; + x$$fr=x$$fl+2footjut; y$$fr=y$$fl; + draw_squiggle($$fl,$$fr,wiggle,srad); + labels($$fl,$$fr); +enddef; % end of draw_footstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_foot} +% A macro to draw a foot. |draw_foot(1)| uses the current pen to draw +% a foot at the point |z1|, where |z1| is at the bottom center of the foot. +% The width of the foot is twice the (global) value of |footjut|. +% \begin{macrocode} + +def draw_foot(suffix $)= + x$fl=x$-footjut; bot y$fl= y$; + x$fr-x$=x$-x$fl; y$fr=y$fl; + draw_squiggle($fl,$fr,wiggle,srad); + labels($fl,$fr); +enddef; % end of draw_foot + +% \end{macocode} +% \end{routine} +% +% \begin{routine}{draw_head} +% A macro to draw a head squiggle. |draw_head(1)| uses the current pen to draw +% a head at the point |z1|, where |z1| is at the top center of the head. +% The width of the head is twice the (global) value of |footjut|. +% \begin{macrocode} + +def draw_head(suffix $)= + x$hl=x$-footjut; top y$hl= y$; + x$hr-x$=x$-x$hl; y$hr=y$hl; + draw_squiggle($hl,$hr,wiggle,srad); + labels($hl,$hr); +enddef; % end of draw_head + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_bow} +% A macro to draw a bow. |draw_bow(1,2,f)| uses the |bowpen| to draw a bowed +% line from |z1| to |z2|. The midpoint of the bowed line is offest by an +% amount |f*l| perpendicular to the line joining |z1| to |z2|, where |l| +% is the distance between |z1| and |z2|. +% \begin{macrocode} + +def draw_bow(suffix $, $$)(expr fr)= + pen oldpen; oldpen:=currentpen; + z$bm=1/2[z$,z$$]; + l:=length(z$-z$$); + bdir:=angle(z$-z$$); +%% z$bo=z$bm shifted (fr*l*dir(bdir+90)); + z$bo=z$bm shifted (fr*l*dir(bdir-90)); + pickup bowpen; + draw z$..z$bo..z$$; + pickup oldpen; + labels($bm,$bo); +enddef; % end of draw_bow + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_squiggle} +% A macro to draw a squiggle. |draw_squiggle(1,2,w,f)| draws a squiggle from +% |z1| to |z2| (z1 assumed to be at the left of z2), with |w| amount of +% wiggle and |f| controlling the serif radius. +% \begin{macrocode} + +def draw_squiggle(suffix $, $$)(expr w, fr)= + z$si=1/4[z$,z$$]; z$sii=3/4[z$,z$$]; + l:=length(z$-z$$); + bdir:=angle(z$-z$$); +%% z$sio=z$si shifted (w*l*dir(bdir+90)); +%% z$siio=z$sii shifted (w*l*dir(bdir-90)); + z$sio=z$si shifted (w*l*dir(bdir-90)); + z$siio=z$sii shifted (w*l*dir(bdir+90)); + draw z$..z$sio..z$siio..z$$; % the squiggle +%% draw_serif($,$$,fr); +%% draw_serif($$,$,fr); + labels($sio,$siio); +enddef; % end of draw_squiggle + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_serif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_serif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; + z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + if y$=y$$: + if x$<x$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + top_serif := false; + z$c=z$b shifted (bjut*pdir); + fi + else: + top_serif:=false; + z$c=z$b shifted (bjut*pdir); + fi + fi +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_serif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_istem} +% A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs +% are of extent |jut|. The serif radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_istem(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % top serif + draw_serif($$, $, fr); % bottom serif + draw z$a--z$$a; % the stem +enddef; % end of draw_istem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tlserif} +% A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serif +% is of extent |jut|. It also draws the stem to the point |z2|. The serif +% radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_tlserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % the serif + draw z$a--z$$; % the stem +enddef; % end of draw_tlserif + +% \end{macrocode} +% \end{routine} +% +% +% +% +% \begin{routine}{draw_pdot} +% A macro to draw a period dot. +% |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|. +% \begin{macrocode} + +def draw_pdot(suffix $)(expr sz)= +% \end{macrocode} +% Draw a square rotated 45 degrees. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$ shifted (0.5sz*up); + z$u = z$s shifted (sz*right); + z$v = z$t shifted (sz*down); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pdot + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pcomma} +% A macro to draw a period comma. +% |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. The pen is |stylus|. +% \begin{macrocode} + +def draw_pcomma(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping back and down at 45 degrees +% for a total width of |ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s-ar; y$v=y$s-ar; + z$u = z$v shifted (sz*right); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pcomma + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_plq} +% A macro to draw a period left quote. +% |draw_pcomma(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. +% \begin{macrocode} + +def draw_plq(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping forward and down at 45 degrees +% for a total width of |ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s+ar; y$v=y$s-ar; + z$u = z$v shifted (sz*right); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_plq + +% \end{macrocode} +% \end{routine} +% +% +% Set the mode and font setup. +% \begin{macrocode} + +font_coding_scheme:="ASCII minuscules and punctuation"; +mode_setup; +rustic_font_setup; + +% \end{macrocode} +% +% +% We generate letters, together with some punctuation and +% analphabetics. +% \begin{macrocode} + +input rustl; % normal letters +input rustu; % capital letters +input rustdig; % arabic digits +input rustpunct; % punctuation +input rustlig; % the several dashes +%%%%input rustp; % ampersand and ?mark + +% \end{macrocode} +% +% Finally, do the uppercase ligtable. +% +% \begin{macrocode} + +font_slant slant; font_x_height x_height#; +if monospace: font_normal_space 9u#; % no stretching or shrinking + font_quad 18u#; + font_extra_space 9u#; +else: font_normal_space 6u#+2letter_fit#; + font_normal_stretch 3u#; font_normal_shrink 2u#; + font_quad 18u#+4letter_fit#; + font_extra_space 2u#; + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning +%% ligtable "P": "T": "Y": "A" kern kk#; +%% ligtable "F": "V": "W": "A" kern if serifs: kkk# else: kk#fi, +%% "K": "X": "O" kern k#, "C" kern k#, "G" kern k#, "Q" kern k#; +%% ligtable "O": "D": "X" kern k#, "W" kern k#, "A" kern k#, +%% "V" kern k#, "Y" kern k#; +%% ligtable "A": if serifs: "R": fi +%% "C" kern k#, "O" kern k#, "G" kern k#, "U" kern k#, "Q" kern k#, +%% "L": "T" kern kk#, "Y" kern kkk#, "V" kern kk#, "W" kern kkk#; +%%ligtable "I": "I" kern -k#; % Richard III +fi + +bye. + +%</mfd> +% \end{macrocode} +% +% \subsection{The code for normal letters} +% +% The following code is for the normal alphabetic characters. +% +% \begin{macrocode} +%<*min> +% RUSTL.MF Program file for normal rustic letters +% + + +% \end{macrocode} +% +% +% \begin{routine}{a} +% The letter `a'. +% \begin{macrocode} +cmchar "Rustic letter a"; +beginchar("a", 2u#+hstretch*(4/5x_height#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right leg +z1-z2=whatever*thick_tltobr; +top y1=h; +rt x2=w-pcshiftx-jut; bot y2=0; +% for the left leg +z3=9/10[z2,z1]; +x4=pcshiftx+footjut+extra_fhjut; bot y4=0; +% code for foot +x7=x4; y7=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % right leg +draw_bow(3,4,bowoff); % left leg +draw_foot(7); % left leg foot +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "a" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{b} +% The letter `b'. This is a tall letter +% \begin{macrocode} +cmchar "Rustic letter b"; +beginchar("b", 2u#+hstretch*(7/10x_height#), 11/10x_height#, 0); +adjust_fit(0,0); +pcshiftx := u+hookjut+thin; +pickup quill; +% stem +x1=x2=pcshiftx; +y1=h; y2=0; +% bottom bowl +rt x3=x1; bot y3=thin; +rt x5=w-u; y5 = 1/6h; +x4=0.4[x2,x5]; y4=0; +lft x6=x2; y6=2/3h; +% top bowl +z7=z6; +x8=0.25[x4,x5]; top y8=y1; +x9=0.5[x1,x8]; bot y9=h; +z10=z1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_rusticstem(1,2); % the stem +draw z3..z4{right}..z5..{dir(pangle+90)}z6; % bottom bowl +draw z7{pdir}..z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "b" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{c} +% The letter `c'. +% \begin{macrocode} +cmchar "Rustic letter c"; +beginchar("c", 2u#+hstretch*(3/5x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=pcshiftx+sqxside; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +rt x5= rt x6=w-pcshiftx; +top y5=1/5h; +top y6=4/5h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "c" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{d} +% The letter `d'. +% \begin{macrocode} +cmchar "Rustic letter d"; +beginchar("d", 2u#+hstretch*(3/5x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +x1=x2=pcshiftx+hookjut+thin; +top y1=h; y2=0; +% bowl +rt x3=x1; bot y3=thin; +rt x5=w-u; y5 = 2/5h; +x4=0.4[x2,x5]; y4=0; +x6=x1; top y6=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_rusticstem(1,2); % stem +draw z3..z4{right}..z5{up}..z6; % bowl +ductus:=false; +penlabels(0,1,2,3,4,5,6,100); +endchar; % end "d" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{e} +% The letter `e'. +% \begin{macrocode} +cmchar "Rustic letter e"; +beginchar("e", 2u#+hstretch*(4/10x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +x1=x2=pcshiftx+stem_offset; +top y1=h; y2=0; +% top bar +rt x3=x1; x4=w-u; +top y3=top y4=h; +% middle bar +x5=x3; x6=x4; +y5=y6=3/5h; +% foot +x7=x3; x8=x4; +bot y7= bot y8=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_rusticstem(1,2); % stem +draw_squiggle(3,4,wiggle,srad); % top bar +draw_squiggle(5,6,wiggle,srad); % middle bar +draw_squiggle(7,8,wiggle,srad); % bottom bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{f} +% The letter `f'. This is a tall letter +% \begin{macrocode} +cmchar "Rustic letter f"; +beginchar("f", 2u#+hstretch*(4/10x_height#), 6/5x_height#, 0); +adjust_fit(0,0); +pcshiftx := u +stem_offset; +pickup quill; +% stem +x1=x2=pcshiftx; +top y1=h; y2=0; +% top bar +x3=x1; x4=w-u; +top y3=top y4=h; +% middle bar +x5=x3; x6=x4; +y5=y6=2/3h; +% foot +x7=x3; x8=x4; +bot y7= bot y8=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % stem +draw_squiggle(3,4,wiggle,srad); % top bar +draw_squiggle(5,6,wiggle,srad); % middle bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "f" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{g} +% The letter `g'. Like a `c' but bottom curls inwards. +% \begin{macrocode} +cmchar "Rustic letter g"; +beginchar("g", 2u#+hstretch*(3/5x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=pcshiftx+sqxside; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +rt x5= rt x6=w-pcshiftx; +top y5=1/5h; +top y6=4/5h; +lft x7=w/2; y7=h/2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z7..z5{down}..{left}z4..z1..z2..z6; % the bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "g" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{h} +% The letter `h'. +% \begin{macrocode} +cmchar "Rustic letter h"; +beginchar("h", 2u#+hstretch*(4/5x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = sqyside/2; x100 = pcshiftx+y100; % square center +pickup quill; +% left stem and foot +x1=x2=pcshiftx+stem_offset; +y1=h; y2=0; +% bar +y5=y6=7/10h; +lft x5=pcshiftx; rt x6=w-pcshiftx; +% right stem +rt x7=w-pcshiftx; top y7=h; +x8=x7; bot y8=0; +x9=x8-2thin; y9=0.5[y8,y7]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % left stem +draw_hserif(1,2,srad); % its serif +draw_squiggle(5,6,wiggle,srad); % the bar +draw z7..z9..z8; % right stem +ductus:=false; +penlabels(1,1',2,2',3,4,5,6,7,7',8,8',99,99',100); +endchar; % end "h" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{i} +% The letter i. +% \begin{macrocode} +cmchar "Rustic letter i"; +beginchar("i", 2u#+hstretch*(2footjut#+hookjut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +x1=x2=pcshiftx+stem_offset; +y1=h; y2=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % stem and foot +draw_hserif(1,2,srad); % serif +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{j} +% The letter `j'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "Rustic letter j"; +beginchar("j", 4u#+hstretch*(3/5x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := 3u; +pickup quill; +% stem +x1=x2=pcshiftx+2/3(w-4u); +y1=h; y2=0; +% top bar +rt x4=w-u; top y4=h; +x1-x3 = x4-x1; y3=y4; +% bowl +rt x5 = lft x3; +top y5=2/5h; +x7=x2; bot y7=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_rusticstem(1,2); % stem +draw_squiggle(3,4,wiggle,srad); % top bar +draw z7{left}..{pdir}z5; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "j" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{k} +% The letter `k'. +% \begin{macrocode} +cmchar "Rustic letter k"; +beginchar("k", 2u#+hstretch*(x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the stem and its foot +x1=x2=pcshiftx+stem_offset; +y1=h; y2=0; +lft x13=pcshiftx; bot y13=0; +x2-x13=x14-x2; y14=y13; +% upper diagonal and its top +x3=x1; y3=h/2; +x4=x1+y3; top y4=h; +x5=x4-jut; x6-x4=x4-x5; +top y5=top y6=h; +x24=x4; y24=h; +% bottom leg +lft x7=x3; bot y7=y3; +rt x9=w-pcshiftx; bot y9=0; +x8=0.5[x7,x9]; y8=0.7[y7,y9]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % the stem +draw_hserif(1,2,srad); % its serif +draw z3--z4; % upper diagonal +draw_head(24); +draw z7..z8..z9; % bottom leg +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "k" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{l} +% The letter `l'. This is a tall letter. +% \begin{macrocode} +cmchar "Rustic letter l"; +beginchar("l", 2u#+hstretch*(1/2x_height#), 6/5x_height#, 0); +adjust_fit(0,0); +pcshiftx := u+hookjut; +pickup quill; +x1=x2=pcshiftx+thin+hookjut; +y1=h; y2=0; +rt x3=x1; rt x4=w-u; +bot y3= bot y4=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_rusticstem(1,2); % stem +draw_hserif(1,2,srad); % serif +draw_squiggle(3,4,wiggle,srad); % foot +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "l" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{m} +% The letter `m'. Like 2 As stuck together. +% \begin{macrocode} +cmchar "Rustic letter m"; +beginchar("m", 2u#+hstretch*(6/5x_height#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right a thick diag +z11-z12=whatever*thick_tltobr; +rt x12=w-pcshiftx-jut; bot y12=0; +top y11=h; +% left a thin diag +pickup bowpen; +x4=pcshiftx+footjut+extra_fhjut; bot y4=thin; +z3=9/10[z2,z1]; +pickup quill; +x7=x4; y7=0; % for the foot +% the two thin diags are parallel, and just shifted horizontally +z13=9/10[z12,z11]; +z3-z4=z13-z14; y4=y14; +% similarly for the two thick diags +z1-z2=z11-z12; % y2=y12; +x12-x2=1/3w; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw left a +draw_istem(1,2,srad); % right leg +draw_bow(3,4,bowoff); % left leg +draw_foot(7); % left leg foot +% draw right a +draw_istem(11,12,srad); +draw_bow(13,14,bowoff); +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,13,14,100); +endchar; % end "m" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{n} +% The letter `n'. +% \begin{macrocode} +cmchar "Rustic letter n"; +beginchar("n", 2u#+hstretch*(9/10x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left stem and foot +x1=x2=pcshiftx+stem_offset; +y1=h; y2=0; +% right stem +x5=x6=w-u-hookjut-thin; +y5=y1; y6=y2; +% diagonal +x7=x1; y7=h; +x9=x6; bot y9=0; +x8=0.5[x7,x9]; y8=0.6[y7,y9]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % left stem +draw_rusticstem(5,6); % right stem +draw_hserif(5,6,srad); % its serif +draw z7..z8..z9; % diagonal +draw_serif(9,8,srad); % its bottom serif +ductus:=false; +penlabels(1,2,5,6,7,8,9,100); +endchar; % end "n" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{o} +% The letter `o'. +% \begin{macrocode} +cmchar "Rustic letter o"; +beginchar("o", 2u#+hstretch*(3/5x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "o" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{p} +% The letter `p'. +% \begin{macrocode} +cmchar "Rustic letter p"; +beginchar("p", 2u#+hstretch*(5/10x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem and foot +x1=x2=pcshiftx+stem_offset; +top y1=h; y2=0; +% bowl +lft x7=x2; y7=1/2h; % y7=2/3h; +rt x8=w-pcshiftx; top y8=y1; +z10=z1; +x9=0.5[x1,x8]; y9=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % stem +draw z7{pdir}..z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,7,8,9,10,100); +endchar; % end "p" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{q} +% The letter `q'. +% \begin{macrocode} +cmchar "Rustic letter q"; +beginchar("q", 2u#+hstretch*(3/5x_height#), x_height#, 2/3thick#); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the O shape +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +% the tail +path p; +p = z4{right}..{up}z3; +z5 = directionpoint pdir of p; +x7= x4+w/2; top y7=0; +x6=0.5[x5,x7]; y6=y7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; % O shape +draw z5..z6..z7; % the tail +ductus:=false; +penlabels(0,1,2,3,4,5,6,6',7,100); +endchar; % end "q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{r} +% The letter `r'. +% \begin{macrocode} +cmchar "Rustic letter r"; +beginchar("r", 2u#+hstretch*(4/5x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha, beta; +alpha:=thin*(xpart pdir); beta:=thin*(ypart pdir); +pickup quill; +% stem +x1=x2=pcshiftx+stem_offset; +top y1=h; y2=0; +% bowl +lft x7=x2; bot y7=1/2h; +rt x8=5/8w; top y8=y1; +z10=z1; +x9=0.5[x1,x8]; y9=h; +% leg +z11=z7 shifted (thin*pdir); +rt x13=w-pcshiftx; bot y13=0; +x12=0.5[x11,x13]; y12=0.7[y11,y13]; +% points defining the leg profile +x11l=lft x11 + alpha; y11l=bot y11 + beta; +x11r= rt x11 - alpha; y11r=top y11 - beta; +x12l=0.6[lft x12, x12]; y12l=0.6[bot y12, y12]; +x12r=0.6[rt x12, x12]; y12r=0.6[top y12, y12]; +x14=w-pcshiftx-thin; y14=thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % stem and foot +draw z7{pdir}..z8{up}..z9{left}..z10; % bowl +pickup stylus; % drawing the leg +filldraw z11l..z12l..{right}z14 & z14{left}..z12r..z11r--cycle; +ductus:=false; +penlabels(1,2,7,8,9,10,11,12,14,100); +endchar; % end "r" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{s} +% The letter `s'. +% \begin{macrocode} +cmchar "Rustic letter s"; +beginchar("s", 2u#+hstretch*(3/5x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% for the foot +lft x7=pcshiftx+extra_fhjut; bot y7=0; +% the S curve +rt x1=w-pcshiftx; top y1=h-thin; +lft x3=pcshiftx+extra_fhjut; y3=0.75h; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +x2=x4; top y2=h; +x5=x1; y5=0.3h; +x6=0.75w; bot y6=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{left}..z3{down}..z4..z5{down}..{-pdir}z6; % S curve +draw_squiggle(7,6,wiggle,srad); % base +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "s" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{t} +% The letter `t'. +% \begin{macrocode} +cmchar "Rustic letter t"; +beginchar("t", 2u#+hstretch*(2/5x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +x1=x2=w/2; +y1=h; y2=0; +lft x3=pcshiftx; top y3=h; +rt x4=w-pcshiftx; y4=y3; +rt x5=x2; bot y5= bot y6=0; +rt x6=w-pcshiftx; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % the stem +draw_squiggle(3,4,wiggle,srad); % the top crossbar +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "t" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{u} +% The letter `u'. This is a modern version as the font did not have a U. +% \begin{macrocode} +cmchar "Rustic letter u"; +beginchar("u", 2u#+hstretch*(4/5x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the right stem +x5=x6=w-pcshiftx-hookjut-thin; y5=h; y6=-thin; +% left stem and bowl +lft x1= lft x2=pcshiftx+jut; +top y1=h; y2=2thick; +x3=0.5[x1,x5]; bot y3=0; +rt x4=x5; bot y4=0.25thick; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_rusticstem(5,6); % right stem +draw_hserif(5,6,srad); % its serif +draw_tlserif(1,2,srad); % left stem and serif +draw z2{down}..z3{right}..{pdir}z4; % the bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "u" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{v} +% The letter `v'. +% if you prefer). +% \begin{macrocode} +cmchar "Rustic letter v"; +beginchar("v", 2u#+hstretch*(x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left side +z1-z2=whatever*thick_tltobr; +lft x1=pcshiftx+jut; top y1=h; +bot y2=0; +% right side +pickup bowpen; +x3=w-pcshiftx-footjut-extra_fhjut; top y3=h; +pickup quill; +x4=lft x2; y4=0; +x5=x3; y5=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % left part +draw_bow(3,4,bowoff); % right part +draw_head(5); % and its head +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "v" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{w} +% The letter `w'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "Rustic letter w"; +beginchar("w", 2u#+hstretch*(8/5x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left thick diagonal +z1-z2=whatever*thick_tltobr; +lft x1=pcshiftx+jut; top y1=h; bot y2=0; +% right thin diagonal +pickup bowpen; +x13=w-pcshiftx-footjut-extra_fhjut; top y13=h-thin; +x23=x13; y23=h; % for the head +bot y14=thin; +pickup quill; +% right thick diagonal +z11-z12=z1-z2; +x12-x2=1/3w; y12=y2; +% left thin diagonal +z3-z4=z13-z14; +x4=x2; +x14=x12; +y3=y13; + +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % left and right thick diags +draw_istem(11,12,srad); +draw_bow(3,4,bowoff); % left thin diag +draw_bow(13,14,bowoff); % right thin diag +draw_head(23); % its head +ductus:=false; +penlabels(1,2,3,4,11,12,13,14,23,100); +endchar; % end "w" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{x} +% The letter `x'. +% \begin{macrocode} +cmchar "Rustic letter x"; +beginchar("x", 2u#+hstretch*(9/10x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% thick diagonal +lft x1=pcshiftx+jut; top y1=h; +rt x2= w-pcshiftx-jut; bot y2=0; +% thin diagonal +pickup bowpen; +x3=w-pcshiftx-footjut-extra_fhjut-thin; top y3=h; +x4=pcshiftx+footjut+extra_fhjut+thin; bot y4=0; +x7=x3; y7=h; +x8=x4; y8=0; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % thick diagonal +draw_bow(3,4,bowoff); % thin diagonal +draw_head(7); % its head +draw_foot(8); % its foot +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "x" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{y} +% The letter `y'. +% \begin{macrocode} +cmchar "Rustic letter y"; +beginchar("y", 2u#+hstretch*(4/5x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left side +lft x1=pcshiftx+jut; top y1=h; +x2=1/2w; bot y2=1/3h; +% right side +pickup bowpen; +x3=w-pcshiftx-footjut-extra_fhjut; top y3=h; +lft x4=x2; bot y4=y2; +pickup quill; +x5=x3; y5=h; +% leg +x7=x2; y7=y2; +x8=x7; y8=0; +pickup bowpen; +x10=lft x8; x11=rt x8; +pickup stylus; +bot y10= bot y11=thin; +pickup quill; +%% ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % left stroke +draw_bow(3,4,bowoff); % right stroke +draw_head(5); % its head +draw_foot(8); % the foot +pickup stylus; % the leg +filldraw z7--z10--z11--cycle; +ductus:=false; +penlabels(1,2,3,4,5,7,8,9,100); +endchar; % end "y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{z} +% The letter `z'. +% \begin{macrocode} +cmchar "Rustic letter z"; +beginchar("z", 2u#+hstretch*(4/5x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% bottom stroke +lft x4=pcshiftx; bot y4=0; +rt x6=w-pcshiftx; y6=y4; +% top stroke +x1=x4; top y1=h; +rt x3 =7/8w-pcshiftx; y3=y1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_squiggle(1,3,1/2wiggle,srad); % top stroke +draw_squiggle(4,6,1/2wiggle,srad); % bottom stroke +% the diagonal +pickup stylus; +draw z4--z3; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "z" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file +% \begin{macrocode} +%</min> +% \end{macrocode} +% +% +% \subsection{The code for capitals} +% +% Roman Rustic `capitals' were drawn with the same pen as for the normal +% text, the letters were merely drawn slightly larger. +% +% \begin{macrocode} +%<*maj> +% RUSTU.MF Program file for Roman Rustic `capitals' +% + +% \end{macrocode} +% +% +% \begin{routine}{A} +% The letter `A'. +% \begin{macrocode} +cmchar "Rustic letter A"; +beginchar("A", 2u#+caprat*hstretch*(4/5x_height#+jut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right leg +z1-z2=whatever*thick_tltobr; +top y1=h; +rt x2=w-pcshiftx-jut; bot y2=0; +% for the left leg +z3=9/10[z2,z1]; +x4=pcshiftx+footjut+extra_fhjut; bot y4=0; +% code for foot +x7=x4; y7=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % right leg +draw_bow(3,4,bowoff); % left leg +draw_foot(7); % left leg foot +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "A" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{B} +% The letter `B'. This is a tall letter +% \begin{macrocode} +cmchar "Rustic letter B"; +beginchar("B", 2u#+caprat*hstretch*(7/10x_height#), caprat*(11/10x_height#), 0); +adjust_fit(0,0); +pcshiftx := u+hookjut+thin; +pickup quill; +% stem +x1=x2=pcshiftx; +y1=h; y2=0; +% bottom bowl +rt x3=x1; bot y3=thin; +rt x5=w-u; y5 = 1/6h; +x4=0.4[x2,x5]; y4=0; +lft x6=x2; y6=2/3h; +% top bowl +z7=z6; +x8=0.25[x4,x5]; top y8=y1; +x9=0.5[x1,x8]; bot y9=h; +z10=z1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_rusticstem(1,2); % the stem +draw z3..z4{right}..z5..{dir(pangle+90)}z6; % bottom bowl +draw z7{pdir}..z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "B" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{C} +% The letter `C'. +% \begin{macrocode} +cmchar "Rustic letter C"; +beginchar("C", 2u#+caprat*hstretch*(3/5x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=pcshiftx+sqxside; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +rt x5= rt x6=w-pcshiftx; +top y5=1/5h; +top y6=4/5h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "C" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{D} +% The letter `D'. +% \begin{macrocode} +cmchar "Rustic letter D"; +beginchar("D", 2u#+caprat*hstretch*(3/5x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +x1=x2=pcshiftx+hookjut+thin; +top y1=h; y2=0; +% bowl +rt x3=x1; bot y3=thin; +rt x5=w-u; y5 = 2/5h; +x4=0.4[x2,x5]; y4=0; +x6=x1; top y6=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_rusticstem(1,2); % stem +draw z3..z4{right}..z5{up}..z6; % bowl +ductus:=false; +penlabels(0,1,2,3,4,5,6,100); +endchar; % end "D" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{E} +% The letter `E'. +% \begin{macrocode} +cmchar "Rustic letter E"; +beginchar("E", 2u#+caprat*hstretch*(4/10x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +x1=x2=pcshiftx+stem_offset; +top y1=h; y2=0; +% top bar +rt x3=x1; x4=w-u; +top y3=top y4=h; +% middle bar +x5=x3; x6=x4; +y5=y6=3/5h; +% foot +x7=x3; x8=x4; +bot y7= bot y8=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_rusticstem(1,2); % stem +draw_squiggle(3,4,wiggle,srad); % top bar +draw_squiggle(5,6,wiggle,srad); % middle bar +draw_squiggle(7,8,wiggle,srad); % bottom bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "E" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{F} +% The letter `F'. This is a tall letter +% \begin{macrocode} +cmchar "Rustic letter F"; +beginchar("F", 2u#+caprat*hstretch*(4/10x_height#), caprat*(6/5x_height#), 0); +adjust_fit(0,0); +pcshiftx := u +stem_offset; +pickup quill; +% stem +x1=x2=pcshiftx; +top y1=h; y2=0; +% top bar +x3=x1; x4=w-u; +top y3=top y4=h; +% middle bar +x5=x3; x6=x4; +y5=y6=2/3h; +% foot +x7=x3; x8=x4; +bot y7= bot y8=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % stem +draw_squiggle(3,4,wiggle,srad); % top bar +draw_squiggle(5,6,wiggle,srad); % middle bar +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "F" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{G} +% The letter `G'. Like a `C' but bottom curls inwards. +% \begin{macrocode} +cmchar "Rustic letter G"; +beginchar("G", 2u#+caprat*hstretch*(3/5x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=pcshiftx+sqxside; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +rt x5= rt x6=w-pcshiftx; +top y5=1/5h; +top y6=4/5h; +lft x7=w/2; y7=h/2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z7..z5{down}..{left}z4..z1..z2..z6; % the bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "G" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{H} +% The letter `H'. +% \begin{macrocode} +cmchar "Rustic letter H"; +beginchar("H", 2u#+caprat*hstretch*(4/5x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = sqyside/2; x100 = pcshiftx+y100; % square center +pickup quill; +% left stem and foot +x1=x2=pcshiftx+stem_offset; +y1=h; y2=0; +% bar +y5=y6=7/10h; +lft x5=pcshiftx; rt x6=w-pcshiftx; +% right stem +rt x7=w-pcshiftx; top y7=h; +x8=x7; bot y8=0; +x9=x8-2thin; y9=0.5[y8,y7]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % left stem +draw_hserif(1,2,srad); % its serif +draw_squiggle(5,6,wiggle,srad); % the bar +draw z7..z9..z8; % right stem +ductus:=false; +penlabels(1,1',2,2',3,4,5,6,7,7',8,8',99,99',100); +endchar; % end "H" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{I} +% The letter I. +% \begin{macrocode} +cmchar "Rustic letter I"; +beginchar("I", 2u#+caprat*hstretch*(2footjut#+hookjut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +x1=x2=pcshiftx+stem_offset; +y1=h; y2=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % stem and foot +draw_hserif(1,2,srad); % serif +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "I" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{J} +% The letter `J'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "Rustic letter J"; +beginchar("J", 4u#+caprat*hstretch*(3/5x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := 3u; +pickup quill; +% stem +x1=x2=pcshiftx+2/3(w-4u); +y1=h; y2=0; +% top bar +rt x4=w-u; top y4=h; +x1-x3 = x4-x1; y3=y4; +% bowl +rt x5 = lft x3; +top y5=2/5h; +x7=x2; bot y7=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_rusticstem(1,2); % stem +draw_squiggle(3,4,wiggle,srad); % top bar +draw z7{left}..{pdir}z5; % bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "J" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{K} +% The letter `K'. +% \begin{macrocode} +cmchar "Rustic letter K"; +beginchar("K", 2u#+caprat*hstretch*(x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the stem and its foot +x1=x2=pcshiftx+stem_offset; +y1=h; y2=0; +lft x13=pcshiftx; bot y13=0; +x2-x13=x14-x2; y14=y13; +% upper diagonal and its top +x3=x1; y3=h/2; +x4=x1+y3; top y4=h; +x5=x4-jut; x6-x4=x4-x5; +top y5=top y6=h; +x24=x4; y24=h; +% bottom leg +lft x7=x3; bot y7=y3; +rt x9=w-pcshiftx; bot y9=0; +x8=0.5[x7,x9]; y8=0.7[y7,y9]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % the stem +draw_hserif(1,2,srad); % its serif +draw z3--z4; % upper diagonal +draw_head(24); +draw z7..z8..z9; % bottom leg +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "K" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{L} +% The letter `L'. This is a tall letter. +% \begin{macrocode} +cmchar "Rustic letter L"; +beginchar("L", 2u#+caprat*hstretch*(1/2x_height#), caprat*(6/5x_height#), 0); +adjust_fit(0,0); +pcshiftx := u+hookjut; +pickup quill; +x1=x2=pcshiftx+thin+hookjut; +y1=h; y2=0; +rt x3=x1; rt x4=w-u; +bot y3= bot y4=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_rusticstem(1,2); % stem +draw_hserif(1,2,srad); % serif +draw_squiggle(3,4,wiggle,srad); % foot +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "L" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{M} +% The letter `M'. Like 2 As stuck together. +% \begin{macrocode} +cmchar "Rustic letter M"; +beginchar("M", 2u#+caprat*hstretch*(6/5x_height#+jut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% right a thick diag +z11-z12=whatever*thick_tltobr; +rt x12=w-pcshiftx-jut; bot y12=0; +top y11=h; +% left a thin diag +pickup bowpen; +x4=pcshiftx+footjut+extra_fhjut; bot y4=thin; +z3=9/10[z2,z1]; +pickup quill; +x7=x4; y7=0; % for the foot +% the two thin diags are parallel, and just shifted horizontally +z13=9/10[z12,z11]; +z3-z4=z13-z14; y4=y14; +% similarly for the two thick diags +z1-z2=z11-z12; % y2=y12; +x12-x2=1/3w; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw left a +draw_istem(1,2,srad); % right leg +draw_bow(3,4,bowoff); % left leg +draw_foot(7); % left leg foot +% draw right a +draw_istem(11,12,srad); +draw_bow(13,14,bowoff); +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,13,14,100); +endchar; % end "M" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{N} +% The letter `N'. +% \begin{macrocode} +cmchar "Rustic letter N"; +beginchar("N", 2u#+caprat*hstretch*(9/10x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left stem and foot +x1=x2=pcshiftx+stem_offset; +y1=h; y2=0; +% right stem +x5=x6=w-u-hookjut-thin; +y5=y1; y6=y2; +% diagonal +x7=x1; y7=h; +x9=x6; bot y9=0; +x8=0.5[x7,x9]; y8=0.6[y7,y9]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % left stem +draw_rusticstem(5,6); % right stem +draw_hserif(5,6,srad); % its serif +draw z7..z8..z9; % diagonal +draw_serif(9,8,srad); % its bottom serif +ductus:=false; +penlabels(1,2,5,6,7,8,9,100); +endchar; % end "N" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{O} +% The letter `O'. +% \begin{macrocode} +cmchar "Rustic letter O"; +beginchar("O", 2u#+caprat*hstretch*(3/5x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "O" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{P} +% The letter `P'. +% \begin{macrocode} +cmchar "Rustic letter P"; +beginchar("P", 2u#+caprat*hstretch*(5/10x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem and foot +x1=x2=pcshiftx+stem_offset; +top y1=h; y2=0; +% bowl +lft x7=x2; y7=1/2h; % y7=2/3h; +rt x8=w-pcshiftx; top y8=y1; +z10=z1; +x9=0.5[x1,x8]; y9=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % stem +draw z7{pdir}..z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,7,8,9,10,100); +endchar; % end "P" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Q} +% The letter `Q'. +% \begin{macrocode} +cmchar "Rustic letter Q"; +beginchar("Q", 2u#+caprat*hstretch*(3/5x_height#), caprat*x_height#, + caprat*(2/3thick#)); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the O shape +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +% the tail +path p; +p = z4{right}..{up}z3; +z5 = directionpoint pdir of p; +x7= x4+w/2; top y7=0; +x6=0.5[x5,x7]; y6=y7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; % O shape +draw z5..z6..z7; % the tail +ductus:=false; +penlabels(0,1,2,3,4,5,6,6',7,100); +endchar; % end "Q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{R} +% The letter `R'. +% \begin{macrocode} +cmchar "Rustic letter R"; +beginchar("R", 2u#+caprat*hstretch*(4/5x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha, beta; +alpha:=thin*(xpart pdir); beta:=thin*(ypart pdir); +pickup quill; +% stem +x1=x2=pcshiftx+stem_offset; +top y1=h; y2=0; +% bowl +lft x7=x2; bot y7=1/2h; +rt x8=5/8w; top y8=y1; +z10=z1; +x9=0.5[x1,x8]; y9=h; +% leg +z11=z7 shifted (thin*pdir); +rt x13=w-pcshiftx; bot y13=0; +x12=0.5[x11,x13]; y12=0.7[y11,y13]; +% points defining the leg profile +x11l=lft x11 + alpha; y11l=bot y11 + beta; +x11r= rt x11 - alpha; y11r=top y11 - beta; +x12l=0.6[lft x12, x12]; y12l=0.6[bot y12, y12]; +x12r=0.6[rt x12, x12]; y12r=0.6[top y12, y12]; +x14=w-pcshiftx-thin; y14=thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % stem and foot +draw z7{pdir}..z8{up}..z9{left}..z10; % bowl +pickup stylus; % drawing the leg +filldraw z11l..z12l..{right}z14 & z14{left}..z12r..z11r--cycle; +ductus:=false; +penlabels(1,2,7,8,9,10,11,12,14,100); +endchar; % end "R" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{S} +% The letter `S'. +% \begin{macrocode} +cmchar "Rustic letter S"; +beginchar("S", 2u#+caprat*hstretch*(3/5x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% for the foot +lft x7=pcshiftx+extra_fhjut; bot y7=0; +% the S curve +rt x1=w-pcshiftx; top y1=h-thin; +lft x3=pcshiftx+extra_fhjut; y3=0.75h; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +x2=x4; top y2=h; +x5=x1; y5=0.3h; +x6=0.75w; bot y6=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{left}..z3{down}..z4..z5{down}..{-pdir}z6; % S curve +draw_squiggle(7,6,wiggle,srad); % base +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "S" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{T} +% The letter `T'. +% \begin{macrocode} +cmchar "Rustic letter T"; +beginchar("T", 2u#+caprat*hstretch*(2/5x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +x1=x2=w/2; +y1=h; y2=0; +lft x3=pcshiftx; top y3=h; +rt x4=w-pcshiftx; y4=y3; +rt x5=x2; bot y5= bot y6=0; +rt x6=w-pcshiftx; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % the stem +draw_squiggle(3,4,wiggle,srad); % the top crossbar +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "T" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{U} +% The letter `U'. This is a modern version as the font did not have a U. +% \begin{macrocode} +cmchar "Rustic letter U"; +beginchar("U", 2u#+caprat*hstretch*(4/5x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the right stem +x5=x6=w-pcshiftx-hookjut-thin; y5=h; y6=-thin; +% left stem and bowl +lft x1= lft x2=pcshiftx+jut; +top y1=h; y2=2thick; +x3=0.5[x1,x5]; bot y3=0; +rt x4=x5; bot y4=0.25thick; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_rusticstem(5,6); % right stem +draw_hserif(5,6,srad); % its serif +draw_tlserif(1,2,srad); % left stem and serif +draw z2{down}..z3{right}..{pdir}z4; % the bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "U" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{V} +% The letter `V'. +% if you prefer). +% \begin{macrocode} +cmchar "Rustic letter V"; +beginchar("V", 2u#+caprat*hstretch*(x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left side +z1-z2=whatever*thick_tltobr; +lft x1=pcshiftx+jut; top y1=h; +bot y2=0; +% right side +pickup bowpen; +x3=w-pcshiftx-footjut-extra_fhjut; top y3=h; +pickup quill; +x4=lft x2; y4=0; +x5=x3; y5=h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % left part +draw_bow(3,4,bowoff); % right part +draw_head(5); % and its head +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "V" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{W} +% The letter `W'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "Rustic letter W"; +beginchar("W", 2u#+caprat*hstretch*(8/5x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left thick diagonal +z1-z2=whatever*thick_tltobr; +lft x1=pcshiftx+jut; top y1=h; bot y2=0; +% right thin diagonal +pickup bowpen; +x13=w-pcshiftx-footjut-extra_fhjut; top y13=h-thin; +x23=x13; y23=h; % for the head +bot y14=thin; +pickup quill; +% right thick diagonal +z11-z12=z1-z2; +x12-x2=1/3w; y12=y2; +% left thin diagonal +z3-z4=z13-z14; +x4=x2; +x14=x12; +y3=y13; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % left and right thick diags +draw_istem(11,12,srad); +draw_bow(3,4,bowoff); % left thin diag +draw_bow(13,14,bowoff); % right thin diag +draw_head(23); % its head +ductus:=false; +penlabels(1,2,3,4,11,12,13,14,23,100); +endchar; % end "W" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{X} +% The letter `X'. +% \begin{macrocode} +cmchar "Rustic letter X"; +beginchar("X", 2u#+caprat*hstretch*(9/10x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% thick diagonal +lft x1=pcshiftx+jut; top y1=h; +rt x2= w-pcshiftx-jut; bot y2=0; +% thin diagonal +pickup bowpen; +x3=w-pcshiftx-footjut-extra_fhjut-thin; top y3=h; +x4=pcshiftx+footjut+extra_fhjut+thin; bot y4=0; +x7=x3; y7=h; +x8=x4; y8=0; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % thick diagonal +draw_bow(3,4,bowoff); % thin diagonal +draw_head(7); % its head +draw_foot(8); % its foot +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "X" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Y} +% The letter `Y'. +% \begin{macrocode} +cmchar "Rustic letter Y"; +beginchar("Y", 2u#+caprat*hstretch*(4/5x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% left side +lft x1=pcshiftx+jut; top y1=h; +x2=1/2w; bot y2=1/3h; +% right side +pickup bowpen; +x3=w-pcshiftx-footjut-extra_fhjut; top y3=h; +lft x4=x2; bot y4=y2; +pickup quill; +x5=x3; y5=h; +% leg +x7=x2; y7=y2; +x8=x7; y8=0; +pickup bowpen; +x10=lft x8; x11=rt x8; +pickup stylus; +bot y10= bot y11=thin; +pickup quill; +%% ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % left stroke +draw_bow(3,4,bowoff); % right stroke +draw_head(5); % its head +draw_foot(8); % the foot +pickup stylus; % the leg +filldraw z7--z10--z11--cycle; +ductus:=false; +penlabels(1,2,3,4,5,7,8,9,100); +endchar; % end "Y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{Z} +% The letter `Z'. +% \begin{macrocode} +cmchar "Rustic letter Z"; +beginchar("Z", 2u#+caprat*hstretch*(4/5x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% bottom stroke +lft x4=pcshiftx; bot y4=0; +rt x6=w-pcshiftx; y6=y4; +% top stroke +x1=x4; top y1=h; +rt x3 =7/8w-pcshiftx; y3=y1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_squiggle(1,3,1/2wiggle,srad); % top stroke +draw_squiggle(4,6,1/2wiggle,srad); % bottom stroke +% the diagonal +pickup stylus; +draw z4--z3; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "Z" + +% \end{macrocode} +% \end{routine} +% +% +% +% +% The end of this file +% \begin{macrocode} +%</maj> +% \end{macrocode} +% +% +% +% \subsection{The punctuation file} +% +% The main punctuation marks are defined in this file. +% +% \begin{macrocode} +%<*punct> +% RUSTPUNCT.MF This file contains punctuation marks + +% \end{macrocode} +% +% +% \begin{routine}{,} +% The `,' character. +% \begin{macrocode} + +cmchar "Rustic Comma"; +beginchar(",",2u#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h/2; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "," + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{.} +% The `.' character. +% \begin{macrocode} + +cmchar "Rustic Period"; +beginchar(".",2u#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=u; +x1=w/2; y1=h/2; +draw_pdot(1,dot_size); +penlabels(1); +endchar; % end of "." + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{:} +% The `:' character. +% \begin{macrocode} + +cmchar "Rustic Colon"; +beginchar(":",2u#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=u; +x1=x2=w/2; y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pdot(2,dot_size); +penlabels(1,2); +endchar; % end ":" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{;} +% The `;' character. +% \begin{macrocode} + +cmchar "Rustic Semicolon"; +beginchar(";",2u#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pcomma(2,dot_size,comma_width); +penlabels(1,2); +endchar; % end of ";" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{'} +% The `'' character. +% \begin{macrocode} + +cmchar "Rustic Apostrophe"; +beginchar("'",2u#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "'" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{`} +% The ``' character. +% \begin{macrocode} + +cmchar "Rustic Reverse apostrophe"; +beginchar("`",2u#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=pcshiftx+(0.5hstretch*dot_size); y1=h; +draw_plq(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "`" + +% \end{macrocode} +% \end{routine} +% +% The end of this file. +% \begin{macrocode} +%</punct> +% \end{macrocode} +% +% +% \subsection{The ligatures and dashes file} +% +% The ligatured punctuation marks and dashes are defined in this file. +% \begin{macrocode} +%<*lig> +% RUSTLIG.MF Roman Rustic ligatured punctation and dashes + +% \end{macrocode} +% First the ligtables. +% \begin{macrocode} + +ligtable "`": "`"=:oct"134"; +ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#; + +ligtable "-": "-"=:oct"173"; +ligtable oct"173": "-"=:oct"174"; + +% \end{macrocode} +% +% \begin{routine}{''} +% The `''' ligature. +% \begin{macrocode} + +cmchar "Rustic closing quotes"; +beginchar(oct"042",2u#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h; +x2=x1-(2hstretch*dot_size); +draw_pcomma(1,dot_size,comma_width); % right +draw_pcomma(2,dot_size,comma_width); % left +penlabels(1,2); +endchar; % end of "''" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{``} +% The ```' ligature. +% \begin{macrocode} + +cmchar "Rustic opening quotes"; +beginchar(oct"134",2u#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h; +x2=x1+(2hstretch*dot_size); +draw_plq(1,dot_size,comma_width); % left +draw_plq(2,dot_size,comma_width); % right +penlabels(1,2); +endchar; % end of "``" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{-} +% The `-' character. +% \begin{macrocode} + +cmchar "Rustic hyphen"; +beginchar("-",u#+hstretch*(0.8x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u/2; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +draw z1--z2; % bar +penlabels(1,2); +endchar; % end of "-" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{--} +% The -- ligature. +% \begin{macrocode} + +cmchar "Rustic en dash"; +beginchar(oct"173",u#+hstretch*(x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u/2; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +draw z1--z2; % bar +penlabels(1,2); +endchar; % end of "--" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{---} +% The `---' ligature. The em dash is twice the width of the en dash. +% \begin{macrocode} + +cmchar "Rustic em dash"; +beginchar(oct"174",u#+hstretch*(2x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u/2; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +draw z1--z2; % bar +penlabels(1,2); +endchar; % end of "---" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</lig> +% \end{macrocode} +% +% \subsection{The digits file} +% +% These are arabic digits in the style of the book-hand. They are a modern +% invention. +% +% \begin{macrocode} +%<*dig> +% RUSTDIG.MF Program file for Roman Rustic `digits' +% + +% \end{macrocode} +% +% \begin{routine}{1} +% The digit `1'. +% \begin{macrocode} +cmchar "Rustic digit 1"; +beginchar("1", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +x1=x2=w/2; +y1=h; y2=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % stem and foot +draw_hserif(1,2,srad); % serif +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "1" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{2} +% The digit `2'. This is like a stemless B. +% \begin{macrocode} +cmchar "Rustic digit 2"; +beginchar("2", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=pcshiftx; top y1=h-2thin; +x2=1/2w; top y2= h; +rt x3=w-pcshiftx; y3=3/4h; +% squiggle +x5=pcshiftx+extra_fhjut; bot y5=0; +x6=w-pcshiftx-extra_fhjut; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{down}..{-pdir}z5; % curve +draw_squiggle(5,6,wiggle,srad); % foot +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "2" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{3} +% The digit `3'. This is like a stemless B. +% \begin{macrocode} +cmchar "Rustic digit 3"; +beginchar("3", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% x values +lft x3=pcshiftx; x10=x3; +rt x5=w-pcshiftx; x8=x5-3thin; +x4=0.5[x3,x5]; +x9=0.5[x10,x8]; +lft x6=pcshiftx+extra_fhjut; x7=x6; +% y values +bot y3=thin; top y10=h-2thin; +y6=0.5[y3,y10]; y7=y6; +bot y4=-thin; top y9=h+thin; +y5=0.5[y3,y6]; +y8=11/12[y7,y10]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw_rusticstem(1,2); % the stem +draw z3..z4{right}..z5{up}...{-pdir}z6; % bottom bowl +draw z7{pdir}..z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "3" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{4} +% The digit `4'. +% \begin{macrocode} +cmchar "Rustic digit 4"; +beginchar("4", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the stem +x1=x2=w-pcshiftx-footjut-extra_fhjut; +y1=h; y2=0; +% the crossbar +x3=pcshiftx+extra_fhjut; y3=0.33h; +x4=w-pcshiftx-extra_fhjut; y4=y3; +% the thin diagonal +x5=lft x3; y5=bot y3+thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_footstem(1,2); % stem and foot +%%draw_hserif(1,2,srad); % serif +draw_squiggle(3,4,wiggle,srad); % squiggle +pickup stylus; +draw z5{pdir}..z1; % thin diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "4" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{5} +% The digit `5'. +% \begin{macrocode} +cmchar "Rustic digit 5"; +beginchar("5", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% for the foot +lft x7=pcshiftx+extra_fhjut; bot y7=0; +% for the top +rt x1=w-pcshiftx-extra_fhjut; top y1=h; +lft x2=pcshiftx+extra_fhjut; y2=y1; + +% the S curve +x3=x2; y3=0.5h; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +rt x5=w-pcshiftx; y5=0.3h; +x6=0.75w; bot y6=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_squiggle(2,1,wiggle,srad); % top squiggle +draw z3{pdir}..z5{down}..{-pdir}z6; % curve +draw_squiggle(7,6,wiggle,srad); % base +pickup stylus; +draw z2--z3; % vertical +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "5" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{6} +% The digit `6'. +% \begin{macrocode} +cmchar "Rustic digit 6"; +beginchar("6", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx; top y1=h-2thin; +x2=1/2w; top y2= h; +lft x3=pcshiftx; y3=1/2h; +x4=x2; bot y4=0; +rt x5=w-pcshiftx; y5=1/4h; +lft x6=rt x3; bot y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{left}..z3{down}..z4{right}..z5{up}..{-pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "6" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{7} +% The digit `7'. +% \begin{macrocode} +cmchar "Rustic digit 7"; +beginchar("7", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% top bar +x1=pcshiftx+extra_fhjut; +x2=w-pcshiftx-extra_fhjut; +top y1=top y2=h; +% bowed leg +rt x4=w-pcshiftx-3thin; bot y4=0; +x3=0.5[x2,x4]-2thin; y3=0.5[y2,y4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_squiggle(1,2,wiggle,srad); +draw z2..z3..z4; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "7" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{8} +% The digit `8'. +% \begin{macrocode} +cmchar "Rustic digit 8"; +beginchar("8", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx-o; rt x3=w-pcshiftx; y1=y3=3/4h; +x2=x4=w/2; top y2=h+o; bot y4=-o; +x5=x2; y5=h/2; +x11=x1+o; x13=x3+o; y11=y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z5..z11..z4..z13..z5..cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,100); +endchar; % end "8" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{9} +% The digit `9'. +% \begin{macrocode} +cmchar "Rustic digit 9"; +beginchar("9", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; bot y1=2thin; +x2=1/2w; bot y2= 0; +rt x3=w-pcshiftx; y3=1/2h; +x4=x2; top y4=h; +lft x5=pcshiftx; y5=3/4h; +rt x6=lft x3; top y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{up}..z4{left}..z5{down}..{pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "9" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{0} +% The digit `0'. +% \begin{macrocode} +cmchar "Rustic digit 0"; +beginchar("0", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "0" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</dig> +% \end{macrocode} +% +% +% \section{The font definition files} \label{sec:fd} +% +% The font comes in normal and bold weights only. +% +% \begin{macrocode} +%<*fdot1> +\DeclareFontFamily{OT1}{rust}{} +%% \DeclareFontShape{OT1}{rust}{m}{n}{ <-> rust10 }{} + \DeclareFontShape{OT1}{rust}{m}{n}{ <-8.5> rust7 <8.5-15> rust10 <15-> rust17 }{} + \DeclareFontShape{OT1}{rust}{m}{sl}{ <-> sub * rust/m/n }{} + \DeclareFontShape{OT1}{rust}{m}{it}{ <-> sub * rust/m/n }{} + \DeclareFontShape{OT1}{rust}{m}{sc}{ <-> sub * rust/m/n }{} + \DeclareFontShape{OT1}{rust}{m}{u}{ <-> sub * rust/m/n }{} +%% \DeclareFontShape{OT1}{rust}{bx}{n}{ <-> rustb10 }{} + \DeclareFontShape{OT1}{rust}{bx}{n}{ <-8.5> rustb7 <8.5-15> rustb10 <15-> rustb17 }{} + \DeclareFontShape{OT1}{rust}{bx}{it}{ <-> sub * rust/bx/n }{} + \DeclareFontShape{OT1}{rust}{bx}{sl}{ <-> sub * rust/bx/n }{} + \DeclareFontShape{OT1}{rust}{b}{n}{ <-> sub * rust/bx/n }{} +%</fdot1> +% \end{macrocode} +% +% +% \begin{macrocode} +%<*fdt1> +\DeclareFontFamily{T1}{rust}{} + \DeclareFontShape{T1}{rust}{m}{n}{ <-8.5> rust7 <8.5-15> rust10 <15-> rust17 }{} + \DeclareFontShape{T1}{rust}{m}{sl}{ <-> sub * rust/m/n }{} + \DeclareFontShape{T1}{rust}{m}{it}{ <-> sub * rust/m/n }{} + \DeclareFontShape{T1}{rust}{m}{sc}{ <-> sub * rust/m/n }{} + \DeclareFontShape{T1}{rust}{m}{u}{ <-> sub * rust/m/n }{} + \DeclareFontShape{T1}{rust}{bx}{n}{ <-8.5> rustb7 <8.5-15> rustb10 <15-> rustb17 }{} + \DeclareFontShape{T1}{rust}{bx}{it}{ <-> sub * rust/bx/n }{} + \DeclareFontShape{T1}{rust}{bx}{sl}{ <-> sub * rust/bx/n }{} + \DeclareFontShape{T1}{rust}{b}{n}{ <-> sub * rust/bx/n }{} +%</fdt1> +% \end{macrocode} +% +% \section{The \Lpack{rustic} and \Lpack{allrust} package code} \label{sec:code} +% +% \subsection{The \Lpack{rustic} code} +% +% The \Lpack{rustic} package is intended for use when typesetting examples +% of the book-hand in a document that is otherwise typeset in normal fonts. +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. +% \begin{macrocode} +%<*usc> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{rustic}[1999/05/01 v1.0 package for Roman Rustic fonts] +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\rustfamily} +% Selects the Roman Rustic font family in either T1 or OT1 encoding. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \newcommand{\rustfamily}{\usefont{T1}{rust}{m}{n}} +\else + \newcommand{\rustfamily}{\usefont{OT1}{rust}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textrust} +% Text command for the Roman Rustic font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textrust}{\rustfamily} +% \end{macrocode} +% \end{macro} +% +% The end of this package. +% \begin{macrocode} +%</usc> +% \end{macrocode} +% +% \subsection{The \Lpack{allrust} code} +% +% The \Lpack{allrust} package is intended for use when the entire document +% will be typeset in the book-hand. This is a minimal package. Because the +% book-hand should not contain arabic digits a fuller package would redefine +% anything numbered in \LaTeX{} to use roman instead of arabic numbering. +% Also, because of the large |\baselineskip| many other aspects of \LaTeX{} +% to do with vertical positioning should also be redefined. +% +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. It also uses the \Lpack{rustic} package. +% \begin{macrocode} +%<*uscall> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{allrust}[1999/05/01 v1.0 package for all Roman Rustic fonts] +\RequirePackage{rustic} +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% Redefine the default fonts to be Roman Rustic, which has only one family +% member. +% \begin{macro}{\rmdefault} +% \begin{macro}{\sfdefault} +% \begin{macro}{\ttdefault} +% \begin{macrocode} +\renewcommand{\rmdefault}{rust} +\renewcommand{\sfdefault}{rust} +\renewcommand{\ttdefault}{rust} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The `leading' in the book-hand is the same as the |x-height|, which is much +% greater than for the CMR fonts. I have borrowed code from Frank Jensen's +% \Lpack{beton} package~\cite{BETON} to do this. +% +% \begin{macro}{\rustic@baselineskip@table} +% A table of the normal font sizes and the corresponding baselineskip. +% \begin{macrocode} +\newcommand{\rustic@baselineskip@table}{% + <\@vpt>9.5% + <\@vipt>11.4% + <\@viipt>13.3% + <\@viiipt>15.2% + <\@xpt>19% + <\@xipt>20.9% + <\@xiipt>22.8% + <\@xivpt>27.36% + <\@xviipt>23.3% + <\@xxpt>38% + <\@xxvpt>47.5} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\rustic@new@setfontsize} +% This is a macro that replaces the |\@setfontsize| macro which is called by +% the font size changing commands. +% \begin{macrocode} +\newcommand{\rustic@new@setfontsize}[3]{% + \edef\@tempa{\def\noexpand\@tempb####1<#2}% + \@tempa>##2<##3\@nil{\def\rustic@baselineskip@value{##2}}% + \edef\@tempa{\noexpand\@tempb\rustic@baselineskip@table<#2}% + \@tempa><\@nil + \ifx\rustic@baselineskip@value\@empty + \def\rustic@baselineskip@value{#3}% + \fi + \rustic@old@setfontsize{#1}{#2}\rustic@baselineskip@value} +% \end{macrocode} +% \end{macro} +% +% We had better give an author a means of using The Computer Modern fonts +% if necessary. +% +% \begin{macro}{\cmrfamily} +% \begin{macro}{\cmssfamily} +% \begin{macro}{\cmttfamily} +% These macros select the Computer Modern Roman, Sans, and Typewriter +% font families in either the T1 or OT1 encodings. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}} +\else + \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcmr} +% Text command for the Computer Modern Roman font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmr}{\cmrfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmss} +% Text command for the Computer Modern Sans font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmss}{\cmssfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmtt} +% Text command for the Computer Modern Typewriter font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmtt}{\cmttfamily} +% \end{macrocode} +% \end{macro} +% +% +% At the start of the document, change the |\@setfontsize| macro and call +% the normal font to implement the change. +% \begin{macrocode} +\AtBeginDocument{% + \let\rustic@old@setfontsize=\@setfontsize + \let\@setfontsize=\rustic@new@setfontsize} +\AtBeginDocument{\normalsize} +% \end{macrocode} +% +% +% The end of this package. +% \begin{macrocode} +%</uscall> +% \end{macrocode} +% +% +% \bibliographystyle{alpha} +% \renewcommand{\refname}{Bibliography} +% \begin{thebibliography}{GMS94a} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem[And69]{ANDERSON69} +% Donald M.~Anderson. +% \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}. +% \newblock Holt, Rinehart and Winston, 1969. +% +% \bibitem[Bol95]{BOLOGNA95} +% Giulia Bologna. +% \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}. +% \newblock Crescent Books, 1995. +% +% \bibitem[Day95]{DAY95} +% Lewis F.~Day. +% \newblock {\em Alphabets Old \& New}. +% \newblock (3rd edition originally published by B.~T.~Batsford, 1910) +% \newblock Senate, 1995. +% +% \bibitem[Dro80]{DROGIN80} +% Marc Drogin. +% \newblock {\em Medieval Calligraphy: Its History and Technique}. +% \newblock Allenheld, Osmun \& Co., 1980. +% +% \bibitem[Dru95]{DRUCKER95} +% Johanna Drucker. +% \newblock {\em The Alphabetic Labyrinth}. +% \newblock Thames \& Hudson, 1995. +% +% \bibitem[Fir93]{FIRMAGE93} +% Richard A.~Firmage. +% \newblock {\em The Alphabet Abecedarium}. +% \newblock David R~Goodine, 1993. +% +% +% \bibitem[Har95]{HARRIS95} +% David Harris. +% \newblock {\em The Art of Calligraphy}. +% \newblock DK Publishing, 1995. +% +% \bibitem[Jen95]{BETON} +% Frank Jensen. +% \newblock {\em The BETON package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1995. +% +% +% \bibitem[Joh71]{JOHNSTON75} +% Edward Johnston (ed. Heather Child). +% \newblock {\em Formal Penship and Other Papers}. +% \newblock Penthalic, 1971. +% +% \bibitem[Knu87]{CM} +% Donald E.~Knuth. +% \newblock {\em Computer Modern Typefaces}. +% \newblock Addison-Wesley, 1987. +% +% \bibitem[Knu92]{METAFONT} +% Donald E.~Knuth. +% \newblock {\em The METAFONTbook}. +% \newblock Addison-Wesley, 1992. +% +% +% \bibitem[GMS94]{GOOSSENS94} +% Michel Goossens, Frank Mittelbach, and Alexander Samarin. +% \newblock {\em The LaTeX Companion}. +% \newblock Addison-Wesley Publishing Company, 1994. +% +% \bibitem[Tho75]{THOMAS75} +% Alan G.~Thomas. +% \newblock {\em Great Books and Book Collectors}. +% \newblock Weidenfield and Nichoson, 1975. +% +% \bibitem[Wil99a]{DOCMFP} +% Peter R.~Wilson. +% \newblock {\em The DOCMFP Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \bibitem[Wil99b]{ROMANNUM} +% Peter R.~Wilson. +% \newblock {\em The ROMANNUM Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \end{thebibliography} +% +% +% \Finale +% \PrintIndex +% +\endinput + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + diff --git a/Master/texmf-dist/source/latex/bookhands/rustic/rustic.ins b/Master/texmf-dist/source/latex/bookhands/rustic/rustic.ins new file mode 100644 index 00000000000..7c885c2de53 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/rustic/rustic.ins @@ -0,0 +1,103 @@ +%% +%% rustic.ins +%% Copyright 1999 Peter R. Wilson +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Peter Wilson (CUA and NIST) +%% now at: peter.r.wilson@boeing.com +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{rustic.ins} +\input docstrip.tex +\preamble + + Copyright 1999 Peter R. Wilson + + This program is provided under the terms of the + LaTeX Project Public License distributed from CTAN + archives in directory macros/latex/base/lppl.txt. + +Author: Peter Wilson (CUA) + now at: peter.r.wilson@boeing.com + +\endpreamble + +\keepsilent + +%%% \Msg{*** Generating the driver file ***} +%%% \generateFile{rustic.drv}{t}{\from{rustic.dtx}{driver}} + +\Msg{*** Generating the Metafont files ***} + +\usepostamble\empty +\generateFile{rust7.mf}{t}{\from{rustic.dtx}{base7}} +\generateFile{rust10.mf}{t}{\from{rustic.dtx}{base10}} +\generateFile{rust17.mf}{t}{\from{rustic.dtx}{base17}} +\generateFile{rustb7.mf}{t}{\from{rustic.dtx}{base7b}} +\generateFile{rustb10.mf}{t}{\from{rustic.dtx}{base10b}} +\generateFile{rustb17.mf}{t}{\from{rustic.dtx}{base17b}} +\generateFile{rustl.mf}{t}{\from{rustic.dtx}{min}} +\generateFile{rustu.mf}{t}{\from{rustic.dtx}{maj}} +\generateFile{rusttitle.mf}{t}{\from{rustic.dtx}{mfd}} +\generateFile{rustpunct.mf}{t}{\from{rustic.dtx}{punct}} +\generateFile{rustlig.mf}{t}{\from{rustic.dtx}{lig}} +\generateFile{rustdig.mf}{t}{\from{rustic.dtx}{dig}} +%%% \generateFile{rustp.mf}{t}{\from{rustic.dtx}{xp}} + +\Msg{*** Generating the Font Definition files ***} +\usepostamble\defaultpostamble + +\generateFile{ot1rust.fd}{t}{\from{rustic.dtx}{fdot1}} +\generateFile{t1rust.fd}{t}{\from{rustic.dtx}{fdt1}} + +\Msg{*** Generating the LaTeX2e package files ***} + +\generateFile{rustic.sty}{t}{\from{rustic.dtx}{usc}} +\generateFile{allrust.sty}{t}{\from{rustic.dtx}{uscall}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into directories searched by TeX:} +\Msg{*} +\Msg{* Move these into the font source area:} +\Msg{* \space\space rust7.mf} +\Msg{* \space\space rust10.mf} +\Msg{* \space\space rust17.mf} +\Msg{* \space\space rustb7.mf} +\Msg{* \space\space rustb10.mf} +\Msg{* \space\space rustb17.mf} +\Msg{* \space\space rustl.mf} +\Msg{* \space\space rustu.mf} +\Msg{* \space\space rusttitle.mf} +\Msg{* \space\space rustpunct.mf} +\Msg{* \space\space rustlig.mf} +\Msg{* \space\space rustdig.mf} +%%% \Msg{* \space\space rustp.mf} +\Msg{*} +\Msg{* Move these into the LaTeX macro area:} +\Msg{* \space\space ot1rust.fd} +\Msg{* \space\space t1rust.fd} +\Msg{* \space\space rustic.sty} +\Msg{* \space\space allrust.sty} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{* Process any name.idx file by:} +\Msg{* \space\space\space\space makeindex -s gind.ist name} +\Msg{* Process any name.glo file by:} +\Msg{* \space\space\space\space makeindex -s gglo.ist -o name.gls name.glo} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/bookhands/sqrcaps/sqrcaps.dtx b/Master/texmf-dist/source/latex/bookhands/sqrcaps/sqrcaps.dtx new file mode 100644 index 00000000000..5e46e90e1c7 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/sqrcaps/sqrcaps.dtx @@ -0,0 +1,4908 @@ +% \iffalse meta-comment +% +% sqrcaps.dtx +% Copyright 1999 Peter R. Wilson +% +% This program is provided under the terms of the +% LaTeX Project Public License distributed from CTAN +% archives in directory macros/latex/base/lppl.txt. +% +% Author: Peter Wilson (CUA) (now at: peter.r.wilson@boeing.com) +% +% If you do not have the docmfp package (available from CTAN in +% tex-archive/macros/latex/contrib/supported), comment out the +% \usepackage{docmfp} line below and uncomment the line following it. +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{docmfp} +%%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{} +\EnableCrossrefs +\CodelineIndex +%% comment out the next line to show the code. +\OnlyDescription +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{sqrcaps.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{136} +% +% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} +% \DoNotIndex{\@centercr,\@cite} +% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} +% \DoNotIndex{\@input,\@ixpt,\@m} +% \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} +% \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} +% \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} +% \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} +% \DoNotIndex{\advance,\Alph,\alph} +% \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\bullet} +% \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} +% \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} +% \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} +% \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +% \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} +% \DoNotIndex{\fbox} +% \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} +% \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +% \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} +% \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} +% \DoNotIndex{\input} +% \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} +% \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} +% \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +% \DoNotIndex{\NeedsTeXFormat,\newdimen} +% \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} +% \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} +% \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} +% \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +% \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +% \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +% \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} +% \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} +% \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} +% \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} +% \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} +% \DoNotIndex{\viipt,\vipt,\vskip,\vspace} +% \DoNotIndex{\wd,\xiipt,\year,\z@} +% +% \changes{v1.0}{2002/12/30}{First public release} +% +% \def\fileversion{v1.0} +% \def\filedate{2002/12/30} +% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package +% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option +% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file +% \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter +% \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle +% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment +% \newcommand*{\AD}{\textsc{ad}} +% \newcommand*{\thisfont}{Square Capitals} +% +% \title{The \Lpack{Square Capitals} fonts\thanks{This +% file has version number \fileversion, last revised +% \filedate.}} +% +% \author{% +% Peter Wilson\\ +% Catholic University of America \\ +% Now at \texttt{peter.r.wilson@boeing.com} +% } +% \date{\filedate} +% \maketitle +% \begin{abstract} +% The \Lpack{sqrcaps} and \Lpack{allsqrc} packages provide a set of +% Metafont \thisfont{} book-hands +% as used +% for manuscripts from the 1st to the 16th century. This is one in a series +% of manuscript fonts. +% \end{abstract} +% \tableofcontents +% \listoftables +% +% +% +% +% \section{Introduction} +% +% The \Lpack{sqrcaps} and \Lpack{allsqrc} packages provide a Metafont~\cite{METAFONT} version +% of the \thisfont{} manuscript book-hand that was in use between about the +% first and sixteenth centuries~\AD. It is part of a project to provide fonts +% covering the major manuscript hands between the first century~\AD{} and +% the invention of printing. The principal resources used in this project +% are listed in the Bibliography. +% +% This manual is typeset according to the conventions of the +% \LaTeX{} \textsc{docstrip} utility which enables the automatic +% extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. +% The \Lpack{docmfp} package is used for documenting the Metafont portions +% of the distribution~\cite{DOCMFP}. +% +% Section~\ref{sec:usc} describes the usage of the package. +% Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} +% and source code for the package is in Section~\ref{sec:code}. +% +% \subsection{Manuscript book-hands} +% +% Before the invention of printing all books were written by hand. The book-hands +% used by the scribes and copyists for the manuscripts changed as time +% went on. Table~\ref{tab:1} lists some of the common book-hands which were used +% between the 1st and 15th centuries. The later book-hands formed the basis of the +% fonts used by the early printers, which in turn form the basis of the printing +% fonts in use today. +% +% The manuscript book-hands were written with a broad nibbed reed or quill +% pen. Among the distinguishing characteristics of a hand, apart from the +% actual shape of the letters, are the angle of the pen (which controls the +% variation between thick and thin strokes) and the height of a letter compared +% to the width of the nib. The lower the ratio of the letter height to nib +% width, the more condensed is the script. The scripts also varied in their +% typical height. +% +% Table~\ref{tab:1} gives an `average' x-height for each +% script, which I obtained by measuring a sample of photographs of +% manuscripts written in the various hands. About a dozen examples +% of each book-hand were measured. This figure should not be taken too +% seriously. +% +% There was not a sharp division between the use of one hand and another. +% Many manuscripts exhibit a variety of hands in the same document. For example, +% the scribe writing in an Uncial hand may have used Roman Rustic letters +% for capitals. Usually the same pen was used for the two different scripts. +% +% Generally speaking, as a hand got older it became more embelished, and +% therefore took longer to write. As this happened a new hand would appear that +% was faster, and which would eventually make the earlier one obsolete. +% +% Many of the book-hands were single-cased; that is, they did not have an +% upper- and lower-case as we do nowadays in Western scripts. On the other +% hand, a script might be majuscule or minuscule. A \textit{majuscule} script +% is one, like our upper-case, where the letters are drawn between two lines +% and are of a uniform height with no ascenders or descenders. +% A \textit{minuscule} script, like our lower-case, is drawn between four lines +% and has ascenders and descenders. +% +% \begin{table} +% \centering +% \caption{The main manuscript book-hands} \label{tab:1} +% \begin{tabular}{lccccc} \hline +% Name & Century & x-height & Height & Pen & Normalised \\ +% & & (mm) & (nib widths) & angle & height \\ \hline +% Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\ +% Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\ +% Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\ +% Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\ +% Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\ +% Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\ +% Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\ +% Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\ +% Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\ +% Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\ +% Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\ +% Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline +% \end{tabular} +% \end{table} +% +% During the period under consideration arabic numerals were effectively +% not used. At the beginning they were unknown and even though some knew +% of them towards the end, the glyphs used for them are not recognisable --- +% to me they look somewhat like cryllic letters --- and each locality +% and time had its own highly individualistic rendering. The general rule +% when using one of these book-hands is to write all numbers using +% roman numerals. +% +% The Roman alphabet consisted of 23 capital letters --- the J, U and W +% were absent. The book-hands initially used both a `u' and a `v' interchangeably +% but by the 10th century the practice had become to use the `v' before a vowel +% and the `u' otherwise. The letter corresponding to the W sound appeared +% in England around the 7th century in +% the form of the runic \textit{wen} character and by about the 11th century +% the `w' chacter was generally used. The `J' is the newest letter of all, not +% appearing until about the mid 16th century. +% +% In the first century punctuation was virtually unknown, and typically +% would not even be any additional space between individual words, never +% mind denoting ends of sentences. Sometimes a dot at mid-height would be +% used as a word seperator, or to mark off the end of a paragraph. Effectively +% a text was a continuous stream of letters. By the time that printing was +% invented, though, all of our modern punctuation marks were being used. +% +% Among all these manuscript hands, the Carolingian minuscule is the +% most important as our modern fonts are based on its letter shapes, and it is +% also at this point in time where the division occured between the black letter +% scripts as used even today in Germany, and the lighter fonts used elesewhere. +% The Rotunda and Humanist minuscule hands were developed in Italy and were +% essentially a rediscovery of the Carolingian minusucle. Guthenberg took the +% Gothic scripts as the model for his types. Later printers, +% such as Nicholas Jenson of Venice, +% took the Humanist scripts as their models. +% +% +% \subsection{The \thisfont{} script} +% +% The \thisfont{} hand was in use from the first century onwards. It +% is a majestic hand and very time-consuming to use; there are only two known +% manuscripts written in it. However, characters from the script were +% used as capital letters for many other hands throughout the whole period. +% +% Some calligraphers say that it is easier to draw or paint the characters +% rather than use a broad nibbed pen. If a pen is used, then the nib is used +% in a variety of angles, and for some parts of a character just a corner might +% be used to fill in an awkward space. +% +% +% \section{The \Lpack{sqrcaps} and \Lpack{allsqrc} packages} \label{sec:usc} +% +% The \thisfont{} font family is called |sqrc|. The font is supplied in both +% OT1 and T1 encodings. +% +% \subsection{The \Lpack{sqrcaps} package} +% +% This is intended for the occasions when some short pieces of text have +% to be written in \thisfont{} while the majority of the document is in another +% font. The normal baselineskips are used. +% +% \DescribeMacro{\sqrcfamily} +% The |\sqrcfamily| declaration starts typesetting with the \thisfont{} fonts. +% Use of the \thisfont{} font will continue until either there is another |\...family| +% declaration or the current group (e.g., environment) is closed. +% +% \DescribeMacro{\textsqrc} +% The command |\textsqrc{|\meta{text}|}| will typeset \meta{text} using the +% \thisfont{} fonts. +% +% \subsection{The \Lpack{allsqrc} package} +% +% +% This package is for when the entire document will be typeset with the +% \thisfont{} font. The baselineskips are set to those appropriate to the +% book-hand. +% +% This is a minimalist package. Apart from declaring \thisfont{} to be the +% default font and setting the baselineskips appropriately, it makes no other +% alterations. +% Vertical spacing +% before and after section titles and before and after lists, etc., will be +% too small as the \LaTeX{} design assumes a font comparable in size to +% normal printing fonts, and the book-hand is much taller. +% To capture more of the flavour of the time, all numbers +% should be written using roman numerals. +% The \Lpack{romannum} package~\cite{ROMANNUM} +% can be used so that \LaTeX{} will typeset the numbers that it generates, +% like sectioning or caption numbers, using roman numerals instead of arabic +% digits. +% +% \DescribeMacro{\cmrfamily} +% \DescribeMacro{\textcmr} +% \DescribeMacro{\cmssfamily} +% \DescribeMacro{\textcmss} +% \DescribeMacro{\cmttfamily} +% \DescribeMacro{\textcmtt} +% The |...family| declarations start typesetting with the Computer Modern Roman +% (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer +% Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}| +% commands will typeset \meta{text} in the corresponding Computer Modern font. +% +% The \Lpack{allsqrc} package automatically loads the \Lpack{sqrcaps} package, +% so its font commands are available if necessary. +% +% \StopEventually{ +% \bibliographystyle{alpha} +% \renewcommand{\refname}{Bibliography} +% \begin{thebibliography}{GMS94} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem[And69]{ANDERSON69} +% Donald M.~Anderson. +% \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}. +% \newblock Holt, Rinehart and Winston, 1969. +% +% \bibitem[Bol95]{BOLOGNA95} +% Giulia Bologna. +% \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}. +% \newblock Crescent Books, 1995. +% +% \bibitem[Day95]{DAY95} +% Lewis F.~Day. +% \newblock {\em Alphabets Old \& New}. +% \newblock (3rd edition originally published by B.~T.~Batsford, 1910) +% \newblock Senate, 1995. +% +% \bibitem[Dro80]{DROGIN80} +% Marc Drogin. +% \newblock {\em Medieval Calligraphy: Its History and Technique}. +% \newblock Allenheld, Osmun \& Co., 1980. +% +% \bibitem[Dru95]{DRUCKER95} +% Johanna Drucker. +% \newblock {\em The Alphabetic Labyrinth}. +% \newblock Thames \& Hudson, 1995. +% +% \bibitem[Fir93]{FIRMAGE93} +% Richard A.~Firmage. +% \newblock {\em The Alphabet Abecedarium}. +% \newblock David R~Goodine, 1993. +% +% \bibitem[Fli98]{LETTRINE} +% Daniel Flipo. +% \newblock {\em The LETTRINE package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1998. +% +% \bibitem[Har95]{HARRIS95} +% David Harris. +% \newblock {\em The Art of Calligraphy}. +% \newblock DK Publishing, 1995. +% +% \bibitem[Jen95]{BETON} +% Frank Jensen. +% \newblock {\em The BETON package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1995. +% +% \bibitem[Joh71]{JOHNSTON75} +% Edward Johnston (ed. Heather Child). +% \newblock {\em Formal Penship and Other Papers}. +% \newblock Penthalic, 1971. +% +% \bibitem[Knu87]{CM} +% Donald E.~Knuth. +% \newblock {\em Computer Modern Typefaces}. +% \newblock Addison-Wesley, 1987. +% +% \bibitem[Knu92]{METAFONT} +% Donald E.~Knuth. +% \newblock {\em The METAFONTbook}. +% \newblock Addison-Wesley, 1992. +% +% \bibitem[GMS94]{GOOSSENS94} +% Michel Goossens, Frank Mittelbach, and Alexander Samarin. +% \newblock {\em The LaTeX Companion}. +% \newblock Addison-Wesley Publishing Company, 1994. +% +% \bibitem[Tho75]{THOMAS75} +% Alan G.~Thomas. +% \newblock {\em Great Books and Book Collectors}. +% \newblock Weidenfield and Nichoson, 1975. +% +% \bibitem[Wil99]{DOCMFP} +% Peter R.~Wilson. +% \newblock {\em The DOCMFP Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \bibitem[Wil99b]{ROMANNUM} +% Peter R.~Wilson. +% \newblock {\em The ROMANNUM Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \end{thebibliography} +% } +% +% \section{The Metafont code} \label{sec:mf} +% +% +% As previously noted, this work is part of a larger project to provide +% fonts covering the main manuscript book-hands. As such, one of the +% aims is to produce a coordinated set of fonts, especially as multiple +% hands might be used in a single document. +% +% Noting that the hands tend to be somewhat larger than the typical 10pt +% size (where the x-height is approximately 1.5mm) used for modern books, +% I have also designed the fonts +% at a larger than normal size, then applied some non-linear factors when reducing +% them down to a 10pt size. +% Further, I have used the height of the Carolingian minuscule as a +% normalising factor when deciding on the absolute height of any particular +% script. The x-height of the Carolingian font is made equal to the +% x-height of the Computer Modern Roman (CMR) font. +% +% Modern fonts are effectively drawn. That is, the outline of the letter is +% drawn carefully and the center is filled with ink. This is shown to good +% effect in the Metafont code for the Computer Modern fonts~\cite{CM}. +% In contrast, the manuscript letters were inked by single pen strokes in +% a calligraphic manner. I have tried to repeat this calligraphic style +% in the Metafont code. +% +% As much as possible I have tried to use parameter values from the +% Computer Modern Roman (CMR) fonts in order to reduce possible +% infelicities if the CM and manuscript fonts are used together. However, +% few of the CMR parameters are applicable to the calligraphic style. +% +% +% \subsection{The parameter file} +% +% We deal with the parameter files first, and start by announcing +% what they are for. The \thisfont{} font comes in three sizes and also as a normal +% and a bold font. +% \begin{macrocode} +%<*base7|base10|base17|base7b|base10b|base17b> +%<base7>%%% SQRC7.MF Square Capitals at 7 point design size. +%<base10>%%% SQRC10.MF Square Capitals at 10 point design size. +%<base17>%%% SQRC17.MF Square Capitals at 17 point design size. +%<base7b>%%% SQRCB7.MF Square Capitals Bold at 7 point design size. +%<base10b>%%% SQRCB10.MF Square Capitals Bold at 10 point design size. +%<base17b>%%% SQRCB17.MF Square Capitals Bold at 17 point design size. +% +% \end{macrocode} +% Parameters from CMR are used as much as possible. We also +% make sure that \Lpack{cmbase} is loaded as well as plain Metafont. +% \begin{macrocode} +if unknown cmbase: input cmbase fi + +%<base7>font_identifier:="SQRC"; font_size 7pt#; +%<base10>font_identifier:="SQRC"; font_size 10pt#; +%<base17>font_identifier:="SQRC"; font_size 17.28pt#; +%<base7b>font_identifier:="SQRCB"; font_size 7pt#; +%<base10b>font_identifier:="SQRCB"; font_size 10pt#; +%<base17b>font_identifier:="SQRCB"; font_size 17.28pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutstretch} +% The CMR scaling for lowercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> jutstretch:=1.19; +%<base10|base10b> jutstretch:=1.152; +%<base17|base17b> jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{stemstretch} +% The CMR scaling for lowercase stem widths wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> stemstretch:=1.50; +%<base10|base10b> stemstretch:=1.31; +%<base17|base17b> stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{caprat} +% The scaling for `capitals' wrt `lowercase'. This is pretty much a guess +% (the ratio for CMR10 is 1.59). +% \begin{macrocode} + caprat:=1.3; % ratio of capital height to minuscule height +% \end{macrocode} +% +% \DescribeVariable{cap_jutstretch} +% The CMR scaling for uppercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_jutstretch:=1.3; +%<base10|base10b> cap_jutstretch:=1.2; +%<base17|base17b> cap_jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{cap_stemstretch} +% The CMR scaling for uppercase stem width wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_stemstretch:=1.45; +%<base10|base10b> cap_stemstretch:=1.31; +%<base17|base17b> cap_stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{bfudge} +% Letter width scaling for bold font wrt normal font. +% \begin{macrocode} +%<base7|base10|base17> bfudge:=1.0; +%<base7b|base10b|base17b> bfudge:=1.2; +% \end{macrocode} +% +% \DescribeVariable{szfudge} +% Width scaling wrt 17pt letter width. +% \begin{macrocode} +%<base7|base7b> szfudge:=1.18; +%<base10|base10b> szfudge:=1.0; +%<base17|base17b> szfudge:=1.0; +% \end{macrocode} +% +% \DescribeVariable{hstretch} +% Horizontal stretching factor wrt 17pt size letter width. +% \begin{macrocode} + hstretch:=szfudge*bfudge; +% \end{macrocode} +% +% \DescribeVariable{carol_height} +% The x-height of the Carolingian minuscule font. +% \begin{macrocode} +%<base7|base7b> carol_height#:=108.5/36pt#; +%<base10|base10b> carol_height#:=155/36pt#; +%<base17|base17b> carol_height#:=268/36pt#; +% \end{macrocode} +% +% \DescribeVariable{vstretch} +% The height of this font wrt the Carolingian font. +% \begin{macrocode} + vstretch:=5/3; + +% \end{macrocode} +% +% \DescribeVariable{x_height} +% The x-height of lower case letters. Scaled from the Carolingian font. +% \begin{macrocode} + x_height#:=vstretch*carol_height#; +% \end{macrocode} +% +% \DescribeVariable{u} +% The unit width. The CMR values are used. +% \begin{macrocode} +%<base7> u#:=15.5/36pt#; +%<base10> u#:=20/36pt#; +%<base17> u#:=32.5/36pt#; +%<base7b> u#:=17.9/36pt#; +%<base10b> u#:=23/36pt#; +%<base17b> u#:=37/36pt#; +% \end{macrocode} +% +% \DescribeVariable{width_adj} +% \DescribeVariable{serif_fit} +% \DescribeVariable{cap_serif_fit} +% \DescribeVariable{letter_fit} +% The majority of these parameters and values are constant. +% They are for fine adjustements of characters. The CM values are used. +% \begin{macrocode} + width_adj#:=0pt#; % width adjustment for certain characters + serif_fit#:=0pt#; % extra sidebar near lowercase serifs +%<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs +%<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +%<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs +%<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars +% \end{macrocode} +% +% \DescribeVariable{sb} +% A length used for adjusting the side bearings of characters. +% \begin{macrocode} +%<base7|base7b> sb#:=1/2u#; % unit for side bearings +%<base10|base10b> sb#:=1/2u#; % unit for side bearings +%<base17|base17b> sb#:=1/2u#; % unit for side bearings + +% \end{macrocode} +% +% \DescribeVariable{cap_height} +% The height of capital letters. +% \begin{macrocode} +%<base7|base7b> cap_height#:=172.2/36pt#; % height of caps +%<base10|base10b> cap_height#:=246/36pt#; % height of caps +%<base17|base17b> cap_height#:=425/36pt#; % height of caps +% \end{macrocode} +% +% \DescribeVariable{thickfudge} +% The reciprocal of the font height in nib widths. Normal font height +% is 5 nib widths and the bold font height is 4 nib widths. +% \begin{macrocode} +%<base7|base10|base17> thickfudge:=1/5; +%<base7b|base10b|base17b> thickfudge:=1/4; +% \end{macrocode} +% +% \DescribeVariable{thinfudge} +% The nib sharpness. +% \begin{macrocode} +thinfudge:=1/6; +% \end{macrocode} +% +% \DescribeVariable{thick} +% The maximum nib width. +% That is, the width of the thickest line that can be penned. +% \begin{macrocode} +thick#:=stemstretch*thickfudge*x_height#; % max pen breadth +% \end{macrocode} +% +% \DescribeVariable{thin} +% The nib thinness. +% That is, the width of the thinnest line that can be penned. +% \begin{macrocode} +thin#:=thinfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{pangle} +% The pen angle (in degrees). +% \begin{macrocode} +pangle:=10; % pen angle +% \end{macrocode} +% +% \DescribeVariable{ascratio} +% The height of lower case ascenders wrt |x_height|. +% \begin{macrocode} + ascratio:=1.0; +% \end{macrocode} +% +% \DescribeVariable{asc_height} +% The height of lower case ascenders. +% \begin{macrocode} + asc_height#:=ascratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{descratio} +% The depth of lower case descenders wrt |x_height|. +% \begin{macrocode} + descratio:=0; +% \end{macrocode} +% +% \DescribeVariable{desc_depth} +% The depth of lower case descenders. +% \begin{macrocode} + desc_depth#:=descratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_height} +% The height of numerals. Make these midway between normal and capital +% letters. +% \begin{macrocode} + fig_height#:=(0.5[1,caprat])*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_width} +% The width of numerals. All numerals are the same width (roughly, an `o'). +% \begin{macrocode} + fig_width#:=hstretch*(x_height#); +% \end{macrocode} +% +% \DescribeVariable{body_height} +% The height of the tallest character. +% \begin{macrocode} + body_height#:=caprat*asc_height#; +% \end{macrocode} +% +% \DescribeVariable{body_depth} +% The depth of the lowest character. +% \begin{macrocode} + body_depth#:=caprat*desc_depth#; +% \end{macrocode} +% +% \DescribeVariable{half_height} +% Half the normal letter height. +% \begin{macrocode} + half_height#:=1/2x_height#; % half the height of x height letters + +% \end{macrocode} +% +% \DescribeVariable{side} +% We might be using a square for the character design. +% \begin{macrocode} +side#:=x_height#; +% \end{macrocode} +% +% \DescribeVariable{rule_thickness} +% Thickness of rules (in math symbols). The CMR values are used. +% \begin{macrocode} +%<base7|base7b> rule_thickness#:=.34pt#; +%<base10|base10b> rule_thickness#:=.4pt#; +%<base17|base17b> rule_thickness#:=.6pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutfudge} +% Controls the protrusion of serifs. +% \begin{macrocode} +%%%jutfudge:= 3/4; +jutfudge:= 1/2; +% \end{macrocode} +% +% \DescribeVariable{jut} +% The lowercase serif protrusion. +% \begin{macrocode} +jut#:=jutstretch*jutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{sqrcjut} +% Square Captitals flat serif protrusion. +% \begin{macrocode} +\sqrcjut# := 2cap_jutstretch*thin#; +% \end{macrocode} +% +% \DescribeVariable{sqrcjutrat} +% Ration of Square Captitals thin triangle serif to flat serif protrusion. +% \begin{macrocode} +\sqrcjutrat := 2; +% \end{macrocode} +% +% \DescribeVariable{srad} +% |srad| with |0 < srad < 1| controls the serif radius. +% \begin{macrocode} +srad:=0.8; % was 0.5 +% \end{macrocode} +% +% \DescribeVariable{trijut} +% The lowercase triangular serif protrusion. +% \begin{macrocode} +trijut#:=0.75jutstretch*thick#; +% \end{macrocode} +% +% \DescribeVariable{clubjutfudge} +% The fractional protusion of a club serif. +% \begin{macrocode} +clubjutfudge:=1/2; +% \end{macrocode} +% +% \DescribeVariable{clubjut} +% The lowercase club serif protrusion. +% \begin{macrocode} +clubjut#:=jutstretch*clubjutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{o} +% Amount of overshoot for curves (as in an `o'). Use CMR values. +% \begin{macrocode} +%<base7|base7b> o#:=5/36pt#; +%<base10|base10b> o#:=8/36pt#; +%<base17|base17b> o#:=10/36pt#; + +% \end{macrocode} +% +% \DescribeVariable{slant} +% |slant| is the amount the font slopes to the right. \\ +% 5 degrees = 9/100; 10 degrees = 11/50. +% \begin{macrocode} +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +%%%%%%slant:= sind 10/cosd 10; %% 10 degree slant + +% \end{macrocode} +% +% \DescribeVariable{monospace} +% We are generating a variable-width font. +% \begin{macrocode} +monospace:=false; % should all characters have the same width? + +% \end{macrocode} +% +% \DescribeVariable{dot_size} +% The size of (punctuation) dots. +% \begin{macrocode} +dot_size#:=5thin#; % size of dots +% \end{macrocode} +% +% \DescribeVariable{comma_width} +% The horizontal width of a comma. +% \begin{macrocode} +comma_width#:=5/4dot_size#; + +% \end{macrocode} +% +% Finally, call the driver file for the font. +% \begin{macrocode} +generate sqrctitle %% switch to the driver file + +% \end{macrocode} +% +% The end of this code section. +% \begin{macrocode} +%</base7|base10|base17|base7b|base10b|base17b> +% \end{macrocode} +% +% +% \subsection{The driver file} +% +% The driver file sets up the font parameters and also contains +% the macros used in the definition of the characters. +% +% \begin{macrocode} +%<*mfd> +% This is SQRCTITLE.MF for the Square Capitals font. +% This makes a short font. +% This file also contains special macros universally needed in the +% font but either not in the cmbase.mf file or modifications of these. +% +% \end{macrocode} +% +% \begin{routine}{makebox} +% This is a new version of the \Lpack{cmbase.mf} |makebox| macro. +% Essentially, as we are only generating a single case font, we don't +% need all the horizontals for the CMR characters. +% +% \begin{macrocode} +% A new version of cmbase.mf makebox macro +def makebox(text rule) = + for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth: + rule((l,y)t_,(r,y)t_); endfor % horizontals + for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals + for x=u*(1+floor(1/u)) step u until r-1: + rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals + if charic<>0: + rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{proofpcbb} +% The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the +% square, and at the bottom and top midpoints, where the point |zS| is at +% position |(xoff,yoff)| in the square. +% \begin{macrocode} + +% A macro to delineate a letter's bounding square in proof mode. +% Point z$ is at (xoff,yoff) in the bounding square. +def proofpcbb(suffix $)(expr xoff, yoff) = +if proofing > 0: + x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner + z$br = (x$bl+side, y$bl); % BRHC + z$tr = (x$bl+side, y$bl+side); % TRHC + z$tl = (x$bl, y$bl+side); % TLHC + z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points + pair hc, vc; + hc = (2u,0); vc = (0,2u); + pickup pensquare scaled 2; + for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc: + draw s-hc--s+hc; + draw s-vc--s+vc; + endfor +fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{sqrcaps_font_setup} +% This macro contains the set up for the \thisfont{} fonts. +% \begin{macrocode} + +def sqrcaps_font_setup= % contains special stuff for sqrcaps fonts + define_pixels(side,half_height,carol_height,comma_width); + define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit, + cap_serif_fit,jut,clubjut,cap_jut,trijut); + define_pixels(fig_width); + define_whole_pixels(letter_fit,sb); + define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height, + desc_depth,body_depth,fig_height); + define_corrected_pixels(o); + define_blacker_pixels(thick,thin); + define_pixels(sqrcjut); + let adjust_fit = normal_adjust_fit; +% \end{macrocode} +% \DescribeVariable{stylus} +% The pen for drawing the thinnest lines is |stylus|. +% \begin{macrocode} + pickup pencircle scaled thin; + stylus:=savepen; +% \end{macrocode} +% \DescribeVariable{thickstylus} +% The pen for drawing lines a bit thicker than the thinnest is |thickstylus|. +% \begin{macrocode} + pickup pencircle scaled (1.5thin); + thickstylus:=savepen; +% \end{macrocode} +% \DescribeVariable{quill} +% The normal calligraphic pen is |quill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated pangle; + quill:=savepen; + +% \end{macrocode} +% +% \DescribeVariable{threequarterquill} +% A pen with 3/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 3/4thick yscaled thin rotated pangle; + threequarterquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{halfquill} +% A pen with 1/2 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/2thick yscaled thin rotated pangle; + halfquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{quarterquill} +% A pen with 1/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/4thick yscaled thin rotated pangle; + quarterquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{thinquill} +% A narrow pen with a fraction of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 3/8thick yscaled thin rotated pangle; %% 1/4 too small + thinquill := savepen; + +% \end{macrocode} +% +% +% \begin{macrocode} + numeric pcshiftx#; % x value of LHS of box wrt origin of char box + define_pixels(pcshiftx); + numeric sqxside#; % x size of the square + numeric sqyside#; % y size of the square + define_pixels(sqxside,sqyside); + +enddef; % end of sqrcaps_font_setup + +% \end{macrocode} +% \end{routine} +% +% +% \DescribeVariable{ductus} +% A boolean to control drawing the ductus (TRUE) or the full letter (FALSE). +% \begin{macrocode} +boolean ductus; +ductus:=false; +% \end{macrocode} +% +% \DescribeVariable{qhor} +% \DescribeVariable{qvert} +% The cosine and sine of the pen angle. +% \begin{macrocode} +numeric qhor, qvert; +qhor:=cosd(pangle); qvert:=sind(pangle); +% \end{macrocode} +% +% \DescribeVariable{pdir} +% The vector corresponding to the pen angle. +% \begin{macrocode} +pair pdir; pdir=dir(pangle); +% \end{macrocode} +% +% \DescribeVariable{ppdir} +% The vector that is perpendicular (anticlockwise) to the pen angle. +% \begin{macrocode} +pair ppdir; ppdir=dir(pangle+90); +% \end{macrocode} +% +% \begin{routine}{draw_serif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_serif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; + z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + top_serif:=false; + z$c=z$b shifted (bjut*pdir); + fi +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_serif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_roundserif} +% The |draw_serif| routine can leave a bump at the end of the stem. +% The |draw_roundserif| routine, which takes the same arguments, +% is meant to eliminate the bump. +% \begin{macrocode} + +def draw_roundserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); + undraw z$--z$a; +enddef; % end of draw_roundserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flatserif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. This produces a serif like |draw_serif| except +% that one side of the seerif is flat. +% \begin{macrocode} + +def draw_flatserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; +%%% z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-jut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (jut*pdir); + fi + z$b = fr[z$,z$c]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$a--z$; + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_flatserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_clubserif} +% A macro to draw a clubbed serif. |draw_clubserif(1,2,f)| uses the current +% pen to +% draw a clubbed serif of extent |clubjut| at |z1| to the left of the line +% from |z2| +% to |z1|. The serif matches |z1| like the flatserif does and ends at the +% point |f[z1,z2]|. +% \begin{macrocode} + +def draw_clubserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| controls the length of the serif. +% \begin{macrocode} +%% beta=1-fr; + ajut=clubjut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem, |fr| between |$| and |$$|. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); +%% vec2=ajut*vec1; +%% z$a=z$ shifted vec2; + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-clubjut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (clubjut*pdir); + fi + z$a = fr[z$,z$$]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$c..z$a{vec1}; + labels($a,$b,$c); +enddef; % end of draw_clubserif + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{draw_triserif} +% A macro to draw a triangular top left serif. +% |draw_triserif(1,tj)| draws a serif at |z1| with its leftmost x +% value at |x1-tj|, where it is assumed that the +% top point on the stem is at |z1| and the stem was drawn with |quill|. +% \begin{macrocode} + +def draw_triserif(suffix $)(expr tj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$ts1'=lft x$; y$ts1'=bot y$; + pickup stylus; + lft x$ts1=x$ts1'; bot y$ts1=y$ts1'; + x$ts2=x$ts1-tj; z$ts2=whatever[z$,z$ts1]; + x$ts3=x$ts1; y$ts3=y$ts2-tj; + pickup stylus; +%% filldraw z$ts1--z$ts2--z$ts3--cycle; + filldraw z$--z$ts2--z$ts3--cycle; + pickup oldpen; + labels($ts1,$ts2,$ts3); +enddef; % end of draw_triserif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_istem} +% A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs +% are of extent |jut|. There is a top left and bottom right serif. +% The serif radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_istem(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % top serif + draw_serif($$, $, fr); % bottom serif + draw z$a--z$$a; % the stem +enddef; % end of draw_istem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tstem} +% A macro to draw the shape of the stem of a `t'. |draw_tstem(1,2,f)| draws a +% stem whose +% top is at |z1| and bottom at |z2| with a right serif at |z2|. The radius +% is controlled by |f|, with $0 < f < 1$. +% It draws with the current pen and the serif is of extent |jut|. +% NOTE: for the HMIN font, just the stem is drawn --- no serif! +% \begin{macrocode} + +def draw_tstem(suffix $, $$)(expr fr)= +%% draw_serif($$, $, fr); % the serif +%% draw z$--z$$a; % the stem + draw z$--z$$; +enddef; % end of draw_tstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tlserif} +% A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serif +% is of extent |jut|. It also draws the stem to the point |z2|. The serif +% radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_tlserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % the serif + draw z$a--z$$; % the stem +enddef; % end of draw_tlserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flick} +% A macro to draw a flick (like an eyebrow). +% |draw_flick(1,rise,fall,fjut)| draws a stroke starting at |z1| rising up by +% |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is +% |fjut| to the right of |z1|. It is drawn with the current pen. +% \begin{macrocode} + +def draw_flick(suffix $)(expr rise, fall, fjut)= +% \end{macrocode} +% The points |z$a| and |z$b|, together with |z$| make up three points on the +% ductus. +% \begin{macrocode} + rt x$b = x1+fjut; top y$b=y$-fall; + x$a=0.5[x$,x$b]; top y$a=y$+rise; +% \end{macrocode} +% Draw the part, and finish off. +% \begin{macrocode} + draw z$..z$a..z$b; + labels($a,$b); +enddef; % end of draw_flick + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_wave} +% A macro to draw a (horizontal) stroke with a flick at each end +% (down at the left and up at the right). |draw_wave(1,2,f)| uses the current +% pen to draw from |z1wl| to |z1wr|, where |x1wl=x1|, |y1wl=y1-f|, and +% |x1wr=x2|, |y1wr=y2+f|, with |z1| assumed to be at the left of |z2|. +% \begin{macrocode} + +def draw_wave(suffix $,$$)(expr f)= + x$wl=x$; y$wl=y$-f; + x$wr=x$$; y$wr=y$$+f; + z$wc=0.5[z$wl,z$wr]; + draw z$wl{pdir}..z$wc{right}..{pdir}z$wr; + labels($wl,$wc,$wr); +enddef; % end of draw_wave +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tail} +% A macro to draw a tail at the bottom of a (vertical) stem. +% |draw_tail(1,fjut)| draws a tail at the bottom of the stem which ends at |z1|. +% The depth is controlled by the |desc_depth| value and the jut by |fjut|. +% \begin{macrocode} + +def draw_tail(suffix $)(expr fj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$tl' = lft x$; y$tl=bot y$; + pickup stylus; + lft x$tl=x$tl'; + x$tb=x$tl-fj; bot y$tb=y$tl-1/2desc_depth; + filldraw z${down}..{-pdir}z$tb & z$tb{pdir}..{up}z$tl--cycle; + pickup oldpen; + labels($tb,$tl); +enddef; % end of draw_tail +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_triangle} +% A macro to draw a downward pointing equilateral triangle. +% |draw_triangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_triangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$-0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_triangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_utriangle} +% A macro to draw an upward pointing equilateral triangle. +% |draw_utriangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_utriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$+0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_utriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rtriangle} +% A macro to draw a downward pointing right angled triangle. +% |draw_rtriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rtriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$-sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rtriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rutriangle} +% A macro to draw an upward pointing right angled triangle. +% |draw_rutriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rutriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$+sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rutriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_fork} +% A macro to draw a forked line. +% |draw_fork(1,2,sz)| draws a graduated line from |z1| to |z2| with a forked +% end of size |sz|. +% \begin{macrocode} + +def draw_fork(suffix $, $$)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$f1'=lft x$; y$f1'=bot y$; + x$f3'=rt x$; y$f3'=top y$; + pickup stylus; + lft x$f1=x$f1'; bot y$f1=y$f1'; + rt x$f3=x$f3'; y$f3-y$=2*(y$-y$f1); + rt x$f2=x$$-sz; bot y$f2=y$$; + rt x$f4= rt x$f5=x$$; + bot y$f5=y$$-sz; top y$f4=y$$+1/2sz; + filldraw z$f1--z$f2--z$f3--cycle; % the line + draw z$f2{right}..z$f4; % upper fork + draw z$f2{right}..z$f5; % lower fork + pickup oldpen; + labels($f1,$f2,$f3,$f4,$f5); +enddef; % end of draw_fork +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_urswish} +% A macro to draw a line up and to the right with an under curl at the end. +% |draw_urswish(1,2)| draws from |z1| towards |z2|, which is the max upper right +% of a bounding box, where the curl is. +% \begin{macrocode} + +def draw_urswish(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + pickup quill; + rt x$$s1=x$$-thick; top y$$s1=y$$; + rt x$$s2=x$$; +%% x$$s3=x$$-thick; + lft x$$s3=x$$s1; + bot y$$s3=y$$-thick; y$$s2=0.5[y$$s1,y$$s3]; +%% draw z$---z$$s1{right}..z$$s2{down}..{-pdir}z$$s3; + draw z$..z$$s1{pdir}..z$$s2{down}; + labels($$s1,$$s2,$$s3); +enddef; % end of draw_urswish +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{bowl_stem} +% Calculate where a bowl should meet a stem so that the pen is moving in the +% pen direction. +% |bowl_stem(1,2)| calculates the point |z1i|, where |z1| is on the bowl and +% there is a vertical line at |x2|. +% +% \begin{macrocode} + +def bowl_stem(suffix $, $$)= + x$'=0.5[x$,x$$]; y$'=y$; % the mid-point + z$''=z$' shifted (thick*pdir); + x$i=x$$; z$i=whatever[z$',z$'']; + labels($',$i); +enddef; % end of bowl_stem +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_clubbase} +% Draw a clubbed bottom of a vertical stem for the HMIN font. +% |draw_clubbase(1, 2, st, left, right)| draws from |st[z2,z1]| to |z2|. +% At |z2| the pen +% is shifted |left| fraction of the pen width and |right| fraction of the +% pen width, both in the direction of the pen angle. Pen draws smoothly the +% path |z1|, |left|, |right|, |z1|. +% \begin{macrocode} + +% draw clubbed bottom of vertical stem for HMIN font. +def draw_clubbase(suffix $, $$)(expr st, lft, rt)= + z$$l = z$$ shifted (lft*thick*(-pdir)); + z$$r = z$$ shifted (rt*thick*(pdir)); + z$$t = st[z$$,z$]; + draw z$$t{z$$-z$}..z$$l--z$$r..{z$-z$$}z$$t; + labels($$t,$$l,$$r); +enddef; % end of draw_clubbase + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pdot} +% A macro to draw a period dot. +% |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|. +% \begin{macrocode} + +def draw_pdot(suffix $)(expr sz)= +% \end{macrocode} +% Draw a square rotated 45 degrees. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$ shifted (0.5sz*up); + z$u = z$s shifted (sz*right); + z$v = z$t shifted (sz*down); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pdot + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pcomma} +% A macro to draw a period comma. +% |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. The pen is |stylus|. +% \begin{macrocode} + +def draw_pcomma(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping back and down +% for a total width of |ar| and depth |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s-ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu{down}..{left}z$uv--z$vu{right}..{up}z$sv--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pcomma + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_plq} +% A macro to draw a period left quote. +% |draw_plq(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. +% \begin{macrocode} + +def draw_plq(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping forward and down +% for a total width of |ar| and depth |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s+ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu{down}..{right}z$uv--z$vu{left}..{up}z$sv--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_plq + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{offsetbowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for a non-centered letter `o'. |offsetbowl($, sx, sy, fx, fy)| +% calculates the paths for an `o' +% enclosed in a rectangle size |sx| by |sy| with its bottom lefthand corner +% located at |z$|, where the center of the o is at |(fx*sx, fy*sy)| in the +% bounding rectangle. +% +% Two construction paths, namely |obfirst| and |obsecond| are also +% available. They should be identical. +% +% All paths have points listed in a clockwise direction, starting with +% |z$nh| or |z$minl| as appropriate. +% +% |offsetbowl($, sx, sy, 1/2, 1/2)| gives the same results as |obowl($, sx, sy)|. +% \begin{macrocode} + +path obouter, obinner, obfirst, obsecond; +def offsetbowl(suffix $)(expr sx, sy, fx, fy)= + numeric inx, iny, cx, cy; + pair pt[]; + path pth[]; + inx := 1/2thick*cosd(pangle); iny := 1/2thick*sind(pangle); + cx := x$+fx*sx; cy := y$+fy*sy; + z$obc = (cx,cy); +% \end{macrocode} +% Calulate points on the centre path of the pen. These are offset by |inx| +% from the rectangles vertical sides and by |iny| from the horizontal sides. +% If the pen is parallel to a side, offset the point by half the pen's +% dimension. First do the West, East, North and South points. +% \begin{macrocode} + if pangle = 90: + z$wt=(x$+1/2thin, cy); + z$et=(x$+sx-1/2thin, cy); + else: + z$wt=(x$+inx, cy); + z$et=(x$+sx-inx, cy); + penpos$wt(thick,pangle); + penpos$et(thick,pangle); + fi + if pangle = 0: + z$nh=(cx, y$+sy-1/2thin); + z$sh=(cx, y$+1/2thin); + else: + z$nh=(cx, y$+sy-iny); + z$sh=(cx, y$+iny); + penpos$nh(thick,pangle); + penpos$sh(thick,pangle); + fi + obfirst := z$nh{right}..z$et{down}..z$sh{left}..z$wt{up}..cycle; +% \end{macrocode} +% Now calculate the points on the path |obfirst| where the pen will +% draw the min width lines (i.e., the points where the pen will be +% moving parallel to |pangle|). +% \begin{macrocode} + if pangle = 90: + z$minl = z$wt; z$maxr = z$nh; z$minr = z$et; z$maxl = z$sh; + else: + if pangle = 0: + z$minl = z$nh; z$maxr = z$et; z$minr = z$sh; z$maxl = z$wt; + else: + z$minl = directionpoint dir(pangle) of obfirst; + z$minr = directionpoint -dir(pangle) of obfirst; +% \end{macrocode} +% The max points are roughly where the inner and outer diverge +% the most. These are simple for 0 and 90 degree pens and have +% been calculated above. It's not so simple for intermediate +% angles. For a reasonable looking result, we pick the max +% points to be halfway between the min points. This involves +% calculating some angles, paths and intersections. +% \begin{macrocode} + pt1 := z$minr - z$minl; % direction + pt2 := (- ypart pt1, xpart pt1); % perpendicular + pt3 := 1/2[z$minl, z$minr]; + pt4 := pt3 shifted pt2; + pt5 := pt3 shifted -pt2; + pth1 := pt3--pt4; + pth2 := pt3--pt5; + z$maxr = pth1 intersectionpoint obfirst; + z$maxl = pth2 intersectionpoint obfirst; + \fi + \fi +% \end{macrocode} +% Place the pen at each of these points to get the outer and inner points. +% \begin{macrocode} + penpos$minl(thin,pangle+90); + penpos$maxr(thick,pangle); + penpos$minr(thin,pangle+90); + penpos$maxl(thick,pangle); +% \end{macrocode} +% Finally, the outer and inner paths. +% \begin{macrocode} + obsecond := z$minl..z$maxr..z$minr..z$maxl..cycle; + z$minlo = z$minl.r; z$maxro = z$maxr.r; + z$minro = z$minr.l; z$maxlo = z$maxl.l; + obouter := z$minlo{dir(pangle)}...z$maxro...z$minro{-dir(pangle)}...z$maxlo...cycle; + z$minli = z$minl.l; z$maxri = z$maxr.l; + z$minri = z$minr.r; z$maxli = z$maxl.r; + obinner := z$minli...z$maxri...z$minri...z$maxli...cycle; + labels($obc, $nh, $et, $sh, $wt); + labels($minl, $maxr, $minr, $maxl); + labels($minlo, $maxro, $minro, $maxlo); + labels($minli, $maxri, $minri, $maxli); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{obowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for the letter `o'. |obowl($, sx, sy)| calculates the paths for an `o' +% centered and enclosed in a rectangle size |sx| by |sy| with its bottom +% lefthand corner located at |z$|. +% \begin{macrocode} + +def obowl(suffix $)(expr sx, sy)= + offsetbowl($, sx, sy, 1/2, 1/2); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{scalarprod} +% |v scalarprod w| calulates the scalar product between the +% two vectors |v| and |w|. +% \begin{macrocode} + +primarydef v scalarprod w = + (xpart v * ypart w - ypart v * xpart w) +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{tangentpoint} +% |tangentpoint($, path)| calculates the point |z$tan| on the |path| +% so that |z$tan--z$| is tangent to the path. It uses a binary search +% to find a point on the path such that the path direction is +% (anti-) parallel to the dirction from that point to the given point. +% \begin{macrocode} + +def tangentpoint(suffix $)(expr pth)= + pair vecll, veclr, veclm; % "tangent" line directions + numeric pl, pr, pm; % path parameter values + pair vecpl, vecpr, vecpm; % path directions + pair ptl, ptr, ptm; % path points + numeric sl, sr, sm; % scalar products of path/line directions + numeric stpsize; % size of current binary step + numeric tantol; % tolerance + boolean wtest; % a boolean + + tantol := eps; +% \end{macrocode} +% Initialise using the left right and middle points on the path. +% \begin{macrocode} + pl:=0; pr:=length pth; pm:=0.5(pl+pr); stpsize:=pr-pl; + ptl := point pl of pth; + ptm := point pm of pth; + ptr := point pr of pth; +% \end{macrocode} +% Now the various vectors, and make sure they are unit vectors to +% have a consistent measure scale when we take the scalar products. +% \begin{macrocode} + vecll := unitvector (z$-ptl); + veclm := unitvector (z$-ptm); + veclr := unitvector (z$-ptr); + vecpl := unitvector (direction pl of pth); + vecpm := unitvector (direction pm of pth); + vecpr := unitvector (direction pr of pth); + sl := vecll scalarprod vecpl; + sm := veclm scalarprod vecpm; + sr := veclr scalarprod vecpr; +% \end{macrocode} +% We stop if any of the points is the tangent point, or if the step +% size is too small, or if the signs of the left and right scalar +% products are the same. +% \begin{macrocode} + wtest := (stpsize < tantol) or (sl*sr > 0) or + (abs sl < tantol) or (abs sm < tantol) or (abs sr < tantol); + if wtest: + if (stpsize < tantol): + z$tan=(0,0); + errmessage("No tangent; path too short"); + else: + if (sl*sr > 0): + z$tan=(0,0); + errmessage("No tangent; end products have the same sign"); + else: + if (abs sl < tantol): + z$tan=ptl; + else: + if (abs sm < tantol): + z$tan=ptm; + else: + z$tan=ptr; + fi + fi + fi + fi + else: +% \end{macrocode} +% There should be a tangent and we iterate to find it, using +% bisection. If there is one to be found it will be at the +% current middle point. The tangent point will be somewhere +% between the two points that lead to opposite signed scalar +% products. +% \begin{macrocode} + forever: + if (sl*sm < 0): % opposite signs, look between pl & pm + pr:=pm; pm:=0.5(pr+pl); + vecpr := vecpm; veclr := veclm; sr:=sm; + else: + pl:=pm; pm:=0.5(pr+pl); + vecpl:=vecpm; vecll:=veclm; sl:=sm; + fi + stpsize:=pr-pl; + ptm := point pm of pth; + veclm := unitvector (z$-ptm); + vecpm := unitvector (direction pm of pth); + sm := veclm scalarprod vecpm; +% \end{macrocode} +% We stop the iteration if the step size is too small or the +% middle point is the tangent point. In either case, the +% middle point is the best guess that can be made. +% \begin{macrocode} + wtest := (stpsize < tantol) or (abs sm < tantol); + if wtest: + if (abs sm < tantol): + z$tan = ptm; + else: + z$tan = ptm; +%%%%%% errmessage("Warning: tangent approximated"); + fi + fi + exitif wtest; + endfor + fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% Set the mode and font setup. +% \begin{macrocode} + +font_coding_scheme:="ASCII minuscules and punctuation"; +mode_setup; +sqrcaps_font_setup; + +% \end{macrocode} +% +% +% We generate letters, together with some punctuation and +% analphabetics. +% \begin{macrocode} + +input sqrcl; % lower case +input sqrcu; % capitals +input sqrcpunct; % punctuation +input sqrclig; % the several dashes +input sqrcdig; % arabic digits + +% \end{macrocode} +% +% Set up the spacings, stretches and shrinks. +% +% \begin{macrocode} + +font_slant slant; font_x_height x_height#; +if monospace: + font_normal_space vstretch*9u#; % no stretching or shrinking + font_quad vstretch*18u#; + font_extra_space vstretch*9u#; +else: + font_normal_space vstretch*6u#+2letter_fit#; + font_normal_stretch vstretch*3u#; font_normal_shrink vstretch*2u#; + font_quad vstretch*18u#+4letter_fit#; + font_extra_space vstretch*2u#; + +% \end{macrocode} +% +% Finally, do the ligtables, but I don't think they are needed (yet?). +% +% \begin{macrocode} + +fi + +bye. + + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + kks#:=-4u#; kkx#:=-1.5u#; kkj#:=-2u#; kkr#:=-5u#; kkrs#:=-2u#; kkrl#:=-8u#; + ligtable "s": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "S": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "x": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "X": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "a": "A": + "b": "B": + "c": "C": + "d": "D": + "e": "E": + "h": "H": + "i": "I": + "k": "K": + "l": "L": + "m": "M": + "n": "N": + "o": "O": + "p": "P": + "t": "T": + "u": "U": + "v": "V": + "w": "W": + "z": "Z": + "j" kern kkj#, "J" kern kkj#; + + ligtable "r": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + ligtable "R": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + +fi + +bye. + +%</mfd> +% \end{macrocode} +% +% +% +% \subsection{The code for ordinary letters} +% +% +% \begin{macrocode} +%<*min> +% SQRCL.MF Program file for Square Capitals letters. +% + +% \end{macrocode} +% +% +% \begin{routine}{a} +% The letter `a'. +% \begin{macrocode} +cmchar "SQRC letter a"; +beginchar("a", 2sb#+hstretch*(14/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% legs +x1 = 6/16w; top y1=h; +rt x3 = w-pcshiftx - n1; bot y3= 0; +pickup thinquill; +lft x2 = pcshiftx; bot y2 = 0; +x21 = x2 + n2; y21 = y2; +y22 = y21+n2; z22 = whatever[z2,z1]; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z3; draw (x1-n1,y1)--(x1,y1); draw (x3,y3)--(x3+n1,y3); %% right leg +pickup thinquill; +draw z1--z2; %% left leg +filldraw z2--z21{left}..{z1-z2}z22--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +endchar; % end "a" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{b} +% The letter `b'. +% \begin{macrocode} +cmchar "SQRC letter b"; +beginchar("b", 2sb#+hstretch*(14/13x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := sqrcjut; +%% stem +lft x1 = pcshiftx + n1; top y1 = h; +x2 = x1; bot y2 = 0; +z12 = 1/2[z1,z2]; +%% bottom bowl +lft x21 = pcshiftx; bot y21 = 0; +z22=z2; +lft x27 = rt x12; y27 = y12; +rt x25 = w-pcshiftx; y25 = 1/2[y22,y27]; +pth1 := z21--z22{right}..z25{up}..{left}z27; +%% top bowl +z32 = z27; z37 = z1; +x38 = x21; y38 = y37; +rt x35 = x25; y35 = 1/2[y32,y37]; +pth2 := z38--z37{right}..z35{down}..{left}z27; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw pth1; draw pth2; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "b" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{c} +% The letter `c'. +% \begin{macrocode} +cmchar "SQRC letter c"; +beginchar("c", 2sb#+hstretch*(14/13x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z24..z1{left}..z2{down}..z3{right}..z4{3pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "c" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{d} +% The letter `d'. +% \begin{macrocode} +cmchar "SQRC letter d"; +beginchar("d", 2sb#+hstretch*(14/13x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +x100 = 0; n1 := rt x100 - lft x100; +%% stem +lft x1 = pcshiftx+sqrcjut; top y1=h; +x2 = x1; bot y2 = 0; +%% bowl +lft x3 = pcshiftx; y3 = y1; +z7 = (x3,y2); +rt x5 = w-pcshiftx; y5 = 1/2[y3,y7]; +pth1 := z3--z1{right}..{down}z5..{left}z2--z7; +if ductus: + pickup stylus; +fi +draw z1--z2; %% stem +draw pth1; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "d" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{e} +% The letter `e'. +% \begin{macrocode} +cmchar "SQRC letter e"; +beginchar("e", sb#+hstretch*(9/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 = rt x100 - lft x100; +%% stem +lft x1 = pcshiftx+sqrcjut; top y1 = h; +x2 = x1; bot y2=0; +%% bars +lft x3 = pcshiftx; y3 = y1; rt x4 = w-pcshiftx; y4=y3; +x5=x1; y5 = 6/16[y1,y2]; x6 = x4; y6 = y5; +x7 = x3; y7 = y2; x8 = x4; y8=y7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw z3--z4; draw z5--z6; draw z7--z8; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,17,70,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{f} +% The letter `f'. +% \begin{macrocode} +cmchar "SQRC letter f"; +beginchar("f", 2sb#+hstretch*(9/13x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% stem +lft x1=lft x2=pcshiftx+sqrcjut; bot y1=h; bot y2=0; +%% bars +lft x3 = pcshiftx; y3 = y1; rt x4 = w-pcshiftx; y4 = y3; +x5=x1; y5 = 6/16[y1,y2]; x6 = x4; y6 = y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw z3--z4; draw z5--z6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,14,15,16,100); +endchar; % end "f" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{g} +% The letter `g'. +% \begin{macrocode} +cmchar "SQRC letter g"; +beginchar("g", 2sb#+hstretch*(14/13x_height#), + x_height#, 0); +adjust_fit(0,0); +path pth[]; +pair vec[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := sqrcjut; +%% bar +rt x52 = w - pcshiftx; y52 = 1/2h; +x51 = x52 - 2n1; y51 = y52; +z512 = 1/2[z51,z52]; +x54=x512; bot y54 = 0; +%% bowl +lft x2 = pcshiftx; y2 = 1/2h; +x4 = x512; y4 = 1/4h; +x3 = x1 = 1/2[x2,x4]; bot y3 = 0; top y1 = h; +x24 = x512; y24 = 3/4h; +pth1 := z24..z1{left}..z2{down}..z3{right}..z4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +%%draw z4--z512; draw z51--z52; +draw z512--z54; draw (x512-n1,y512)--(x512,y512); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,12,13,24,31,32,33,34,35,36,51,52,512,100); +endchar; % end "g" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{h} +% The letter `h'. +% \begin{macrocode} +cmchar "SQRC letter h"; +beginchar("h", 2sb#+hstretch*(14/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +x100 = 0; +n1 := sqrcjut; +%% stems +lft x1=lft x2=pcshiftx+sqrcjut; +top y1=h; bot y2=0; +rt x3 = w - pcshiftx - sqrcjut; x4 = x3; y3 = y1; y4 = y2; +%% bar +z12 = 7/16[z1,z2]; z34 = 7/16[z3,z4]; +% serifs +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; draw z12--z34; +%% serifs +draw (x1-n1,y1)--(x1,y1); draw (x2,y2)--(x2+n1,y2); +draw (x3-n1,y3)--(x3,y3); draw (x4,y4)--(x4+n1,y4); +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "h" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{i} +% The letter `i'. +% \begin{macrocode} +cmchar "SQRC letter i"; +beginchar("i", 2sb#+hstretch*(thick#+2sqrcjut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +x1 = x2 = 1/2w; +top y1=h; bot y2=0; +%% serifs +lft x111 = pcshiftx; rt x112 = w-pcshiftx; +x211 = x111; x212 = x112; +draw z1--z2; +%% serifs +draw (x111,y1)--(x112,y1); +draw (x211,y2)--(x212,y2); +ductus:=false; +penlabels(1,2,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{j} +% The letter `j'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "SQRC letter j"; +beginchar("j", 2sb#+hstretch*(2thick#+sqrcjut#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +%% stem +rt x1 = w-pcshiftx; top y1 = h; +x2 = x1; y2 = 1/4h; +%% hook +lft x4 = pcshiftx; bot y4 = 0; +pth1 := z4{pdir}..z2{up}; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2{down}..{-pdir}z4; % stem & hook +draw (x1-n1,y1)--z1; +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "j" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{k} +% The letter `k'. +% \begin{macrocode} +cmchar "SQRC letter k"; +beginchar("k", 2sb#+hstretch*(16/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +%% stem +lft x1 = pcshiftx+n1; top y1 = h; +x2 = x1; bot y2 = 0; +z12 = 1/2[z1,z2]; +%% top arm +x3 = rt x12; y3 = y12; +x5 = 1/2[w - pcshiftx, x1]; y5 = y1; +%%pth1 := z3{pdir}..{up}z5; +pth1 := z3--z5; +%% lower arm +z7 = z3; +rt x9 = w-pcshiftx; bot y9 = 0; +pth2 := z7{-ppdir}..{right}z9; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw pth1; draw pth2; +draw (x1-n1,y1)--(x1,y1); +draw (x2-n1,y2)--(x2+n1,y2); +draw (x5,y5)--(x5+n1,y5); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,100); +endchar; % end "k" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{l} +% The letter `l'. +% \begin{macrocode} +cmchar "SQRC letter l"; +beginchar("l", 2sb#+hstretch*(9/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +lft x1=pcshiftx+n1; bot y1=h; +x2=x1; bot y2 =0; +x3 = x2; rt x4 = w-pcshiftx; y3 = y4 = y2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; +draw (x1-n1,y1)--(x1,y1); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "l" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{m} +% The letter `m'. +% \begin{macrocode} +cmchar "SQRC letter m"; +beginchar("m", 2sb#+hstretch*(19/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% thick stem tops +lft x1=pcshiftx+n1; top y1=h; +rt x3 = w - pcshiftx -2n1; y3 = y1; +%% right stem bottom +rt x4 = w - pcshiftx - n1; bot y4 = 0; +%% the V +x24 = 1/2w; bot y24 = 0; +%% left stem top and bottom +x81 = lft x1; y81 = top y1; +pickup thinquill; +lft x11 = x81; top y11 = y81; +lft x2 = pcshiftx; bot y2 = 0; +x2a = x2+n2; y2a = y2; +y2b = y2+n2; z2b = whatever[z2,z11]; +pickup quill; +%% thin middle top and bottom +x83 = lft x3; y83 = top y3; +x824 = rt x24; y824 = bot y24; +pickup thinquill; +lft x13 = x83; top y13 = y83; +rt x124 = x824; bot y124 = y824; +pickup quill; +pth124 := z1{-ppdir}..z24; +pth34 := z3{down}..z4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%% thick legs +draw pth124; draw pth34; +draw (x1-n1,y1)--(x1,y1); draw (x3-n1,y3)--(x3,y3); draw (x4,y4)--(x4+n1,y4); +%% thin legs +pickup thinquill; +draw z11--z2; +filldraw z2--z2a{left}..{z11-z2}z2b--cycle; +%%%%pickup quarterquill; + draw z13--z124; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100); +endchar; % end "m" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{n} +% The letter `n'. +% \begin{macrocode} +cmchar "SQRC letter n"; +beginchar("n", 2sb#+hstretch*(14/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% diagonal +lft x1=pcshiftx+n1; top y1=h; +rt x4 = w -pcshiftx-n1; bot y4 = 0; +x101 = lft x1; +x104 = rt x4; +pth1 := z1{-ppdir}..z4; +%% stems +pickup thinquill; +lft x21 = x101; top y21 =h; +x22 = x21; bot y22 = 0; +x22a = x22+n2; y22a=y22; +x22b = x22; y22b=y22+n2; +rt x24 = x104; bot y24 = 0; +x23 = x24; top y23 = h; +x23a = x23-n2; x23b = x23+n1; y23a = y23b = y23; +x23c = x23; y23c = y23-n2; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%% diagonal +draw pth1; draw (x1-n1,y1)--(x1,y1); +%% stems +pickup thinquill; +draw z21--z22; +filldraw z22--z22a{left}..{up}z22b--cycle; +draw z23--z24; +filldraw z23--z23a{right}..{down}z23c{up}..{right}z23b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,23,23a,23b,23c,100); +endchar; % end "n" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{o} +% The letter `o'. +% \begin{macrocode} +cmchar "SQRC letter o"; +beginchar("o", 2sb#+hstretch*(17/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "o" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{p} +% The letter `p'. +% \begin{macrocode} +cmchar "SQRC letter p"; +beginchar("p", 2sb#+hstretch*(13/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1:= sqrcjut; +%% stem +lft x1=lft x2=pcshiftx+n1; +top y1=h; bot y2=0; +z12 = 1/2[z1,z2]; +%% bowl +lft x3 = pcshiftx; y3 = y1; +x7 = x12; top y7 = y12; +rt x5 = w-pcshiftx; y5 = 1/2[y3,y7]; +pth1 := z3--z1{right}..z5{down}..{left}z7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw pth1; +%%draw (x2-n1,y2)--(x2+n1,y2); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "p" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{q} +% The letter `q'. +% \begin{macrocode} +cmchar "SQRC letter q"; +beginchar("q", 2sb#+hstretch*(17/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% bowl +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +pth1 := z1..z4..z3..z2..cycle; +%% tail +n1 := rt x1 - lft x1; +pth2 := z1..z2..z3..z4; +z5 = directionpoint pdir of pth1; +x7 = x3 + 2n1; top y7 = -n1; +pth3 := z5{-ppdir}..{pdir}z7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +draw pth3; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{r} +% The letter `r'. +% \begin{macrocode} +cmchar "SQRC letter r"; +beginchar("r", 2sb#+hstretch*(15/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1:= sqrcjut; +n3 := sqrcjutrat*sqrcjut; +n2 := 11/15; %% P/R width ratio +%% stem +pickup thinquill; +lft x1=lft x2=pcshiftx+n1; +top y1=h; bot y2=0; +x2a = x2 + n3; y2a = y2; +x2b = x2; y2b = y2+n3; +z12 = 1/2[z1,z2]; +pickup quill; +%% bowl +lft x3 = pcshiftx; top y3 = h; x13 = x1; y13 = y3; +lft x7 = x12; top y7 = y12; +rt x5 = w*n2 - pcshiftx; y5 = 1/2[y3,y7]; +pth1 := z3--z13{right}..z5{down}..{left}z7; +%% leg +z21 = z7; +rt x23 = w-pcshiftx; bot y23 = 0; +pth2 := z21{-ppdir}..{right}z23; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw pth2; +pickup thinquill; +draw z1--z2; +filldraw z2--z2a{left}..{up}z2b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "r" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{s} +% The letter `s'. +% \begin{macrocode} +cmchar "SQRC letter s"; +beginchar("s", 2sb#+hstretch*(15/18x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +x1 = x3 = x5 = 1/2w; +top y1 = h; bot y5 = 0; y3 = 1/2[y1,y5]; +lft x2 = pcshiftx; rt x4 = w-pcshiftx; +y2 = 1/2[y1,y3]; y4 = 1/2[y3,y5]; +rt x101 = w-pcshiftx; top y101 = y1; +lft x102 = pcshiftx; bot y102 = y5; +pth1 := z101..z1..z2..z3..z4..z5..z102; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100); +endchar; % end "s" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{t} +% The letter `t'. +% \begin{macrocode} +cmchar "SQRC letter t"; +beginchar("t", 2sb#+hstretch*(10/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% bar +lft x1 = pcshiftx; rt x2=w-pcshiftx; +top y1 = top y2 = h; +pth1 := z1{pdir}..{pdir}z2; +%% stem +z3 = 1/2[z1,z2]; +x4 = x3; bot y4 = 0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; % bar +draw z3--z4; % stem +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "t" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{u} +% The letter `u'. +% \begin{macrocode} +cmchar "SQRC letter u"; +beginchar("u", 2sb#+hstretch*(15/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +%% left stem +lft x1 = pcshiftx + n1; top y1 = h; +% start of bowl +lft x13=pcshiftx; y13=1/3h; +% right stem +rt x3=w-pcshiftx-n1; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +pth1 := z1..z13{down}..z14{right}..{pdir}z33; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +draw (x1-n1,y1)--(x1,y1); +draw z3--z4; +draw (x3-n1,y3)--(x3,y3); +draw (x4,y4)--(x4+n1,y4); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "u" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{v} +% The letter `v'. +% \begin{macrocode} +cmchar "SQRC letter v"; +beginchar("v", 2sb#+hstretch*(13/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% stem tops +lft x1 = pcshiftx + n1; top y1 = h; +pickup thinquill; +rt x3 = w - pcshiftx; top y3 = h; +x3a = x3-n2; y3a=y3; +x3b = x3; y3b = y3-n2; +pickup quill; +%% bottom +x13 = 10/16[x1,x3]; bot y13 = 0; +x83 = rt x13; y83 = top y13; +pth1 := z1{down}..z13; +pth2 := z3{down}..z83; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +draw (x1-n1,y1)--(x1,y1); + +pickup thinquill; +draw pth2; +filldraw z3--z3a{right}..{down}z3b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "v" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{w} +% The letter `w'. This is a modern version as the font did not have a w. +% \begin{macrocode} +cmchar "SQRC letter w"; +beginchar("w", 2sb#+hstretch*(22/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% thick leg tops +lft x1 = pcshiftx + n1; top y1 = h; +x3 = 1/2w; y3 = y1; +%% thin leg top +pickup thinquill; +rt x5 = w-pcshiftx; top y5 = h; +x5a = x5-n2; y5a = y5; +x5b = x5; y5b = y5-n2; +pickup quill; +%% V bottoms +x13 = 1/2[x1,x3]; bot y13 = 0; +x35 = 1/2[x3,x5]; bot y35 = 0; +pth113 := z1{down}..z13; +pth335 := z3{down}..z35; +x83 = x3; y83 = top y3; +x813 = rt x13; y813 = bot y13; +x835 = rt x35; y835 = bot y35; +%% thin legs +pickup thinquill; +rt x113 = x813; bot y113 = y813; +rt x135 = x835; bot y135 = y835; +%%ductus:=true; +if ductus: + pickup stylus; +fi +pickup quill; +draw pth113; draw pth335; draw (x1-n1,y1)--(x1,y1); +pickup thinquill; +draw z113..{up}z3; draw z135..{up}z5; +filldraw z5--z5a{right}..{down}z5b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "w" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{x} +% The letter `x'. +% \begin{macrocode} +cmchar "SQRC letter x"; +beginchar("x", 2sb#+hstretch*(17/13x_height#), + x_height#, 0); +adjust_fit(0,0); +path pth[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% diag top left to bottom right +lft x1=pcshiftx+n1; top y1 = h; +rt x2 = w - pcshiftx - n1; bot y2 = 0; +%% diag top right to bottom left +pickup thinquill; +rt x3 = w - pcshiftx - n1; top y3 = h; +lft x4 = pcshiftx; bot y4 = 0; +x3a = x3-n2; x3b = x3+n1; y3a = y3b = y3; +y3c = y3-n2; z3c = whatever[z3,z4]; +x4a = x4+n2; y4a = y4; +y4b = y4+n2; z4b = whatever[z4,z3]; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw (x1-n1,y1)--(x1,y1); +draw (x2,y2)--(x2+n1,y2); +pickup thinquill; +draw z3--z4; +filldraw z3--z3a{right}..{z4-z3}z3c{z3-z4}..{right}z3b--cycle; +filldraw z4--z4a{left}..{z3-z4}z4b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,150,60,160,100); +endchar; % end "x" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{y} +% The letter `y'. +% \begin{macrocode} +cmchar "SQRC letter y"; +beginchar("y", 2sb#+hstretch*(13/13x_height#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% upright +x5 = 1/2w; y5 = 1/2h; +x6 = x5; bot y6 = 0; +%% left stem top +lft x1 = pcshiftx + n1; top y1 = h; +%% right stem +x85 = rt x5; y85 = top y5; +pickup thinquill; +rt x3=w-pcshiftx; top y3 = h; +x4=x85; y4 = y85; +x3a=x3-n2; y3a = y3; +y3b = y3-n2; z3b = whatever[z3,z4]; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5--z6; draw (x6-n1,y6)--(x6+n1,y6); % stem +draw z1--z5; draw (x1-n1,y1)--(x1,y1); % left arm +pickup thinquill; +draw z3--z4; +filldraw z3--z3a{right}..{z4-z3}z3b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{z} +% The letter `z'. +% \begin{macrocode} +cmchar "SQRC letter z"; +beginchar("z", 2sb#+hstretch*(13/13x_height#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +n1 := sqrcjutrat*sqrcjut; +path pth[]; +pcshiftx := sb; +pickup quill; +%% top bar ends +lft x1 = pcshiftx; rt x2 = w -pcshiftx; top y1 = top y2 = h; +x101 = lft x1; y101 = top y1; +%% bottom bar ends +lft x3 = pcshiftx; rt x4 = w -pcshiftx; bot y3 = bot y4 = 0; +x104 = rt x4; y104 = bot y4; +pickup stylus; +lft x11 = x101; top y11 = y101; +x12 = x11; y12 = y11-n1; +x13 = x11+n1; y13 = y11; +rt x14 = x104; bot y14 = y104; +x15 = x14; y15 = y14 + n1; +x16 = x14 - n1; y16 = y14; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; +draw z2--z3; +pickup stylus; +filldraw z11--z12{up}..{right}z13--cycle; +filldraw z14--z15{down}..{left}z16--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,14,14,16,20o,20i,100); +endchar; % end "z" + +% \end{macrocode} +% \end{routine} +% +% +% +% The end of this file +% \begin{macrocode} +%</min> +% \end{macrocode} +% +% +% +% \subsection{The code for capital letters} +% +% \thisfont{} `capitals' were drawn with the same pen as for the `lower case', +% and the letters were merely larger versions. +% +% \begin{macrocode} +%<*maj> +% SQRCU.MF Program file for Square Capitals `upper case'. +% + +% \end{macrocode} +% +% +% \begin{routine}{A} +% The letter `A'. +% \begin{macrocode} +cmchar "SQRC letter A"; +beginchar("A", 2sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% legs +x1 = 6/16w; top y1=h; +rt x3 = w-pcshiftx - n1; bot y3= 0; +pickup thinquill; +lft x2 = pcshiftx; bot y2 = 0; +x21 = x2 + n2; y21 = y2; +y22 = y21+n2; z22 = whatever[z2,z1]; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z3; draw (x1-n1,y1)--(x1,y1); draw (x3,y3)--(x3+n1,y3); %% right leg +pickup thinquill; +draw z1--z2; %% left leg +filldraw z2--z21{left}..{z1-z2}z22--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +endchar; % end "A" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{B} +% The letter `B'. +% \begin{macrocode} +cmchar "SQRC letter B"; +beginchar("B", 2sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := sqrcjut; +%% stem +lft x1 = pcshiftx + n1; top y1 = h; +x2 = x1; bot y2 = 0; +z12 = 1/2[z1,z2]; +%% bottom bowl +lft x21 = pcshiftx; bot y21 = 0; +z22=z2; +lft x27 = rt x12; y27 = y12; +rt x25 = w-pcshiftx; y25 = 1/2[y22,y27]; +pth1 := z21--z22{right}..z25{up}..{left}z27; +%% top bowl +z32 = z27; z37 = z1; +x38 = x21; y38 = y37; +rt x35 = x25; y35 = 1/2[y32,y37]; +pth2 := z38--z37{right}..z35{down}..{left}z27; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw pth1; draw pth2; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "B" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{C} +% The letter `C'. +% \begin{macrocode} +cmchar "SQRC letter C"; +beginchar("C", 2sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z24..z1{left}..z2{down}..z3{right}..z4{3pdir}; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "C" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{D} +% The letter `D'. +% \begin{macrocode} +cmchar "SQRC letter D"; +beginchar("D", 2sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +x100 = 0; n1 := rt x100 - lft x100; +%% stem +lft x1 = pcshiftx+sqrcjut; top y1=h; +x2 = x1; bot y2 = 0; +%% bowl +lft x3 = pcshiftx; y3 = y1; +z7 = (x3,y2); +rt x5 = w-pcshiftx; y5 = 1/2[y3,y7]; +pth1 := z3--z1{right}..{down}z5..{left}z2--z7; +if ductus: + pickup stylus; +fi +draw z1--z2; %% stem +draw pth1; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "D" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{E} +% The letter `E'. +% \begin{macrocode} +cmchar "SQRC letter E"; +beginchar("E", sb#+caprat*hstretch*(9/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 = rt x100 - lft x100; +%% stem +lft x1 = pcshiftx+sqrcjut; top y1 = h; +x2 = x1; bot y2=0; +%% bars +lft x3 = pcshiftx; y3 = y1; rt x4 = w-pcshiftx; y4=y3; +x5=x1; y5 = 6/16[y1,y2]; x6 = x4; y6 = y5; +x7 = x3; y7 = y2; x8 = x4; y8=y7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw z3--z4; draw z5--z6; draw z7--z8; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,17,70,100); +endchar; % end "E" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{F} +% The letter `F'. +% \begin{macrocode} +cmchar "SQRC letter F"; +beginchar("F", 2sb#+caprat*hstretch*(9/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +%% stem +lft x1=lft x2=pcshiftx+sqrcjut; bot y1=h; bot y2=0; +%% bars +lft x3 = pcshiftx; y3 = y1; rt x4 = w-pcshiftx; y4 = y3; +x5=x1; y5 = 6/16[y1,y2]; x6 = x4; y6 = y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw z3--z4; draw z5--z6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,14,15,16,100); +endchar; % end "F" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{G} +% The letter `G'. +% \begin{macrocode} +cmchar "SQRC letter G"; +beginchar("G", 2sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +path pth[]; +pair vec[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := sqrcjut; +%% bar +rt x52 = w - pcshiftx; y52 = 1/2h; +x51 = x52 - 2n1; y51 = y52; +z512 = 1/2[z51,z52]; +x54=x512; bot y54 = 0; +%% bowl +lft x2 = pcshiftx; y2 = 1/2h; +x4 = x512; y4 = 1/4h; +x3 = x1 = 1/2[x2,x4]; bot y3 = 0; top y1 = h; +x24 = x512; y24 = 3/4h; +pth1 := z24..z1{left}..z2{down}..z3{right}..z4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +%%draw z4--z512; draw z51--z52; +draw z512--z54; draw (x512-n1,y512)--(x512,y512); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,12,13,24,31,32,33,34,35,36,51,52,512,100); +endchar; % end "G" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{H} +% The letter `H'. +% \begin{macrocode} +cmchar "SQRC letter H"; +beginchar("H", 2sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +x100 = 0; +n1 := sqrcjut; +%% stems +lft x1=lft x2=pcshiftx+sqrcjut; +top y1=h; bot y2=0; +rt x3 = w - pcshiftx - sqrcjut; x4 = x3; y3 = y1; y4 = y2; +%% bar +z12 = 7/16[z1,z2]; z34 = 7/16[z3,z4]; +% serifs +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; draw z12--z34; +%% serifs +draw (x1-n1,y1)--(x1,y1); draw (x2,y2)--(x2+n1,y2); +draw (x3-n1,y3)--(x3,y3); draw (x4,y4)--(x4+n1,y4); +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "H" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{I} +% The letter `I'. +% \begin{macrocode} +cmchar "SQRC letter I"; +beginchar("I", 2sb#+caprat*hstretch*(thick#+2sqrcjut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +x1 = x2 = 1/2w; +top y1=h; bot y2=0; +%% serifs +lft x111 = pcshiftx; rt x112 = w-pcshiftx; +x211 = x111; x212 = x112; +draw z1--z2; +%% serifs +draw (x111,y1)--(x112,y1); +draw (x211,y2)--(x212,y2); +ductus:=false; +penlabels(1,2,100); +endchar; % end "I" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{J} +% The letter `J'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "SQRC letter J"; +beginchar("J", 2sb#+caprat*hstretch*(2thick#+sqrcjut#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +%% stem +rt x1 = w-pcshiftx; top y1 = h; +x2 = x1; y2 = 1/4h; +%% hook +lft x4 = pcshiftx; bot y4 = 0; +pth1 := z4{pdir}..z2{up}; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2{down}..{-pdir}z4; % stem & hook +draw (x1-n1,y1)--z1; +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "J" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{K} +% The letter `K'. +% \begin{macrocode} +cmchar "SQRC letter K"; +beginchar("K", 2sb#+caprat*hstretch*(16/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +%% stem +lft x1 = pcshiftx+n1; top y1 = h; +x2 = x1; bot y2 = 0; +z12 = 1/2[z1,z2]; +%% top arm +x3 = rt x12; y3 = y12; +x5 = 1/2[w - pcshiftx, x1]; y5 = y1; +%%pth1 := z3{pdir}..{up}z5; +pth1 := z3--z5; +%% lower arm +z7 = z3; +rt x9 = w-pcshiftx; bot y9 = 0; +pth2 := z7{-ppdir}..{right}z9; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw pth1; draw pth2; +draw (x1-n1,y1)--(x1,y1); +draw (x2-n1,y2)--(x2+n1,y2); +draw (x5,y5)--(x5+n1,y5); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,100); +endchar; % end "K" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{L} +% The letter `L'. +% \begin{macrocode} +cmchar "SQRC letter L"; +beginchar("L", 2sb#+caprat*hstretch*(9/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +lft x1=pcshiftx+n1; bot y1=h; +x2=x1; bot y2 =0; +x3 = x2; rt x4 = w-pcshiftx; y3 = y4 = y2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; +draw (x1-n1,y1)--(x1,y1); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "L" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{M} +% The letter `M'. +% \begin{macrocode} +cmchar "SQRC letter M"; +beginchar("M", 2sb#+caprat*hstretch*(19/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% thick stem tops +lft x1=pcshiftx+n1; top y1=h; +rt x3 = w - pcshiftx -2n1; y3 = y1; +%% right stem bottom +rt x4 = w - pcshiftx - n1; bot y4 = 0; +%% the V +x24 = 1/2w; bot y24 = 0; +%% left stem top and bottom +x81 = lft x1; y81 = top y1; +pickup thinquill; +lft x11 = x81; top y11 = y81; +lft x2 = pcshiftx; bot y2 = 0; +x2a = x2+n2; y2a = y2; +y2b = y2+n2; z2b = whatever[z2,z11]; +pickup quill; +%% thin middle top and bottom +x83 = lft x3; y83 = top y3; +x824 = rt x24; y824 = bot y24; +pickup thinquill; +lft x13 = x83; top y13 = y83; +rt x124 = x824; bot y124 = y824; +pickup quill; +pth124 := z1{-ppdir}..z24; +pth34 := z3{down}..z4; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%% thick legs +draw pth124; draw pth34; +draw (x1-n1,y1)--(x1,y1); draw (x3-n1,y3)--(x3,y3); draw (x4,y4)--(x4+n1,y4); +%% thin legs +pickup thinquill; +draw z11--z2; +filldraw z2--z2a{left}..{z11-z2}z2b--cycle; +%%%%pickup quarterquill; + draw z13--z124; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100); +endchar; % end "M" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{N} +% The letter `N'. +% \begin{macrocode} +cmchar "SQRC letter N"; +beginchar("N", 2sb#+caprat*hstretch*(14/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% diagonal +lft x1=pcshiftx+n1; top y1=h; +rt x4 = w -pcshiftx-n1; bot y4 = 0; +x101 = lft x1; +x104 = rt x4; +pth1 := z1{-ppdir}..z4; +%% stems +pickup thinquill; +lft x21 = x101; top y21 =h; +x22 = x21; bot y22 = 0; +x22a = x22+n2; y22a=y22; +x22b = x22; y22b=y22+n2; +rt x24 = x104; bot y24 = 0; +x23 = x24; top y23 = h; +x23a = x23-n2; x23b = x23+n1; y23a = y23b = y23; +x23c = x23; y23c = y23-n2; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%% diagonal +draw pth1; draw (x1-n1,y1)--(x1,y1); +%% stems +pickup thinquill; +draw z21--z22; +filldraw z22--z22a{left}..{up}z22b--cycle; +draw z23--z24; +filldraw z23--z23a{right}..{down}z23c{up}..{right}z23b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,23,23a,23b,23c,100); +endchar; % end "N" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{O} +% The letter `O'. +% \begin{macrocode} +cmchar "SQRC letter O"; +beginchar("O", 2sb#+caprat*hstretch*(17/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "O" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{P} +% The letter `P'. +% \begin{macrocode} +cmchar "SQRC letter P"; +beginchar("P", 2sb#+caprat*hstretch*(13/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1:= sqrcjut; +%% stem +lft x1=lft x2=pcshiftx+n1; +top y1=h; bot y2=0; +z12 = 1/2[z1,z2]; +%% bowl +lft x3 = pcshiftx; y3 = y1; +x7 = x12; top y7 = y12; +rt x5 = w-pcshiftx; y5 = 1/2[y3,y7]; +pth1 := z3--z1{right}..z5{down}..{left}z7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw pth1; +%%draw (x2-n1,y2)--(x2+n1,y2); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "P" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Q} +% The letter `Q'. +% \begin{macrocode} +cmchar "SQRC letter Q"; +beginchar("Q", 2sb#+caprat*hstretch*(17/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% bowl +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +pth1 := z1..z4..z3..z2..cycle; +%% tail +n1 := rt x1 - lft x1; +pth2 := z1..z2..z3..z4; +z5 = directionpoint pdir of pth1; +x7 = x3 + 2n1; top y7 = -n1; +pth3 := z5{-ppdir}..{pdir}z7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +draw pth3; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "Q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{R} +% The letter `R'. +% \begin{macrocode} +cmchar "SQRC letter R"; +beginchar("R", 2sb#+caprat*hstretch*(15/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1:= sqrcjut; +n3 := sqrcjutrat*sqrcjut; +n2 := 11/15; %% P/R width ratio +%% stem +pickup thinquill; +lft x1=lft x2=pcshiftx+n1; +top y1=h; bot y2=0; +x2a = x2 + n3; y2a = y2; +x2b = x2; y2b = y2+n3; +z12 = 1/2[z1,z2]; +pickup quill; +%% bowl +lft x3 = pcshiftx; top y3 = h; x13 = x1; y13 = y3; +lft x7 = x12; top y7 = y12; +rt x5 = w*n2 - pcshiftx; y5 = 1/2[y3,y7]; +pth1 := z3--z13{right}..z5{down}..{left}z7; +%% leg +z21 = z7; +rt x23 = w-pcshiftx; bot y23 = 0; +pth2 := z21{-ppdir}..{right}z23; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw pth2; +pickup thinquill; +draw z1--z2; +filldraw z2--z2a{left}..{up}z2b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "R" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{S} +% The letter `S'. +% \begin{macrocode} +cmchar "SQRC letter S"; +beginchar("S", 2sb#+caprat*hstretch*(15/18x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +path pth[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := rt x100 - lft x100; +x1 = x3 = x5 = 1/2w; +top y1 = h; bot y5 = 0; y3 = 1/2[y1,y5]; +lft x2 = pcshiftx; rt x4 = w-pcshiftx; +y2 = 1/2[y1,y3]; y4 = 1/2[y3,y5]; +rt x101 = w-pcshiftx; top y101 = y1; +lft x102 = pcshiftx; bot y102 = y5; +pth1 := z101..z1..z2..z3..z4..z5..z102; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100); +endchar; % end "S" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{T} +% The letter `T'. +% \begin{macrocode} +cmchar "SQRC letter T"; +beginchar("T", 2sb#+caprat*hstretch*(10/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% bar +lft x1 = pcshiftx; rt x2=w-pcshiftx; +top y1 = top y2 = h; +pth1 := z1{pdir}..{pdir}z2; +%% stem +z3 = 1/2[z1,z2]; +x4 = x3; bot y4 = 0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; % bar +draw z3--z4; % stem +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "T" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{U} +% The letter `U'. +% \begin{macrocode} +cmchar "SQRC letter U"; +beginchar("U", 2sb#+caprat*hstretch*(15/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +%% left stem +lft x1 = pcshiftx + n1; top y1 = h; +% start of bowl +lft x13=pcshiftx; y13=1/3h; +% right stem +rt x3=w-pcshiftx-n1; y3=y1; +x4=x3; bot y4=0; +z33=1/4[z4,z3]; % start of bowl +% middle of bowl +x14=1/3[x1,x3]; bot y14=0; +pth1 := z1..z13{down}..z14{right}..{pdir}z33; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +draw (x1-n1,y1)--(x1,y1); +draw z3--z4; +draw (x3-n1,y3)--(x3,y3); +draw (x4,y4)--(x4+n1,y4); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "U" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{V} +% The letter `V'. +% \begin{macrocode} +cmchar "SQRC letter V"; +beginchar("V", 2sb#+caprat*hstretch*(13/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% stem tops +lft x1 = pcshiftx + n1; top y1 = h; +pickup thinquill; +rt x3 = w - pcshiftx; top y3 = h; +x3a = x3-n2; y3a=y3; +x3b = x3; y3b = y3-n2; +pickup quill; +%% bottom +x13 = 10/16[x1,x3]; bot y13 = 0; +x83 = rt x13; y83 = top y13; +pth1 := z1{down}..z13; +pth2 := z3{down}..z83; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +draw (x1-n1,y1)--(x1,y1); + +pickup thinquill; +draw pth2; +filldraw z3--z3a{right}..{down}z3b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "V" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{W} +% The letter `W'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "SQRC letter W"; +beginchar("W", 2sb#+caprat*hstretch*(22/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% thick leg tops +lft x1 = pcshiftx + n1; top y1 = h; +x3 = 1/2w; y3 = y1; +%% thin leg top +pickup thinquill; +rt x5 = w-pcshiftx; top y5 = h; +x5a = x5-n2; y5a = y5; +x5b = x5; y5b = y5-n2; +pickup quill; +%% V bottoms +x13 = 1/2[x1,x3]; bot y13 = 0; +x35 = 1/2[x3,x5]; bot y35 = 0; +pth113 := z1{down}..z13; +pth335 := z3{down}..z35; +x83 = x3; y83 = top y3; +x813 = rt x13; y813 = bot y13; +x835 = rt x35; y835 = bot y35; +%% thin legs +pickup thinquill; +rt x113 = x813; bot y113 = y813; +rt x135 = x835; bot y135 = y835; +%%ductus:=true; +if ductus: + pickup stylus; +fi +pickup quill; +draw pth113; draw pth335; draw (x1-n1,y1)--(x1,y1); +pickup thinquill; +draw z113..{up}z3; draw z135..{up}z5; +filldraw z5--z5a{right}..{down}z5b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "W" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{X} +% The letter `X'. +% \begin{macrocode} +cmchar "SQRC letter X"; +beginchar("X", 2sb#+caprat*hstretch*(17/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +path pth[]; +numeric n[]; +pcshiftx := sb; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% diag top left to bottom right +lft x1=pcshiftx+n1; top y1 = h; +rt x2 = w - pcshiftx - n1; bot y2 = 0; +%% diag top right to bottom left +pickup thinquill; +rt x3 = w - pcshiftx - n1; top y3 = h; +lft x4 = pcshiftx; bot y4 = 0; +x3a = x3-n2; x3b = x3+n1; y3a = y3b = y3; +y3c = y3-n2; z3c = whatever[z3,z4]; +x4a = x4+n2; y4a = y4; +y4b = y4+n2; z4b = whatever[z4,z3]; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; +draw (x1-n1,y1)--(x1,y1); +draw (x2,y2)--(x2+n1,y2); +pickup thinquill; +draw z3--z4; +filldraw z3--z3a{right}..{z4-z3}z3c{z3-z4}..{right}z3b--cycle; +filldraw z4--z4a{left}..{z3-z4}z4b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,150,60,160,100); +endchar; % end "X" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Y} +% The letter `Y'. +% \begin{macrocode} +cmchar "SQRC letter Y"; +beginchar("Y", 2sb#+caprat*hstretch*(13/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +pickup quill; +x100 = 0; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +%% upright +x5 = 1/2w; y5 = 1/2h; +x6 = x5; bot y6 = 0; +%% left stem top +lft x1 = pcshiftx + n1; top y1 = h; +%% right stem +x85 = rt x5; y85 = top y5; +pickup thinquill; +rt x3=w-pcshiftx; top y3 = h; +x4=x85; y4 = y85; +x3a=x3-n2; y3a = y3; +y3b = y3-n2; z3b = whatever[z3,z4]; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5--z6; draw (x6-n1,y6)--(x6+n1,y6); % stem +draw z1--z5; draw (x1-n1,y1)--(x1,y1); % left arm +pickup thinquill; +draw z3--z4; +filldraw z3--z3a{right}..{z4-z3}z3b--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "Y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{Z} +% The letter `Z'. +% \begin{macrocode} +cmchar "SQRC letter Z"; +beginchar("Z", 2sb#+caprat*hstretch*(13/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +n1 := sqrcjutrat*sqrcjut; +path pth[]; +pcshiftx := sb; +pickup quill; +%% top bar ends +lft x1 = pcshiftx; rt x2 = w -pcshiftx; top y1 = top y2 = h; +x101 = lft x1; y101 = top y1; +%% bottom bar ends +lft x3 = pcshiftx; rt x4 = w -pcshiftx; bot y3 = bot y4 = 0; +x104 = rt x4; y104 = bot y4; +pickup stylus; +lft x11 = x101; top y11 = y101; +x12 = x11; y12 = y11-n1; +x13 = x11+n1; y13 = y11; +rt x14 = x104; bot y14 = y104; +x15 = x14; y15 = y14 + n1; +x16 = x14 - n1; y16 = y14; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; draw z3--z4; +draw z2--z3; +pickup stylus; +filldraw z11--z12{up}..{right}z13--cycle; +filldraw z14--z15{down}..{left}z16--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,14,14,16,20o,20i,100); +endchar; % end "Z" + +% \end{macrocode} +% \end{routine} +% +% +% +% The end of this file +% \begin{macrocode} +%</maj> +% \end{macrocode} +% +% +% +% \subsection{The punctuation file} +% +% The main punctuation marks are defined in this file. +% +% \begin{macrocode} +%<*punct> +% IMINPUNCT.MF This file contains punctuation marks + +% \end{macrocode} +% +% +% \begin{routine}{!} +% The `!' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Exclamation mark"; +beginchar("!", 2sb#+hstretch*(thick#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +x1=w/2; top y1 = h; +z3=(x1, 1/2dot_size); +z2=(x1, y3+3/2dot_size); +draw z1--z2; +draw_pdot(3,dot_size); +penlabels(1,2,3); + +endchar; % end of "!" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{?} +% The `?' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Question mark"; +beginchar("?", 2sb#+hstretch*(13/13x_height#), + 11/10x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-2pcshiftx; % actual character width +n2 := 1/3h; % height of top bowl +n3 := n2; % height of bottom bowl +z5=(1/2w,1/2dot_size); +x4 = x5; y4=y5+3/2dot_size; +lft x1 = pcshiftx; y1 = 3/4h; +x2 = 1/2w; top y2 = h; +rt x3 = w-pcshiftx; y3 = 2/3h; + +%%ductus:= true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{down}..z4{down}; +draw_pdot(5, dot_size); +penlabels(1,2,3,4,5); +endchar; % end of "?" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{,} +% The `,' character. +% \begin{macrocode} + +cmchar "Comma"; +beginchar(",",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=1/2dot_size; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "," + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{.} +% The `.' character. +% \begin{macrocode} + +cmchar "Period"; +beginchar(".",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +z1=(w/2, 1/2dot_size); +draw_pdot(1,dot_size); +penlabels(1); +endchar; % end of "." + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{:} +% The `:' character. +% \begin{macrocode} + +cmchar "Colon"; +beginchar(":",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +x1=x2=w/2; y1=2/3h; y2=1/2dot_size; +draw_pdot(1,dot_size); +draw_pdot(2,dot_size); +penlabels(1,2); +endchar; % end ":" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{;} +% The `;' character. +% \begin{macrocode} + +cmchar "Semicolon"; +beginchar(";",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=2/3h; y2=1/2dot_size; +draw_pdot(1,dot_size); +draw_pcomma(2,dot_size,comma_width); +penlabels(1,2); +endchar; % end of ";" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{'} +% The `'' character. +% \begin{macrocode} + +cmchar "Apostrophe"; +beginchar("'",2sb#+hstretch*(comma_width#+dot_size#),7/8asc_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "'" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{`} +% The ``' character. +% \begin{macrocode} + +cmchar "Reverse apostrophe"; +beginchar("`",2sb#+hstretch*(comma_width#+dot_size#),7/8asc_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=h; +draw_plq(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "`" + +% \end{macrocode} +% \end{routine} +% +% The end of this file. +% \begin{macrocode} +%</punct> +% \end{macrocode} +% +% +% \subsection{The ligatures and dashes file} +% +% The ligatured letters, punctuation marks and dashes are defined in this file. +% \begin{macrocode} +%<*lig> +% SQRCLIG.MF Uncial ligatured letters, punctation and dashes + +% \end{macrocode} +% First the ligtables. +% \begin{macrocode} + +ligtable "`": "`"=:oct"134"; +ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#; + +ligtable "-": "-"=:oct"173"; +ligtable oct"173": "-"=:oct"174"; + + +% \end{macrocode} +% +% +% \begin{routine}{''} +% The `''' ligature. +% \begin{macrocode} + +cmchar "Closing quotes"; +beginchar(oct"042",2sb#+hstretch*(comma_width#+3dot_size#),7/8asc_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h; +x2=x1-(2hstretch*dot_size); +draw_pcomma(1,dot_size,comma_width); % right +draw_pcomma(2,dot_size,comma_width); % left +penlabels(1,2); +endchar; % end of "''" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{``} +% The ```' ligature. +% \begin{macrocode} + +cmchar "Opening quotes"; +beginchar(oct"134",2sb#+hstretch*(comma_width#+3dot_size#),7/8asc_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h; +x2=x1+(2hstretch*dot_size); +draw_plq(1,dot_size,comma_width); % left +draw_plq(2,dot_size,comma_width); % right +penlabels(1,2); +endchar; % end of "``" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{-} +% The `-' (hyphen) character. +% \begin{macrocode} + +cmchar "Hyphen"; +beginchar("-",sb#+hstretch*(8/13x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +pickup threequarterquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +z31 = z21 shifted (-jut*pdir); +draw z21--z22; +%draw_flatserif(21,22,srad); +draw z31--z21; +draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "-" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{--} +% The `--' (en-dash) ligature. +% \begin{macrocode} + +cmchar "En dash"; +beginchar(oct"173",sb#+hstretch*(10/13x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +pickup threequarterquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +z31 = z21 shifted (-jut*pdir); +draw z21--z22; +%%draw_roundserif(21,22,srad); +draw z31--z21; +draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "--" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{---} +% The `---' (em dash) ligature. The em dash is twice the width of the en dash. +% \begin{macrocode} + +cmchar "Em dash"; +beginchar(oct"174",sb#+hstretch*(20/13x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +numeric alpha; alpha:=w/8; +pickup threequarterquill; +lft x21=pcshiftx+jut; rt x22=w-pcshiftx-jut; y21=y22=1/2h; +z31 = z21 shifted (-jut*pdir); +draw z21--z22; +%%draw_roundserif(21,22,srad); +draw z31--z21; +draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "---" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{&} +% The ampersand, but there wasn't one. +% \begin{macrocode} + +cmchar "SQRC ampersand"; +beginchar("&", sb#+caprat*hstretch*(18/13x_height#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +x100 = 0; +n1 = sqrcjut; +%%%% The E +%% stem +lft x1 = pcshiftx+n1; top y1 = h; +x2 = x1; bot y2=0; +%% bars +lft x3 = pcshiftx; y3 = y1; rt x4 = 9/20w-pcshiftx; y4=y3; +x5=x1; y5 = 6/16[y1,y2]; x6 = x4; y6 = y5; +x7 = x3; y7 = y2; x8 = x4; y8=y7; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % stem +draw z3--z4; draw z5--z6; draw z7--z8; +ductus:=false; +%%%%%%%%% The T + +%% bar +lft x11 = rt x4 + 2pcshiftx; rt x12=w-pcshiftx; +top y11 = top y12 = h; +pth1 := z11{pdir}..{pdir}z12; +%% stem +z13 = 1/2[z11,z12]; +x14 = x13; bot y14 = 0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; % bar +draw z13--z14; % stem +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,12,13,14,17,70,100); +%%% end T +endchar; % end "&" + + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</lig> +% \end{macrocode} +% +% \subsection{The digits file} +% +% These are arabic digits in the style of the book-hand. They are a +% modern invention. +% +% \begin{macrocode} +%<*dig> +% SQRCDIG.MF Program file for Square Capitals digits +% + +% \end{macrocode} +% +% +% +% \begin{routine}{1} +% The digit `1'. +% \begin{macrocode} +cmchar "SQRC digit 1"; +beginchar("1", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric n[]; +n1 := sqrcjut; +pickup quill; +x1=x2=w/2; +top y1=h; bot y2=0; +%%ductus:=true; +draw z1--z2; +draw (x1-n1,y1)--(x1,y1); +draw (x2,y2)--(x2+n1,y2); +ductus:=false; +penlabels(1,2,100); +endchar; % end "1" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{2} +% The digit `2'. +% \begin{macrocode} +cmchar "SQRC digit 2"; +beginchar("2", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +numeric n[]; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +pcshiftx := u; +pickup quill; +% stem +lft x1=pcshiftx+o; top y1=h-2thin; +x2=1/2w; top y2= h+o; +rt x3=w-pcshiftx-o; y3=3/4h; +% foot +lft x5=pcshiftx; bot y5=0; +rt x6=w-pcshiftx; y6=y5; +x6a = rt x6; y6a = y6; +x6b = x6a; y6b = y6a+n2; +x6c = x6a-n2; y6c=y6a; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{down}..{-pdir}z5; % curve +draw z5--z6; % foot +pickup stylus; +filldraw z6a--z6b{down}..{left}z6c--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "2" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{3} +% The digit `3'. +% \begin{macrocode} +cmchar "SQRC digit 3"; +beginchar("3", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% x values +lft x3=pcshiftx; x10=x3; +rt x5=w-pcshiftx; x8=x5-3thin; +x4=0.5[x3,x5]; +x9=0.5[x10,x8]; +%%lft x6=pcshiftx+3thin; x7=x6; +x6=1/2[x3,x9]; x7=x6; +% y values +bot y3=thin; top y10=h-2thin; +y6=0.5[y3,y10]; y7=y6; +bot y4=-thin; top y9=h+thin; +y5=0.5[y3,y6]; +y8=11/12[y7,y10]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw z3..z4{right}..z5{up}...{-pdir}z6; % bottom bowl +%%draw z7{pdir}..z8{up}..z9{left}..z10; % top bowl +draw z3..z4{right}..z5{up}...{left}z6; % bottom bowl +draw z7{right}..z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "3" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{4} +% The digit `4'. +% \begin{macrocode} +cmchar "SQRC digit 4"; +beginchar("4", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric n[]; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +pickup quill; +% the stem +rt x1= rt x2= w-pcshiftx-n1; +top y1=h; bot y2=0; +% the crossbar +lft x3=pcshiftx; y3=0.33h; +rt x4=w-pcshiftx; y4=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % vertical +draw (x2,y2)--(x2+n1,y2); +draw z3--z4; % horizontal +draw z1--z3; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "4" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{5} +% The digit `5'. +% \begin{macrocode} +cmchar "SQRC digit 5"; +beginchar("5", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric n[]; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +pickup quill; +% for the top +rt x1=w-pcshiftx; top y1=h; +lft x2=pcshiftx; y2=y1; +% the S curve +x3=x2; y3=0.5h+thin; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +rt x5=w-pcshiftx; y5=0.3h; +x6=w/2; bot y6=0; +lft x7=pcshiftx; bot y7=2thin; +x1a = rt x1; y1a = y1c = y1; +x1b = x1a; y1b = y1a-n2; +x1c = x1a-n2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % horizontal +draw z2--z3; % vertical +draw z3{pdir}..z5{down}..z6{left}..z7; % curve +pickup stylus; +%%filldraw z1a--z1b{up}..{left}z1c--cycle; +filldraw z1a--z1c{right}..{down}z1b--cycle; +ductus:=false; +penlabels(1,1a,1b,1c,2,3,4,5,6,7,100); +endchar; % end "5" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{6} +% The digit `6'. +% \begin{macrocode} +cmchar "SQRC digit 6"; +beginchar("6", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx; top y1=h-2thin; +x2=1/2w; top y2= h; +lft x3=pcshiftx; y3=1/2h; +x4=x2; bot y4=0; +rt x5=w-pcshiftx; y5=1/4h; +lft x6=rt x3; bot y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{left}..z3{down}..z4{right}..z5{up}..{-pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "6" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{7} +% The digit `7'. +% \begin{macrocode} +cmchar "SQRC digit 7"; +beginchar("7", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric n[]; +n1 := sqrcjut; +n2 := sqrcjutrat*sqrcjut; +pickup quill; +% top bar +lft x1=pcshiftx; +rt x2=w-pcshiftx; +top y1=top y2=h; +x1a = lft x1; y1a = y1c = y1; +x1b = x1a; y1b = y1a-n2; +x1c = x1a + n2; +% bowed leg +x4=w/2; bot y4=0; +x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1--z2; % top bar +draw z2..z3..z4; +pickup stylus; +filldraw z1a--z1b{up}..{right}z1c--cycle; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "7" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{8} +% The digit `8'. +% \begin{macrocode} +cmchar "SQRC digit 8"; +beginchar("8", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=1; +pickup quill; +lft x1=alpha*pcshiftx+o; rt x3=w-alpha*pcshiftx-o; y1=y3=3/4h; +x2=x4=w/2; top y2=h+o; bot y4=-o; +x5=x2; y5=h/2+2o; +lft x11=pcshiftx; rt x13=w-pcshiftx; y11=y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z5..z11..z4..z13..z5..cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,100); +endchar; % end "8" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{9} +% The digit `9'. +% \begin{macrocode} +cmchar "SQRC digit 9"; +beginchar("9", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; bot y1=2thin; +x2=1/2w; bot y2= 0; +rt x3=w-pcshiftx; y3=1/2h; +x4=x2; top y4=h; +lft x5=pcshiftx; y5=3/4h; +rt x6=lft x3; top y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{up}..z4{left}..z5{down}..{pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "9" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{0} +% The digit `0'. +% \begin{macrocode} +cmchar "SQRC digit 0"; +beginchar("0", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "0" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</dig> +% \end{macrocode} +% +% +% \section{The font definition files} \label{sec:fd} +% +% The font comes in normal and bold weights only. +% +% \begin{macrocode} +%<*fdot1> +\DeclareFontFamily{OT1}{sqrc}{} + \DeclareFontShape{OT1}{sqrc}{m}{n}{ <-8.5> sqrc7 <8.5-15> sqrc10 <15-> sqrc17 }{} + \DeclareFontShape{OT1}{sqrc}{m}{sl}{ <-> sub * sqrc/m/n }{} + \DeclareFontShape{OT1}{sqrc}{m}{it}{ <-> sub * sqrc/m/n }{} + \DeclareFontShape{OT1}{sqrc}{m}{sc}{ <-> sub * sqrc/m/n }{} + \DeclareFontShape{OT1}{sqrc}{m}{u}{ <-> sub * sqrc/m/n }{} + \DeclareFontShape{OT1}{sqrc}{bx}{n}{ <-8.5> sqrcb7 <8.5-15> sqrcb10 <15-> sqrcb17 }{} + \DeclareFontShape{OT1}{sqrc}{bx}{it}{ <-> sub * sqrc/bx/n }{} + \DeclareFontShape{OT1}{sqrc}{bx}{sl}{ <-> sub * sqrc/bx/n }{} + \DeclareFontShape{OT1}{sqrc}{b}{n}{ <-> sub * sqrc/bx/n }{} +%</fdot1> +% \end{macrocode} +% +% +% \begin{macrocode} +%<*fdt1> +\DeclareFontFamily{T1}{sqrc}{} + \DeclareFontShape{T1}{sqrc}{m}{n}{ <-8.5> sqrc7 <8.5-15> sqrc10 <15-> sqrc17 }{} + \DeclareFontShape{T1}{sqrc}{m}{sl}{ <-> sub * sqrc/m/n }{} + \DeclareFontShape{T1}{sqrc}{m}{it}{ <-> sub * sqrc/m/n }{} + \DeclareFontShape{T1}{sqrc}{m}{sc}{ <-> sub * sqrc/m/n }{} + \DeclareFontShape{T1}{sqrc}{m}{u}{ <-> sub * sqrc/m/n }{} + \DeclareFontShape{T1}{sqrc}{bx}{n}{ <-8.5> sqrcb7 <8.5-15> sqrcb10 <15-> sqrcb17 }{} + \DeclareFontShape{T1}{sqrc}{bx}{it}{ <-> sub * sqrc/bx/n }{} + \DeclareFontShape{T1}{sqrc}{bx}{sl}{ <-> sub * sqrc/bx/n }{} + \DeclareFontShape{T1}{sqrc}{b}{n}{ <-> sub * sqrc/bx/n }{} +%</fdt1> +% \end{macrocode} +% +% \section{The package code} \label{sec:code} +% +% \subsection{The \Lpack{sqrcaps} package} +% +% The \Lpack{sqrcaps} package is for typesetting short pieces of text +% in the \thisfont{} fonts. +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. +% \begin{macrocode} +%<*usc> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{sqrcaps}[2002/12/30 v1.0 package for Square Capitals fonts] +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\sqrcfamily} +% Selects the \thisfont{} font family in the OT1 or T1 encoding. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \newcommand{\sqrcfamily}{\usefont{T1}{sqrc}{m}{n}} +\else + \newcommand{\sqrcfamily}{\usefont{OT1}{sqrc}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textsqrc} +% Text command for the \thisfont{} font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textsqrc}{\sqrcfamily} +% \end{macrocode} +% \end{macro} +% +% The end of this package. +% \begin{macrocode} +%</usc> +% \end{macrocode} +% +% \subsection{The \Lpack{allsqrc} package} +% +% The \Lpack{allsqrc} package is intended for use when the entire document +% will be typeset in the book-hand. This is a minimal package. Because the +% book-hand should not contain arabic digits a fuller package would redefine +% anything numbered in \LaTeX{} to use roman instead of arabic numbering. +% Also, because of the large |\baselineskip| many other aspects of \LaTeX{} +% to do with vertical positioning should also be redefined. +% +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. It also uses the \Lpack{sqrcaps} package. +% \begin{macrocode} +%<*uscall> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{allsqrc}[2002/12/30 v1.0 package for all Square Capitals fonts] +\RequirePackage{sqrcaps} +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% Redefine the default fonts to be \thisfont, which has only one family +% member. +% \begin{macro}{\rmdefault} +% \begin{macro}{\sfdefault} +% \begin{macro}{\ttdefault} +% \begin{macrocode} +\renewcommand{\rmdefault}{sqrc} +\renewcommand{\sfdefault}{sqrc} +\renewcommand{\ttdefault}{sqrc} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The `leading' in the book-hands is a function of the |x-height|, which is +% normally much +% greater than for the CMR fonts. I have borrowed code from Frank Jensen's +% \Lpack{beton} package~\cite{BETON} to do this. The |x-height| (in points) +% for the CMR +% fonts is given in Table~\ref{tab:cmrx}. Note that the CMR design sizes are +% 5--10, 12, and 17.28 points. The other values given are scaled from these +% figures. +% +% \begin{table} +% \centering +% \caption{The x heights of the CMR and \thisfont{} fonts} \label{tab:cmrx} +% \begin{tabular}{ccc} \hline +% Design & CMR & \thisfont \\ +% Size & X Height & X Height \\ \hline +% 5 & 2.14 & 3.00 \\ ^^A CMR skip = 6pt = 2.8 times +% 6 & 2.58 & 3.61 \\ ^^A CMR skip = 7pt = 2.7 times +% 7 & 3.00 & 4.20 \\ ^^A CMR skip = 8pt = 2.7 times +% 8 & 3.44 & 4.81 \\ ^^A CMR skip = 9.5pt = 2.8 times +% 9 & 3.86 & 5.40 \\ ^^A CMR skip = 11pt = 2.8 times +% 10 & 4.31 & 6.03 \\ ^^A CMR skip = 12pt = 2.8 times +% 11 & 4.74 & 6.64 \\ ^^A CMR skip = 13.6pt = 2.8 times +% 12 & 5.17 & 7.24 \\ ^^A CMR skip = 14.5pt = 2.8 times +% 14 & 6.03 & 8.44 \\ ^^A CMR skip = 18pt = 3.0 times +% 17 & 7.44 & 10.41 \\ ^^A CMR skip = 22pt = 3.0 times +% 20 & 8.75 & 12.25 \\ ^^A CMR skip = 25pt = 2.9 times +% 25 & 10.94 & 15.32 \\ ^^A CMR skip = 30pt = 2.7 times +% \hline +% \end{tabular} +% \end{table} +% +% \begin{macro}{\sqrc@baselineskip@table} +% A table of the normal font sizes and the corresponding baselineskip. +% The distance between baselines for \thisfont{} is over twice +% the |x-height|. ^^A actually 2.5 times to nearest half point +% +% \begin{macrocode} +\newcommand{\sqrc@baselineskip@table}{% + <\@vpt>7.5% + <\@vipt>9.0% + <\@viipt>10.5% + <\@viiipt>12.0% + <\@ixpt>13.5% + <\@xpt>15.0% + <\@xipt>16.5% + <\@xiipt>18.0% + <\@xivpt>21.0% + <\@xviipt>26.0% + <\@xxpt>30.5% + <\@xxvpt>38.5} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\sqrc@new@setfontsize} +% This is a macro that replaces the |\@setfontsize| macro which is called by +% the font size changing commands. +% \begin{macrocode} +\newcommand{\sqrc@new@setfontsize}[3]{% + \edef\@tempa{\def\noexpand\@tempb####1<#2}% + \@tempa>##2<##3\@nil{\def\sqrc@baselineskip@value{##2}}% + \edef\@tempa{\noexpand\@tempb\sqrc@baselineskip@table<#2}% + \@tempa><\@nil + \ifx\sqrc@baselineskip@value\@empty + \def\sqrc@baselineskip@value{#3}% + \fi + \sqrc@old@setfontsize{#1}{#2}\sqrc@baselineskip@value} +% \end{macrocode} +% \end{macro} +% +% We had better give an author a means of using The Computer Modern fonts +% if necessary. +% +% \begin{macro}{\cmrfamily} +% \begin{macro}{\cmssfamily} +% \begin{macro}{\cmttfamily} +% These macros select the Computer Modern Roman, Sans, and Typewriter +% font families in either the T1 or OT1 encodings. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}} +\else + \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcmr} +% Text command for the Computer Modern Roman font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmr}{\cmrfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmss} +% Text command for the Computer Modern Sans font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmss}{\cmssfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmtt} +% Text command for the Computer Modern Typewriter font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmtt}{\cmttfamily} +% \end{macrocode} +% \end{macro} +% +% +% At the start of the document, change the |\@setfontsize| macro and call +% the normal font to implement the change. +% \begin{macrocode} +\AtBeginDocument{% + \let\sqrc@old@setfontsize=\@setfontsize + \let\@setfontsize=\sqrc@new@setfontsize} +\AtBeginDocument{\normalsize} +% \end{macrocode} +% +% +% The end of this package. +% \begin{macrocode} +%</uscall> +% \end{macrocode} +% +% +% +% +% +% \Finale +% \PrintIndex +% +\endinput + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + diff --git a/Master/texmf-dist/source/latex/bookhands/sqrcaps/sqrcaps.ins b/Master/texmf-dist/source/latex/bookhands/sqrcaps/sqrcaps.ins new file mode 100644 index 00000000000..05a77644f8d --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/sqrcaps/sqrcaps.ins @@ -0,0 +1,101 @@ +%% +%% sqrcaps.ins +%% Copyright 1999 Peter R. Wilson +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Peter Wilson (CUA) +%% now at: peter.r.wilson@boeing.com +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{sqrcaps.ins} +\input docstrip.tex +\preamble + + Copyright 1999 Peter R. Wilson + + This program is provided under the terms of the + LaTeX Project Public License distributed from CTAN + archives in directory macros/latex/base/lppl.txt. + +Author: Peter Wilson (CUA) + now at: peter.r.wilson@boeing.com + +\endpreamble + +\keepsilent + +%%% \Msg{*** Generating the driver file ***} +%%% \generateFile{sqrcaps.drv}{t}{\from{sqrcaps.dtx}{driver}} + +\Msg{*** Generating the Metafont files ***} + +\usepostamble\empty +\generateFile{sqrc7.mf}{t}{\from{sqrcaps.dtx}{base7}} +\generateFile{sqrc10.mf}{t}{\from{sqrcaps.dtx}{base10}} +\generateFile{sqrc17.mf}{t}{\from{sqrcaps.dtx}{base17}} +\generateFile{sqrcb7.mf}{t}{\from{sqrcaps.dtx}{base7b}} +\generateFile{sqrcb10.mf}{t}{\from{sqrcaps.dtx}{base10b}} +\generateFile{sqrcb17.mf}{t}{\from{sqrcaps.dtx}{base17b}} +\generateFile{sqrcl.mf}{t}{\from{sqrcaps.dtx}{min}} +\generateFile{sqrcu.mf}{t}{\from{sqrcaps.dtx}{maj}} +\generateFile{sqrctitle.mf}{t}{\from{sqrcaps.dtx}{mfd}} +\generateFile{sqrcpunct.mf}{t}{\from{sqrcaps.dtx}{punct}} +\generateFile{sqrclig.mf}{t}{\from{sqrcaps.dtx}{lig}} +\generateFile{sqrcdig.mf}{t}{\from{sqrcaps.dtx}{dig}} + +\Msg{*** Generating the Font Definition files ***} +\usepostamble\defaultpostamble + +\generateFile{ot1sqrc.fd}{t}{\from{sqrcaps.dtx}{fdot1}} +\generateFile{t1sqrc.fd}{t}{\from{sqrcaps.dtx}{fdt1}} + +\Msg{*** Generating the LaTeX2e package files ***} + +\generateFile{sqrcaps.sty}{t}{\from{sqrcaps.dtx}{usc}} +\generateFile{allsqrc.sty}{t}{\from{sqrcaps.dtx}{uscall}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into directories searched by TeX:} +\Msg{*} +\Msg{* Move these into the font source area:} +\Msg{* \space\space sqrc7.mf} +\Msg{* \space\space sqrc10.mf} +\Msg{* \space\space sqrc17.mf} +\Msg{* \space\space sqrcb7.mf} +\Msg{* \space\space sqrcb10.mf} +\Msg{* \space\space sqrcb17.mf} +\Msg{* \space\space sqrcl.mf} +\Msg{* \space\space sqrcu.mf} +\Msg{* \space\space sqrctitle.mf} +\Msg{* \space\space sqrcpunct.mf} +\Msg{* \space\space sqrclig.mf} +\Msg{* \space\space sqrcdig.mf} +\Msg{*} +\Msg{* Move these into the LaTeX macro area:} +\Msg{* \space\space ot1sqrc.fd} +\Msg{* \space\space t1sqrc.fd} +\Msg{* \space\space sqrcaps.sty} +\Msg{* \space\space allsqrc.sty} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{* Process any name.idx file by:} +\Msg{* \space\space\space\space makeindex -s gind.ist name} +\Msg{* Process any name.glo file by:} +\Msg{* \space\space\space\space makeindex -s gglo.ist -o name.gls name.glo} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/bookhands/tgothic/tgothic.dtx b/Master/texmf-dist/source/latex/bookhands/tgothic/tgothic.dtx new file mode 100644 index 00000000000..68b4c095968 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/tgothic/tgothic.dtx @@ -0,0 +1,5402 @@ +% \iffalse meta-comment +% +% tgothic.dtx +% Copyright 1999 Peter R. Wilson +% +% This program is provided under the terms of the +% LaTeX Project Public License distributed from CTAN +% archives in directory macros/latex/base/lppl.txt. +% +% Author: Peter Wilson (CUA) (now at: peter.r.wilson@boeing.com) +% +% If you do not have the docmfp package (available from CTAN in +% tex-archive/macros/latex/contrib/supported), comment out the +% \usepackage{docmfp} line below and uncomment the line following it. +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{docmfp} +%%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{} +\EnableCrossrefs +\CodelineIndex +%% comment out the next line to show the code +\OnlyDescription +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{tgothic.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{134} +% +% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} +% \DoNotIndex{\@centercr,\@cite} +% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} +% \DoNotIndex{\@input,\@ixpt,\@m} +% \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} +% \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} +% \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} +% \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} +% \DoNotIndex{\advance,\Alph,\alph} +% \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\bullet} +% \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} +% \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} +% \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} +% \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +% \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} +% \DoNotIndex{\fbox} +% \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} +% \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +% \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} +% \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} +% \DoNotIndex{\input} +% \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} +% \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} +% \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +% \DoNotIndex{\NeedsTeXFormat,\newdimen} +% \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} +% \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} +% \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} +% \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +% \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +% \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +% \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} +% \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} +% \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} +% \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} +% \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} +% \DoNotIndex{\viipt,\vipt,\vskip,\vspace} +% \DoNotIndex{\wd,\xiipt,\year,\z@} +% +% \changes{v1.0}{2002/12/30}{First public release} +% +% \def\fileversion{v1.0} +% \def\filedate{2002/12/30} +% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package +% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option +% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file +% \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter +% \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle +% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment +% \newcommand*{\AD}{\textsc{ad}} +% \newcommand*{\thisfont}{Gothic Textura Quadrata} +% +% \title{The \Lpack{Gothic Textura Quadrata} fonts\thanks{This +% file has version number \fileversion, last revised +% \filedate.}} +% +% \author{% +% Peter Wilson\\ +% Catholic University of America \\ +% Now at \texttt{peter.r.wilson@boeing.com} +% } +% \date{\filedate} +% \maketitle +% \begin{abstract} +% The \Lpack{tgothic} and \Lpack{alltgoth} packages provide a set of +% Metafont \thisfont{} book-hands +% as used +% for manuscripts in the 13th to the 15th century. This is one in a series +% of manuscript fonts. +% \end{abstract} +% \tableofcontents +% \listoftables +% +% +% +% +% \section{Introduction} +% +% The \Lpack{tgothic} and \Lpack{alltgoth} packages provide a Metafont~\cite{METAFONT} version +% of the \thisfont{} manuscript book-hand that was in use between about the +% thirteenth and fifteenth centuries~\AD. It is part of a project to provide fonts +% covering the major manuscript hands between the first century~\AD{} and +% the invention of printing. The principal resources used in this project +% are listed in the Bibliography. +% +% This manual is typeset according to the conventions of the +% \LaTeX{} \textsc{docstrip} utility which enables the automatic +% extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. +% The \Lpack{docmfp} package is used for documenting the Metafont portions +% of the distribution~\cite{DOCMFP}. +% +% Section~\ref{sec:usc} describes the usage of the package. +% Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} +% and source code for the package is in Section~\ref{sec:code}. +% +% \subsection{Manuscript book-hands} +% +% Before the invention of printing all books were written by hand. The book-hands +% used by the scribes and copyists for the manuscripts changed as time +% went on. Table~\ref{tab:1} lists some of the common book-hands which were used +% between the 1st and 15th centuries. The later book-hands formed the basis of the +% fonts used by the early printers, which in turn form the basis of the printing +% fonts in use today. +% +% The manuscript book-hands were written with a broad nibbed reed or quill +% pen. Among the distinguishing characteristics of a hand, apart from the +% actual shape of the letters, are the angle of the pen (which controls the +% variation between thick and thin strokes) and the height of a letter compared +% to the width of the nib. The lower the ratio of the letter height to nib +% width, the more condensed is the script. The scripts also varied in their +% typical height. +% +% Table~\ref{tab:1} gives an `average' x-height for each +% script, which I obtained by measuring a sample of photographs of +% manuscripts written in the various hands. About a dozen examples +% of each book-hand were measured. This figure should not be taken too +% seriously. +% +% There was not a sharp division between the use of one hand and another. +% Many manuscripts exhibit a variety of hands in the same document. For example, +% the scribe writing in an Uncial hand may have used Roman Rustic letters +% for capitals. Usually the same pen was used for the two different scripts. +% +% Generally speaking, as a hand got older it became more embelished, and +% therefore took longer to write. As this happened a new hand would appear that +% was faster, and which would eventually make the earlier one obsolete. +% +% Many of the book-hands were single-cased; that is, they did not have an +% upper- and lower-case as we do nowadays in Western scripts. On the other +% hand, a script might be majuscule or minuscule. A \textit{majuscule} script +% is one, like our upper-case, where the letters are drawn between two lines +% and are of a uniform height with no ascenders or descenders. +% A \textit{minuscule} script, like our lower-case, is drawn between four lines +% and has ascenders and descenders. +% +% \begin{table} +% \centering +% \caption{The main manuscript book-hands} \label{tab:1} +% \begin{tabular}{lccccc} \hline +% Name & Century & x-height & Height & Pen & Normalised \\ +% & & (mm) & (nib widths) & angle & height \\ \hline +% Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\ +% Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\ +% Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\ +% Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\ +% Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\ +% Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\ +% Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\ +% Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\ +% Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\ +% Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\ +% Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\ +% Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline +% \end{tabular} +% \end{table} +% +% During the period under consideration arabic numerals were effectively +% not used. At the beginning they were unknown and even though some knew +% of them towards the end, the glyphs used for them are not recognisable --- +% to me they look somewhat like cryllic letters --- and each locality +% and time had its own highly individualistic rendering. The general rule +% when using one of these book-hands is to write all numbers using +% roman numerals. +% +% The Roman alphabet consisted of 23 capital letters --- the J, U and W +% were absent. The book-hands initially used both a `u' and a `v' interchangeably +% but by the 10th century the practice had become to use the `v' before a vowel +% and the `u' otherwise. The letter corresponding to the W sound appeared +% in England around the 7th century in +% the form of the runic \textit{wen} character and by about the 11th century +% the `w' chacter was generally used. The `J' is the newest letter of all, not +% appearing until about the mid 16th century. +% +% In the first century punctuation was virtually unknown, and typically +% would not even be any additional space between individual words, never +% mind denoting ends of sentences. Sometimes a dot at mid-height would be +% used as a word seperator, or to mark off the end of a paragraph. Effectively +% a text was a continuous stream of letters. By the time that printing was +% invented, though, all of our modern punctuation marks were being used. +% +% Among all these manuscript hands, the Carolingian minuscule is the +% most important as our modern fonts are based on its letter shapes, and it is +% also at this point in time where the division occured between the black letter +% scripts as used even today in Germany, and the lighter fonts used elesewhere. +% The Rotunda and Humanist minuscule hands were developed in Italy and were +% essentially a rediscovery of the Carolingian minusucle. Guthenberg took the +% Gothic scripts as the model for his types. Later printers, +% such as Nicholas Jenson of Venice, +% took the Humanist scripts as their models. +% +% +% \subsection{The \thisfont{} script} +% +% With the Gothic hands, used from the thirteenth century, the attention of +% the scribes moved from the individual letter to the word. The scripts +% changed to accomodate this interest so the appearance of the letters +% became subordinate to the overall appearance of the words they formed. +% Many of the letters appear to be indistinguishable today but the contemporary +% reading public seemed to have no difficulty. +% +% It was during the heyday of the Gothic scripts that separate capital +% letters were introduced. Also, as a small concession to legibility, +% the lowecase `i' acquired a small mark above it. Ligatures were similar +% to those in Early Gothic. The letter `w' was added to the hand early on +% and `j' started to appear after 1400, providing the full 26 letter alphabet +% for the first time. +% +% This font includes both lowercase and (fancy) uppercase letters. Guthenberg +% used this script as a model. +% +% \section{The \Lpack{tgothic} and \Lpack{alltgoth} packages} \label{sec:usc} +% +% The \thisfont{} font family is called |tgoth|. The font is supplied in both +% OT1 and T1 encodings. +% +% \subsection{The \Lpack{tgothic} package} +% +% This is intended for the occasions when some short pieces of text have +% to be written in \thisfont{} while the majority of the document is in another +% font. The normal baselineskips are used. +% +% \DescribeMacro{\tgothfamily} +% The |\tgothfamily| declaration starts typesetting with the \thisfont{} fonts. +% Use of the \thisfont{} font will continue until either there is another |\...family| +% declaration or the current group (e.g., environment) is closed. +% +% \DescribeMacro{\texttgoth} +% The command |\texttgoth{|\meta{text}|}| will typeset \meta{text} using the +% \thisfont{} fonts. +% +% \subsection{The \Lpack{alltgoth} package} +% +% +% This package is for when the entire document will be typeset with the +% \thisfont{} font. The baselineskips are set to those appropriate to the +% book-hand. +% +% This is a minimalist package. Apart from declaring \thisfont{} to be the +% default font and setting the baselineskips appropriately, it makes no other +% alterations. +% Vertical spacing +% before and after section titles and before and after lists, etc., will be +% too small as the \LaTeX{} design assumes a font comparable in size to +% normal printing fonts, and the book-hand is much taller. +% To capture more of the flavour of the time, all numbers +% should be written using roman numerals. +% The \Lpack{romannum} package~\cite{ROMANNUM} +% can be used so that \LaTeX{} will typeset the numbers that it generates, +% like sectioning or caption numbers, using roman numerals instead of arabic +% digits. +% +% \DescribeMacro{\cmrfamily} +% \DescribeMacro{\textcmr} +% \DescribeMacro{\cmssfamily} +% \DescribeMacro{\textcmss} +% \DescribeMacro{\cmttfamily} +% \DescribeMacro{\textcmtt} +% The |...family| declarations start typesetting with the Computer Modern Roman +% (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer +% Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}| +% commands will typeset \meta{text} in the corresponding Computer Modern font. +% +% The \Lpack{alltgoth} package automatically loads the \Lpack{tgothic} package, +% so its font commands are available if necessary. +% +% \StopEventually{ +% \bibliographystyle{alpha} +% \renewcommand{\refname}{Bibliography} +% \begin{thebibliography}{GMS94} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem[And69]{ANDERSON69} +% Donald M.~Anderson. +% \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}. +% \newblock Holt, Rinehart and Winston, 1969. +% +% \bibitem[Bol95]{BOLOGNA95} +% Giulia Bologna. +% \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}. +% \newblock Crescent Books, 1995. +% +% \bibitem[Day95]{DAY95} +% Lewis F.~Day. +% \newblock {\em Alphabets Old \& New}. +% \newblock (3rd edition originally published by B.~T.~Batsford, 1910) +% \newblock Senate, 1995. +% +% \bibitem[Dro80]{DROGIN80} +% Marc Drogin. +% \newblock {\em Medieval Calligraphy: Its History and Technique}. +% \newblock Allenheld, Osmun \& Co., 1980. +% +% \bibitem[Dru95]{DRUCKER95} +% Johanna Drucker. +% \newblock {\em The Alphabetic Labyrinth}. +% \newblock Thames \& Hudson, 1995. +% +% \bibitem[Fir93]{FIRMAGE93} +% Richard A.~Firmage. +% \newblock {\em The Alphabet Abecedarium}. +% \newblock David R~Goodine, 1993. +% +% \bibitem[Fli98]{LETTRINE} +% Daniel Flipo. +% \newblock {\em The LETTRINE package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1998. +% +% \bibitem[Har95]{HARRIS95} +% David Harris. +% \newblock {\em The Art of Calligraphy}. +% \newblock DK Publishing, 1995. +% +% \bibitem[Jen95]{BETON} +% Frank Jensen. +% \newblock {\em The BETON package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1995. +% +% \bibitem[Joh71]{JOHNSTON75} +% Edward Johnston (ed. Heather Child). +% \newblock {\em Formal Penship and Other Papers}. +% \newblock Penthalic, 1971. +% +% \bibitem[Knu87]{CM} +% Donald E.~Knuth. +% \newblock {\em Computer Modern Typefaces}. +% \newblock Addison-Wesley, 1987. +% +% \bibitem[Knu92]{METAFONT} +% Donald E.~Knuth. +% \newblock {\em The METAFONTbook}. +% \newblock Addison-Wesley, 1992. +% +% \bibitem[GMS94]{GOOSSENS94} +% Michel Goossens, Frank Mittelbach, and Alexander Samarin. +% \newblock {\em The LaTeX Companion}. +% \newblock Addison-Wesley Publishing Company, 1994. +% +% \bibitem[Tho75]{THOMAS75} +% Alan G.~Thomas. +% \newblock {\em Great Books and Book Collectors}. +% \newblock Weidenfield and Nichoson, 1975. +% +% \bibitem[Wil99]{DOCMFP} +% Peter R.~Wilson. +% \newblock {\em The DOCMFP Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \bibitem[Wil99b]{ROMANNUM} +% Peter R.~Wilson. +% \newblock {\em The ROMANNUM Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \end{thebibliography} +% } +% +% \section{The Metafont code} \label{sec:mf} +% +% +% As previously noted, this work is part of a larger project to provide +% fonts covering the main manuscript book-hands. As such, one of the +% aims is to produce a coordinated set of fonts, especially as multiple +% hands might be used in a single document. +% +% Noting that the hands tend to be somewhat larger than the typical 10pt +% size (where the x-height is approximately 1.5mm) used for modern books, +% I have also designed the fonts +% at a larger than normal size, then applied some non-linear factors when reducing +% them down to a 10pt size. +% Further, I have used the height of the Carolingian minuscule as a +% normalising factor when deciding on the absolute height of any particular +% script. The x-height of the Carolingian font is made equal to the +% x-height of the Computer Modern Roman (CMR) font. +% +% Modern fonts are effectively drawn. That is, the outline of the letter is +% drawn carefully and the center is filled with ink. This is shown to good +% effect in the Metafont code for the Computer Modern fonts~\cite{CM}. +% In contrast, the manuscript letters were inked by single pen strokes in +% a calligraphic manner. I have tried to repeat this calligraphic style +% in the Metafont code. +% +% As much as possible I have tried to use parameter values from the +% Computer Modern Roman (CMR) fonts in order to reduce possible +% infelicities if the CM and manuscript fonts are used together. However, +% few of the CMR parameters are applicable to the calligraphic style. +% +% +% \subsection{The parameter file} +% +% We deal with the parameter files first, and start by announcing +% what they are for. The \thisfont{} font comes in three sizes and also as a normal +% and a bold font. +% \begin{macrocode} +%<*base7|base10|base17|base7b|base10b|base17b> +%<base7>%%% TGOTH7.MF Gothic Textura Quadrata at 7 point design size. +%<base10>%%% TGOTH10.MF Gothic Textura Quadrata at 10 point design size. +%<base17>%%% TGOTH17.MF Gothic Textura Quadrata at 17 point design size. +%<base7b>%%% TGOTHB7.MF Gothic Textura Quadrata Bold at 7 point design size. +%<base10b>%%% TGOTHB10.MF Gothic Textura Quadrata Bold at 10 point design size. +%<base17b>%%% TGOTHB17.MF Gothic Textura Quadrata Bold at 17 point design size. +% +% \end{macrocode} +% Parameters from CMR are used as much as possible. We also +% make sure that \Lpack{cmbase} is loaded as well as plain Metafont. +% \begin{macrocode} +if unknown cmbase: input cmbase fi + +%<base7>font_identifier:="TGOTH"; font_size 7pt#; +%<base10>font_identifier:="TGOTH"; font_size 10pt#; +%<base17>font_identifier:="TGOTH"; font_size 17.28pt#; +%<base7b>font_identifier:="TGOTHB"; font_size 7pt#; +%<base10b>font_identifier:="TGOTHB"; font_size 10pt#; +%<base17b>font_identifier:="TGOTHB"; font_size 17.28pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutstretch} +% The CMR scaling for lowercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> jutstretch:=1.19; +%<base10|base10b> jutstretch:=1.152; +%<base17|base17b> jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{stemstretch} +% The CMR scaling for lowercase stem widths wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> stemstretch:=1.50; +%<base10|base10b> stemstretch:=1.31; +%<base17|base17b> stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{caprat} +% The scaling for capitals wrt lowercase. +% (the ratio for CMR10 is 1.59). +% \begin{macrocode} + caprat:=7/5; % ratio of capital height to minuscule height +% \end{macrocode} +% +% \DescribeVariable{cap_jutstretch} +% The CMR scaling for uppercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_jutstretch:=1.3; +%<base10|base10b> cap_jutstretch:=1.2; +%<base17|base17b> cap_jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{cap_stemstretch} +% The CMR scaling for uppercase stem width wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_stemstretch:=1.45; +%<base10|base10b> cap_stemstretch:=1.31; +%<base17|base17b> cap_stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{bfudge} +% Letter width scaling for bold font wrt normal font. We don't really +% need to change this for bold fonts as the letter width is in terms +% of the pen, not the x-height. +% +% \begin{macrocode} +%<base7|base10|base17> bfudge:=1.0; +%<base7b|base10b|base17b> bfudge:=1.0; %% normally 1.2 +% \end{macrocode} +% +% \DescribeVariable{szfudge} +% Width scaling wrt 17pt letter width. +% \begin{macrocode} +%<base7|base7b> szfudge:=1.18; +%<base10|base10b> szfudge:=1.0; +%<base17|base17b> szfudge:=1.0; +% \end{macrocode} +% +% \DescribeVariable{hstretch} +% Horizontal stretching factor wrt 17pt size letter width. +% \begin{macrocode} + hstretch:=szfudge*bfudge; +% \end{macrocode} +% +% \DescribeVariable{carol_height} +% The x-height of the Carolingian gothic font. +% \begin{macrocode} +%<base7|base7b> carol_height#:=108.5/36pt#; +%<base10|base10b> carol_height#:=155/36pt#; +%<base17|base17b> carol_height#:=268/36pt#; +% \end{macrocode} +% +% \DescribeVariable{vstretch} +% The height of this font wrt the Carolingian font. +% \begin{macrocode} + vstretch:=1.3; + +% \end{macrocode} +% +% \DescribeVariable{x_height} +% The x-height of lower case letters. Scaled from the Carolingian font. +% \begin{macrocode} + x_height#:=vstretch*carol_height#; +% \end{macrocode} +% +% \DescribeVariable{u} +% The unit width. The CMR values are used. +% \begin{macrocode} +%<base7> u#:=15.5/36pt#; +%<base10> u#:=20/36pt#; +%<base17> u#:=32.5/36pt#; +%<base7b> u#:=17.9/36pt#; +%<base10b> u#:=23/36pt#; +%<base17b> u#:=37/36pt#; +% \end{macrocode} +% +% \DescribeVariable{width_adj} +% \DescribeVariable{serif_fit} +% \DescribeVariable{cap_serif_fit} +% \DescribeVariable{letter_fit} +% The majority of these parameters and values are constant. +% They are for fine adjustements of characters. The CM values are used. +% \begin{macrocode} + width_adj#:=0pt#; % width adjustment for certain characters + serif_fit#:=0pt#; % extra sidebar near lowercase serifs +%<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs +%<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +%<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs +%<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars +% \end{macrocode} +% +% \DescribeVariable{sb} +% A length used for adjusting the side bearings of characters. Normally +% |1/2u| but want it less (1/2) for a Gothic. +% \begin{macrocode} +%<base7|base7b> sb#:=1/4u#; % unit for side bearings +%<base10|base10b> sb#:=1/4u#; % unit for side bearings +%<base17|base17b> sb#:=1/4u#; % unit for side bearings + +% \end{macrocode} +% +% \DescribeVariable{cap_sb} +% A length used for adjusting the side bearings of uppercase characters. +% \begin{macrocode} +%<base7|base7b> cap_sb#:=2sb#; % unit for uppercase side bearings +%<base10|base10b> cap_sb#:=2sb#; % unit for uppercase side bearings +%<base17|base17b> cap_sb#:=2sb#; % unit for uppercase side bearings + +% \end{macrocode} +% +% \DescribeVariable{cap_height} +% The height of capital letters. +% \begin{macrocode} +%<base7|base7b> cap_height#:=172.2/36pt#; % height of caps +%<base10|base10b> cap_height#:=246/36pt#; % height of caps +%<base17|base17b> cap_height#:=425/36pt#; % height of caps +% \end{macrocode} +% +% \DescribeVariable{thickfudge} +% The reciprocal of the font height in nib widths. Normal font height +% is 5 nib widths and the bold font height is 4 nib widths. +% \begin{macrocode} +%<base7|base10|base17> thickfudge:=1/5; +%<base7b|base10b|base17b> thickfudge:=1/4; +% \end{macrocode} +% +% \DescribeVariable{thinfudge} +% The nib sharpness. +% \begin{macrocode} +thinfudge:=1/6; +% \end{macrocode} +% +% \DescribeVariable{thick} +% The maximum nib width. +% That is, the width of the thickest line that can be penned. +% \begin{macrocode} +thick#:=stemstretch*thickfudge*x_height#; % max pen breadth +% \end{macrocode} +% +% \DescribeVariable{thin} +% The nib thinness. +% That is, the width of the thinnest line that can be penned. +% \begin{macrocode} +thin#:=thinfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{pangle} +% The pen angle (in degrees). +% \begin{macrocode} +pangle:=45; % pen angle +% \end{macrocode} +% +% \DescribeVariable{stem_width} +% The width of a vertical stem. +% \begin{macrocode} +stem_width#:= thick#*(cosd pangle); +% \end{macrocode} +% +% \DescribeVariable{perpdec} +% \DescribeVariable{angdec} +% The perpendicular shift between pairs of thin decorative lines in capitals +% is |perpdec| and between angled lines is |angdec|. +% \begin{macrocode} +perpdec#:= 3thin#; +angdec#:= perpdec#/(cosd pangle); +% \end{macrocode} +% +% +% \DescribeVariable{ascratio} +% The height of lower case ascenders wrt |x_height|. +% \begin{macrocode} + ascratio:=5/4; +% \end{macrocode} +% +% \DescribeVariable{asc_height} +% The height of lower case ascenders. +% \begin{macrocode} + asc_height#:=ascratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{descratio} +% The depth of lower case descenders wrt |x_height|. +% \begin{macrocode} + descratio:=2/4; +% \end{macrocode} +% +% \DescribeVariable{desc_depth} +% The depth of lower case descenders. +% \begin{macrocode} + desc_depth#:=descratio*x_height#; +% \end{macrocode} +% +% \DescribeVariable{body_height} +% The height of the tallest character. +% \begin{macrocode} + body_height#:=caprat*asc_height#; +% \end{macrocode} +% +% \DescribeVariable{body_depth} +% The depth of the lowest character. +% \begin{macrocode} + body_depth#:=caprat*desc_depth#; +% \end{macrocode} +% +% \DescribeVariable{half_height} +% Half the normal letter height. +% \begin{macrocode} + half_height#:=1/2x_height#; % half the height of x height letters + +% \end{macrocode} +% +% \DescribeVariable{side} +% We might be using a square for the character design. +% \begin{macrocode} +side#:=x_height#; +% \end{macrocode} +% +% \DescribeVariable{rule_thickness} +% Thickness of rules (in math symbols). The CMR values are used. +% \begin{macrocode} +%<base7|base7b> rule_thickness#:=.34pt#; +%<base10|base10b> rule_thickness#:=.4pt#; +%<base17|base17b> rule_thickness#:=.6pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutfudge} +% Controls the protrusion of serifs. +% \begin{macrocode} +%%%jutfudge:= 3/4; +jutfudge:= 1/2; +% \end{macrocode} +% +% \DescribeVariable{jut} +% The lowercase serif protrusion. +% \begin{macrocode} +jut#:=jutstretch*jutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{srad} +% |srad| with |0 < srad < 1| controls the serif radius. +% \begin{macrocode} +srad:=0.8; % was 0.5 +% \end{macrocode} +% +% \DescribeVariable{trijut} +% The lowercase triangular serif protrusion. +% \begin{macrocode} +trijut#:=0.75jutstretch*thick#; +% \end{macrocode} +% +% \DescribeVariable{clubjutfudge} +% The fractional protusion of a club serif. +% \begin{macrocode} +clubjutfudge:=1/2; +% \end{macrocode} +% +% \DescribeVariable{clubjut} +% The lowercase club serif protrusion. +% \begin{macrocode} +clubjut#:=jutstretch*clubjutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{wided} +% \DescribeVariable{widedmin} +% Default juts of wide (touching) diamonds. +% \begin{macrocode} +wided:= 0.75; +widedmin := 1.05 - wided; +% \end{macrocode} +% +% \DescribeVariable{narrowd} +% \DescribeVariable{narrowdmin} +% Default juts of narrow (non-touching) diamonds. +% \begin{macrocode} +narrowd:= 0.5; +narrowdmin := 0.7 - narrowd; +% \end{macrocode} +% +% \DescribeVariable{diawd} +% \DescribeVariable{diang} +% Default width and angle of diamonds. +% \begin{macrocode} +diawd := 1.0; +diang := 30; +% \end{macrocode} +% +% \DescribeVariable{fig_height} +% The height of numerals. Make these midway between normal and capital +% letters. +% \begin{macrocode} + fig_height#:=(0.5[1,caprat])*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_width} +% The width of numerals. All numerals are the same width (roughly, an `o'). +% \begin{macrocode} + fig_width#:=hstretch*(4+wided+widedmin)*stem_width#; +% \end{macrocode} +% +% +% +% \DescribeVariable{o} +% Amount of overshoot for curves (as in an `o'). Use CMR values. +% \begin{macrocode} +%<base7|base7b> o#:=5/36pt#; +%<base10|base10b> o#:=8/36pt#; +%<base17|base17b> o#:=10/36pt#; + +% \end{macrocode} +% +% \DescribeVariable{slant} +% |slant| is the amount the font slopes to the right. \\ +% 5 degrees = 9/100; 10 degrees = 11/50. +% \begin{macrocode} +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +%%%%%%slant:= sind 10/cosd 10; %% 10 degree slant + +% \end{macrocode} +% +% \DescribeVariable{monospace} +% We are generating a variable-width font. +% \begin{macrocode} +monospace:=false; % should all characters have the same width? + +% \end{macrocode} +% +% \DescribeVariable{dot_size} +% The size of (punctuation) dots. +% \begin{macrocode} +dot_size#:=5thin#; % size of dots +% \end{macrocode} +% +% \DescribeVariable{comma_width} +% The horizontal width of a comma. +% \begin{macrocode} +comma_width#:=5/4dot_size#; + +% \end{macrocode} +% +% Finally, call the driver file for the font. +% \begin{macrocode} +generate tgothtitle %% switch to the driver file + +% \end{macrocode} +% +% The end of this code section. +% \begin{macrocode} +%</base7|base10|base17|base7b|base10b|base17b> +% \end{macrocode} +% +% +% \subsection{The driver file} +% +% The driver file sets up the font parameters and also contains +% the macros used in the definition of the characters. +% +% \begin{macrocode} +%<*mfd> +% This is TGOTHTITLE.MF for the Gothic Textura Quadrata font. +% This makes a short font. +% This file also contains special macros universally needed in the +% font but either not in the cmbase.mf file or modifications of these. +% +% \end{macrocode} +% +% \begin{routine}{makebox} +% This is a new version of the \Lpack{cmbase.mf} |makebox| macro. +% Essentially, as we are only generating a single case font, we don't +% need all the horizontals for the CMR characters. +% +% \begin{macrocode} +% A new version of cmbase.mf makebox macro +def makebox(text rule) = + for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth: + rule((l,y)t_,(r,y)t_); endfor % horizontals + for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals + for x=u*(1+floor(1/u)) step u until r-1: + rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals + if charic<>0: + rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{proofpcbb} +% The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the +% square, and at the bottom and top midpoints, where the point |zS| is at +% position |(xoff,yoff)| in the square. +% \begin{macrocode} + +% A macro to delineate a letter's bounding square in proof mode. +% Point z$ is at (xoff,yoff) in the bounding square. +def proofpcbb(suffix $)(expr xoff, yoff) = +if proofing > 0: + x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner + z$br = (x$bl+side, y$bl); % BRHC + z$tr = (x$bl+side, y$bl+side); % TRHC + z$tl = (x$bl, y$bl+side); % TLHC + z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points + pair hc, vc; + hc = (2u,0); vc = (0,2u); + pickup pensquare scaled 2; + for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc: + draw s-hc--s+hc; + draw s-vc--s+vc; + endfor +fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{tgothic_font_setup} +% This macro contains the set up for the \thisfont{} fonts. +% \begin{macrocode} + +def tgothic_font_setup= % contains special stuff for tgothic fonts + define_pixels(side,half_height,carol_height,comma_width); + define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit, + cap_serif_fit,jut,clubjut,cap_jut,trijut); + define_pixels(fig_width); + define_whole_pixels(letter_fit,sb,cap_sb); + define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height, + desc_depth,body_depth,fig_height); + define_corrected_pixels(o); + define_blacker_pixels(thick,thin); + define_pixels(stem_width); + define_pixels(perpdec,angdec); + let adjust_fit = normal_adjust_fit; +% \end{macrocode} +% \DescribeVariable{stylus} +% The pen for drawing the thinnest lines is |stylus|. +% \begin{macrocode} + pickup pencircle scaled thin; + stylus:=savepen; +% \end{macrocode} +% \DescribeVariable{thickstylus} +% The pen for drawing lines a bit thicker than the thinnest is |thickstylus|. +% \begin{macrocode} + pickup pencircle scaled (1.5thin); + thickstylus:=savepen; +% \end{macrocode} +% \DescribeVariable{quill} +% The normal calligraphic pen is |quill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated pangle; + quill:=savepen; + +% \end{macrocode} +% +% \DescribeVariable{threequarterquill} +% A pen with 3/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 3/4thick yscaled thin rotated pangle; + threequarterquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{halfquill} +% A pen with 1/2 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/2thick yscaled thin rotated pangle; + halfquill := savepen; + +% \end{macrocode} +% +% \DescribeVariable{quarterquill} +% A pen with 1/4 of the width as quill (but with the same thinness). +% \begin{macrocode} + pickup pencircle xscaled 1/4thick yscaled thin rotated pangle; + quarterquill := savepen; + +% \end{macrocode} +% +% +% \begin{macrocode} + numeric pcshiftx#; % x value of LHS of box wrt origin of char box + define_pixels(pcshiftx); + numeric sqxside#; % x size of the square + numeric sqyside#; % y size of the square + define_pixels(sqxside,sqyside); + +enddef; % end of tgothic_font_setup + +% \end{macrocode} +% \end{routine} +% +% +% \DescribeVariable{ductus} +% A boolean to control drawing the ductus (TRUE) or the full letter (FALSE). +% \begin{macrocode} +boolean ductus; +ductus:=false; +% \end{macrocode} +% +% \DescribeVariable{qhor} +% \DescribeVariable{qvert} +% The cosine and sine of the pen angle. +% \begin{macrocode} +numeric qhor, qvert; +qhor:=cosd(pangle); qvert:=sind(pangle); +% \end{macrocode} +% +% \DescribeVariable{pdir} +% The vector corresponding to the pen angle. +% \begin{macrocode} +pair pdir; pdir=dir(pangle); +% \end{macrocode} +% +% \DescribeVariable{ppdir} +% The vector that is perpendicular (anticlockwise) to the pen angle. +% \begin{macrocode} +pair ppdir; ppdir=dir(pangle+90); +% \end{macrocode} +% +% \begin{routine}{draw_upforkstem} +% A macro to draw a vertical stem with a fork at the top. +% |draw_upforkstem(1,2)| uses the current pen to draw a vertical line, whose absolute +% top and bottom are at |z1| and |z2|. The top (|z1|) has a wedge shaped slit. +% \begin{macrocode} + +def draw_upforkstem(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + x$a=x$; top y$a = bot y$; % top of straight stem + draw z$a--z$$; % straight part + z$b = (rt x$, y$); z$c = (x$b, top y$a); + z$d = (lft x$, bot y$a); z$e = (x$d, y$); + pickup stylus; + rt x$cc = x$c; y$cc = y$c; + lft x$bb = x$b; y$bb = y$b; + lft x$dd = x$d; y$dd = y$d; + rt x$ee = x$e; y$ee = y$e; + filldraw z$a--z$bb..z$cc--cycle; % fork + filldraw z$a--z$dd..z$ee--cycle; + pickup oldpen; + labels($a,$b,$c,$d,$e); +enddef; % end of draw_upforkstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_downforkstem} +% A macro to draw a vertical stem with a fork at the bottom. +% |draw_downforkstem(1,2)| uses the current pen to draw a vertical line, whose absolute +% top and bottom are at |z1| and |z2|. The bottom (|z2|) has a wedge shaped slit. +% \begin{macrocode} + +def draw_downforkstem(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + x$$a=x$$; bot y$$a = top y$$; % bottom of straight stem + draw z$--z$$a; % straight part + z$$b = (rt x$$, y$$); z$$c = (x$$b, top y$$a); + z$$d = (lft x$$, bot y$$a); z$$e = (x$$d, y$$); + pickup stylus; + rt x$$cc = x$$c; y$$cc = y$$c; + lft x$$bb = x$$b; y$$bb = y$$b; + lft x$$dd = x$$d; y$$dd = y$$d; + rt x$$ee = x$$e; y$$ee = y$$e; + filldraw z$$a--z$$bb..z$$cc--cycle; % fork + filldraw z$$a--z$$dd..z$$ee--cycle; + pickup oldpen; + labels($$a,$$b,$$c,$$d,$$e); +enddef; % end of draw_downforkstem + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_upcurlstem} +% A macro to draw a vertical stem with a curl to the left at the top. +% |draw_upcurlstem(1,2)| uses the current pen to draw a vertical line, whose absolute +% top and bottom are at |z1| and |z2|. The top (|z1|) has a fancy curl to the left, +% jutting out 3 stem widths. +% \begin{macrocode} + +def draw_upcurlstem(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + path curlp[]; numeric curln[]; + x$a=x$; top y$a = y$; % top of straight stem + draw z$a--z$$; % straight part + curln1 := rt x$a - lft x$a; % stem width + x$b = x$a - 4/2curln1; y$b = y$a; % left jut + curlp1 := z$a{-pdir}..{left}z$b; + draw curlp1; + + x$c = x$a-3curln1; top y$c = bot y$a-1/2curln1; + x$f = x$b; y$f = 1/3[y$c,y$b]; + x$tb = rt x$b; y$tb = top y$b; + x$bb = lft x$b; y$bb = bot y$b; + curlp2 := z$tb--z$bb..{down}z$c..{ppdir}z$f; + pickup stylus; + draw curlp2; + pickup oldpen; + labels($a,$b,$c,$d,$e,$f); +enddef; % end of draw_upcurlstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_updiamondstem} +% A macro to draw a vertical stem with a diamond at the top. +% |draw_updiamondstem(1,2,fr,minfr,wd,ang)| uses the quill pen to draw a vertical line, +% whose absolute +% top and bottom are at |z1| and |z2|. The top (|z1|) has a leftward diamond, whose +% left jut is |fr| times the width of the stem, right jut is |minfr*stem_width|, width +% is |wd*stem_width| and angle above the horizontal is |ang|. +% \begin{macrocode} + +def draw_updiamondstem(suffix $, $$)(expr fr, minfr, wd, phi)= + pen oldpen; oldpen:=currentpen; + numeric sj; sj := fr*stem_width; % jut distance + numeric sjr; sjr := minfr*stem_width; % right jut distance + numeric jw; jw := wd*stem_width; % jut width + %% $b is bottom left of jut, on LHS of stem + %% $c is leftmost point on jut + %% $d is topmost point on jut + %% $g is topmost point on stem + %% $e is on exprapolation of line from $d through $g + %% i.e., the rightmost point on jut + %% $f is on RHS of stem + pickup quill; + x$b = lft x$; + x$c = x$b - sj; y$c = y$ - jw*(cosd phi); % $c done + y$b = y$c - sj*(sind phi); % $b done + x$d = x$c + jw*(sind phi); y$d = y$; % $d done + x$g = x$f = rt x$; + y$g = y$ - (x$g-x$d)*(sind phi)/(cosd phi); % $g done + x$a = x$; top y$a = y$g; % $a done + x$e = x$g + sjr; z$e = whatever[z$d,z$g]; % $e done + z$f-z$e = whatever*(z$c-z$d); % $f done + x$h = x$b; y$h = bot y$a; + draw z$a--z$$; % straight part + pickup stylus; + lft x$cc = x$c; y$cc = y$c; + x$dd = x$d; top y$dd = y$d; + rt x$ee = x$e; bot y$ee=y$e; + filldraw z$b--z$cc--z$dd--z$ee--z$f--cycle; % diamond + if y$b > y$h: + lft x$hh = x$h; y$hh=y$h; + filldraw z$b--z$hh--z$g--cycle; + fi + pickup oldpen; + labels($a,$b,$c,$d,$e,$f); +enddef; % end of draw_updiamondstem + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_downdiamondstem} +% A macro to draw a vertical stem with a diamond at the bottom. +% |draw_downdiamondstem(1,2,fr,minfr,wd,ang)| uses the quill pen to draw a vertical line, +% whose absolute +% top and bottom are at |z1| and |z2|. The bottom (|z2|) has a rightward diamond, whose +% right jut is |fr| times the width of the stem, left jut is |minfr*stem_width|, +% width is |wd*stem_width| and is at |ang| degrees below the horizontal. +% \begin{macrocode} + +def draw_downdiamondstem(suffix $, $$)(expr fr, minfr, wd, phi)= + pen oldpen; oldpen:=currentpen; + numeric sj; sj := fr*stem_width; % (left) jut distance + numeric sjr; sjr := minfr*stem_width;; % right jut distance + numeric jw; jw := wd*stem_width; % jut width + %% $$b is top right of jut, on RHS of stem + %% $$c is rightmost point on jut + %% $$d is bottommost point on jut + %% $$g is bottommost point on stem + %% $$e is on exprapolation of line from $d through $g + %% i.e., the leftmost point on jut + %% $$f is on LHS of stem + pickup quill; + x$$b = rt x$$; + x$$c = x$$b + sj; y$$c = y$$ + jw*(cosd phi); % $$c done + y$$b = y$$c + sj*(sind phi); % $$b done + x$$d = x$$c - jw*(sind phi); y$$d = y$$; % $$d done + x$$g = x$$f = lft x$$; + y$$g = y$$ + (x$$d-x$$g)*(sind phi)/(cosd phi); % $$g done + x$$a = x$$; bot y$$a = y$$g; % $$a done + x$$e = x$$g - sjr; z$$e = whatever[z$$d,z$$g]; % $$e done + z$$f-z$$e = whatever*(z$$c-z$$d); % $$f done + x$$h = x$$b; y$$h = top y$$a; + draw z$--z$$a; % straight part + pickup stylus; + rt x$$cc = x$$c; y$$cc=y$$c; + x$$dd = x$$d; bot y$$dd = y$$d; + lft x$$ee = x$$e; top y$$ee = y$$e; + filldraw z$$b--z$$cc--z$$dd--z$$ee--z$$f--cycle; % diamond + if y$$b < y$$h: + rt x$$hh = x$$h; y$$hh=y$$h; + filldraw z$$b--z$$hh--z$$g--cycle; + fi + pickup oldpen; + labels($$a,$$b,$$c,$$d,$$e,$$f); +enddef; % end of draw_downdiamondstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_serif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_serif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; + z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + top_serif:=false; + z$c=z$b shifted (bjut*pdir); + fi +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_serif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_roundserif} +% The |draw_serif| routine can leave a bump at the end of the stem. +% The |draw_roundserif| routine, which takes the same arguments, +% is meant to eliminate the bump. +% \begin{macrocode} + +def draw_roundserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); + undraw z$--z$a; +enddef; % end of draw_roundserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flatserif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. This produces a serif like |draw_serif| except +% that one side of the seerif is flat. +% \begin{macrocode} + +def draw_flatserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; +%%% z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-jut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (jut*pdir); + fi + z$b = fr[z$,z$c]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$a--z$; + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_flatserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_clubserif} +% A macro to draw a clubbed serif. |draw_clubserif(1,2,f)| uses the current +% pen to +% draw a clubbed serif of extent |clubjut| at |z1| to the left of the line +% from |z2| +% to |z1|. The serif matches |z1| like the flatserif does and ends at the +% point |f[z1,z2]|. +% \begin{macrocode} + +def draw_clubserif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| controls the length of the serif. +% \begin{macrocode} +%% beta=1-fr; + ajut=clubjut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem, |fr| between |$| and |$$|. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); +%% vec2=ajut*vec1; +%% z$a=z$ shifted vec2; + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$ shifted (-clubjut*pdir); + else: + top_serif:=false; + z$c=z$ shifted (clubjut*pdir); + fi + z$a = fr[z$,z$$]; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$c..z$a{vec1}; + labels($a,$b,$c); +enddef; % end of draw_clubserif + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{draw_triserif} +% A macro to draw a triangular top left serif. +% |draw_triserif(1,tj)| draws a serif at |z1| with its leftmost x +% value at |x1-tj|, where it is assumed that the +% top point on the stem is at |z1| and the stem was drawn with |quill|. +% \begin{macrocode} + +def draw_triserif(suffix $)(expr tj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$ts1'=lft x$; y$ts1'=bot y$; + pickup stylus; + lft x$ts1=x$ts1'; bot y$ts1=y$ts1'; + x$ts2=x$ts1-tj; z$ts2=whatever[z$,z$ts1]; + x$ts3=x$ts1; y$ts3=y$ts2-tj; + pickup stylus; +%% filldraw z$ts1--z$ts2--z$ts3--cycle; + filldraw z$--z$ts2--z$ts3--cycle; + pickup oldpen; + labels($ts1,$ts2,$ts3); +enddef; % end of draw_triserif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_istem} +% A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs +% are of extent |jut|. There is a top left and bottom right serif. +% The serif radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_istem(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % top serif + draw_serif($$, $, fr); % bottom serif + draw z$a--z$$a; % the stem +enddef; % end of draw_istem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tstem} +% A macro to draw the shape of the stem of a `t'. |draw_tstem(1,2,f)| draws a +% stem whose +% top is at |z1| and bottom at |z2| with a right serif at |z2|. The radius +% is controlled by |f|, with $0 < f < 1$. +% It draws with the current pen and the serif is of extent |jut|. +% NOTE: for the TGOTH font, just the stem is drawn --- no serif! +% \begin{macrocode} + +def draw_tstem(suffix $, $$)(expr fr)= +%% draw_serif($$, $, fr); % the serif +%% draw z$--z$$a; % the stem + draw z$--z$$; +enddef; % end of draw_tstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tlserif} +% A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serif +% is of extent |jut|. It also draws the stem to the point |z2|. The serif +% radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_tlserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % the serif + draw z$a--z$$; % the stem +enddef; % end of draw_tlserif + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_flick} +% A macro to draw a flick (like an eyebrow). +% |draw_flick(1,rise,fall,fjut)| draws a stroke starting at |z1| rising up by +% |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is +% |fjut| to the right of |z1|. It is drawn with the current pen. +% \begin{macrocode} + +def draw_flick(suffix $)(expr rise, fall, fjut)= +% \end{macrocode} +% The points |z$a| and |z$b|, together with |z$| make up three points on the +% ductus. +% \begin{macrocode} + rt x$b = x1+fjut; top y$b=y$-fall; + x$a=0.5[x$,x$b]; top y$a=y$+rise; +% \end{macrocode} +% Draw the part, and finish off. +% \begin{macrocode} + draw z$..z$a..z$b; + labels($a,$b); +enddef; % end of draw_flick + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_wave} +% A macro to draw a (horizontal) stroke with a flick at each end +% (down at the left and up at the right). |draw_wave(1,2,f)| uses the current +% pen to draw from |z1wl| to |z1wr|, where |x1wl=x1|, |y1wl=y1-f|, and +% |x1wr=x2|, |y1wr=y2+f|, with |z1| assumed to be at the left of |z2|. +% \begin{macrocode} + +def draw_wave(suffix $,$$)(expr f)= + x$wl=x$; y$wl=y$-f; + x$wr=x$$; y$wr=y$$+f; + z$wc=0.5[z$wl,z$wr]; + draw z$wl{pdir}..z$wc{right}..{pdir}z$wr; + labels($wl,$wc,$wr); +enddef; % end of draw_wave +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tail} +% A macro to draw a tail at the bottom of a (vertical) stem. +% |draw_tail(1,fjut)| draws a tail at the bottom of the stem which ends at |z1|. +% The depth is controlled by the |desc_depth| value and the jut by |fjut|. +% \begin{macrocode} + +def draw_tail(suffix $)(expr fj)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$tl' = lft x$; y$tl=bot y$; + pickup stylus; + lft x$tl=x$tl'; + x$tb=x$tl-fj; bot y$tb=y$tl-1/2desc_depth; + filldraw z${down}..{-pdir}z$tb & z$tb{pdir}..{up}z$tl--cycle; + pickup oldpen; + labels($tb,$tl); +enddef; % end of draw_tail +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_triangle} +% A macro to draw a downward pointing equilateral triangle. +% |draw_triangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_triangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$-0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_triangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_utriangle} +% A macro to draw an upward pointing equilateral triangle. +% |draw_utriangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle +% of the base. +% \begin{macrocode} + +def draw_utriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz/2; x$t3=x$+sz/2; + y$t1=y$t3=y$; + x$t2=x$; y$t2=y$+0.9sz; % approx sqrt(3)/2 + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_utriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rtriangle} +% A macro to draw a downward pointing right angled triangle. +% |draw_rtriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rtriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$-sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rtriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_rutriangle} +% A macro to draw an upward pointing right angled triangle. +% |draw_rutriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the +% right (where the right angle is). +% \begin{macrocode} + +def draw_rutriangle(suffix $)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup stylus; + x$t1=x$-sz; rt x$t3=x$; + y$t1=y$t3=y$; + x$t2=x$t3; y$t2=y$+sz; + filldraw z$t1--z$t2--z$t3--cycle; + pickup oldpen; + labels($t1,$t2,$t3); +enddef; % end of draw_rutriangle +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_fork} +% A macro to draw a forked line. +% |draw_fork(1,2,sz)| draws a graduated line from |z1| to |z2| with a forked +% end of size |sz|. +% \begin{macrocode} + +def draw_fork(suffix $, $$)(expr sz)= + pen oldpen; oldpen:=currentpen; + pickup quill; + x$f1'=lft x$; y$f1'=bot y$; + x$f3'=rt x$; y$f3'=top y$; + pickup stylus; + lft x$f1=x$f1'; bot y$f1=y$f1'; + rt x$f3=x$f3'; y$f3-y$=2*(y$-y$f1); + rt x$f2=x$$-sz; bot y$f2=y$$; + rt x$f4= rt x$f5=x$$; + bot y$f5=y$$-sz; top y$f4=y$$+1/2sz; + filldraw z$f1--z$f2--z$f3--cycle; % the line + draw z$f2{right}..z$f4; % upper fork + draw z$f2{right}..z$f5; % lower fork + pickup oldpen; + labels($f1,$f2,$f3,$f4,$f5); +enddef; % end of draw_fork +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_urswish} +% A macro to draw a line up and to the right with an under curl at the end. +% |draw_urswish(1,2)| draws from |z1| towards |z2|, which is the max upper right +% of a bounding box, where the curl is. +% \begin{macrocode} + +def draw_urswish(suffix $, $$)= + pen oldpen; oldpen:=currentpen; + pickup quill; + rt x$$s1=x$$-thick; top y$$s1=y$$; + rt x$$s2=x$$; +%% x$$s3=x$$-thick; + lft x$$s3=x$$s1; + bot y$$s3=y$$-thick; y$$s2=0.5[y$$s1,y$$s3]; +%% draw z$---z$$s1{right}..z$$s2{down}..{-pdir}z$$s3; + draw z$..z$$s1{pdir}..z$$s2{down}; + labels($$s1,$$s2,$$s3); +enddef; % end of draw_urswish +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{bowl_stem} +% Calculate where a bowl should meet a stem so that the pen is moving in the +% pen direction. +% |bowl_stem(1,2)| calculates the point |z1i|, where |z1| is on the bowl and +% there is a vertical line at |x2|. +% +% \begin{macrocode} + +def bowl_stem(suffix $, $$)= + x$'=0.5[x$,x$$]; y$'=y$; % the mid-point + z$''=z$' shifted (thick*pdir); + x$i=x$$; z$i=whatever[z$',z$'']; + labels($',$i); +enddef; % end of bowl_stem +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_clubbase} +% Draw a clubbed bottom of a vertical stem for the TGOTH font. +% |draw_clubbase(1, 2, st, left, right)| draws from |st[z2,z1]| to |z2|. +% At |z2| the pen +% is shifted |left| fraction of the pen width and |right| fraction of the +% pen width, both in the direction of the pen angle. Pen draws smoothly the +% path |z1|, |left|, |right|, |z1|. +% \begin{macrocode} + +% draw clubbed bottom of vertical stem for TGOTH font. +def draw_clubbase(suffix $, $$)(expr st, lft, rt)= + z$$l = z$$ shifted (lft*thick*(-pdir)); + z$$r = z$$ shifted (rt*thick*(pdir)); + z$$t = st[z$$,z$]; + draw z$$t{z$$-z$}..z$$l--z$$r..{z$-z$$}z$$t; + labels($$t,$$l,$$r); +enddef; % end of draw_clubbase + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pdot} +% A macro to draw a period dot. +% |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|. +% \begin{macrocode} + +def draw_pdot(suffix $)(expr sz)= +% \end{macrocode} +% Draw a square rotated 45 degrees. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$ shifted (0.5sz*up); + z$u = z$s shifted (sz*right); + z$v = z$t shifted (sz*down); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pdot + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pcomma} +% A macro to draw a period comma. +% |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. The pen is |stylus|. +% \begin{macrocode} + +def draw_pcomma(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping back and down +% for a total width of |ar| and deptrh of |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s-ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu--z$uv--z$vu--z$v--z$sv--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pcomma + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_plq} +% A macro to draw a period left quote. +% |draw_pcomma(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. +% \begin{macrocode} + +def draw_plq(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping forward and down +% for a total width of |ar| and depth |2ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s+ar; y$v=y$s-2ar; + z$u = z$v shifted (sz*right); + z$sv = (x$s, 1/3[y$s,y$v]); + z$tu = (x$t, y$sv); + z$uv = 1/3[z$u,z$v]; + z$vu = 1/3[z$v,z$u]; + pickup stylus; +%% filldraw z$s--z$t--z$u--z$v--cycle; + filldraw z$s--z$t--z$tu--z$uv--z$vu--z$v--z$sv--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_plq + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{offsetbowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for a non-centered letter `o'. |offsetbowl($, sx, sy, fx, fy)| +% calculates the paths for an `o' +% enclosed in a rectangle size |sx| by |sy| with its bottom lefthand corner +% located at |z$|, where the center of the o is at |(fx*sx, fy*sy)| in the +% bounding rectangle. +% +% Two construction paths, namely |obfirst| and |obsecond| are also +% available. They should be identical. +% +% All paths have points listed in a clockwise direction, starting with +% |z$nh| or |z$minl| as appropriate. +% +% |offsetbowl($, sx, sy, 1/2, 1/2)| gives the same results as |obowl($, sx, sy)|. +% \begin{macrocode} + +path obouter, obinner, obfirst, obsecond; +def offsetbowl(suffix $)(expr sx, sy, fx, fy)= + numeric inx, iny, cx, cy; + pair pt[]; + path pth[]; + inx := 1/2thick*cosd(pangle); iny := 1/2thick*sind(pangle); + cx := x$+fx*sx; cy := y$+fy*sy; + z$obc = (cx,cy); +% \end{macrocode} +% Calulate points on the centre path of the pen. These are offset by |inx| +% from the rectangles vertical sides and by |iny| from the horizontal sides. +% If the pen is parallel to a side, offset the point by half the pen's +% dimension. First do the West, East, North and South points. +% \begin{macrocode} + if pangle = 90: + z$wt=(x$+1/2thin, cy); + z$et=(x$+sx-1/2thin, cy); + else: + z$wt=(x$+inx, cy); + z$et=(x$+sx-inx, cy); + penpos$wt(thick,pangle); + penpos$et(thick,pangle); + fi + if pangle = 0: + z$nh=(cx, y$+sy-1/2thin); + z$sh=(cx, y$+1/2thin); + else: + z$nh=(cx, y$+sy-iny); + z$sh=(cx, y$+iny); + penpos$nh(thick,pangle); + penpos$sh(thick,pangle); + fi + obfirst := z$nh{right}..z$et{down}..z$sh{left}..z$wt{up}..cycle; +% \end{macrocode} +% Now calculate the points on the path |obfirst| where the pen will +% draw the min width lines (i.e., the points where the pen will be +% moving parallel to |pangle|). +% \begin{macrocode} + if pangle = 90: + z$minl = z$wt; z$maxr = z$nh; z$minr = z$et; z$maxl = z$sh; + else: + if pangle = 0: + z$minl = z$nh; z$maxr = z$et; z$minr = z$sh; z$maxl = z$wt; + else: + z$minl = directionpoint dir(pangle) of obfirst; + z$minr = directionpoint -dir(pangle) of obfirst; +% \end{macrocode} +% The max points are roughly where the inner and outer diverge +% the most. These are simple for 0 and 90 degree pens and have +% been calculated above. It's not so simple for intermediate +% angles. For a reasonable looking result, we pick the max +% points to be halfway between the min points. This involves +% calculating some angles, paths and intersections. +% \begin{macrocode} + pt1 := z$minr - z$minl; % direction + pt2 := (- ypart pt1, xpart pt1); % perpendicular + pt3 := 1/2[z$minl, z$minr]; + pt4 := pt3 shifted pt2; + pt5 := pt3 shifted -pt2; + pth1 := pt3--pt4; + pth2 := pt3--pt5; + z$maxr = pth1 intersectionpoint obfirst; + z$maxl = pth2 intersectionpoint obfirst; + \fi + \fi +% \end{macrocode} +% Place the pen at each of these points to get the outer and inner points. +% \begin{macrocode} + penpos$minl(thin,pangle+90); + penpos$maxr(thick,pangle); + penpos$minr(thin,pangle+90); + penpos$maxl(thick,pangle); +% \end{macrocode} +% Finally, the outer and inner paths. +% \begin{macrocode} + obsecond := z$minl..z$maxr..z$minr..z$maxl..cycle; + z$minlo = z$minl.r; z$maxro = z$maxr.r; + z$minro = z$minr.l; z$maxlo = z$maxl.l; + obouter := z$minlo{dir(pangle)}...z$maxro...z$minro{-dir(pangle)}...z$maxlo...cycle; + z$minli = z$minl.l; z$maxri = z$maxr.l; + z$minri = z$minr.r; z$maxli = z$maxl.r; + obinner := z$minli...z$maxri...z$minri...z$maxli...cycle; + labels($obc, $nh, $et, $sh, $wt); + labels($minl, $maxr, $minr, $maxl); + labels($minlo, $maxro, $minro, $maxlo); + labels($minli, $maxri, $minri, $maxli); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{obowl} +% A macro to calculate the outer and inner paths (|obouter| and |obinner|) +% for the letter `o'. |obowl($, sx, sy)| calculates the paths for an `o' +% centered and enclosed in a rectangle size |sx| by |sy| with its bottom +% lefthand corner located at |z$|. +% \begin{macrocode} + +def obowl(suffix $)(expr sx, sy)= + offsetbowl($, sx, sy, 1/2, 1/2); +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{scalarprod} +% |v scalarprod w| calulates the scalar product between the +% two vectors |v| and |w|. +% \begin{macrocode} + +primarydef v scalarprod w = + (xpart v * ypart w - ypart v * xpart w) +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{tangentpoint} +% |tangentpoint($, path)| calculates the point |z$tan| on the |path| +% so that |z$tan--z$| is tangent to the path. It uses a binary search +% to find a point on the path such that the path direction is +% (anti-) parallel to the dirction from that point to the given point. +% \begin{macrocode} + +def tangentpoint(suffix $)(expr pth)= + pair vecll, veclr, veclm; % "tangent" line directions + numeric pl, pr, pm; % path parameter values + pair vecpl, vecpr, vecpm; % path directions + pair ptl, ptr, ptm; % path points + numeric sl, sr, sm; % scalar products of path/line directions + numeric stpsize; % size of current binary step + numeric tantol; % tolerance + boolean wtest; % a boolean + + tantol := eps; +% \end{macrocode} +% Initialise using the left right and middle points on the path. +% \begin{macrocode} + pl:=0; pr:=length pth; pm:=0.5(pl+pr); stpsize:=pr-pl; + ptl := point pl of pth; + ptm := point pm of pth; + ptr := point pr of pth; +% \end{macrocode} +% Now the various vectors, and make sure they are unit vectors to +% have a consistent measure scale when we take the scalar products. +% \begin{macrocode} + vecll := unitvector (z$-ptl); + veclm := unitvector (z$-ptm); + veclr := unitvector (z$-ptr); + vecpl := unitvector (direction pl of pth); + vecpm := unitvector (direction pm of pth); + vecpr := unitvector (direction pr of pth); + sl := vecll scalarprod vecpl; + sm := veclm scalarprod vecpm; + sr := veclr scalarprod vecpr; +% \end{macrocode} +% We stop if any of the points is the tangent point, or if the step +% size is too small, or if the signs of the left and right scalar +% products are the same. +% \begin{macrocode} + wtest := (stpsize < tantol) or (sl*sr > 0) or + (abs sl < tantol) or (abs sm < tantol) or (abs sr < tantol); + if wtest: + if (stpsize < tantol): + z$tan=(0,0); + errmessage("No tangent; path too short"); + else: + if (sl*sr > 0): + z$tan=(0,0); + errmessage("No tangent; end products have the same sign"); + else: + if (abs sl < tantol): + z$tan=ptl; + else: + if (abs sm < tantol): + z$tan=ptm; + else: + z$tan=ptr; + fi + fi + fi + fi + else: +% \end{macrocode} +% There should be a tangent and we iterate to find it, using +% bisection. If there is one to be found it will be at the +% current middle point. The tangent point will be somewhere +% between the two points that lead to opposite signed scalar +% products. +% \begin{macrocode} + forever: + if (sl*sm < 0): % opposite signs, look between pl & pm + pr:=pm; pm:=0.5(pr+pl); + vecpr := vecpm; veclr := veclm; sr:=sm; + else: + pl:=pm; pm:=0.5(pr+pl); + vecpl:=vecpm; vecll:=veclm; sl:=sm; + fi + stpsize:=pr-pl; + ptm := point pm of pth; + veclm := unitvector (z$-ptm); + vecpm := unitvector (direction pm of pth); + sm := veclm scalarprod vecpm; +% \end{macrocode} +% We stop the iteration if the step size is too small or the +% middle point is the tangent point. In either case, the +% middle point is the best guess that can be made. +% \begin{macrocode} + wtest := (stpsize < tantol) or (abs sm < tantol); + if wtest: + if (abs sm < tantol): + z$tan = ptm; + else: + z$tan = ptm; +%%%%%% errmessage("Warning: tangent approximated"); + fi + fi + exitif wtest; + endfor + fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% Set the mode and font setup. +% \begin{macrocode} + +font_coding_scheme:="ASCII minuscules and punctuation"; +mode_setup; +tgothic_font_setup; + +% \end{macrocode} +% +% +% We generate letters, together with some punctuation and +% analphabetics. +% \begin{macrocode} + +input tgothl; % lower case +input tgothu; % capitals +input tgothpunct; % punctuation +input tgothlig; % the several dashes +input tgothdig; % arabic digits + +% \end{macrocode} +% +% Set up the spacings, stretches and shrinks. +% +% \begin{macrocode} + +font_slant slant; font_x_height x_height#; +if monospace: + font_normal_space 2vstretch*stem_width#; % no stretching or shrinking + font_quad vstretch*18u#; + font_extra_space vstretch*9u#; +else: + font_normal_space 2vstretch*stem_width#+2letter_fit#; + font_normal_stretch vstretch*3u#; font_normal_shrink vstretch*2u#; + font_quad vstretch*18u#+4letter_fit#; + font_extra_space vstretch*2u#; + +% \end{macrocode} +% +% Finally, do the ligtables, but I don't think they are needed (yet?). +% +% \begin{macrocode} + +fi + +bye. + + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + kks#:=-4u#; kkx#:=-1.5u#; kkj#:=-2u#; kkr#:=-5u#; kkrs#:=-2u#; kkrl#:=-8u#; + ligtable "s": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "S": + "a" kern kks#, "A" kern kks#, + "c" kern kks#, "C" kern kks#, + "d" kern kks#, "D" kern kks#, + "e" kern kks#, "E" kern kks#, + "f" kern kks#, "F" kern kks#, + "g" kern kks#, "G" kern kks#, + "i" kern kks#, "I" kern kks#, + "j" kern kks#, "J" kern kks#, + "k" kern kks#, "K" kern kks#, + "m" kern kks#, "M" kern kks#, + "n" kern kks#, "N" kern kks#, + "o" kern kks#, "O" kern kks#, + "p" kern kks#, "P" kern kks#, + "q" kern kks#, "Q" kern kks#, + "r" kern kks#, "R" kern kks#, + "t" kern kks#, "T" kern kks#, + "u" kern kks#, "U" kern kks#, + "v" kern kks#, "V" kern kks#, + "w" kern kks#, "W" kern kks#, + "x" kern kks#, "X" kern kks#, + "y" kern kks#, "Y" kern kks#, + "z" kern kks#, "Z" kern kks#; + + ligtable "x": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "X": + "a" kern kkx#, "A" kern kkx#, + "b" kern kkx#, "B" kern kkx#, + "c" kern kkx#, "C" kern kkx#, + "d" kern kkx#, "D" kern kkx#, + "e" kern kkx#, "E" kern kkx#, + "g" kern kkx#, "G" kern kkx#, + "j" kern kkx#, "J" kern kkx#, + "l" kern kkx#, "L" kern kkx#, + "o" kern kkx#, "O" kern kkx#, + "q" kern kkx#, "Q" kern kkx#, + "t" kern kkx#, "T" kern kkx#, + "u" kern kkx#, "U" kern kkx#, + "v" kern kkx#, "V" kern kkx#, + "w" kern kkx#, "W" kern kkx#, + "y" kern kkx#, "Y" kern kkx#; + + ligtable "a": "A": + "b": "B": + "c": "C": + "d": "D": + "e": "E": + "h": "H": + "i": "I": + "k": "K": + "l": "L": + "m": "M": + "n": "N": + "o": "O": + "p": "P": + "t": "T": + "u": "U": + "v": "V": + "w": "W": + "z": "Z": + "j" kern kkj#, "J" kern kkj#; + + ligtable "r": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + ligtable "R": + "a" kern kkr#, "A" kern kkr#, + "b" kern kkr#, "B" kern kkr#, + "c" kern kkr#, "C" kern kkr#, + "d" kern kkr#, "D" kern kkr#, + "e" kern kkr#, "E" kern kkr#, + "f" kern kkrs#, "F" kern kkrs#, + "g" kern kkrs#, "G" kern kkrs#, + "h" kern kkr#, "H" kern kkr#, + "i" kern kkr#, "I" kern kkr#, + "j" kern kkj#, "J" kern kkj#, + "k" kern kkrs#, "K" kern kkrs#, + "l" kern kkr#, "L" kern kkr#, + "m" kern kkr#, "M" kern kkr#, + "n" kern kkrs#, "N" kern kkrs#, + "o" kern kkr#, "O" kern kkr#, + "p" kern kkrs#, "P" kern kkrs#, + "q" kern kkr#, "Q" kern kkr#, + "r" kern kkrs#, "R" kern kkrs#, + "s" kern kkr#, "S" kern kkr#, + "t" kern kkr#, "T" kern kkr#, + "u" kern kkr#, "U" kern kkr#, + "v" kern kkr#, "V" kern kkr#, + "w" kern kkr#, "W" kern kkr#, + "x" kern kkx#, "X" kern kkx#, + "y" kern kkr#, "Y" kern kkr#, + "z" kern kkr#, "Z" kern kkr#; + + +fi + +bye. + +%</mfd> +% \end{macrocode} +% +% \subsection{The code for normal letters} +% +% The following code is for the lower case characters. +% +% \begin{macrocode} +%<*min> +% TGOTHL.MF Program file for Gothic Textura Quadrata lower case +% + +% \end{macrocode} +% +% +% \begin{routine}{a} +% The letter `a'. +% \begin{macrocode} +cmchar "TGOTH letter a"; +beginchar("a", 2sb#+hstretch*((3+widedmin+wided)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pair pr[]; +pickup quill; +%% left hand +lft x1 = pcshiftx + widedmin*stem_width; y1 = 1/2h; +x2 = x1; y2 = 0; +draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); +%% right stem +rt x3 = w - pcshiftx - wided*stem_width; y3=h; +x4=x3; y4=0; +z34=1/2[z3,z4]; +draw_updiamondstem(3,34,1.0,0.1,diawd,diang); +draw_downdiamondstem(34,4,wided,widedmin,diawd,diang); +%% swirl +x11=rt x1; y11 = top y1; +pickup stylus; +draw z3d--z3c..{-ppdir}z11; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +endchar; % end "a" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{b} +% The letter `b'. +% \begin{macrocode} +cmchar "TGOTH letter b"; +beginchar("b", 2sb#+hstretch*((3 + widedmin + narrowdmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := sb; +pickup quill; +n1:=w-2pcshiftx; % actual letter width +n2:=h/ascratio; % top of bowl +%%ductus:=true; +lft x1 = pcshiftx + widedmin*st; y1=h; +x2 = x1; y2=0; +z3=1/2[z1,z2]; +draw_upforkstem(1,3); +draw_downdiamondstem(3,2,1.0,widedmin,diawd,diang); +lft x6 = x2c; bot y6 = y2c; +x4 = x6; y4=n2; +draw_updiamondstem(4,6,narrowd,narrowdmin,diawd,diang); +x7 = x1; z7 = whatever[z4d,z4c]; +pickup stylus; +draw z4d--z7; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "b" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{c} +% The letter `c'. +% \begin{macrocode} +cmchar "TGOTH letter c"; +beginchar("c", 2sb#+hstretch*((3+wided)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; +st := stem_width; +pcshiftx := sb; +pickup quill; +%% left +lft x1 = pcshiftx+wided*st; y1 = 3/4h; +x2 = x1; y2 = 0; +draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); +%% top +lft x3 = rt x1; bot y3 = top y1; +rt x4 = w - pcshiftx; +z3 - z4 = -whatever*ppdir; +draw z3--z4; +z11-z2c = z2c - z2d; +pickup stylus; +draw z2d--z11; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100); +endchar; % end "c" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{d} +% The letter `d'. +% \begin{macrocode} +cmchar "TGOTH letter d"; +beginchar("d", 2sb#+hstretch*((3+widedmin+narrowdmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := sb; +pickup quill; +n1 = h/ascratio; % x-height +%% left +n2 := st*(cosd diang); +lft x1 = pcshiftx + widedmin*st; top y1 = 12/16n1; +x2=x1; y2=0; +draw_downdiamondstem(1,2, 1.0, widedmin, diawd,diang); +%% right +rt x3 = w-pcshiftx-narrowdmin*st; y3=h; +x4 = x3; bot y4 = y2c; +draw_updiamondstem(3,4, 2.0, narrowdmin, diawd,diang); +x31 = lft x1; y31 = bot y1; +x32 = rt x1; y32 = top y1; +z33 = whatever[z31,z32] = whatever[z3e,z3c]; +pickup stylus; +draw z31--z33; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "d" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{e} +% The letter `e'. +% \begin{macrocode} +cmchar "TGOTH letter e"; +beginchar("e", 2sb#+hstretch*((3+wided)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; +st := stem_width; +path pth[]; +pickup quill; +%% left +lft x1 = pcshiftx+wided*st; y1 = 3/4h; +x2 = x1; y2 = 0; +draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); +%% top +lft x3 = rt x1; bot y3 = top y1; +rt x4 = w - pcshiftx; +z3 - z4 = -whatever*ppdir; +draw z3--z4; +x5 = x1; +z4-z5 = whatever*pdir; +pickup stylus; +draw z4--z5; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,17,27,34,70,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{f} +% The letter `f'. +% \begin{macrocode} +cmchar "TGOTH letter f"; +beginchar("f", 2sb#+hstretch*((3+widedmin)*stem_width#), + (asc_height#), 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +pcshiftx := sb; +pickup quill; +n1 := h/ascratio; % x-height +%% stem +lft x1=lft x2=pcshiftx+widedmin*st; y2=0; top y1 = h - (top y2 - bot y2); +draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); +%% top bar +lft x3 = rt x1; rt x5 = w-pcshiftx; bot y3 = top y1; y5=y3; +draw z3--z5; +%% middle bar +lft x7 = pcshiftx; rt x9 = x5; +y7 = y9 = 10/16h; +draw z7--z9; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,14,15,16,100); +endchar; % end "f" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{g} +% The letter `g'. +% \begin{macrocode} +cmchar "TGOTH letter g"; +beginchar("g", 2sb#+hstretch*((4)*stem_width#), + x_height#, desc_depth#); +adjust_fit(0,0); +path pth[]; +pair vec[]; +numeric n[]; +numeric st; st := stem_width; +pcshiftx := sb; +pickup quill; +%% left +lft x1 = pcshiftx; +x2 = x1; bot y2 = 0; top y1 = h - (top y2 - bot y2); +draw z1--z2; +x3 = x4 = x1 + 2st; y4 = y2; +lft x13 = rt x1; bot y13 = top y1; +(z3-z13) = whatever*(dir -diang); +draw z13--z3--z4; +z34 = 1/2[z13,z3]; rt x37 = w-pcshiftx; top y37 = h; +draw z34{right}..{pdir}z37; +pickup stylus; +bot y5 = -d; +(z4-z5) = whatever*pdir; +draw z4--z5; +pickup quill; +%% bottom loop +z21 = z2; +lft x25 = x5; bot y25=-d; +x29 = 1/2[x3,x37]; +(z29-z21) = whatever*(dir -diang); +x23 = x29; y23 = 1/2[y29,y25]; +draw z21{dir - diang}..z23{down}..{left}z25; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,12,13,31,32,33,34,35,36,100); +endchar; % end "g" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{h} +% The letter `h'. +% \begin{macrocode} +cmchar "TGOTH letter h"; +beginchar("h", 2sb#+hstretch*((3 + narrowd + narrowdmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +numeric n[]; +n1 = h/ascratio; +%% stem +lft x1=lft x2=pcshiftx + narrowdmin*stem_width; +y1=h; y2=0; +z12 = 1/2[z1,z2]; +draw_upforkstem(1,12); +draw_downdiamondstem(12,2,narrowd,narrowdmin,diawd,diang); +%% bowl +x3 = x1 + 2stem_width; x4 = x3; +y3 = n1; y4=0; +z34 = 1/2[z3,z4]; +draw_updiamondstem(3,34,narrowd,narrowdmin,diawd,diang); +draw_downdiamondstem(34,4,narrowd,narrowdmin,diawd,diang); +x7 = x1; z7 = whatever[z3d,z3c]; +pickup stylus; +draw z3d--z7; +penlabels(1,2,3,4,5,6,100); +endchar; % end "h" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{i} +% The letter `i'. +% \begin{macrocode} +cmchar "TGOTH letter i"; +beginchar("i", 2sb#+hstretch*(2stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +x1 = x2 = 1/2w; y1 = h; y2 = 0; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,1/2,1/2,diawd,diang); +draw_downdiamondstem(12,2,1/2,1/2,diawd,diang); +x3= x1-thin; bot y3 = h + 1/2stem_width; +z4 = (x3+3thin,y3); +pickup halfquill; +draw z3--z4; +penlabels(1,2,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{j} +% The letter `j'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "TGOTH letter j"; +beginchar("j", sb#+hstretch*(5/2stem_width#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% stem +rt x1 = w-pcshiftx - 1/2stem_width; y1 = h; +x2=x1; y2=-1/2d; +%% bottom hook +lft x3 = pcshiftx; bot y3 = -d; +draw_updiamondstem(1,2,narrowd,narrowdmin,diawd,diang); +draw z2{down}..z3{-pdir}; % hook +ductus:=false; +penlabels(1,2,3,100); +endchar; % end "j" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{k} +% The letter `k'. +% \begin{macrocode} +cmchar "TGOTH letter k"; +beginchar("k", 2sb#+hstretch*((3 + narrowd + narrowdmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +n1 = h/ascratio; % x-height +lft x1=lft x2=pcshiftx + narrowdmin*st; +y1=h; y2=0; +z12 = 1/2[z1,z2]; +draw_upforkstem(1,12); +draw_downdiamondstem(12,2, narrowd, narrowdmin, diawd,diang); +%% right leg +x3 = x1 + 2st; y3 = 8/16n1; +x4 = x3; y4 = 0; +z34 = 1/2[z3,z4]; +draw_downdiamondstem(34,4, narrowd, narrowdmin, diawd,diang); +draw z3--z34; +lft x5 = rt x1; +(z3-z5) = whatever*(dir -diang); +draw z5--z3; + +%% top arm +x6 = 1/2[x3, rt x3]; +(z6-z5) = whatever*(pdir); +rt x8 = lft x5; top y8 = bot y5+thick; +(z7-z8) = whatever*(z6-z5); +(z7-z6)=whatver*(z5-z3); +draw z6--z7; +pickup stylus; +draw z5--z6--z7--z8; + +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,100); +endchar; % end "k" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{l} +% The letter `l'. +% \begin{macrocode} +cmchar "TGOTH letter l"; +beginchar("l", 2sb#+hstretch*((2 + widedmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +numeric st; st := stem_width; +pcshiftx := sb; +pickup quill; +lft x1=pcshiftx + widedmin*st; y1=h; +x2=x1; y2 =0; +z3 = 1/2[z1,z2]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_upforkstem(1,3); +draw_downdiamondstem(3,2,1.0,widedmin,diawd,diang); +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "l" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{m} +% The letter `m'. +% \begin{macrocode} +cmchar "TGOTH letter m"; +beginchar("m", 2sb#+hstretch*((5+wided+narrowd)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+wided*stem_width; y1 = y3 = y5 = h; +x2=x1; y2=y4=y6=0; +z12=1/2[z1,z2]; +draw_updiamondstem(1,12,wided,widedmin,diawd,diang); +draw_downdiamondstem(12,2,narrowd,narrowdmin,diawd,diang); +%% right stem +rt x5 = rt x6 = w-pcshiftx-narrowd*stem_width; +z56 = 1/2[z5,z6]; +draw_updiamondstem(5,56,wided,widedmin,diawd,diang); +draw_downdiamondstem(56,6,narrowd,narrowdmin,diawd,diang); +%% middle stem +z3=1/2[z1,z5]; z4 = 1/2[z2,z6]; z34=1/2[z3,z4]; +draw_updiamondstem(3,34,wided,widedmin,diawd,diang); +draw_downdiamondstem(34,4,narrowd,narrowdmin,diawd,diang); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100); +endchar; % end "m" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{n} +% The letter `n'. +% \begin{macrocode} +cmchar "TGOTH letter n"; +beginchar("n", 2sb#+hstretch*((3+wided+narrowd)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% left stem +lft x1 = pcshiftx + wided*stem_width; y1 = h; +x2 = x1; y2 = 0; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,wided,widedmin,diawd,diang); +draw_downdiamondstem(12,2,narrowd,narrowdmin,diawd,diang); +%% right stem +rt x3 = w-pcshiftx - narrowd*stem_width; y3=y1; +x4=x3;y4=y2; +z34=1/2[z3,z4]; +draw_updiamondstem(3,34,wided,widedmin,diawd,diang); +draw_downdiamondstem(34,4,narrowd,narrowdmin,diawd,diang); +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "n" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{o} +% The letter `o'. +% \begin{macrocode} +cmchar "TGOTH letter o"; +beginchar("o", 2sb#+hstretch*((3 + narrowdmin + narrowdmin)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% bottom left +lft x12 = pcshiftx + narrowdmin*st; y12 = 1/2h; +x2 = x12; y2 = 0; +draw_downdiamondstem(12,2, 1.0, narrowdmin, diawd,diang); +%% right +rt x3 = w - pcshiftx - narrowdmin*st; x4=x3; +y3 = h; bot y4 = y2c; +draw_updiamondstem(3,4, 1.0, narrowdmin, diawd,diang); +%% top left +x1 = x12; top y1 = y3c; +draw z1--z12; +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "o" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{p} +% The letter `p'. +% \begin{macrocode} +cmchar "TGOTH letter p"; +beginchar("p", 2sb#+hstretch*((3 + wided + widedmin)*stem_width#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+wided*st; +y1=h; y2=-d; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,wided,widedmin,diawd,diang); +draw_downforkstem(12,2); +%% bowl +x3 = x4 = x1 + 2st; +y3 = y1; bot y4 = 0; +draw_updiamondstem(3,4,wided,widedmin,diawd,diang); +lft x5 = pcshiftx; y5 = y4; +draw z5--z4; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "p" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{q} +% The letter `q'. +% \begin{macrocode} +cmchar "TGOTH letter q"; +beginchar("q", 2sb#+hstretch*((3 + widedmin)*stem_width#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% left/bottom of bowl +y99 = 0; +lft x1 = pcshiftx +widedmin*st; top y1 = h - (top y99 - bot y99); +x2 = x1; y2 = 0; +draw_downdiamondstem(1,2, 1.0, widedmin,diawd,diang); +%% rest +x3 = x1 + 2st; x4 = x3; y3 = y1; y4 = -d; +lft x5 = rt x1; bot y5 = top y1; +draw_downforkstem(3,4); +draw z5--z3; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{r} +% The letter `r'. +% \begin{macrocode} +cmchar "TGOTH letter r"; +beginchar("r", 2sb#+hstretch*((3+wided)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx + wided*st; +y1=h; y2=0; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,wided,widedmin,diawd,diang); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +%% bar +lft x3 = rt x1; rt x4 = w-pcshiftx; top y3 = top y4 = h; +draw z3--z4; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,100); +endchar; % end "r" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{s} +% The letter `s'. This is a short S. +% \begin{macrocode} +cmchar "TGOTH letter s"; +beginchar("s", 2sb#+hstretch*((4)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +pcshiftx := sb; +pickup stylus; +%% the diagonal +lft x2 = pcshiftx; bot y2 = 0; +rt x1 = w-pcshiftx; top y1 = h; +draw z1--z2; +pickup quill; +z211 = 13/32[z2,z1]; %% 10/32 too small, 16/32 too large +z213 = 24/32[z2,z1]; %% 26/32 too large +z212 = 1/2[z211,z213]; +%% bottom bowl +lft x21 = x2; bot y21 = 0; +rt x22 = w - pcshiftx; bot y22 = 0; +x23 = x22; z24 = z212; +(z24-z23) = whatever*(dir (180-diang)); +draw z21{pdir}..z22--z23--z24; +%% top bowl +z14 = z211; z11 = z213; +lft x12 = lft x13 = pcshiftx; +(z13-z14) = whatever*(dir (180-diang)); +(z12-z11) = whatever*(dir (180-diang)); +draw z11--z12--z13--z14; +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,12,13,14,15,16,17,20,21,22,23,24,25,26,27,28,100); +endchar; % end "s" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{t} +% The letter `t'. +% \begin{macrocode} +cmchar "TGOTH letter t"; +beginchar("t", 2sb#+hstretch*((2+1.0)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% bar +lft x3 = pcshiftx; top y1 = h; +top y3 = bot y1; +rt x4 = w-pcshiftx; y4=y3; +draw z3--z4; +%% stem +lft x1 = rt x3; +x2 = x1; y2 = 0; +draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100); +endchar; % end "t" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{u} +% The letter `u'. +% \begin{macrocode} +cmchar "TGOTH letter u"; +beginchar("u", 2sb#+hstretch*((3+narrowd+wided)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +pickup quill; +%% left stem +lft x1 = pcshiftx + narrowd*stem_width; y1 = h; +x2 = x1; y2 = 0; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,narrowd,narrowdmin,diawd,diang); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +rt x3 = w - pcshiftx - wided*stem_width; y3=y1; +x4=x3;y4=y2; +z34=1/2[z3,z4]; +draw_updiamondstem(3,34,narrowd,narrowdmin,diawd,diang); +draw_downdiamondstem(34,4,wided,widedmin,diawd,diang); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "u" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{v} +% The letter `v'. +% \begin{macrocode} +cmchar "TGOTH letter v"; +beginchar("v", 2sb#+hstretch*((4 + narrowdmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +numeric n[]; numeric st; +pcshiftx := sb; +st := stem_width; +n1 := h/ascratio; % x-height +pickup quill; +%% bottom left stem +%% right and bottom left stems +rt x23 = w - pcshiftx - narrowdmin*st; y23 = n1; x24=x23; +x1 = x23 - 2st; y1 = 1/2n1; +x2 = x1; y2 = 0; +draw_downdiamondstem(1,2, 1.0, widedmin, diawd, diang); +bot y24 = y2c; +draw_updiamondstem(23, 24, narrowd, narrowdmin, diawd, diang); +%% curly bit +x11=x1; top y11 = h; +lft x12 = pcshiftx; y12 = 1/2[y11,y1]; +draw z11{down}..z12{down}..{down}z1; +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "v" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{w} +% The letter `w'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "TGOTH letter w"; +beginchar("w", 2sb#+hstretch*((5+wided+narrowd)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +%% left stem +lft x1 = pcshiftx + narrowd*stem_width; y1 = y3 = y5 = h; +x2 = x1; y2 = y4 = y6 = 0; +z12=1/2[z1,z2]; +draw_updiamondstem(1,12, narrowd, narrowdmin, diawd, diang); +draw_downdiamondstem(12,2, wided, widedmin, diawd, diang); +%% right stem +rt x5 = w -pcshiftx-wided*stem_width; x6 = x5; +z56 = 1/2[z5,z6]; +draw_updiamondstem(5,56, narrowd, narrowdmin, diawd, diang); +draw_downdiamondstem(56,6, wided, widedmin, diawd, diang); +%% middle stem +z3 = 1/2[z1,z5]; z4 = 1/2[z2,z6]; z34 = 1/2[z3,z4]; +draw_updiamondstem(3,34, narrowd, narrowdmin, diawd, diang); +draw_downdiamondstem(34,4, wided, widedmin, diawd, diang); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "w" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{x} +% The letter `x'. +% \begin{macrocode} +cmchar "TGOTH letter x"; +beginchar("x", 2sb#+hstretch*((4)*stem_width#), + x_height#, 0); +adjust_fit(0,0); +path pth[]; +numeric n[]; +numeric st; st := stem_width; +pcshiftx := sb; +pickup quill; +%% upright +x1 = 1/2w; y1 = h; +x2 = x1; y2 = 0; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12, 1.5, widedmin,diawd,2/3diang); +draw_downdiamondstem(12,2, 1.5, widedmin,diawd,2/3diang); +%% top right bar +lft x3 = rt x1; top y3 = h; +rt x4 = w - pcshiftx; y4=y3; +draw z3--z4; +%% middle bar +n1 := h-y3; +lft x5 = pcshiftx; rt x6 = w - pcshiftx; +y5 = 1/2h - n1; y6 = 1/2h; +z56 = 1/2[z5,z6]; +draw z5{pdir}..z56..{pdir}z6; +%% bottom left +pickup stylus; +lft x11 = pcshiftx; bot y11 = 0; +draw z2e--z11; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,150,60,160,100); +endchar; % end "x" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{y} +% The letter `y'. Modern, but with a dot on top. +% \begin{macrocode} +cmchar "TGOTH letter y"; +beginchar("y", 2sb#+hstretch*((3 + narrowd+ narrowdmin)*stem_width#), + x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := sb; +path pth[]; +numeric n[]; +numeric st; st = stem_width; +pickup quill; +%% right side +rt x3 = w - pcshiftx - narrowdmin*st; y3 = h; +x33 = x3; y33 = 0; +%%draw_updiamondstem(3,4,narrowd,narrowdmin, diawd,diang); +%% left side +x1 = x3 - 2st; y1 = y3; +x2 = x1; y2 = 0; +n1 := top y2 - y2; +draw_updiamondstem(1,2,narrowd,narrowdmin, diawd,diang); +%% tail +x11 = rt x2; y11 = top y2; +x12 = lft x2; y12 = bot y2; +pickup stylus; +lft x14 = x1 - 2st; y14 = -d + n1; +x15 = x14+n1; bot y15 = -d; +z4 = whatever[z11,z12] = whatever[z3,z33]; +x10=x4; bot y10 = y4; +draw z10--z11--z12..{down}z14..{-ppdir}z15; +pickup quill; +draw_updiamondstem(3,4,narrowd,narrowdmin, diawd,diang); +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,14,15,33,100); +endchar; % end "y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{z} +% The letter `z'. +% \begin{macrocode} +cmchar "TGOTH letter z"; +beginchar("z", 2sb#+hstretch*(3stem_width#), + x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := sb; +pickup quill; +%% top bar ends +top y12 = h; +n1 := h - y12; +lft x1 = pcshiftx; rt x2 = w-pcshiftx; +%%y1 = y12-n1; y2=y12+n1; +y1 = y12-n1/2; y2=y12; +x12 = 1/2[x1,x2]; +pth1 := z1{pdir}..z12{right}..z2{pdir}; +%% bottom bar ends +bot y34 = 0; +x3=x1; x4=x2; +%%y3=y34-n1; y4=y34+n1; +y3=y34-n1/2; y4=y34; +x34 = 1/2[x3,x4]; +pth2 := z3{pdir}..z34{right}..z4{pdir}; +%% centre bar +z5 = 1/2[z1,z3]; z6 = 1/2[z2,z4]; z56 = 1/2[z5,z6]; +pth3 := z5{pdir}..z56{right}..z6{pdir}; +draw pth1; draw pth2; draw pth3; % bars +draw z2--z3; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "z" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file +% \begin{macrocode} +%</min> +% \end{macrocode} +% +% +% \subsection{The code for capital letters} +% +% \thisfont{} `capitals' were drawn with the same pen as for the minuscules. +% The letters are pretty fancy. +% +% \begin{macrocode} +%<*maj> +% TGOTHU.MF Program file for Early Gothic `capitals' +% + +% \end{macrocode} +% +% +% \begin{routine}{A} +% The letter `A'. +% \begin{macrocode} +cmchar "TGOTH letter A"; +beginchar("A", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pair pr[]; +pickup quill; +%% stem +rt x1 = w - pcshiftx - wided*st; y1 = h; +x2 = x1; y2 = 0; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +%% leg +x21 = x1; top y21 = h; +lft x22 = pcshiftx + widedmin*st; bot y22 = 0; +draw z21--z22; +draw (x22-widedmin*st, y22)--(x22+wided*st, y22); +%% bar +z13 = z12; +y16 = y13; z16 = whatever[z21,z22]; +x14 = 1/2[x13,x16]; (z13-z14) = whatever*pdir; +pickup threequarterquill; +draw z13--z14; +draw z14{ppdir}..{left}z16; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,100); +endchar; % end "A" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{B} +% The letter `B'. +% \begin{macrocode} +cmchar "TGOTH letter B"; +beginchar("B", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% stem +lft x1 = pcshiftx; bot y1 = 0; +n1 := top y1; +lft x99 = 2/5w; bot y99 = 12/16h; +rt x12 = lft x99; top y12 = bot y99; +x14 = x1; y14 = y12; +x13 = 1/2[x14,x12]; y13 = 1/2[y12,(h-n1/2)]; +pth1 := z1{pdir}..z12..{left}z13..{-pdir}z14; +%% stem decoration +z101=z99; +z181 = (x99,-h); +z102 = (x101,y1); +z112 = 1/2[z101,z102]; +lft x8 = x112; y8 = y112; +%% lower bowl +x113 = w-pcshiftx; +(z113-z112) = whatever*(pdir); +rt x5 = w-pcshiftx; y5 = 6/16y113; +x3 = 10/16[x1,x5]; y3 = y1; +z7 = 2/16[z8,z113]; +pth2 := z1{pdir}..{right}z3..{up}z5..{-pdir}z7--z8; + +%% upper bowl +x10 = 1/2[x7,x5]; y10 = 1/2[y12,y99]; +x19 = 1/2[x99,x10]; top y19 = h; +pth3 := z8--z7{pdir}..{up}z10..{left}z19..{-pdir}z99; +%% angled decoration + +z105 = 1/4[z102,z112]; +x185 = 2w; +(z185-z105) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth2; + +z107 = 1/4[z112,z101]; +x187 = 2w; +(z187-z107) = whatever*(pdir); +z108 = (z107--z187) intersectionpoint pth3; + +if ductus: + pickup stylus; +fi +draw pth1; +draw pth2; +draw pth3; +pickup stylus; +draw z101--z102; +draw z105--z106; draw z107--z108; + +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,19,99,100); +endchar; % end "B" + + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{C} +% The letter `C'. +% \begin{macrocode} +cmchar "TGOTH letter C"; +beginchar("C", 2cap_sb#+hstretch*((5)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% bowl +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +pth1 := z24..z1{left}..z2{down}..z3{right}..z4{pdir}; +%% decoration +z101 = (x1,y1); z102 = (x1,y3); +z103 = (x1+perpdec, y1); z104 = (x103,y102+thin); +z105 = 1/2[z101,z102]; z107 = (x105,y105+angdec); +x185 = -w; (z105-z185) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth1; +x187 = -w; (z107-z187) = whatever*(pdir); +z108 = (z107--z187) intersectionpoint pth1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; %% bowl +pickup stylus; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100,101,102,103,104,105,106,107,108,185); +endchar; % end "C" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{D} +% The letter `D'. +% \begin{macrocode} +cmchar "TGOTH letter D"; +beginchar("D", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% bowl +lft x1 = pcshiftx; bot y1 = 0; +rt x5 = w-pcshiftx; y5 = 1/2h; +x3 = 10/16[x1,x5]; y3 = y1; +x7 = x3; top y7 = h; +lft x9 = 2/5w; bot y9 = 12/16h; +pth1 := z1{pdir}..{right}z3..{up}z5..{left}z7..{-pdir}z9; +%% stem +rt x12 = lft x9; top y12 = bot y9; +x14 = x1; y14 = y12; +x13 = 1/2[x14,x12]; y13 = 1/2[y12,y7]; +pth2 := z1{pdir}..z12..{left}z13..{-pdir}z14; +%% vertical decoration +z101=z9; +z181 = (x9,-h); +z102 = ((x101,h/2)--z181) intersectionpoint pth1; +z103a=(x101+perpdec,h); z103b=(x103a,h/2); z103c=(x103a,-h); +z103 = (z103a--z103b) intersectionpoint pth1; +z104 = (z103b--z103c) intersectionpoint pth1; +%% angled decoration +z106 = (lft x5, y5); +x105 = x103; (z106-z105) = whatever*(pdir); +z107 = (x105, y105+angdec); +x108a = 2w; (z108a-z107) = whatever*(pdir); +z108 = (z108a--z107) intersectionpoint pth1; +if ductus: + pickup stylus; +fi +draw pth1; +draw pth2; +pickup stylus; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,100); +endchar; % end "D" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{E} +% The letter `E'. +% \begin{macrocode} +cmchar "TGOTH letter E"; +beginchar("E", 2cap_sb#+hstretch*((6)*stem_width#), %% (5) too small + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% bowl +n1:=w-2pcshiftx; % actual letter width +n2:=6/5w-2pcshiftx; % width of full bowl +x1=pcshiftx + 1/2n1; top y1 = h; +lft x2 = pcshiftx; y2 = 1/2h; +x3 = x1; bot y3 = 0; +rt x4 = w-pcshiftx; y4 = 1/4h; +x24 = x4; y24 = 3/4h; +pth1 := z24..z1{left}..z2{down}..z3{right}..z4{pdir}; +%% decoration +z101 = (x1,y1); z102 = (x1,y3); +z103 = (x1+perpdec, y1); z104 = (x103,y102+thin); +z105 = 1/2[z101,z102]; z107 = (x105,y105+angdec); +x185 = -w; (z105-z185) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth1; +x187 = -w; (z107-z187) = whatever*(pdir); +z108 = (z107--z187) intersectionpoint pth1; +%% bar +lft x31 = x103; top y31 = y105; +rt x32 = w-pcshiftx; y32=y31; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; %% bowl +draw z31--z32; %% bar +pickup stylus; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,14,16,17,18,100,105,185,106); +endchar; % end "E" + + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{F} +% The letter `F'. +% \begin{macrocode} +cmchar "TGOTH letter F"; +beginchar("F", 2cap_sb#+hstretch*((5)*stem_width#), + 5/4caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% stem (1--2) and top bar (21--22) +lft x1=lft x2=pcshiftx+widedmin*st; y2 = 0; +top y21 = top y22 = h - (top y2 - bot y2); x22 = w-pcshiftx-st; +lft x21 = rt x1; top y1 = bot y21; +z12 = 1/3[z1,z2]; +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +draw z1--z12; +draw z21--z22; +%% vertical decoration +z102 = 2/3[z2b,z2c]; +x101 = x102; y101 = y21; +%% bar +lft x14 = x101; y14 = y12; +rt x16 = w-pcshiftx; y16 = y14; +draw z14--z16; +z16tr = (rt x16, top y16); +pickup stylus; +draw z101--z102; +%% Other decoration +%% bottom bar +rt x201 = x16tr; top y201 = y16tr; +y202 = y201 - 2st; (z201-z202) = whatever*pdir; +draw z201--z202; +%% top bar +pickup quill; +z22tb = (rt x22, top y22); +x22bb - x22 = x22 - x22tb; y22bb - y22 = y22 - y22tb; +x22c = x22 + st; bot y22c = top y22 + 1/2st; +x22f = x22; y22f = 1/3[y22c, y22]; +pickup stylus; +x22br = x22bb; bot y22br = y22bb; +pth3 := z22br--z22tb..{up}z22c..{-ppdir}z22f; +draw pth3; + +penlabels(1,2,3,4,5,6,7,14,15,16,21,22,100); +endchar; % end "F" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{G} +% The letter `G'. +% \begin{macrocode} +cmchar "TGOTH letter G"; +beginchar("G", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pickup quill; +%% bar +top y3=h; n3 := h - top y3; +lft x1 = pcshiftx; rt x2=w-pcshiftx; +y1 = y3-n3; y2=y3; +x3=1/2[x1,x2]; +pth1 := z1{pdir}..z3..z2{pdir}; +%% bowl +n1 := w; % width of bowl +n2 := h; % height of bowl +lft x4 = pcshiftx; y4 = 1/2h; +x5=x3; bot y5 = 0; +rt x6 = w-pcshiftx; y6 = 6/16h; +%% decoration +x101 = lft x3; y101=y3; +x181 = x101; y181=-h/4; z191 = 1/2[z101,z181]; +z102=(x101,y5); +z103 = (x101+3thin, y101); z104 = (x103,y102); +lft x7 = x104; y7 = 10/16[y104,y103]; +%%pth2 := z3..z4{down}..z5{right}..z6{up}..{-pdir}z7; +%%pth2 := z2{-pdir}..z3..z4{down}..z5{right}..z6{up}..{-pdir}z7; +pth2 := z2--z3..z4{down}..z5{right}..z6{up}..{-pdir}z7; +z105 = (x104,y104+4thin); z107=(x105,y105+3thin); +x185 = 2w; (z185-z105) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth2; +z108 = (x106,y106+3thin); +%% fork +z2tr = (rt x2, top y2); +x2a = x2tr; y2a = y2tr + thin; +x2b = x2a; y2b - y2 = y2 - y2a; +x2d = x2 - thick; y2d = y2; +pickup stylus; +% finish off the fork +x2c = x2d = x2e; +top y2e = y2tr; y2c - y2d = y2d - y2e; +%%filldraw z2d--z2c{right}..z2b--cycle; +%%filldraw z2d--z2a..{left}z2e--cycle; +filldraw z2e--z2c{right}..z2b--cycle; +filldraw z2c--z2a..{left}z2e--cycle; +pth9 := (rt x2a,y2a)--(rt x2b,y2b)--(rt x2d,y2d)--cycle; +unfill pth9; +unfill pth9; +unfill pth9; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw pth1; %% bar +draw pth2; %% bowl +ductus:=false; +penlabels(1,2,2a,2b,2c,2d,2e,3,4,5,6,11,12,100,101,102,103,104,181,191); +endchar; % end "G" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{H} +% The letter `H'. +% \begin{macrocode} +cmchar "TGOTH letter H"; +beginchar("H", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric st; st := stem_width; +numeric n[]; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+3st; y1=h; +x2=x1; y2=0; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +% start of bowl +n1 := 12/16h; %% take this as the top of the bowl +x13=x1; y13=3/4n1; +rt x3 = w-pcshiftx; y3 = 8/16n1; +x14 = 8/16[x13,x3]; top y14 = n1; +x4 = 1/2[x14,x3]; bot y4=0; +pth1 := z13{pdir}..{right}z14..{down}z3..{-pdir}z4; +%% bottom curl +z21 = z4; +x24 = x3; top y24 = 0; +x23 = 1/2[x21,x24]; top y23 = bot y24; +pth2 := z21{-pdir}..z23..{ppdir}z24; +%% vertical decoration +z102 = 2/3[z2b,z2c]; +z182 = (x102,h); +z101 = (z102--z182) intersectionpoint pth1; +z105 = 1/2[z102,z101]; +x185 = 2w; +(z185-z105) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth1; +z107 = (x105, y105-angdec); z187 = (x185, y185-angdec); +z108 = (z107--z187) intersectionpoint pth1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +pickup stylus; +draw pth2; +draw z101--z102; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "H" + + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{I} +% The letter `I'. +% \begin{macrocode} +cmchar "TGOTH letter I"; +beginchar("I", 2cap_sb#+hstretch*((4+wided)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric st; st := stem_width; +pickup quill; +lft x1=lft x2=pcshiftx+3st; +y1=h; y2=0; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided, widedmin,diawd,diang); +%% vertical decoration +z102 = 2/3[z2b,z2c]; +pickup stylus; +x101=x102; top y101 = h; +draw z101--z102; +ductus:=false; +penlabels(1,2,101,102,100); +endchar; % end "I" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{J} +% The letter `J'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "TGOTH letter J"; +beginchar("J", cap_sb#+hstretch*((4+wided)*stem_width#), + caprat*x_height#, 1/2caprat*x_height#); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +lft x1 = pcshiftx+3st; y1 = h; +x2=x1; y2=-d + (top y1 - bot y1); +%% bottom hook +lft x3 = pcshiftx; bot y3 = -d; +draw_upcurlstem(1,2); +draw z2{ppdir}..{-pdir}z3; +%% vertical decoration +x201 = rt x1; +x101 = x201 + 2/3wided*st; +pickup stylus; +top y101 = h; y201=y101; +z102=(x101,0); +draw z201--z101--z102; +ductus:=false; +penlabels(1,2,3,101,102,100); +endchar; % end "J" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{K} +% The letter `K'. +% \begin{macrocode} +cmchar "TGOTH letter K"; +beginchar("K", 2cap_sb#+hstretch*((8+wided)*stem_width#), + 5/4caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +n1 = 4/5h; % x-height +lft x1=lft x2=pcshiftx+3st; +y1=h; y2=0; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +%% top arm +%%z3=(x1,1/2n1); +x3 = x1; top y3 = 14/16n1; +z7c = 1/2[z2,z3]; +top y3a = n1; (z3a-z3) = whatever*pdir; +rt x7a = w - pcshiftx - 2st; (z7a-z7c) = whatever*pdir; +x4 = 1/2[x3a,x7a]; y4 = y3a; +x5 = x7a; y5 = 1/2[y3a, y7a]; +z7 = (rt x7c, y7c); +pth1 := z3{pdir}..z4..z5..{-pdir}z7; +%% lower arm +z21=z7; +z24=(x5+st,y2a); +x23 = x24; y23 = 1/2[y21,y24]; +rt x25 = w-pcshiftx; bot y25 = 0; +pth2 := z21{pdir}..{down}z23..z24..{pdir}z25; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; % upper bowl +draw pth2; % lower half +%% decorations +z1tr = (rt x1, top y1); +pickup stylus; +z102 = 2/3[z2b,z2c]; x101 = x102; top y101 = h; +x103 = x1tr; y103 = y101; +draw z103--z101--z102; +x105 = x101; y105 = 1/2[y7,y3]; +y185 = 2w; (z185-z105) = whatever*pdir; +z106 = (z105--z185) intersectionpoint pth1; +x107 = x105; y107 = y105-angdec; +x187 = x185; y187-y185 = y107-y105; +%%z108 = (z107--z187) intersectionpoint pth1; +draw z105--z106; +%%draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,21,22,23,24,25,100); +endchar; % end "K" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{L} +% The letter `L'. +% \begin{macrocode} +cmchar "TGOTH letter L"; +beginchar("L", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric st; st := stem_width; +pickup quill; +lft x1=pcshiftx+3st; y1=h; +x2=x1; bot y2 =0; +draw_upcurlstem(1,2); +rt x4 = w-pcshiftx; bot y4 = 0; +draw z2{right}..{pdir}z4; +%% vertical decoration +x201 = rt x1; +x101 = x201+2/3wided*st; +pickup stylus; +top y101 = h; y201 = y101; +x102 = x101; bot y102=0; +draw z201--z101--z102; +ductus:=false; +penlabels(1,2,3,4,101,102,201,100); +endchar; % end "L" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{M} +% The letter `M'. +% \begin{macrocode} +cmchar "TGOTH letter M"; +beginchar("M", 2cap_sb#+hstretch*((11)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric st; st := stem_width; +path pth[]; +pickup quill; +%%% left part +lft x301 = pcshiftx+3st; y301 = h; +x302 = x301; y302 = 0; +z312 = 1/2[z301,z302]; +draw_upcurlstem(301,312); +draw_downdiamondstem(312,302,wided,widedmin,diawd,diang); + +%% left N stem (and N part) +%%%lft x1=pcshiftx+3st; y1=h; +x1 = x301 + 3st; y1 = h; +x2=x1; y2=0; +z12 = 1/2[z1,z2]; +%%draw_upcurlstem(1,12); +%%draw_updiamondstem(1,12,wided,widedmin,diawd,diang); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +% start of bowl +x13=x1; y13=3/4h; +rt x3 = w-pcshiftx; y3 = 8/16h; +x14 = 8/16[x13,x3]; top y14 = h; +x4 = 1/2[x14,x3]; bot y4=0; +pth1 := z13{pdir}..{right}z14..{down}z3..{-pdir}z4; +%% bottom curl +z21 = z4; +x24 = x3; top y24 = 0; +x23 = 1/2[x21,x24]; top y23 = bot y24; +pth2 := z21{-pdir}..z23..{ppdir}z24; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +pickup stylus; +draw pth2; +pickup quill; +%% finish off the left part +x3011 = 1/2[x301,x1]; top y3011 = h; +z3123 = (x301,3/4h); z123 = (x1,y3123); +draw z3123--z3011--z123--z12; +%% vertical decorations + %% left part +z402 = 2/3[z302b,z302c]; +x401 = x402; z401 = whatever[z3123,z3011]; + %% right part +z102 = 2/3[z2b,z2c]; +z182 = (x102,h); +z101 = (z102--z182) intersectionpoint pth1; +%% angled decorations + %% left part +z406 = z13; +x405 = x402; (z406-z405) = whatever*pdir; +z407 = (x405, y405-angdec); z408 = (x406, y406-angdec); + %% right part +z105 = (x102,y405); +x185 = 2w; +(z185-z105) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth1; +z107 = (x105, y105-angdec); z187 = (x185, y185-angdec); +z108 = (z107--z187) intersectionpoint pth1; +pickup stylus; +draw z401--z402; +draw z405--z406; draw z407--z408; +draw z101--z102; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,101,102,105,106,107,108,301,302,100); +endchar; % end "M" + + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{N} +% The letter `N'. +% \begin{macrocode} +cmchar "TGOTH letter N"; +beginchar("N", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric st; st := stem_width; +path pth[]; +pickup quill; +%% left stem +lft x1=pcshiftx+3st; y1=h; +x2=x1; y2=0; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +% start of bowl +x13=x1; y13=3/4h; +rt x3 = w-pcshiftx; y3 = 8/16h; +x14 = 8/16[x13,x3]; top y14 = h; +x4 = 1/2[x14,x3]; bot y4=0; +pth1 := z13{pdir}..{right}z14..{down}z3..{-pdir}z4; +%% bottom curl +z21 = z4; +x24 = x3; top y24 = 0; +x23 = 1/2[x21,x24]; top y23 = bot y24; +pth2 := z21{-pdir}..z23..{ppdir}z24; +%% vertical decoration +z102 = 2/3[z2b,z2c]; +z182 = (x102,h); +z101 = (z102--z182) intersectionpoint pth1; +z105 = 1/2[z102,z101]; +x185 = 2w; +(z185-z105) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth1; +z107 = (x105, y105-angdec); z187 = (x185, y185-angdec); +z108 = (z107--z187) intersectionpoint pth1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +pickup stylus; +draw pth2; +draw z101--z102; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,13,14,100); +endchar; % end "N" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{O} +% The letter `O'. +% \begin{macrocode} +cmchar "TGOTH letter O"; +beginchar("O", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +pth1 := z1..z2..z3..z4..cycle; +%% vertical decoration +z101=z2; z102=z4; +z103 = (x101-perpdec, y101); z104 = (x103,y102); +%% angled decoration +z108 = (lft x3,y3); +x107 = x101; (z108-z107) = whatever*(pdir); +z105 = (x107, y107+angdec); +x106a = 2w; (z106a-z105) = whatever*(pdir); +z106 = (z105--z106a) intersectionpoint pth1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; +pickup stylus; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "O" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{P} +% The letter `P'. +% \begin{macrocode} +cmchar "TGOTH letter P"; +beginchar("P", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 1/2caprat*x_height#); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +lft x1=lft x2=pcshiftx+3st; +y1=h; y2=-d; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +%% vertical decoration +z1tr = (rt x1, top y1); +z102 = 2/3[z2b,z2c]; +pickup stylus; +x101 = x102; top y101 = h; +x103 = x1tr; y103 = y101; +draw z103--z101--z102; +pickup quill; +%% bowl +lft x22 = x101; top y22 = h; +x21 = x1; (z22-z21) = whatever*pdir; +rt x24 = w - pcshiftx; y24 = 1/2h; +x25 = 1/2[x22,x24]; bot y25 = 0; +pth1 := z21--z22{down}..{down}z24..{-pdir}z25; +z31 = z25; +lft x33 = pcshiftx; bot y33 = 0; +pth2 := z33{pdir}..{right}z31; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw pth2; +%% angled decoration +x105 = x101; y105 = 1/3h; +x185 = 2w; +(z185-z105) = whatever*pdir; +z106 = (z105--z185) intersectionpoint pth1; +z107 = (x105,y105-angdec); +x187 = x185; y107 - y105 = y187 - y185; +z108 = (z107--z187) intersectionpoint pth1; +pickup stylus; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "P" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Q} +% The letter `Q'. +% \begin{macrocode} +cmchar "TGOTH letter Q"; +beginchar("Q", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx-stem_width; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +pth1 := z1..z2..z3..z4..cycle; +%% tail +pth2 := z1..z4..z3; +z11 = directionpoint pdir of pth2; +rt x13 = w-pcshiftx; bot y13 = 0; +pth3 := z11{pdir}..{pdir}z13; +%% vertical decoration +z101=z2; z102=z4; +z103 = (x101-perpdec, y101); z104 = (x103,y102); +%% angled decoration +z108 = (lft x3,y3); +x107 = x101; (z108-z107) = whatever*(pdir); +z105 = (x107, y107+angdec); +x106a = 2w; (z106a-z105) = whatever*(pdir); +z106 = (z105--z106a) intersectionpoint pth1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; draw pth3; +pickup stylus; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,100); +endchar; % end "Q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{R} +% The letter `R'. +% \begin{macrocode} +cmchar "TGOTH letter R"; +beginchar("R", 2cap_sb#+hstretch*((8+wided)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +path pth[]; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% stem +n1 = h; % x-height +lft x1=lft x2=pcshiftx+3st; +y1=h; y2=0; +z12 = 1/2[z1,z2]; +draw_upcurlstem(1,12); +draw_downdiamondstem(12,2,wided,widedmin,diawd,diang); +%% top arm +%%z3=(x1,1/2n1); +x3 = x1; top y3 = 14/16n1; +z7c = 1/2[z2,z3]; +top y3a = n1; (z3a-z3) = whatever*pdir; +rt x7a = w - pcshiftx - 2st; (z7a-z7c) = whatever*pdir; +x4 = 1/2[x3a,x7a]; y4 = y3a; +x5 = x7a; y5 = 1/2[y3a, y7a]; +z7 = (rt x7c, y7c); +pth1 := z3{pdir}..z4..z5..{-pdir}z7; +%% lower arm +z21=z7; +z24=(x5,y2a); +x23 = x24; y23 = 1/2[y21,y24]; +rt x25 = w-pcshiftx; bot y25 = 0; +pth2 := z21{pdir}..{down}z23..z24..{pdir}z25; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; % upper bowl +draw pth2; % lower half +%% decorations +z1tr = (rt x1, top y1); +pickup stylus; +z102 = 2/3[z2b,z2c]; x101 = x102; top y101 = h; +x103 = x1tr; y103 = y101; +draw z103--z101--z102; +x105 = x101; y105 = 1/2[y7,y3]; +y185 = 2w; (z185-z105) = whatever*pdir; +z106 = (z105--z185) intersectionpoint pth1; +x107 = x105; y107 = y105-angdec; +x187 = x185; y187-y185 = y107-y105; +%%z108 = (z107--z187) intersectionpoint pth1; +draw z105--z106; +%%draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,13,14,21,22,23,24,25,100); +endchar; % end "R" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{S} +% The letter `S'. +% \begin{macrocode} +cmchar "TGOTH letter S"; +beginchar("S", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +pickup threequarterquill; +%% top +n1 := 1; +lft x1 = pcshiftx + n1*st; top y1 = h; +rt x3 = w - pcshiftx; y3 = y1; +x2 = 1/2[x1,x3]; top y2 = y1; +pth1 := z1..z2..{pdir}z3; +draw pth1; +%% bottom +lft x4 = pcshiftx; bot y4 = 0; +rt x6 = w -pcshiftx - n1*st; y6 = y4; +x5 = 1/2[x4,x6]; bot y5 = y4; +pth2 := z4{pdir}..z5..z6; +draw pth2; +%% top path +z100 = (1/2w, 1/2h); +z11 = z1; z15 = z6; +x13 = x100; y13 = y100 + st; +pth3 := z11..{right}z13{right}..z15; +draw pth3; +%% bottom path +z21 = z11; z25 = z6; +x23 = x100; y100 - y23 = y13 - y100; +pth4 := z21..{right}z23{right}..z25; +draw pth4; +%% decorations + %% top +z101 = (x2+angdec,y2); y181 = 0; (z101-z181) = whatever*pdir; +z102 = (z101--z181) intersectionpoint pth3; +z103 = (x101-angdec, y101); x183-x181 = x103-x101; y183 = 0; +z104 = (z103--z183) intersectionpoint pth3; + %% bottom +z201 = (x5,y5); y281 = h; (z201-z281) = whatever*pdir; +z202 = (z201--z281) intersectionpoint pth4; +z203 = (x201-angdec, y201); x283-x281 = x203-x201; y283 = h; +z204 = (z203--z283) intersectionpoint pth4; +pickup stylus; +draw z101--z102; draw z103--z104; +draw z201--z202; draw z203--z204; + + +%%ductus:=true; +if ductus: + pickup stylus; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100,101,102,103,104,201,202,203,204); +endchar; % end "S" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{T} +% The letter `T'. +% \begin{macrocode} +cmchar "TGOTH letter T"; +beginchar("T", 2cap_sb#+hstretch*((7)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pickup quill; +%% bar +top y3=h; n3 := h - top y3; +lft x1 = pcshiftx; rt x2=w-pcshiftx; +y1 = y3-n3; y2=y3; +x3=1/2[x1,x2]; +pth1 := z1{pdir}..z3..z2{pdir}; +%% bowl +n1 := w; % width of bowl +n2 := h; % height of bowl +lft x4 = pcshiftx; y4 = 1/2h; +x5=x3; bot y5 = 0; +rt x6 = w-pcshiftx; y6 = 6/16h; +%%pth2 := z3..z4{down}..z5{right}..z6{pdir}; +%% decoration +x101 = lft x3; y101=y3; +x181 = x101; y181=-h/4; z191 = 1/2[z101,z181]; +%%z102 = z191--z181 intersectionpoint pth2; %%% ???? NO INTERSECTION!!!!!! +z102=(x101,y5); +z103 = (x101+3thin, y101); z104 = (x103,y102); +lft x7 = x104; y7 = 10/16[y104,y103]; +pth2 := z3..z4{down}..z5{right}..z6{up}..{-pdir}z7; +z105 = (x104,y104+4thin); z107=(x105,y105+3thin); +x185 = 2w; (z185-z105) = whatever*(pdir); +z106 = (z105--z185) intersectionpoint pth2; +z108 = (x106,y106+3thin); +pickup stylus; +draw z101--z102; draw z103--z104; +draw z105--z106; draw z107--z108; +pickup quill; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw pth1; %% bar +draw pth2; %% bowl +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,100,101,102,103,104,181,191); +endchar; % end "T" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{U} +% The letter `U'. +% \begin{macrocode} +cmchar "TGOTH letter U"; +beginchar("U", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := cap_sb; +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pickup quill; +%% stem tops +lft x1 = pcshiftx + 3st; y1 = h; +rt x3 = w - pcshiftx - widedmin*st; y3 = h; +% bottom of bowl +x7 = x1 - 3/2st; bot y7 = 0; +rt x9 = lft x3; bot y9 = 0; +pth1 := z7{pdir}..{pdir}z9; +draw pth1; +%% stem bottoms +z2 = (z1 -- (x1,-h)) intersectionpoint pth1; +x4 = x3; bot y4 = top y9; +draw_upcurlstem(1,2); +draw_updiamondstem(3,4,wided,widedmin,diawd,diang); +%% decorations +z1tr = (rt x1, top y1); +pickup stylus; +z99 = 2/3[z3b,z3c]; +x101 - x1 = x3 - x99; top y101 = h; +x102 = x101; y102 = y2; +x103 = x1tr; y103 = y101; +draw z103--z101--z102; +x105 = x101; y105 = 1/3h; +x106 = x3; (z106-z105) = whatever*pdir; +z107 = (x105, y105-angdec); x108 = x106; y108-y106 = y107-y105; +draw z105--z106; draw z107--z108; +%%ductus:=true; +if ductus: + pickup stylus; +fi +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100); +endchar; % end "U" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{V} +% The letter `V'. +% \begin{macrocode} +cmchar "TGOTH letter V"; +beginchar("V", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% left stem top +lft x1 = pcshiftx + 3st; y1 = h; +% bottom of bowl +x7 = x1 - 3/2st; bot y7 = 0; +x9 = w/2; bot y9 = 0; +pth1 := z7{pdir}..{right}z9; +draw pth1; +%% left stem bottom +x81 = x1; y81 = - h; +z2 = (z1--z81) intersectionpoint pth1; +draw_upcurlstem(1,2); +%% right stem +z6 = z9; +rt x5 = w - pcshiftx; top y5 = 3/4h; +x3 = 1/2[rt x1, lft x5]; +x4 = 1/2[x3,x5]; top y4 = h; +y3 = 1/2[y4,y5]; +pth2 := z6{pdir}..{up}z5..{left}z4..{-pdir}z3; +draw pth2; +pth3 := pth1 & pth2; +%% decoration +z1tr = (rt x1, top y1); +x101 = x1tr + 2/3wided*st; +pickup stylus; +top y101 = h; +z103 = (x1tr,y101); +z181 = (x101,-w); +z102 = (z101--z181) intersectionpoint pth3; +draw z103--z101--z102; +x105 = x101; y105 = 1/3[y102,y101]; +x185 = 2w; (z185-z105) = whatever*pdir; +z106 = (z105--z185) intersectionpoint pth2; +z107 = (x105, y105-angdec); +x187 = x185; y187-y185 = y107-y105; +z108 = (z107--z187) intersectionpoint pth2; +draw z105--z106; draw z107--z108; + +%%ductus:=true; +if ductus: + pickup stylus; +fi + +ductus:=false; +penlabels(1,2,3,4,5,11,13,14,23,26,100); +endchar; % end "V" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{W} +% The letter `W'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "TGOTH letter W"; +beginchar("W", 2cap_sb#+hstretch*((12)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% top of stems +lft x1 = pcshiftx + 3st; y1 = h; +rt x999 = w - pcshiftx; +x3 = 1/2[x1,x999]; y3 = h; +%% bowl bottoms +x21 = x1 - 3/2st; bot y21 = 0; +rt x23 = lft x3; bot y23 = 0; +pth1 := z21{pdir}..z23; +draw pth1; +lft x31 = rt x23; bot y31 = top y23; +x33 = 1/2[x31,x999]; bot y33 = 0; +pth2 := z31{pdir}..z33; +draw pth2; +%% bottom of stems +z2 = (z1--(x1,0)) intersectionpoint pth1; +x4 = x3; bot y4 = top y23; +draw_upcurlstem(1,2); +draw_updiamondstem(3,4,wided,widedmin,diawd,diang); +%% right V stem +z16 = z33; +x15 = x999; top y15 = 3/4h; +x13 = 1/2[rt x3, lft x15]; +x14 = 1/2[x13,x15]; top y14 = h; +y13 = 1/2[y14,y15]; +pth3 = z16{pdir}..{up}z15..{left}z14..{-pdir}z13; +draw pth3; +%% decorations +z1tr = (rt x1, top y1); +z3tr = (rt x3, top y3); +pickup stylus; +%% for U +z99 = 2/3[z3b,z3c]; +x101 - x1 = x3 - x99; top y101 = h; +x102 = x101; y102 = y2; +x103 = x1tr; y103 = y101; +draw z103--z101--z102; +x105 = x101; y105 = 1/3h; +x106 = x3; (z106-z105) = whatever*pdir; +z107 = (x105, y105-angdec); x108 = x106; y108-y106 = y107-y105; +draw z105--z106; draw z107--z108; +%% for V + +x301 = x3tr+2/3wided*st; top y301 = y3e; +z381 = (x301,-w); +z302 = (z301--z381) intersectionpoint pth2; +draw z3e--z301--z302; +x305 = x301; y305 = 1/3[y302,y301]; +x385 = 2w; (z385-z305) = whatever*pdir; +z306 = (z305--z385) intersectionpoint pth3; +z307 = (x305, y305-angdec); +x387 = x385; y387-y385 = y307-y305; +z308 = (z307--z387) intersectionpoint pth3; +draw z305--z306; draw z307--z308; + + + +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100); +endchar; % end "W" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{X} +% The letter `X'. +% \begin{macrocode} +cmchar "TGOTH letter X"; +beginchar("X", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +path pth[]; +numeric n[]; +numeric st; st := stem_width; +pcshiftx := cap_sb; +pickup quill; +%% center stem +lft x1 = lft x2 = pcshiftx + 3st; +y1 = 3/4h; y2 = 1/4h; +draw z1--z2; +%% top right +z21 = z1; top y22 = h; (z22-z21) = whatever*pdir; +rt x24 = w-pcshiftx; y24 = y21; +pth1 := z21--z22{-ppdir}..{pdir}z24; +draw pth1; +%% bottom right +z31 = z2; +rt x33 = w-pcshiftx; bot y33 = 0; +pth2 := z31{-ppdir}..{pdir}z33; +draw pth2; +%% bottom left +z41 = z2; +bot y43 = -1/4h; (z41-z43) = whatever*pdir; +x45 = x43 + st; y45=y43; +pth3 := z41--z43{-pdir}..{pdir}z45; +pickup stylus; +draw pth3; +pickup quill; +%% top left +x11 = x1; y11 = h; +draw_upcurlstem(11,1); +%% decoration +x81 = rt x1; +pickup stylus; +x101 = x102 = x81 + 2/3wided*st; +z101 = whatever[z1,z22]; +z102 = (z101--(x101,0)) intersectionpoint pth2; +draw z101--z102; +pickup quill; +%% middle arms +z120 = 1/2[z1,z2]; +z51 = z120; +lft x53 = pcshiftx; top y53 = y51; +x52 = 1/2[x51,x53]; y52 = y51; +pth5 := z51--z52{left}..{-pdir}z53; +draw pth5; +lft x61 = x101; y61 = y120; +rt x63 = w-pcshiftx; bot y63 = y61; +x62 = 1/2[x61,x63]; y62 = y61; +pth6 := z61--z62{right}..{pdir}z63; +draw pth6; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,10,25,251,252,40,50,51,52,53,61,62,63,101,102,150,60,160,100); +endchar; % end "X" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Y} +% The letter `Y'. +% \begin{macrocode} +cmchar "TGOTH letter Y"; +beginchar("Y", 2cap_sb#+hstretch*((8)*stem_width#), + caprat*x_height#, 1/2caprat*x_height#); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% stem tops +lft x1 = pcshiftx + 3st; y1 = h; +rt x3 = w - pcshiftx - widedmin*st; y3 = h; +% bottom of bowl +x7 = x1 - 3/2st; bot y7 = 0; +x9 = 1/2[x1,x3]; bot y9 = 0; +pth1 := z7{pdir}..{right}z9; +draw pth1; +%% left stem bottom +x81 = x1; y81 = - h; +z2 = (z1--z81) intersectionpoint pth1; +draw_upcurlstem(1,2); +%% right stem +x4 = x3; y4 = 0; +x5 = x4; y5 = -1/4d; +lft x6 = x9; bot y6 = -d; +draw_updiamondstem(3,4,wided,widedmin,diawd,diang); +draw z6{pdir}..{up}z5--z4; +z3cd = 1/2[z3c,z3d]; +pth2 = z5--z3a--z3cd; +%% fill bowl bottom +x91 = x3; (z91-z9) = whatever*pdir; +draw z9--z91; + +%% decoration +z1tr = (rt x1, top y1); +x101 = x1tr + 2/3wided*st; +pickup stylus; +top y101 = h; +z103 = (x1tr,y101); +z181 = (x101,-w); +z102 = (z101--z181) intersectionpoint pth1; +draw z103--z101--z102; +x105 = x101; y105 = 1/3[y102,y101]; +x185 = 2w; (z185-z105) = whatever*pdir; +z106 = (z105--z185) intersectionpoint pth2; +z107 = (x105, y105-angdec); +x187 = x185; y187-y185 = y107-y105; +z108 = (z107--z187) intersectionpoint pth2; +draw z105--z106; draw z107--z108; +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100,101,102,181); +endchar; % end "Y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{Z} +% The letter `Z'. +% \begin{macrocode} +cmchar "TGOTH letter Z"; +beginchar("Z", 2cap_sb#+hstretch*((5)*stem_width#), + caprat*x_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +path pth[]; +pcshiftx := cap_sb; +pickup quill; +%% top bar ends +top y12 = h; +n1 := h - y12; +lft x1 = pcshiftx; rt x2 = w-pcshiftx-perpdec; +%%y1 = y12-n1; y2=y12+n1; +y1 = y12-n1/2; y2=y12; +x12 = 1/2[x1,x2]; +pth1 := z1{pdir}..z12{right}..z2{pdir}; +x102 = rt x2; y102 = top y2; x202 = x102+perpdec; y202=y102; +%% bottom bar ends +bot y34 = 0; +x3=x1+perpdec; rt x4= w-pcshiftx; +y3=y34-n1/2; y4=y34; +x34 = 1/2[x3,x4]; +pth2 := z3{pdir}..z34{right}..z4{pdir}; +x203 = lft x3; y203 = bot y3; x103 = x203-perpdec; y103=y203; +%% centre bar +z5 = (x1,1/2[y1,y3]); z6 = (x4,1/2[y2,y4]); z56 = 1/2[z5,z6]; +pth3 := z5{pdir}..z56{right}..z6{pdir}; +draw pth1; draw pth2; % bars +draw pth3; +%% decorations +pickup stylus; +draw z102--z103; draw z202--z203; +unfill z102--z103--z203--z202--cycle; +draw z102--z103; draw z202--z203; +ductus:=false; +penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100); +endchar; % end "Z" + +% \end{macrocode} +% \end{routine} +% +% +% +% The end of this file +% \begin{macrocode} +%</maj> +% \end{macrocode} +% +% +% +% \subsection{The punctuation file} +% +% The main punctuation marks are defined in this file. +% +% \begin{macrocode} +%<*punct> +% TGOTHPUNCT.MF This file contains punctuation marks + +% \end{macrocode} +% +% +% \begin{routine}{!} +% The `!' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Exclamation mark"; +beginchar("!", 2sb#+hstretch*(thick#+trijut#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +x1=w/2; top y1 = h; +z3=(x1, 1/2dot_size); +z2=(x1, y3+3/2dot_size); +draw z1--z2; +draw_pdot(3,dot_size); +penlabels(1,2,3); + +endchar; % end of "!" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{?} +% The `?' character, which had not been invented at this time. +% \begin{macrocode} + +cmchar "Question mark"; +beginchar("?", 2sb#+hstretch*((3+wided+widedmin)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +path pth[]; +pickup quill; +n1 := w-2pcshiftx; % actual character width +n2 := 1/3h; % height of top bowl +n3 := n2; % height of bottom bowl +z5=(1/2w,1/2dot_size); +x45 = x5; y45=y5+3/2dot_size; +lft x1 = pcshiftx; y1 = 3/4h; +x2 = 1/2w; top y2 = h; +rt x3 = w-pcshiftx; y3 = 11/16h; + +x4 = x45; +(z3-z4) = whatever*pdir; + +%%ductus:= true; +if ductus: + pickup stylus; +fi +%%draw z1..z2{right}..z3{down}..z4{down}; +draw z1--z2--z3--z4--z45; +draw_pdot(5, dot_size); +penlabels(1,2,3,4,45,5); +endchar; % end of "?" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{,} +% The `,' character. +% \begin{macrocode} + +cmchar "Comma"; +beginchar(",",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=1/2dot_size; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "," + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{.} +% The `.' character. +% \begin{macrocode} + +cmchar "Period"; +beginchar(".",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +z1=(w/2, 1/2dot_size); +draw_pdot(1,dot_size); +penlabels(1); +endchar; % end of "." + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{:} +% The `:' character. +% \begin{macrocode} + +cmchar "Colon"; +beginchar(":",2sb#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=sb; +x1=x2=w/2; y1=3/4h; y2=1/4h; +draw_pdot(1,dot_size); +draw_pdot(2,dot_size); +penlabels(1,2); +endchar; % end ":" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{;} +% The `;' character. +% \begin{macrocode} + +cmchar "Semicolon"; +beginchar(";",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=3/4h; y2=1/2dot_size; +draw_pdot(1,dot_size); +draw_pcomma(2,dot_size,comma_width); +penlabels(1,2); +endchar; % end of ";" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{'} +% The `'' character. +% \begin{macrocode} + +cmchar "Apostrophe"; +beginchar("'",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "'" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{`} +% The ``' character. +% \begin{macrocode} + +cmchar "Reverse apostrophe"; +beginchar("`",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=h; +draw_plq(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "`" + +% \end{macrocode} +% \end{routine} +% +% The end of this file. +% \begin{macrocode} +%</punct> +% \end{macrocode} +% +% +% \subsection{The ligatures and dashes file} +% +% The ligatured letters, punctuation marks and dashes are defined in this file. +% \begin{macrocode} +%<*lig> +% TGOTHLIG.MF Uncial ligatured letters, punctation and dashes + +% \end{macrocode} +% First the ligtables. +% \begin{macrocode} + +ligtable "`": "`"=:oct"134"; +ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#; + +ligtable "-": "-"=:oct"173"; +ligtable oct"173": "-"=:oct"174"; + +%%%%ligtable "c": "t"=:oct"014"; +ligtable "s": "t"=:oct"015"; + +% \end{macrocode} +% +% +% +% \begin{routine}{st} +% The `st' ligature. +% \begin{macrocode} + +cmchar "TGOTH st ligature"; +beginchar(oct"015", 2sb#+hstretch*((1 + narrowd + 3)*stem_width#), + asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +n1 := h/ascratio; % x-height +pickup quill; +%% the S (long) +lft x1 = pcshiftx + narrowd*st; +x2 = x1; y2 = 0; y1 = h - (top y2 - bot y2); +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,narrowd, 1/4narrowdmin, diawd, diang); +draw_downdiamondstem(12,2,narrowd, narrowdmin, diawd, diang); +%% the T +%% bar +lft x23 = rt x1 + pcshiftx; top y23 = n1; +rt x24 = w-pcshiftx; y24=y23; +draw z23--z24; +%% stem +lft x21 = rt x23; top y21 = h; +x22 = x21; y22 = 0; +draw_downdiamondstem(21,22,narrowd,narrowdmin,diawd,diang); +%% the ligature +x11=x1; top y11=h; +draw z12--z11--z21; +ductus:=false; +penlabels(1,2,3,4,5,11,21,22,23,24,100); +%% end "t" +endchar; %% end st ligature + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{''} +% The `''' ligature. +% \begin{macrocode} + +cmchar "Closing quotes"; +beginchar(oct"042",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h; +x2=x1-(2hstretch*dot_size); +draw_pcomma(1,dot_size,comma_width); % right +draw_pcomma(2,dot_size,comma_width); % left +penlabels(1,2); +endchar; % end of "''" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{``} +% The ```' ligature. +% \begin{macrocode} + +cmchar "Opening quotes"; +beginchar(oct"134",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb; +x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h; +x2=x1+(2hstretch*dot_size); +draw_plq(1,dot_size,comma_width); % left +draw_plq(2,dot_size,comma_width); % right +penlabels(1,2); +endchar; % end of "``" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{-} +% The `-' (hyphen) character. +% \begin{macrocode} + +cmchar "Hyphen"; +beginchar("-",sb#+hstretch*((2)*stem_width#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +pickup threequarterquill; +lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=1/2h; +draw z21--z22; +%%draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "-" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{--} +% The `--' (en-dash) ligature. +% \begin{macrocode} + +cmchar "En dash"; +beginchar(oct"173",sb#+hstretch*((3)*stem_width#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +pickup threequarterquill; +lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=1/2h; +draw z21--z22; +%%draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "--" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{---} +% The `---' (em dash) ligature. The em dash is twice the width of the en dash. +% \begin{macrocode} + +cmchar "Em dash"; +beginchar(oct"174",sb#+hstretch*((6)*stem_width#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=sb/2; +pickup threequarterquill; +lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=1/2h; +draw z21--z22; +%%draw_roundserif(21,22,srad); draw_flatserif(22,21,srad); +penlabels(1,2); +endchar; % end of "---" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{&} +% The ampersand (which is really an `et' ligature). +% In this case, a `t' with one thin bar. +% \begin{macrocode} + +cmchar "TGOTH ampersand"; +beginchar("&", 2sb#+hstretch*((7/2)*stem_width#), asc_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +pickup quill; +%% bar +lft x3 = pcshiftx; top y1 = h; +top y3 = bot y1; +rt x4 = w-pcshiftx; y4=y3; +draw z3--z4; +%% stem +lft x1 = rt x3; +x2 = x1; y2 = 0; +draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); +%% E bars +n1 = 1/2[y3,y2a] + 1/2angdec; +pickup halfquill; +lft x11 = pcshiftx; rt x12 = w-pcshiftx; +%y11=y12=n1; +y11 = y12 = 1/2h; +x13 = x11; x14=x12; y13 = y14 = n1-angdec; +draw z11--z12; +%%draw z13--z14; +ductus:=false; +penlabels(1,2,3,4,5,6,11,12,13,14,100); +endchar; % end "&" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</lig> +% \end{macrocode} +% +% \subsection{The digits file} +% +% These are arabic digits in the style of the book-hand. They are a +% modern invention. +% +% \begin{macrocode} +%<*dig> +% TGOTHDIG.MF Program file for Early Gothic digits +% + +% \end{macrocode} +% +% +% +% \begin{routine}{1} +% The digit `1'. +% \begin{macrocode} +cmchar "TGOTH digit 1"; +beginchar("1", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +pickup quill; +x1 = x2 = 1/2w; y1 = h; y2 = 0; +z12 = 1/2[z1,z2]; +draw_updiamondstem(1,12,1/2,1/2,diawd,diang); +draw_downdiamondstem(12,2,1/2,1/2,diawd,diang); +penlabels(1,2,100); +endchar; % end "1" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{2} +% The digit `2'. +% \begin{macrocode} +cmchar "TGOTH digit 2"; +beginchar("2", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric st; st := stem_width; +numeric n[]; +n1 := 1/2st; +pickup quill; +% stem +lft x1=pcshiftx+n1; top y1=h-2n1; +rt x3=w-pcshiftx-n1; y3=3/4h; +x2=1/2[x1,x3]; top y2= h; +% foot +x5= lft x1; bot y5=0; +x6= rt x3; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(5,6,thin); % foot +draw z1--z2--z3--z5wl; % curve +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "2" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{3} +% The digit `3'. +% \begin{macrocode} +cmchar "TGOTH digit 3"; +beginchar("3", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +numeric n[]; +numeric st; st := stem_width; +n1 := st; +pcshiftx := u; +pickup quill; +%% top +lft x1 = pcshiftx + n1; rt x3 = w - pcshiftx - n1; +x2 = 1/2[x1,x3]; x4 = 1/2[x1,x2]; +top y2 = h; y3 = 12/16h; +(z2-z1) = whatever*pdir; +(z3-z4) = whatever*pdir; +%% bottom +x5 = 12/16[x4, rt x4]; x6 = x3; x7 = x2; +x18 = x1-n1; x17 = x7; +bot y7 = thin; +y5 = 12/16[y4, top y4]; +(z5-z6) = whatever*(z2-z3); +bot y18 = 0; bot y17 = 0; + +draw z1--z2--z3--z4; % top +draw_wave(18,17,thin); +draw z5--z6--z18wr; % bottom +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,17,18,100); +endchar; % end "3" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{4} +% The digit `4'. +% \begin{macrocode} +cmchar "TGOTH digit 4"; +beginchar("4", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +numeric st; st := stem_width; +numeric n[]; +pcshiftx := u; +pickup quill; +% the stem +x1=x2=w-pcshiftx-(wided+widedmin)*st; +y1=h; y2=0; +% the crossbar +lft x3=pcshiftx; y3=7/16h; +rt x4=w-pcshiftx; y4=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_downdiamondstem(1,2,wided,widedmin,diawd,diang); % stem +draw z3--z4; % horizontal +draw z1--z3; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "4" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{5} +% The digit `5'. +% \begin{macrocode} +cmchar "TGOTH digit 5"; +beginchar("5", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric n[]; +numeric st; st := stem_width; +n1 := st; +pickup quill; +% for the top +rt x1=w-pcshiftx; top y1=h; +lft x2=pcshiftx+n1; y2=y1; +% the S curve +x3=x2; y3=0.5h; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +rt x5=w-pcshiftx; y5=1/2[thick,y3]; +x6=w/2; bot y6=0; +%%x16 = 12/16[x3,x5]; +x16 = lft x5; +bot y16 = 0; +lft x17=pcshiftx; bot y17=0; +z167 = 1/2[z16,z17]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(2,1,thin); % top squiggle +draw z2wl--z3; % vertical +%%draw_wave(17,16,thin); % foot +draw z17{pdir}..{pdir}z16; % foot +draw z3{pdir}..z5{down}..z16; % curve +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "5" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{6} +% The digit `6'. +% \begin{macrocode} +cmchar "TGOTH digit 6"; +beginchar("6", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +n1 := 24/16st; +pickup quill; +%% bottom left +x1 = x4 = w/2; top y1 = h - thick; bot y4 = 0; +x2 = x3 = x1 + n1; x5 = x6 = x1 - n1; +y2 = y6 = 3/4[y4,y1]; +y3 = y5 = 1/4[y4,y1]; +%% bowl +draw z1--z2--z3--z4--z5--z6--cycle; +%% head +x11 = x5; top y11 = h; +x12 = x2; y12 = y11; +draw_wave(11,12,thin); +x16 = x11; y16 = y11-thin; +draw z6--z16; +penlabels(1,2,3,4,5,6,12,100); +endchar; % end "6" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{7} +% The digit `7'. +% \begin{macrocode} +cmchar "TGOTH digit 7"; +beginchar("7", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% top bar +lft x1=pcshiftx; +rt x2=w-pcshiftx; +top y1=top y2=h; +% bowed leg +x4=w/2; bot y4=0; +x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(1,2,thin); % top bar +draw z1wr..z3..z4; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "7" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{8} +% The digit `8'. +% \begin{macrocode} +cmchar "TGOTH digit 8"; +beginchar("8", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=1; +pickup quill; +lft x1= pcshiftx; rt x3=w-pcshiftx; top y1 = y3 = 3/4h; +rt x2 = lft x4 = w/2; top y2=h; bot y4=0; +x5=x2; y5=h/2+2o; +lft x11=pcshiftx; rt x13=w-pcshiftx; y11 = bot y13 = 1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw z1..z2..z3..z5..z11..z4..z13..z5..cycle; +draw z1--z2--z3--z11--z4--z13--cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,100); +endchar; % end "8" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{9} +% The digit `9'. +% \begin{macrocode} +cmchar "TGOTH digit 9"; +beginchar("9", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +n1 := 24/16st; +pickup quill; +%% bottom left +x1 = x4 = w/2; top y1 = h; bot y4 = thick; +x2 = x3 = x1 + n1; x5 = x6 = x1 - n1; +y2 = y6 = 3/4[y4,y1]; +y3 = y5 = 1/4[y4,y1]; +%% bowl +draw z1--z2--z3--z4--z5--z6--cycle; +%% foot +x11 = x5; bot y11 = 0; +x12 = x2; y12 = y11; +draw_wave(11,12,thin); +x13 = x12; y13 = y12+thin; +draw z3--z13; +penlabels(1,2,3,4,5,6,12,100); +endchar; % end "9" + + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{0} +% The digit `0'. +% \begin{macrocode} +cmchar "TGOTH digit 0"; +beginchar("0", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := sb; +numeric n[]; +numeric st; st := stem_width; +n1 := 24/16st; +pickup quill; +%% bottom left +x1 = x4 = w/2; top y1 = h; bot y4 = 0; +x2 = x3 = x1 + n1; x5 = x6 = x1 - n1; +y2 = y6 = 3/4h; +y3 = y5 = 1/4h; + +draw z1--z2--z3--z4--z5--z6--cycle; + +penlabels(1,2,3,4,5,6,12,100); +endchar; % end "0" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</dig> +% \end{macrocode} +% +% +% \section{The font definition files} \label{sec:fd} +% +% The font comes in normal and bold weights only. +% +% \begin{macrocode} +%<*fdot1> +\DeclareFontFamily{OT1}{tgoth}{} + \DeclareFontShape{OT1}{tgoth}{m}{n}{ <-8.5> tgoth7 <8.5-15> tgoth10 <15-> tgoth17 }{} + \DeclareFontShape{OT1}{tgoth}{m}{sl}{ <-> sub * tgoth/m/n }{} + \DeclareFontShape{OT1}{tgoth}{m}{it}{ <-> sub * tgoth/m/n }{} + \DeclareFontShape{OT1}{tgoth}{m}{sc}{ <-> sub * tgoth/m/n }{} + \DeclareFontShape{OT1}{tgoth}{m}{u}{ <-> sub * tgoth/m/n }{} + \DeclareFontShape{OT1}{tgoth}{bx}{n}{ <-15> tgothb10 <15-> tgothb17 }{} + \DeclareFontShape{OT1}{tgoth}{bx}{it}{ <-> sub * tgoth/bx/n }{} + \DeclareFontShape{OT1}{tgoth}{bx}{sl}{ <-> sub * tgoth/bx/n }{} + \DeclareFontShape{OT1}{tgoth}{b}{n}{ <-> sub * tgoth/bx/n }{} +%</fdot1> +% \end{macrocode} +% +% +% \begin{macrocode} +%<*fdt1> +\DeclareFontFamily{T1}{tgoth}{} + \DeclareFontShape{T1}{tgoth}{m}{n}{ <-8.5> tgoth7 <8.5-15> tgoth10 <15-> tgoth17 }{} + \DeclareFontShape{T1}{tgoth}{m}{sl}{ <-> sub * tgoth/m/n }{} + \DeclareFontShape{T1}{tgoth}{m}{it}{ <-> sub * tgoth/m/n }{} + \DeclareFontShape{T1}{tgoth}{m}{sc}{ <-> sub * tgoth/m/n }{} + \DeclareFontShape{T1}{tgoth}{m}{u}{ <-> sub * tgoth/m/n }{} + \DeclareFontShape{T1}{tgoth}{bx}{n}{ <-15> tgothb10 <15-> tgothb17 }{} + \DeclareFontShape{T1}{tgoth}{bx}{it}{ <-> sub * tgoth/bx/n }{} + \DeclareFontShape{T1}{tgoth}{bx}{sl}{ <-> sub * tgoth/bx/n }{} + \DeclareFontShape{T1}{tgoth}{b}{n}{ <-> sub * tgoth/bx/n }{} +%</fdt1> +% \end{macrocode} +% +% \section{The package code} \label{sec:code} +% +% \subsection{The \Lpack{tgothic} package} +% +% The \Lpack{tgothic} package is for typesetting short pieces of text +% in the \thisfont{} fonts. +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. +% \begin{macrocode} +%<*usc> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{tgothic}[2002/12/30 v1.0 package for Gothic Textura fonts] +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\tgothfamily} +% Selects the \thisfont{} font family in the OT1 or T1 encoding. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \newcommand{\tgothfamily}{\usefont{T1}{tgoth}{m}{n}} +\else + \newcommand{\tgothfamily}{\usefont{OT1}{tgoth}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\texttgoth} +% Text command for the \thisfont{} font family. +% \begin{macrocode} +\DeclareTextFontCommand{\texttgoth}{\tgothfamily} +% \end{macrocode} +% \end{macro} +% +% The end of this package. +% \begin{macrocode} +%</usc> +% \end{macrocode} +% +% \subsection{The \Lpack{alltgoth} package} +% +% The \Lpack{alltgoth} package is intended for use when the entire document +% will be typeset in the book-hand. This is a minimal package. Because the +% book-hand should not contain arabic digits a fuller package would redefine +% anything numbered in \LaTeX{} to use roman instead of arabic numbering. +% Also, because of the large |\baselineskip| many other aspects of \LaTeX{} +% to do with vertical positioning should also be redefined. +% +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. It also uses the \Lpack{tgothic} package. +% \begin{macrocode} +%<*uscall> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{alltgoth}[2002/12/30 v1.0 package for all Gothic Textura fonts] +\RequirePackage{tgothic} +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% Redefine the default fonts to be \thisfont, which has only one family +% member. +% \begin{macro}{\rmdefault} +% \begin{macro}{\sfdefault} +% \begin{macro}{\ttdefault} +% \begin{macrocode} +\renewcommand{\rmdefault}{tgoth} +\renewcommand{\sfdefault}{tgoth} +\renewcommand{\ttdefault}{tgoth} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The `leading' in the book-hands is a function of the |x-height|, which is +% normally much +% greater than for the CMR fonts. I have borrowed code from Frank Jensen's +% \Lpack{beton} package~\cite{BETON} to do this. The |x-height| (in points) +% for the CMR +% fonts is given in Table~\ref{tab:cmrx}. Note that the CMR design sizes are +% 5--10, 12, and 17.28 points. The other values given are scaled from these +% figures. +% +% \begin{table} +% \centering +% \caption{The x heights of the CMR and \thisfont{} fonts} \label{tab:cmrx} +% \begin{tabular}{ccc} \hline +% Design & CMR & \thisfont \\ +% Size & X Height & X Height \\ \hline +% 5 & 2.14 & 3.00 \\ ^^A CMR skip = 6pt = 2.8 times +% 6 & 2.58 & 3.61 \\ ^^A CMR skip = 7pt = 2.7 times +% 7 & 3.00 & 4.20 \\ ^^A CMR skip = 8pt = 2.7 times +% 8 & 3.44 & 4.81 \\ ^^A CMR skip = 9.5pt = 2.8 times +% 9 & 3.86 & 5.40 \\ ^^A CMR skip = 11pt = 2.8 times +% 10 & 4.31 & 6.03 \\ ^^A CMR skip = 12pt = 2.8 times +% 11 & 4.74 & 6.64 \\ ^^A CMR skip = 13.6pt = 2.8 times +% 12 & 5.17 & 7.24 \\ ^^A CMR skip = 14.5pt = 2.8 times +% 14 & 6.03 & 8.44 \\ ^^A CMR skip = 18pt = 3.0 times +% 17 & 7.44 & 10.41 \\ ^^A CMR skip = 22pt = 3.0 times +% 20 & 8.75 & 12.25 \\ ^^A CMR skip = 25pt = 2.9 times +% 25 & 10.94 & 15.32 \\ ^^A CMR skip = 30pt = 2.7 times +% \hline +% \end{tabular} +% \end{table} +% +% \begin{macro}{\tgoth@baselineskip@table} +% A table of the normal font sizes and the corresponding baselineskip. +% The distance between baselines for \thisfont{} is over twice +% the |x-height|. ^^A actually 2.5 times to nearest half point +% +% \begin{macrocode} +\newcommand{\tgoth@baselineskip@table}{% + <\@vpt>7.5% + <\@vipt>9.0% + <\@viipt>10.5% + <\@viiipt>12.0% + <\@ixpt>13.5% + <\@xpt>15.0% + <\@xipt>16.5% + <\@xiipt>18.0% + <\@xivpt>21.0% + <\@xviipt>26.0% + <\@xxpt>30.5% + <\@xxvpt>38.5} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tgoth@new@setfontsize} +% This is a macro that replaces the |\@setfontsize| macro which is called by +% the font size changing commands. +% \begin{macrocode} +\newcommand{\tgoth@new@setfontsize}[3]{% + \edef\@tempa{\def\noexpand\@tempb####1<#2}% + \@tempa>##2<##3\@nil{\def\tgoth@baselineskip@value{##2}}% + \edef\@tempa{\noexpand\@tempb\tgoth@baselineskip@table<#2}% + \@tempa><\@nil + \ifx\tgoth@baselineskip@value\@empty + \def\tgoth@baselineskip@value{#3}% + \fi + \tgoth@old@setfontsize{#1}{#2}\tgoth@baselineskip@value} +% \end{macrocode} +% \end{macro} +% +% We had better give an author a means of using The Computer Modern fonts +% if necessary. +% +% \begin{macro}{\cmrfamily} +% \begin{macro}{\cmssfamily} +% \begin{macro}{\cmttfamily} +% These macros select the Computer Modern Roman, Sans, and Typewriter +% font families in either the T1 or OT1 encodings. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}} +\else + \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcmr} +% Text command for the Computer Modern Roman font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmr}{\cmrfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmss} +% Text command for the Computer Modern Sans font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmss}{\cmssfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmtt} +% Text command for the Computer Modern Typewriter font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmtt}{\cmttfamily} +% \end{macrocode} +% \end{macro} +% +% +% At the start of the document, change the |\@setfontsize| macro and call +% the normal font to implement the change. +% \begin{macrocode} +\AtBeginDocument{% + \let\tgoth@old@setfontsize=\@setfontsize + \let\@setfontsize=\tgoth@new@setfontsize} +\AtBeginDocument{\normalsize} +% \end{macrocode} +% +% +% The end of this package. +% \begin{macrocode} +%</uscall> +% \end{macrocode} +% +% +% +% +% +% \Finale +% \PrintIndex +% +\endinput + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + diff --git a/Master/texmf-dist/source/latex/bookhands/tgothic/tgothic.ins b/Master/texmf-dist/source/latex/bookhands/tgothic/tgothic.ins new file mode 100644 index 00000000000..e78ed2aba99 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/tgothic/tgothic.ins @@ -0,0 +1,101 @@ +%% +%% tgothic.ins +%% Copyright 1999 Peter R. Wilson +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Peter Wilson (CUA) +%% now at: peter.r.wilson@boeing.com +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{tgothic.ins} +\input docstrip.tex +\preamble + + Copyright 1999 Peter R. Wilson + + This program is provided under the terms of the + LaTeX Project Public License distributed from CTAN + archives in directory macros/latex/base/lppl.txt. + +Author: Peter Wilson (CUA) + now at: peter.r.wilson@boeing.com + +\endpreamble + +\keepsilent + +%%% \Msg{*** Generating the driver file ***} +%%% \generateFile{tgothic.drv}{t}{\from{tgothic.dtx}{driver}} + +\Msg{*** Generating the Metafont files ***} + +\usepostamble\empty +\generateFile{tgoth7.mf}{t}{\from{tgothic.dtx}{base7}} +\generateFile{tgoth10.mf}{t}{\from{tgothic.dtx}{base10}} +\generateFile{tgoth17.mf}{t}{\from{tgothic.dtx}{base17}} +\generateFile{tgothb7.mf}{t}{\from{tgothic.dtx}{base7b}} +\generateFile{tgothb10.mf}{t}{\from{tgothic.dtx}{base10b}} +\generateFile{tgothb17.mf}{t}{\from{tgothic.dtx}{base17b}} +\generateFile{tgothl.mf}{t}{\from{tgothic.dtx}{min}} +\generateFile{tgothu.mf}{t}{\from{tgothic.dtx}{maj}} +\generateFile{tgothtitle.mf}{t}{\from{tgothic.dtx}{mfd}} +\generateFile{tgothpunct.mf}{t}{\from{tgothic.dtx}{punct}} +\generateFile{tgothlig.mf}{t}{\from{tgothic.dtx}{lig}} +\generateFile{tgothdig.mf}{t}{\from{tgothic.dtx}{dig}} + +\Msg{*** Generating the Font Definition files ***} +\usepostamble\defaultpostamble + +\generateFile{ot1tgoth.fd}{t}{\from{tgothic.dtx}{fdot1}} +\generateFile{t1tgoth.fd}{t}{\from{tgothic.dtx}{fdt1}} + +\Msg{*** Generating the LaTeX2e package files ***} + +\generateFile{tgothic.sty}{t}{\from{tgothic.dtx}{usc}} +\generateFile{alltgoth.sty}{t}{\from{tgothic.dtx}{uscall}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into directories searched by TeX:} +\Msg{*} +\Msg{* Move these into the font source area:} +\Msg{* \space\space tgoth7.mf} +\Msg{* \space\space tgoth10.mf} +\Msg{* \space\space tgoth17.mf} +\Msg{* \space\space tgothb7.mf} +\Msg{* \space\space tgothb10.mf} +\Msg{* \space\space tgothb17.mf} +\Msg{* \space\space tgothl.mf} +\Msg{* \space\space tgothu.mf} +\Msg{* \space\space tgothtitle.mf} +\Msg{* \space\space tgothpunct.mf} +\Msg{* \space\space tgothlig.mf} +\Msg{* \space\space tgothdig.mf} +\Msg{*} +\Msg{* Move these into the LaTeX macro area:} +\Msg{* \space\space ot1tgoth.fd} +\Msg{* \space\space t1tgoth.fd} +\Msg{* \space\space tgothic.sty} +\Msg{* \space\space alltgoth.sty} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{* Process any name.idx file by:} +\Msg{* \space\space\space\space makeindex -s gind.ist name} +\Msg{* Process any name.glo file by:} +\Msg{* \space\space\space\space makeindex -s gglo.ist -o name.gls name.glo} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput diff --git a/Master/texmf-dist/source/latex/bookhands/uncial/uncial.dtx b/Master/texmf-dist/source/latex/bookhands/uncial/uncial.dtx new file mode 100644 index 00000000000..96041df453a --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/uncial/uncial.dtx @@ -0,0 +1,3761 @@ +% \iffalse meta-comment +% +% uncial.dtx +% Copyright 1999 Peter R. Wilson +% +% This program is provided under the terms of the +% LaTeX Project Public License distributed from CTAN +% archives in directory macros/latex/base/lppl.txt. +% +% Author: Peter Wilson (CUA) (now at: peter.r.wilson@boeing.com) +% +% If you do not have the docmfp package (available from CTAN in +% tex-archive/macros/latex/contrib/supported), comment out the +% \usepackage{docmfp} line below and uncomment the line following it. +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{docmfp} +%%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{} +\EnableCrossrefs +\CodelineIndex +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{uncial.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{131} +% +% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath} +% \DoNotIndex{\@centercr,\@cite} +% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} +% \DoNotIndex{\@input,\@ixpt,\@m} +% \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint} +% \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} +% \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} +% \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} +% \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} +% \DoNotIndex{\advance,\Alph,\alph} +% \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\bullet} +% \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} +% \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} +% \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} +% \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +% \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} +% \DoNotIndex{\fbox} +% \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} +% \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +% \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} +% \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} +% \DoNotIndex{\input} +% \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} +% \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} +% \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +% \DoNotIndex{\NeedsTeXFormat,\newdimen} +% \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} +% \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} +% \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} +% \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +% \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +% \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +% \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman} +% \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength} +% \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} +% \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} +% \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} +% \DoNotIndex{\viipt,\vipt,\vskip,\vspace} +% \DoNotIndex{\wd,\xiipt,\year,\z@} +% +% \changes{v1.0}{1999/04/02}{First public release} +% \changes{v1.0a}{1999/04/29}{Corrected the bookhand table} +% \changes{v1.1}{1999/05/15}{Added arabic digits and new package} +% \changes{v1.1a}{2001/01/02}{Fixed missing * in .fd files} +% +% ^^A \def\fileversion{v1.1} +% ^^A \def\filedate{1999/05/15} +% \def\fileversion{v1.1a} +% \def\filedate{2001/01/02} +% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package +% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option +% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file +% \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter +% \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle +% \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment +% \newcommand*{\AD}{\textsc{ad}} +% +% \title{The \Lpack{uncial} fonts\thanks{This +% file has version number \fileversion, last revised +% \filedate.}} +% +% \author{% +% Peter Wilson\\ +% Catholic University of America \\ +% Now at \texttt{peter.r.wilson@boeing.com} +% } +% \date{\filedate} +% \maketitle +% \begin{abstract} +% The \Lpack{uncial} and \Lpack{alluncl} packages provide a set of +% Metafont Uncial book-hands +% as used +% for manuscripts in the 3rd to the 6th century. This is one in a series +% of manuscript fonts. +% \end{abstract} +% \tableofcontents +% \listoftables +% +% \StopEventually{} +% +% +% +% \section{Introduction} +% +% The \Lpack{uncial} and \Lpack{alluncl} packages provide a Metafont~\cite{METAFONT} version +% of the Uncial manuscript book-hand that was in use between about the +% third and sixth centuries~\AD. It is part of a project to provide fonts +% covering the major manuscript hands between the first century~\AD{} and +% the invention of printing. The principal resources used in this project +% are listed in the Bibliography. +% +% This manual is typeset according to the conventions of the +% \LaTeX{} \textsc{docstrip} utility which enables the automatic +% extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}. +% The \Lpack{docmfp} package is used for documenting the Metafont portions +% of the distribution~\cite{DOCMFP}. +% +% Section~\ref{sec:usc} describes the usage of the package. +% Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} +% and source code for the package is in Section~\ref{sec:code}. +% +% \subsection{Manuscript book-hands} +% +% Before the invention of printing all books were written by hand. The book-hands +% used by the scribes and copyists for the manuscripts changed as time +% went on. Table~\ref{tab:1} lists some of the common book-hands which were used +% between the 1st and 15th centuries. The later book-hands formed the basis of the +% fonts used by the early printers, which in turn form the basis of the printing +% fonts in use today. +% +% The manuscript book-hands were written with a broad nibbed reed or quill +% pen. Among the distinguishing characteristics of a hand, apart from the +% actual shape of the letters, are the angle of the pen (which controls the +% variation between thick and thin strokes) and the height of a letter compared +% to the width of the nib. The lower the ratio of the letter height to nib +% width, the more condensed is the script. The scripts also varied in their +% typical height. +% +% Table~\ref{tab:1} gives an `average' x-height for each +% script, which I obtained by measuring a sample of photographs of +% manuscripts written in the various hands. About a dozen examples +% of each book-hand were measured. This figure should not be taken too +% seriously. +% +% There was not a sharp division between the use of one hand and another. +% Many manuscripts exhibit a variety of hands in the same document. For example, +% the scribe writing in an Uncial hand may have used Roman Rustic letters +% for capitals. Usually the same pen was used for the two different scripts. +% +% Generally speaking, as a hand got older it became more embelished, and +% therefore took longer to write. As this happened a new hand would appear that +% was faster, and which would eventually make the earlier one obsolete. +% +% Many of the book-hands were single-cased; that is, they did not have an +% upper- and lower-case as we do nowadays in Western scripts. On the other +% hand, a script might be majuscule or minuscule. A \textit{majuscule} script +% is one, like our upper-case, where the letters are drawn between two lines +% and are of a uniform height with no ascenders or descenders. +% A \textit{minuscule} script, like our lower-case, is drawn between four lines +% and has ascenders and descenders. +% +% \begin{table} +% \centering +% \caption{The main manuscript book-hands} \label{tab:1} +% \begin{tabular}{lccccc} \hline +% Name & Century & x-height & Height & Pen & Normalised \\ +% & & (mm) & (nib widths) & angle & height \\ \hline +% Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\ +% Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\ +% Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\ +% Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\ +% Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\ +% Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\ +% Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\ +% Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\ +% Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\ +% Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\ +% Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\ +% Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline +% \end{tabular} +% \end{table} +% +% During the period under consideration arabic numerals were effectively +% not used. At the beginning they were unknown and even though some knew +% of them towards the end, the glyphs used for them are not recognisable --- +% to me they look somewhat like cryllic letters --- and each locality +% and time had its own highly individualistic rendering. The general rule +% when using one of these book-hands is to write all numbers using +% roman numerals. +% +% In the first century punctuation was virtually unknown, and typically +% would not even be any additional space between individual words, never +% mind denoting ends of sentences. Sometimes a dot at mid-height would be +% used as a word seperator, or to mark off the end of a paragraph. Effectively +% a text was a continuous stream of letters. By the time that printing was +% invented, though, all of our modern punctuation marks were being used. +% +% Among all these manuscript hands, the Carolingian minuscule is the +% most important as our modern fonts are based on its letter shapes, and it is +% also at this point in time where the division occured between the black letter +% scripts as used even today in Germany, and the lighter fonts used elesewhere. +% The Rotunda and Humanist minuscule hands were developed in Italy and were +% essentially a rediscovery of the Carolingian minusucle. Guthenberg took the +% Gothic scripts as the model for his types. Later printers, +% such as Nicholas Jenson of Venice, +% took the Humanist scripts as their models. +% +% +% \subsection{The Uncial script} +% +% The Uncial hand, which is a minuscule script, was in use for some four +% centuries and was the sucessor to the Roman Rustic book-hand. Usually the +% lettering in a manuscript was all one size. If the scribe felt the need +% for `capital' letters then, using the same pen, would either write a larger +% Uncial letter or write a Roman Rustic letter. During the period when the +% Uncial script was used the alphabet only had 23 letters. I have included +% the missing J, U and W. +% +% Arabic numerals were unknown at this time, so all numbers were written +% using the roman numbering system. I have provided Uncial versions of +% the arabic digits. +% +% Punctuation was practically non-existant. A sentence might be ended with +% a dot at mid-height or a paragraph ended with a colon, also at mid-height. +% More typically, the text ran on continuously with no breaks (in the earliest +% uses of the script there might not be even any extra space between words). +% Towards the end of the script's lifetime, a comma was introduced which was a small +% slash; the semi-colon also made an appearance, as did the single quotation +% mark which was represented by a raised comma. +% +% +% \section{The \Lpack{uncial} and \Lpack{alluncl} packages} \label{sec:usc} +% +% The Uncial font family is called |uncl|. The font is supplied in both +% OT1 and T1 encodings. +% +% \subsection{The \Lpack{uncial} package} +% +% This is intended for the occasions when some short pieces of text have +% to be written in Uncial while the majority of the document is in another +% font. The normal baselineskips are used. +% +% \DescribeMacro{\unclfamily} +% The |\unclfamily| declaration starts typesetting with the Uncial fonts. +% Use of the Uncial font will continue until either there is another |\...family| +% declaration or the current group (e.g., environment) is closed. +% +% \DescribeMacro{\textuncl} +% The command |\textuncl{|\meta{text}|}| will typeset \meta{text} using the +% Uncial fonts. +% +% \subsection{The \Lpack{alluncl} package} +% +% +% This package is for when the entire document will be typeset with the +% Uncial font. The baselineskips are set to those appropriate to the +% book-hand. +% +% This is a minimalist package. Apart from declaring Uncial to be the +% default font and setting the baselineskips appropriately, it makes no other +% alterations. +% Vertical spacing +% before and after section titles and before and after lists, etc., will be +% too small as the \LaTeX{} design assumes a font comparable in size to +% normal printing fonts, and the book-hand is much taller. +% To capture more of the flavour of the time, all numbers +% should be written using roman numerals. +% The \Lpack{romannum} package~\cite{ROMANNUM} +% can be used so that \LaTeX{} will typeset the numbers that it generates, +% like sectioning or caption numbers, using roman numerals instead of arabic +% digits. +% +% \DescribeMacro{\cmrfamily} +% \DescribeMacro{\textcmr} +% \DescribeMacro{\cmssfamily} +% \DescribeMacro{\textcmss} +% \DescribeMacro{\cmttfamily} +% \DescribeMacro{\textcmtt} +% The |...family| declarations start typesetting with the Computer Modern Roman +% (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer +% Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}| +% commands will typeset \meta{text} in the corresponding Computer Modern font. +% +% The \Lpack{alluncl} package automatically loads the \Lpack{uncial} package, +% so the uncial font commands are available if necessary. +% +% +% +% \section{The Metafont code} \label{sec:mf} +% +% +% As previously noted, this work is part of a larger project to provide +% fonts covering the main manuscript book-hands. As such, one of the +% aims is to produce a coordinated set of fonts, especially as multiple +% hands might be used in a single document. +% +% Noting that the hands tend to be somewhat larger than the typical 10pt +% size (where the x-height is approximately 1.5mm) used for modern books, +% I have also designed the fonts +% at a larger than normal size, then applied some non-linear factors when reducing +% them down to a 10pt size. +% Further, I have used the height of the Carolingian minuscule as a +% normalising factor when deciding on the absolute height of any particular +% script. The x-height of the Carolingian font is made equal to the +% x-height of the Computer Modern Roman (CMR) font. +% +% Modern fonts are effectively drawn. That is, the outline of the letter is +% drawn carefully and the center is filled with ink. This is shown to good +% effect in the Metafont code for the Computer Modern fonts~\cite{CM}. +% In contrast, the manuscript letters were inked by single pen strokes in +% a calligraphic manner. I have tried to repeat this calligraphic style +% in the Metafont code. +% +% As much as possible I have tried to use parameter values from the +% Computer Modern Roman (CMR) fonts in order to reduce possible +% infelicities if the CM and manuscript fonts are used together. However, +% few of the CMR parameters are applicable to the calligraphic style. +% +% +% \subsection{The parameter file} +% +% We deal with the parameter files first, and start by announcing +% what they are for. The Uncial font comes in three sizes and also as a normal +% and a bold font. +% \begin{macrocode} +%<*base7|base10|base17|base7b|base10b|base17b> +%<base7>%%% UNCL7.MF Computer Uncial at 7 point design size. +%<base10>%%% UNCL10.MF Computer Uncial at 10 point design size. +%<base17>%%% UNCL17.MF Computer Uncial at 17 point design size. +%<base7b>%%% UNCLB7.MF Computer Uncial Bold at 7 point design size. +%<base10b>%%% UNCLB10.MF Computer Uncial Bold at 10 point design size. +%<base17b>%%% UNCLB17.MF Computer Uncial Bold at 17 point design size. +% +% \end{macrocode} +% Parameters from CMR are used as much as possible. We also +% make sure that \Lpack{cmbase} is loaded as well as plain Metafont. +% \begin{macrocode} +if unknown cmbase: input cmbase fi + +%<base7>font_identifier:="UNCL"; font_size 7pt#; +%<base10>font_identifier:="UNCL"; font_size 10pt#; +%<base17>font_identifier:="UNCL"; font_size 17.28pt#; +%<base7b>font_identifier:="UNCLB"; font_size 7pt#; +%<base10b>font_identifier:="UNCLB"; font_size 10pt#; +%<base17b>font_identifier:="UNCLB"; font_size 17.28pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutstretch} +% The CMR scaling for lowercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> jutstretch:=1.19; +%<base10|base10b> jutstretch:=1.152; +%<base17|base17b> jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{stemstretch} +% The CMR scaling for lowercase stem widths wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> stemstretch:=1.50; +%<base10|base10b> stemstretch:=1.31; +%<base17|base17b> stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{caprat} +% The scaling for `capitals' wrt `lowercase'. This is pretty much a guess. +% \begin{macrocode} + caprat:=1.25; % ratio of capital height to minuscule height +% \end{macrocode} +% +% \DescribeVariable{cap_jutstretch} +% The CMR scaling for uppercase serifs wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_jutstretch:=1.3; +%<base10|base10b> cap_jutstretch:=1.2; +%<base17|base17b> cap_jutstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{cap_stemstretch} +% The CMR scaling for uppercase stem width wrt 17pt size. +% \begin{macrocode} +%<base7|base7b> cap_stemstretch:=1.45; +%<base10|base10b> cap_stemstretch:=1.31; +%<base17|base17b> cap_stemstretch:=1.0; +% \end{macrocode} +% +% \DescribeVariable{bfudge} +% Letter width scaling for bold font wrt normal font. +% \begin{macrocode} +%<base7|base10|base17> bfudge:=1.0; +%<base7b|base10b|base17b> bfudge:=1.15; +% \end{macrocode} +% +% \DescribeVariable{szfudge} +% Width scaling wrt 17pt letter width. +% \begin{macrocode} +%<base7|base7b> szfudge:=1.18; +%<base10|base10b> szfudge:=1.0; +%<base17|base17b> szfudge:=1.0; +% \end{macrocode} +% +% \DescribeVariable{hstretch} +% Horizontal stretching factor wrt 17pt size letter width. +% \begin{macrocode} + hstretch:=szfudge*bfudge; +% \end{macrocode} +% +% \DescribeVariable{carol_height} +% The x-height of the Carolingian minuscule font. +% \begin{macrocode} +%<base7|base7b> carol_height#:=108.5/36pt#; +%<base10|base10b> carol_height#:=155/36pt#; +%<base17|base17b> carol_height#:=268/36pt#; +% \end{macrocode} +% +% \DescribeVariable{vstretch} +% The height of this font wrt the Carolingian font. +% \begin{macrocode} + vstretch:=1.37; + +% \end{macrocode} +% +% \DescribeVariable{x_height} +% The x-height of lower case letters. Scaled from the Carolingian font. +% \begin{macrocode} + x_height#:=vstretch*carol_height#; +% \end{macrocode} +% +% \DescribeVariable{u} +% The unit width. The CMR values are used. +% \begin{macrocode} +%<base7> u#:=15.5/36pt#; +%<base10> u#:=20/36pt#; +%<base17> u#:=32.5/36pt#; +%<base7b> u#:=17.9/36pt#; +%<base10b> u#:=23/36pt#; +%<base17b> u#:=37/36pt#; +% \end{macrocode} +% +% \DescribeVariable{width_adj} +% \DescribeVariable{serif_fit} +% \DescribeVariable{cap_serif_fit} +% \DescribeVariable{letter_fit} +% The majority of these parameters and values are constant. +% They are for fine adjustements of characters. The CM values are used. +% \begin{macrocode} + width_adj#:=0pt#; % width adjustment for certain characters + serif_fit#:=0pt#; % extra sidebar near lowercase serifs +%<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs +%<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +%<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs +%<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars +%<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars + +% \end{macrocode} +% +% \DescribeVariable{cap_height} +% The height of capital letters. +% \begin{macrocode} +%<base7|base7b> cap_height#:=172.2/36pt#; % height of caps +%<base10|base10b> cap_height#:=246/36pt#; % height of caps +%<base17|base17b> cap_height#:=425/36pt#; % height of caps +% \end{macrocode} +% +% \DescribeVariable{thickfudge} +% The reciprical of the font height in nib widths. Normal font height +% is 5 nib widths and the bold font height is 4 nib widths. +% \begin{macrocode} +%<base7|base10|base17> thickfudge:=1/5; +%<base7b|base10b|base17b> thickfudge:=1/4; +% \end{macrocode} +% +% \DescribeVariable{thinfudge} +% The nib sharpness. +% \begin{macrocode} +thinfudge:=1/6; +% \end{macrocode} +% +% \DescribeVariable{thick} +% The maximum nib width. +% That is, the width of the thickest line that can be penned. +% \begin{macrocode} +thick#:=stemstretch*thickfudge*x_height#; % max pen breadth +% \end{macrocode} +% +% \DescribeVariable{thin} +% The nib thinness. +% That is, the width of the thinnest line that can be penned. +% \begin{macrocode} +thin#:=thinfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{pangle} +% The pen angle (in degrees). +% \begin{macrocode} +pangle:=30; % pen angle +% \end{macrocode} +% +% \DescribeVariable{asc_height} +% The height of lower case ascenders. +% \begin{macrocode} + asc_height#:=2x_height#; +% \end{macrocode} +% +% \DescribeVariable{desc_depth} +% The depth of lower case descenders. +% \begin{macrocode} + desc_depth#:=x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_height} +% The height of numerals. Make these midway between normal and capital +% letters. +% \begin{macrocode} + fig_height#:=(0.5[1,caprat])*x_height#; +% \end{macrocode} +% +% \DescribeVariable{fig_width} +% The width of numerals. All numerals are the same width (roughly, an `o'). +% \begin{macrocode} + fig_width#:=hstretch*(9/10x_height#); +% \end{macrocode} +% +% \DescribeVariable{body_height} +% The height of the tallest character. +% \begin{macrocode} + body_height#:=caprat*asc_height#; +% \end{macrocode} +% +% \DescribeVariable{body_depth} +% The depth of the lowest character. +% \begin{macrocode} + body_depth#:=caprat*desc_depth#; +% \end{macrocode} +% +% \DescribeVariable{half_height} +% Half the normal letter height. +% \begin{macrocode} + half_height#:=1/2x_height#; % half the height of x height letters + +% \end{macrocode} +% +% \DescribeVariable{side} +% We might be using a square for the character design. +% \begin{macrocode} +side#:=x_height#; +% \end{macrocode} +% +% \DescribeVariable{rule_thickness} +% Thickness of rules (in math symbols). The CMR values are used. +% \begin{macrocode} +%<base7|base7b> rule_thickness#:=.34pt#; +%<base10|base10b> rule_thickness#:=.4pt#; +%<base17|base17b> rule_thickness#:=.6pt#; + +% \end{macrocode} +% +% \DescribeVariable{jutfudge} +% Controls the protrusion of serifs. +% \begin{macrocode} +jutfudge:= 3/4; +% \end{macrocode} +% +% \DescribeVariable{jut} +% The lowercase serif protrusion. +% \begin{macrocode} +jut#:=jutstretch*jutfudge*thick#; +% \end{macrocode} +% +% \DescribeVariable{srad} +% |srad| with |0 < srad < 1| controls the serif radius. +% \begin{macrocode} +srad:=0.5; +% \end{macrocode} +% +% \DescribeVariable{o} +% Amount of overshoot for curves (as in an `o'). Use CMR values. +% \begin{macrocode} +%<base7|base7b> o#:=5/36pt#; +%<base10|base10b> o#:=8/36pt#; +%<base17|base17b> o#:=10/36pt#; + +% \end{macrocode} +% +% \DescribeVariable{slant} +% |slant| is the amount the font slopes to the right. +% \begin{macrocode} +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ + +% \end{macrocode} +% +% \DescribeVariable{monospace} +% We are generating a variable-width font. +% \begin{macrocode} +monospace:=false; % should all characters have the same width? + +% \end{macrocode} +% +% \DescribeVariable{dot_size} +% The size of (punctuation) dots. +% \begin{macrocode} +dot_size#:=5thin#; % size of dots +% \end{macrocode} +% +% \DescribeVariable{comma_width} +% The horizontal width of a comma. +% \begin{macrocode} +comma_width#:=2.5dot_size#; + +% \end{macrocode} +% +% Finally, call the driver file for the font. +% \begin{macrocode} +generate uncltitle %% switch to the driver file + +% \end{macrocode} +% +% The end of this code section. +% \begin{macrocode} +%</base7|base10|base17|base7b|base10b|base17b> +% \end{macrocode} +% +% +% \subsection{The driver file} +% +% The driver file sets up the font parametrs and also contains +% the macros used in the definition of the characters. +% +% \begin{macrocode} +%<*mfd> +% This is UNCLTITLE.MF for the Uncial font. +% This makes a short font. +% This file also contains special macros universally needed in the +% font but either not in the cmbase.mf file or modifications of these. +% +% \end{macrocode} +% +% \begin{routine}{makebox} +% This is a new version of the \Lpack{cmbase.mf} |makebox| macro. +% Essentially, as we are only generating a single case font, we don't +% need all the horizontals for the CMR characters. +% +% \begin{macrocode} +% A new version of cmbase.mf makebox macro +def makebox(text rule) = + for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth: + rule((l,y)t_,(r,y)t_); endfor % horizontals + for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals + for x=u*(1+floor(1/u)) step u until r-1: + rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals + if charic<>0: + rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction +enddef; + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{proofpcbb} +% The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the +% square, and at the bottom and top midpoints, where the point |zS| is at +% position |(xoff,yoff)| in the square. +% \begin{macrocode} + +% A macro to delineate a letter's bounding square in proof mode. +% Point z$ is at (xoff,yoff) in the bounding square. +def proofpcbb(suffix $)(expr xoff, yoff) = +if proofing > 0: + x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner + z$br = (x$bl+side, y$bl); % BRHC + z$tr = (x$bl+side, y$bl+side); % TRHC + z$tl = (x$bl, y$bl+side); % TLHC + z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points + pair hc, vc; + hc = (2u,0); vc = (0,2u); + pickup pensquare scaled 2; + for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc: + draw s-hc--s+hc; + draw s-vc--s+vc; + endfor +fi +enddef; + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{uncial_font_setup} +% This macro contains the set up for the uncial fonts. +% \begin{macrocode} + +def uncial_font_setup= % contains special stuff for uncial fonts + define_pixels(side,half_height,carol_height,comma_width); + define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit, + cap_serif_fit,jut,cap_jut); + define_pixels(fig_width); + define_whole_pixels(letter_fit); + define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height, + desc_depth,body_depth,fig_height); + define_corrected_pixels(o); + define_blacker_pixels(thick,thin); + let adjust_fit = normal_adjust_fit; +% \end{macrocode} +% \DescribeVariable{stylus} +% The pen for drawing the thinnest lines is |stylus|. +% \begin{macrocode} + pickup pencircle scaled thin; + stylus:=savepen; +% \end{macrocode} +% \DescribeVariable{quill} +% The normal calligraphic pen is |quill|. +% \begin{macrocode} + pickup pencircle xscaled thick yscaled thin rotated pangle; + quill:=savepen; + numeric pcshiftx#; % x value of LHS of box wrt origin of char box + define_pixels(pcshiftx); + numeric sqxside#; % x size of the square + numeric sqyside#; % y size of the square + define_pixels(sqxside,sqyside); + +enddef; % end of uncial_font_setup + +% \end{macrocode} +% \end{routine} +% +% +% \DescribeVariable{ductus} +% A boolean to control drawing the ductus (TRUE) or the full letter (FALSE). +% \begin{macrocode} +boolean ductus; +ductus:=false; +% \end{macrocode} +% +% \DescribeVariable{qhor} +% \DescribeVariable{qvert} +% The cosine and sine of the pen angle. +% \begin{macrocode} +numeric qhor, qvert; +qhor:=cosd(pangle); qvert:=sind(pangle); +% \end{macrocode} +% +% \DescribeVariable{pdir} +% The vector corresponding to the pen angle. +% \begin{macrocode} +pair pdir; pdir=dir(pangle); +% \end{macrocode} +% +% \DescribeVariable{ppdir} +% The vector that is perpendicular (anticlockwise) to the pen angle. +% \begin{macrocode} +pair ppdir; ppdir=dir(pangle+90); +% \end{macrocode} +% +% \begin{routine}{draw_serif} +% A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to +% draw a serif of extent |jut| at |z1| to the left of the line from |z2| +% to |z1|. The +% radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2| +% starts at the point |z1a|. +% \begin{macrocode} + +def draw_serif(suffix $, $$)(expr fr)= + numeric beta, ajut, bjut; +% \end{macrocode} +% |fr| and |beta| control the serif radius. +% \begin{macrocode} + beta=1-fr; + ajut=fr*jut; bjut=beta*jut; +% \end{macrocode} +% The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif +% the leftmost (rightmost) point is +% |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the +% distance |ajut|, and the other points are calculated from this. If the stem +% is not vertical, then we have to rotate |$b| to match. +% \begin{macrocode} + pair vec[]; vec1=unitvector(z$$-z$); + vec2=ajut*vec1; + z$a=z$ shifted vec2; + z$b=z$a rotatedaround (z$,-90); + boolean top_serif; + if y$>y$$: + top_serif := true; + z$c=z$b shifted (-bjut*pdir); + else: + top_serif:=false; + z$c=z$b shifted (bjut*pdir); + fi +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + if top_serif: + draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif + else: + draw z$c--z$b{-pdir}..{z$$-z$}z$a; + fi + labels($a,$b,$c); +enddef; % end of draw_serif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_istem} +% A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs +% are of extent |jut|. The serif radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_istem(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % top serif + draw_serif($$, $, fr); % bottom serif + draw z$a--z$$a; % the stem +enddef; % end of draw_istem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tstem} +% A macro to draw the shape of the stem of a `t'. |draw_tstem(1,2,f)| draws a +% stem whose +% top is at |z1| and bottom at |z2| with a right serif at |z2|. The radius +% is controlled by |f|, with $0 < f < 1$. +% It draws with the current pen and the serif is of extent |jut|. +% \begin{macrocode} + +def draw_tstem(suffix $, $$)(expr fr)= + draw_serif($$, $, fr); % the serif + draw z$--z$$a; % the stem +enddef; % end of draw_tstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_tlserif} +% A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. It draws with the current pen and the serif +% is of extent |jut|. It also draws the stem to the point |z2|. The serif +% radius is controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_tlserif(suffix $, $$)(expr fr)= + draw_serif($, $$, fr); % the serif + draw z$a--z$$; % the stem +enddef; % end of draw_tlserif + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_jstem} +% A macro to draw a stem like a `j'. |draw_jstem(1,2,f,jjut,jdepth)| draws a +% serif on top +% of a stem whose absolute +% top is at |z1| and bottom at |z2|. A straight stem is drawn down to |z2|. +% A curved point is dawn, ending at |jjut| to the left and |jdepth| below +% |z2|. It draws with the current pen and the serif +% is of extent |jut| with the radius controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_jstem(suffix $, $$)(expr fr, jjut, jdepth)= + draw_serif($, $$, fr); % the serif +% \end{macrocode} +% The point |z$$a| is at |jjut| to the left and |jdepth| below the point |z$$|. +% \begin{macrocode} + lft x$$a=x$$-jjut; bot y$$a=y$$-jdepth; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$a--z$${down}..{-pdir}z$$a; % straight stem and curved ending + labels($$a); +enddef; % end of draw_jstem + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_jcurve} +% A macro to draw a curved stem like a `j'. +% |draw_jstem(1,f,jjut,jdepth)| draws a +% serif on top +% of a stem whose absolute +% top is at |z1|. A curved stem with a pointed end +% is drawn, ending at |jjut| to the left and |jdepth| below +% |z1|. It draws with the current pen and the serif +% is of extent |jut| with the radius controlled by |f|, with $0<f<1$. +% \begin{macrocode} + +def draw_jcurve(suffix $)(expr fr, jjut, jdepth)= + z$'= z$ shifted down; + draw_serif($, $', fr); % the serif +% \end{macrocode} +% The point |z$d| is at |jjut| to the left and |\jdepth| below the point |z$|. +% \begin{macrocode} + lft x$d=x$-jjut; bot y$d=y$-jdepth; +% \end{macrocode} +% Draw the parts, and finish off. +% \begin{macrocode} + draw z$a{down}...{-pdir}z$d; % curved downwards stem + labels($d); +enddef; % end of draw_jcurve + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_flick} +% A macro to draw a flick (like an eyebrow). +% |draw_flick(1,rise,fall,fjut)| draws a stroke starting at |z1| rising up by +% |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is +% |fjut| to the right of |z1|. It is drawn with the current pen. +% \begin{macrocode} + +def draw_flick(suffix $)(expr rise, fall, fjut)= +% \end{macrocode} +% The points |z$a| and |z$b|, together with |z$| make up three points on the +% ductus. +% \begin{macrocode} + rt x$b = x$+fjut; top y$b=y$-fall; + x$a=0.5[x$,x$b]; top y$a=y$+rise; +% \end{macrocode} +% Draw the part, and finish off. +% \begin{macrocode} + draw z$..z$a..z$b; + labels($a,$b); +enddef; % end of draw_flick + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_hbowl} +% A macro to draw the bowl of an `h'. +% |draw_hbowl(1,rise,fall,hjut)| draws a stroke starting at |z1| rising up by +% |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is +% |hjut| to the right of |z1|. It is drawn with the current pen as a part circle, +% with the left and bottom parts missing. +% \begin{macrocode} + +def draw_hbowl(suffix $)(expr rise, fall, fjut)= +% \end{macrocode} +% The points |z$|, |z$e|, |z$f| and |z$j| are the points defining the ductus. +% First we need the ductus of the circle. This is radius |rad| and center |z$c|. +% \begin{macrocode} + numeric rad; rad=0.5(rise+fall); + x$c=x$+fjut-rad; y$c=y$+rise-rad; +% \end{macrocode} +% Points |z$d| to |z$g| define the circle ductus. +% \begin{macrocode} + lft x$d=x$c-rad; rt x$f=x$c+rad; y$d=y$f=y$c; + x$e=x$g=x$c; top y$e=y$c+rad; bot y$g=y$c-rad; +% \end{macrocode} +% Locate the lower right thinnest point on the circle, and drop it vertically +% down to the baseline. +% \begin{macrocode} + z$k = z$c shifted (-rad*ppdir); + path p[]; + p1 = z$e{right}..z$f{down}..{left}z$g; + z$i = (z$c--z$k) intersectionpoint p1; + x$j=x$i; bot y$j = y$c-rad; +% \end{macrocode} +% Draw the part, and finish off. +% \begin{macrocode} + draw z$..z$e{right}..z$f{down}..{-pdir}z$j; + labels($c,$d,$e,$f,$g,$i,$j,$k); +enddef; % end of draw_hbowl + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_wave} +% A macro to draw a (horizontal) stroke with a flick at each end +% (down at the left and up at the right). |draw_wave(1,2,f)| uses the current +% pen to draw from |z1wl| to |z1wr|, where |x1wl=x1|, |y1wl=y1-f|, and +% |x1wr=x2|, |y1wr=y2+f|, with |z1| assumed to be at the left of |z2|. +% \begin{macrocode} + +def draw_wave(suffix $,$$)(expr f)= + x$wl=x$; y$wl=y$-f; + x$wr=x$$; y$wr=y$$+f; + z$wc=0.5[z$wl,z$wr]; + draw z$wl{pdir}..z$wc{right}..{pdir}z$wr; + labels($wl,$wc,$wr); +enddef; % end of draw_wave +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{draw_pdot} +% A macro to draw a period dot. +% |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|. +% \begin{macrocode} + +def draw_pdot(suffix $)(expr sz)= +% \end{macrocode} +% Draw a square rotated 45 degrees. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$ shifted (0.5sz*up); + z$u = z$s shifted (sz*right); + z$v = z$t shifted (sz*down); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pdot + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_pcomma} +% A macro to draw a period comma. +% |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. The pen is |stylus|. +% \begin{macrocode} + +def draw_pcomma(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping back and down at 45 degrees +% for a total width of |ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s-ar; y$v=y$s-ar; + z$u = z$v shifted (sz*right); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_pcomma + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{draw_plq} +% A macro to draw a period left quote. +% |draw_pcomma(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t| +% and bottom of line is |w| horizontally from |z1|. +% \begin{macrocode} + +def draw_plq(suffix $)(expr sz, ar)= +% \end{macrocode} +% Draw a line of at |z$| of width |sz| sloping forward and down at 45 degrees +% for a total width of |ar|. +% \begin{macrocode} + z$s = z$ shifted (0.5sz*left); + z$t = z$s shifted (sz*right); + x$v=x$s+ar; y$v=y$s-ar; + z$u = z$v shifted (sz*right); + pickup stylus; + filldraw z$s--z$t--z$u--z$v--cycle; + labels($s,$t,$u,$v); +enddef; % end of draw_plq + +% \end{macrocode} +% \end{routine} +% +% +% Set the mode and font setup. +% \begin{macrocode} + +font_coding_scheme:="ASCII minuscules and punctuation"; +mode_setup; +uncial_font_setup; + +% \end{macrocode} +% +% +% We generate letters, together with some punctuation and +% analphabetics. +% \begin{macrocode} + +input uncll; % minuscules (lower case) +input unclu; % majuscules (capitals) +input unclpunct; % punctuation +input uncllig; % the several dashes +input uncldig; % arabic digits +%%%input unclp; % ampersand and ?mark + +% \end{macrocode} +% +% Finally, do the uppercase ligtable. +% +% \begin{macrocode} + +font_slant slant; font_x_height x_height#; +if monospace: font_normal_space 9u#; % no stretching or shrinking + font_quad 18u#; + font_extra_space 9u#; +else: font_normal_space 6u#+2letter_fit#; + font_normal_stretch 3u#; font_normal_shrink 2u#; + font_quad 18u#+4letter_fit#; + font_extra_space 2u#; + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning +%% ligtable "P": "T": "Y": "A" kern kk#; +%% ligtable "F": "V": "W": "A" kern if serifs: kkk# else: kk#fi, +%% "K": "X": "O" kern k#, "C" kern k#, "G" kern k#, "Q" kern k#; +%% ligtable "O": "D": "X" kern k#, "W" kern k#, "A" kern k#, +%% "V" kern k#, "Y" kern k#; +%% ligtable "A": if serifs: "R": fi +%% "C" kern k#, "O" kern k#, "G" kern k#, "U" kern k#, "Q" kern k#, +%% "L": "T" kern kk#, "Y" kern kkk#, "V" kern kk#, "W" kern kkk#; +%%ligtable "I": "I" kern -k#; % Richard III +fi + +bye. + +%</mfd> +% \end{macrocode} +% +% \subsection{The code for normal letters} +% +% The following code is for the minuscule characters. +% +% \begin{macrocode} +%<*min> +% UNCLL.MF Program file for uncial minuscules +% + + +% \end{macrocode} +% +% +% \begin{routine}{a} +% The letter `a'. +% \begin{macrocode} +cmchar "Uncial letter a"; +beginchar("a", 2u#+hstretch*(x_height#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx+sqxside/3; rt x2=lft x1+2/3sqxside; +y1=h; y2=0; +% for the bowl +z3=3/4[z2,z1]; +z5=3/16[z2,z1]; +y4=1/10[y5,y3]; +lft x4=pcshiftx; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % the stem +draw z3{-pdir}..z4{down}..{pdir}z5; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,100); +endchar; % end "a" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{b} +% The letter `b'. +% \begin{macrocode} +cmchar "Uncial letter b"; +beginchar("b", 2u#+hstretch*(x_height#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u+jut/2; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pair uncial; uncial=(qhor,0.5qvert); +pickup quill; +lft x1=lft x2=pcshiftx; +top y1=h; y2=h/4; +x3=pcshiftx+sqxside/2; bot y3=0; +rt x4=pcshiftx+sqxside; y4=0.3h; +lft x5=x1; bot y5=h/2; +z5'=z5 + thick*uncial; +x6=x4-thick; y6=0.85h; +x7=x1; y7=0.9h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % the stem +draw z2{down}..z3{right}..z4{up}..{-uncial}z5'--z5; % bottom bowl +draw z5--z5'{uncial}..z6{up}..{-pdir}z7; % top bowl +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,5',6,7,8,100); +endchar; % end "b" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{c} +% The letter `c'. +% \begin{macrocode} +cmchar "Uncial letter c"; +beginchar("c", u#+hstretch*(x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u/2; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=pcshiftx+sqxside; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x5=x6=x3; +y5=0.2h; +y6=0.75h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,100); +endchar; % end "c" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{d} +% The letter `d'. +% \begin{macrocode} +cmchar "Uncial letter d"; +beginchar("d", 2u#+hstretch*(x_height#), 5/4x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=4/5h; sqxside:=hstretch*sqyside; +y100 = side/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=pcshiftx+sqxside; y1=y3=sqyside/2; +x2=x4=w/2; top y2=sqyside; bot y4=0; +x5=x6=x3; +y5=0.2h; +y6=0.75h; +rt x0=pcshiftx+0.5sqxside; top y0=sqyside; +lft x7=pcshiftx+0.5sqxside; +bot y7=sqyside; +lft x8=pcshiftx; y8=y7+thick; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z0{-pdir}..z1{down}..z4{right}..z3{up}..z7..z8; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "d" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{e} +% The letter `e'. +% \begin{macrocode} +cmchar "Uncial letter e"; +beginchar("e", 2u#+hstretch*(x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=pcshiftx+sqxside; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x5=x6=x3; +y5=0.2h; +y6=0.75h; +% the bar +x7=x1; y7=y1; +%%x8=x7+side+0.5thick; y8=y7; +x8=w-pcshiftx; y8=y7; +x10=x7; y10=y7+3thin; +numeric alpha; alpha:=0.5; % dishing +x9=0.5[x8,x10]; y9=(0.5alpha)[y8,y10]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; % the bowl +pickup stylus; +filldraw z7--z8..z9..z10--cycle; % the bar +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "e" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{f} +% The letter `f'. +% \begin{macrocode} +cmchar "Uncial letter f"; +beginchar("f", 2u#+hstretch*(jut#+x_height#), x_height#, 2/3x_height#); +adjust_fit(0,0); +pcshiftx := u+jut; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=lft x2=pcshiftx; +top y1=h; bot y2=-d/2; +x3=x4=x1; y3=h-thick; y4=0; +numeric rise, fall, fjut; +rise:=thick; fall:=0; fjut:=2/3sqxside; +%%ductus:=true; +draw_jstem(1,2,srad,d/2,d/2); +draw_flick(3,rise,fall,fjut); +draw_flick(4,rise,fall,fjut); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "f" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{g} +% The letter `g'. Like a `c' but with a small stem. +% \begin{macrocode} +cmchar "Uncial letter g"; +beginchar("g", u#+hstretch*(x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u/2; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=pcshiftx+sqxside; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x5=x6=x3; +y5=0.2h; +y6=0.75h; +lft x7=x5-thick; bot y7=y5-3thick; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; % the bowl +draw z5{down}..{-pdir}z7; % the stem +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "g" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{h} +% The letter `h'. +% \begin{macrocode} +cmchar "Uncial letter h"; +beginchar("h", 2u#+hstretch*(jut#+thick#+x_height#), asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u+jut; +sqyside:=h/2; % asc_height is 2x_height !!! +sqxside:=hstretch*sqyside; +y100 = sqyside/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=lft x2=pcshiftx; +top y1=h; bot y2=0; +% center of circle +x99=w/2; y99=sqyside/2; +y3=y5=y99; +lft x3= pcshiftx; +%%rt x5=x99+w-pcshiftx; +x5 = x99 + (x99-x3); +x4=x6=x99; top y4=sqyside; bot y6 =0; +path pcirc; pcirc=z6..z5..z4..z3..cycle; +x1'=x2'=x1+0.5thick; y1'=h; y2'=0; +z7' = (z1'--z2') intersectionpoint (subpath(2,3) of pcirc); +x7=x1; y7=y7'; +z99'=z99 - 500ppdir; +z8' = (z99--z99') intersectionpoint subpath(0,1) of pcirc; +x8=x8'; bot y8=0; +%%ductus:=true; +if ductus: + pickup stylus; + draw z1'--z2'; draw z99--z99'; draw pcirc; +fi +draw_istem(1,2,srad); +draw z7{pdir}..z4{right}..z5{down}..{-pdir}z8; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,1',2,2',3,4,5,6,7,7',8,8',99,99',100); +endchar; % end "h" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{i} +% The letter i. +% \begin{macrocode} +cmchar "Uncial letter i"; +beginchar("i", 2u#+hstretch*(thick#+2jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u+jut; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=x2=w/2; +top y1=h; bot y2=0; +%%ductus:=true; +draw_istem(1,2,srad); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,100); +endchar; % end "i" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{j} +% The letter `j'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "Uncial letter j"; +beginchar("j", 2u#+hstretch*(thick#+2jut#), x_height#, desc_depth#); +adjust_fit(0,0); +pcshiftx := u+jut; +sqyside:=h; sqxside:=sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=x2=w/2; +top y1=h; bot y2=0; +%%ductus:=true; +draw_jstem(1,2,srad,2/3sqxside,desc_depth); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,100); +endchar; % end "j" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{k} +% The letter `k'. +% \begin{macrocode} +cmchar "Uncial letter k"; +beginchar("k", 2u#+hstretch*(jut#+4/3x_height#), asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u+jut; +sqyside:=h/2; % asc_height = 2x_height !!! +sqxside:=hstretch*sqyside; +y100 = side/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=lft x2=pcshiftx; +top y1=h; bot y2=0; +% for the flick +numeric rise,fall,fjut; +x3=x1; y3=2/3side; +rise:=1/3sqyside; fall:=-rise/2; fjut:=sqxside; %% fjut:=2/3side; +% for the leg +x4=x3+0.25thick; y4=y3+0.5thick; +x5=x3+side; y5=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); +draw_flick(3,rise,fall,fjut); +draw_tstem(4,5,srad); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,100); +endchar; % end "k" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{l} +% The letter `l'. Like a high `i' but with a bottom bowl like the lower half +% of the `c'. +% \begin{macrocode} +cmchar "Uncial letter l"; +beginchar("l", 2u#+hstretch*(x_height#+jut#), asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u+jut; +sqyside:=h/2; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=lft x2=pcshiftx; +top y1=h; y2=h/4; +x3=0.5[x1,x4]; bot y3=0; +rt x4=w-u; y4=0.1h; +%%ductus:=true; +draw_tlserif(1,2,srad); % the stem +draw z2{down}..z3{right}..{pdir}z4; % the bowl +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,100); +endchar; % end "l" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{m} +% The letter `m'. +% \begin{macrocode} +cmchar "Uncial letter m"; +beginchar("m", 2u#+hstretch*(9/6x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=1/3sqxside; bot y1=0; +lft x2= pcshiftx; y2=h/2; +lft x4=pcshiftx+2/3sqxside; y4=2/3h; +x3=0.5[x2,x4]; top y3=h; +x5=x4; y5=y1; +z6=z4; +numeric rise,fall,mjut; +rise=h-y6; fall=y6; mjut=w-pcshiftx-x6; +%%ductus:=true; +draw z1..z2{up}..z3{right}..{down}z4; % left half +draw_tstem(4,5,srad); % middle stem +draw_hbowl(6,rise,fall,mjut); % right half +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,100); +endchar; % end "m" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{n} +% The letter `n'. +% \begin{macrocode} +cmchar "Uncial letter n"; +beginchar("n", 2u#+hstretch*(jut#+x_height#), x_height#, 0.5x_height#); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% left stem +lft x1=pcshiftx; top y1=h; +x2=x1; y2=y1-thin; +numeric jjut, jdepth; +jjut=2jut; jdepth=y2+d-thin; +% right stem +rt x4=pcshiftx+sqxside; y4=y1; +x3=x4; bot y3=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_jcurve(1,srad,jjut,jdepth); % left stem +draw_istem(4,3,srad); % right stem +draw z1--z3; % diagonal +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "n" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{o} +% The letter `o'. +% \begin{macrocode} +cmchar "Uncial letter o"; +beginchar("o", u#+hstretch*(x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u/2; +sqyside:=h; +sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "o" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{p} +% The letter `p'. +% \begin{macrocode} +cmchar "Uncial letter p"; +beginchar("p", 2u#+hstretch*(x_height#+jut#), x_height#, x_height#); +adjust_fit(0,0); +pcshiftx := u+jut; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% stem +lft x1=pcshiftx; top y1=h; +numeric jjut, jdepth; +jjut=1/3sqxside-thin; jdepth=h+d-thin; +% bowl +x2=x1; y2=3/4h; %% y2=2/3side; +rt x4=w-u; +lft x5=x1+thick; y5=0; +y4=0.4[y3,y5]; +top y3=h; x3=0.5[x2,x4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_jcurve(1,srad,jjut,jdepth); % stem +%%draw z2..z3{right}..z4{down}..{-pdir}z5; % bowl +draw z1a..z3{right}..z4{down}..{-pdir}z5; % bowl +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,100); +endchar; % end "p" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{q} +% The letter `q'. +% \begin{macrocode} +cmchar "Uncial letter q"; +beginchar("q", 2u#+hstretch*(x_height#), x_height#, x_height#); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% right stem +rt x1=w-pcshiftx; top y1=h; +numeric jjut, jdepth; +jjut=2jut; jdepth=h+d-thin; +x2=x1-jjut; y2=y1-jdepth; +% bowl +numeric rad; rad := w/2; +x0=w/2; y0=h/2; +lft x4=pcshiftx; y4=y0; +x3=x5=x0; top y3=h; bot y5=0; +x7=x0+rad; y7=y0; +path p[]; +p1=z1{down}..{-pdir}z2; % stem +p2=z4{down}..z5{right}..{up}z7; +z6'= p1 intersectionpoint p2; +rt x6=x6'; y6=y6'; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}...{-pdir}z2; % right stem +draw z1--z3..z4{down}..{right}z5..z6; % bowl +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(0,1,2,3,4,5,6,6',7,100); +endchar; % end "q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{r} +% The letter `r'. +% \begin{macrocode} +cmchar "Uncial letter r"; +beginchar("r", 2u#+hstretch*(4/3x_height#), x_height#, 2/3x_height#); +adjust_fit(0,0); +sqyside:=h; sqxside:=hstretch*sqyside; +pcshiftx := u+jut; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% stem +lft x1=pcshiftx; top y1=h; +numeric jjut, jdepth; +jjut=1/5sqxside; jdepth=h+d-thin; +% bowl +x2=x1; y2=3/4h; +rt x4=pcshiftx+3/4sqxside; +lft x5=x1; bot y5=1/6h; +y4=0.4[y3,y5]; +top y3=h; x3=0.5[x2,x4]; +rt x7=w-u; y7=-thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_jcurve(1,srad,jjut,jdepth); % stem +draw z1a..z3{right}..z4{down}..{-pdir}z5; % bowl +draw z5{-ppdir}..{right}z7; % leg +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "r" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{s} +% The letter `s'. +% \begin{macrocode} +cmchar "Uncial letter s"; +beginchar("s", 2u#+hstretch*(5/6x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +rt x1=w-pcshiftx; top y1=h-thin; +x2=w/2; top y2=h; +lft x3=pcshiftx; y3=0.75h; +x4=w/2; y4=h/2; +rt x5=w-pcshiftx; y5=0.25h; +x6=w/2; bot y6=0; +lft x7= pcshiftx; bot y7 = thin; +path p[]; +p1=z1..z2{left}..z3{down}..z4..z5{down}..z6{left}..z7; +pair vec[]; +vec1= direction 0 of p1; +vec2= direction (length p1) of p1; +z11=z1 shifted vec1; +z17=z7 shifted -vec2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw_serif(1,11,srad); +%%draw_serif(7,17,srad); +%%draw z1a..z2{left}..z3{down}..z4..z5{down}..z6{left}..z7a; +draw p1; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,11,17,100); +endchar; % end "s" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{t} +% The letter `t'. +% \begin{macrocode} +cmchar "Uncial letter t"; +beginchar("t", u#+hstretch*(x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u/2; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=x2=w/2; +top y1=h; bot y2=0; +lft x3=pcshiftx; top y3=h-thin; +x4=x2; top y4=h; +rt x5=w-pcshiftx; top y5=h+thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +draw z3{pdir}..z4{right}..{pdir}z5; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,100); +endchar; % end "t" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{u} +% The letter `u'. This is a modern version as the font did not have a U. +% It uses part of the left half of the W. +% \begin{macrocode} +cmchar "Uncial letter u"; +beginchar("u", 2u#+hstretch*(x_height#+jut#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% left half first +lft x6=pcshiftx+thick; +top y6=h; +lft x7=pcshiftx; y7=h/2; +x8=pcshiftx+0.5sqxside; bot y8=0; +% the stem +rt x1=w-pcshiftx-jut; y1=h; +x2=x1; bot y2=0; +% a construction point for the curved part +x5=x1+sqxside-thick; y5=y6; +path p[]; +p1=z1--z2; +p2=z6..z7{down}..z8{right}..z5; +z9= p2 intersectionpoint p1; +pair vec[]; +vec2 = direction 0 of p2; +z16=z6 shifted vec2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_serif(6,16,srad); % left half +draw z6a..z7{down}..z8{right}..z9; +draw_istem(1,2,srad); % right stem +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "u" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{v} +% The letter `v'. The right half of the `w' is used for the `v' (or vice-versa +% if you prefer). +% \begin{macrocode} +cmchar "Uncial letter v"; +beginchar("v", 2u#+hstretch*(x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% right side first +numeric midx; midx:= pcshiftx; +lft x1=midx+jut; top y1=h; +lft x2=midx; y2=h/2; +rt x4=midx+sqxside; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-thick; y5=y1; +path p[]; +p1=z1..z2{down}..z3{right}..z4{up}..z5; +pair vec[]; +vec1 = direction 0 of p1; +z11=z1 shifted vec1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_serif(1,11,srad); % right half +draw z1a..z2{down}..z3{right}..z4{up}..z5; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,11,100); +endchar; % end "v" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{w} +% The letter `w'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "Uncial letter w"; +beginchar("w", 2u#+hstretch*(5/3x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% right side first +numeric midx; midx:= pcshiftx+2/3sqxside; +lft x1=midx+jut; top y1=h; +lft x2=midx; y2=h/2; +rt x4=midx+sqxside; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-thick; y5=y1; +path p[]; +p1=z1..z2{down}..z3{right}..z4{up}..z5; +% left side +lft x6=pcshiftx+thick; +y6=y1; +lft x7=pcshiftx; y7=y2; +x8=pcshiftx+0.5sqxside; y8=y3; +p2=z6..z7{down}..z8{right}..(z5 shifted -pdir); +z9= p2 intersectionpoint p1; +pair vec[]; +vec1 = direction 0 of p1; +vec2 = direction 0 of p2; +z11=z1 shifted vec1; +z16=z6 shifted vec2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_serif(1,11,srad); % right half +draw z1a..z2{down}..z3{right}..z4{up}..z5; +draw_serif(6,16,srad); % left half +draw z6a..z7{down}..z8{right}..z9; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "w" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{x} +% The letter `x'. +% \begin{macrocode} +cmchar "Uncial letter x"; +beginchar("x", u#+hstretch*(5/3x_height#), x_height#, 1/3x_height#); +adjust_fit(0,0); +pcshiftx := 0; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% thick diagonal +lft x1=pcshiftx+1/2sqxside; rt x2=w-jut; +y1=h; y2=0; +% thin diagonal +lft x3=pcshiftx; bot y3=-d; +z4=z3 shifted (jut*right); +z5=z4 shifted (jut*pdir); +rt x8=w-pcshiftx; top y8=h; +z7=z8 shifted (jut*left); +z6=z7 shifted (-jut*pdir); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % thick diagonal +draw z3---z4..z5---z6..z7---z8; % thin diagonal +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "x" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{y} +% The letter `y'. This has a dot on top! +% \begin{macrocode} +cmchar "Uncial letter y"; +beginchar("y", 2u#+hstretch*(4/3x_height#), x_height#, 2/3x_height#); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% left stroke +lft x1=pcshiftx; top y1=3/4h; +lft x3=w/2; bot y3=-d; +x2=0.8[x1,x3]; y2=0.5[y1,y3]; +% right stroke +rt x4=w-pcshiftx; y4=y1; +x7=pcshiftx; y7=-d; +path p[]; +p1=z1..z2..z3; +z6= (z7--z4) intersectionpoint p1; +x5=0.4[x6,x4]; y5=0.5[y6,y4]; +% the dot +x8=x6; y8=h; +if ductus: + pickup stylus; +fi +draw z1..z2..z3; % left stroke +draw z4{left}..z6; % right stroke +draw_pdot(8,dot_size); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{z} +% The letter `z'. +% \begin{macrocode} +cmchar "Uncial letter z"; +beginchar("z", 2u#+hstretch*(4/3x_height#), x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% bottom stroke +lft x4=pcshiftx; bot y4=0; +rt x6=w-pcshiftx; y6=y4; +x5=0.5[x4,x6]; y5=y4+thin; +% top stroke +x1=x4; top y1=h; +x3=pcshiftx+sqxside; y3=y1; +x2=0.5[x1,x3]; top y2=h-thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3; % top stroke +draw z4..z5..z6; % bottom stroke +% the diagonal +pickup stylus; +draw z4--z3; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,100); +endchar; % end "z" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file +% \begin{macrocode} +%</min> +% \end{macrocode} +% +% +% \subsection{The code for capital letters} +% +% Uncial `capitals' were drawn with the same pen as for the minuscules, +% and the letters were merely larger versions of the minuscules. +% +% \begin{macrocode} +%<*maj> +% UNCLU.MF Program file for uncial `capitals' +% + +% \end{macrocode} +% +% +% \begin{routine}{A} +% The letter `A'. +% \begin{macrocode} +cmchar "Uncial letter A"; +beginchar("A", 2u#+caprat*hstretch*(x_height#+jut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx+sqxside/3; rt x2=lft x1+2/3sqxside; +y1=h; y2=0; +% for the bowl +z3=3/4[z2,z1]; +z5=3/16[z2,z1]; +y4=1/10[y5,y3]; +lft x4=pcshiftx; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % the stem +draw z3{-pdir}..z4{down}..{pdir}z5; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,100); +endchar; % end "A" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{B} +% The letter `B'. +% \begin{macrocode} +cmchar "Uncial letter B"; +beginchar("B", 2u#+caprat*hstretch*(x_height#+jut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u+jut; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pair uncial; uncial=(qhor,0.5qvert); +pickup quill; +lft x1=lft x2=pcshiftx; +top y1=h; y2=h/4; +x3=pcshiftx+sqxside/2; bot y3=0; +rt x4=pcshiftx+sqxside; y4=0.3h; +lft x5=x1; bot y5=h/2; +z5'=z5 + thick*uncial; +x6=x4-thick; y6=0.85h; +x7=x1; y7=0.9h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tlserif(1,2,srad); % the stem +draw z2{down}..z3{right}..z4{up}..{-uncial}z5'--z5; % bottom bowl +draw z5--z5'{uncial}..z6{up}..{-pdir}z7; % top bowl +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,5',6,7,8,100); +endchar; % end "B" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{C} +% The letter `C'. +% \begin{macrocode} +cmchar "Uncial letter C"; +beginchar("C", u#+caprat*hstretch*(x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u/2; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=pcshiftx+sqxside; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x5=x6=x3; +y5=0.2h; +y6=0.75h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,100); +endchar; % end "C" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{D} +% The letter `D'. +% \begin{macrocode} +cmchar "Uncial letter D"; +beginchar("D", 2u#+caprat*hstretch*(x_height#), caprat*(5/4x_height#), 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=4/5h; sqxside:=hstretch*sqyside; +y100 = side/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=pcshiftx+sqxside; y1=y3=sqyside/2; +x2=x4=w/2; top y2=sqyside; bot y4=0; +x5=x6=x3; +y5=0.2h; +y6=0.75h; +rt x0=pcshiftx+0.5sqxside; top y0=sqyside; +lft x7=pcshiftx+0.5sqxside; +bot y7=sqyside; +lft x8=pcshiftx; y8=y7+thick; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z0{-pdir}..z1{down}..z4{right}..z3{up}..z7..z8; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(0,1,2,3,4,5,6,7,8,100); +endchar; % end "D" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{E} +% The letter `E'. +% \begin{macrocode} +cmchar "Uncial letter E"; +beginchar("E", 2u#+caprat*hstretch*(x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=pcshiftx+sqxside; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x5=x6=x3; +y5=0.2h; +y6=0.75h; +% the bar +x7=x1; y7=y1; +%%x8=x7+side+0.5thick; y8=y7; +x8=w-pcshiftx; y8=y7; +x10=x7; y10=y7+3thin; +numeric alpha; alpha:=0.5; % dishing +x9=0.5[x8,x10]; y9=(0.5alpha)[y8,y10]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; % the bowl +pickup stylus; +filldraw z7--z8..z9..z10--cycle; % the bar +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "E" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{F} +% The letter `F'. +% \begin{macrocode} +cmchar "Uncial letter F"; +beginchar("F", 2u#+caprat*hstretch*(jut#+x_height#), caprat*x_height#, + caprat*(2/3x_height#)); +adjust_fit(0,0); +pcshiftx := u+jut; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=lft x2=pcshiftx; +top y1=h; bot y2=-d/2; +x3=x4=x1; y3=h-thick; y4=0; +numeric rise, fall, fjut; +rise:=thick; fall:=0; fjut:=2/3sqxside; +%%ductus:=true; +draw_jstem(1,2,srad,d/2,d/2); +draw_flick(3,rise,fall,fjut); +draw_flick(4,rise,fall,fjut); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "F" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{G} +% The letter `G'. Like a `c' but with a small stem. +% \begin{macrocode} +cmchar "Uncial letter G"; +beginchar("G", u#+caprat*hstretch*(x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u/2; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=pcshiftx+sqxside; y1=y3=h/2; +x2=x4=w/2; top y2=h; bot y4=0; +x5=x6=x3; +y5=0.2h; +y6=0.75h; +lft x7=x5-thick; bot y7=y5-3thick; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z5{-pdir}..{left}z4..z1..z2..z6; % the bowl +draw z5{down}..{-pdir}z7; % the stem +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "G" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{H} +% The letter `H'. +% \begin{macrocode} +cmchar "Uncial letter H"; +beginchar("H", 2u#+caprat*hstretch*(jut#+thick#+x_height#), caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u+jut; +sqyside:=h/2; % asc_height is 2x_height !!! +sqxside:=hstretch*sqyside; +y100 = sqyside/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=lft x2=pcshiftx; +top y1=h; bot y2=0; +% center of circle +x99=w/2; y99=sqyside/2; +y3=y5=y99; +lft x3= pcshiftx; +%%rt x5=x99+w-pcshiftx; +x5 = x99 + (x99-x3); +x4=x6=x99; top y4=sqyside; bot y6 =0; +path pcirc; pcirc=z6..z5..z4..z3..cycle; +x1'=x2'=x1+0.5thick; y1'=h; y2'=0; +z7' = (z1'--z2') intersectionpoint (subpath(2,3) of pcirc); +x7=x1; y7=y7'; +z99'=z99 - 500ppdir; +z8' = (z99--z99') intersectionpoint subpath(0,1) of pcirc; +x8=x8'; bot y8=0; +%%ductus:=true; +if ductus: + pickup stylus; + draw z1'--z2'; draw z99--z99'; draw pcirc; +fi +draw_istem(1,2,srad); +draw z7{pdir}..z4{right}..z5{down}..{-pdir}z8; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,1',2,2',3,4,5,6,7,7',8,8',99,99',100); +endchar; % end "H" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{I} +% The letter `I'. +% \begin{macrocode} +cmchar "Uncial letter I"; +beginchar("I", 2u#+hstretch*(thick#+2jut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u+jut; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=x2=w/2; +top y1=h; bot y2=0; +%%ductus:=true; +draw_istem(1,2,srad); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,100); +endchar; % end "I" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{J} +% The letter `J'. This letter was not in the script, it being a later invention. +% \begin{macrocode} +cmchar "Uncial letter J"; +beginchar("J", 2u#+caprat*hstretch*(thick#+2jut#), caprat*x_height#, + caprat*desc_depth#); +adjust_fit(0,0); +pcshiftx := u+jut; +sqyside:=h; sqxside:=sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=x2=w/2; +top y1=h; bot y2=0; +%%ductus:=true; +draw_jstem(1,2,srad,2/3sqxside,desc_depth); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,100); +endchar; % end "J" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{K} +% The letter `K'. +% \begin{macrocode} +cmchar "Uncial letter K"; +beginchar("K", 2u#+caprat*hstretch*(jut#+4/3x_height#), caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u+jut; +sqyside:=h/2; % asc_height = 2x_height !!! +sqxside:=hstretch*sqyside; +y100 = side/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=lft x2=pcshiftx; +top y1=h; bot y2=0; +% for the flick +numeric rise,fall,fjut; +x3=x1; y3=2/3side; +rise:=1/3sqyside; fall:=-rise/2; fjut:=sqxside; %% fjut:=2/3side; +% for the leg +x4=x3+0.25thick; y4=y3+0.5thick; +x5=x3+side; y5=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); +draw_flick(3,rise,fall,fjut); +draw_tstem(4,5,srad); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,100); +endchar; % end "K" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{L} +% The letter `l'. Like a high `i' but with a bottom bowl like the lower half +% of the `c'. +% \begin{macrocode} +cmchar "Uncial letter L"; +beginchar("L", 2u#+caprat*hstretch*(x_height#+jut#), caprat*asc_height#, 0); +adjust_fit(0,0); +pcshiftx := u+jut; +sqyside:=h/2; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=lft x2=pcshiftx; +top y1=h; y2=h/4; +x3=0.5[x1,x4]; bot y3=0; +rt x4=w-u; +y4=0.1h; +%%ductus:=true; +draw_tlserif(1,2,srad); % the stem +draw z2{down}..z3{right}..{pdir}z4; % the bowl +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,100); +endchar; % end "L" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{M} +% The letter `M'. +% \begin{macrocode} +cmchar "Uncial letter M"; +beginchar("M", 2u#+caprat*hstretch*(9/6x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=1/3sqxside; bot y1=0; +lft x2= pcshiftx; y2=h/2; +lft x4=pcshiftx+2/3sqxside; y4=2/3h; +x3=0.5[x2,x4]; top y3=h; +x5=x4; y5=y1; +z6=z4; +numeric rise,fall,mjut; +rise=h-y6; fall=y6; mjut=w-pcshiftx-x6; +%%ductus:=true; +draw z1..z2{up}..z3{right}..{down}z4; % left half +draw_tstem(4,5,srad); % middle stem +draw_hbowl(6,rise,fall,mjut); % right half +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,100); +endchar; % end "M" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{N} +% The letter `N'. +% \begin{macrocode} +cmchar "Uncial letter N"; +beginchar("N", 2u#+caprat*hstretch*(jut#+x_height#), caprat*x_height#, + caprat*(0.5x_height#)); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% left stem +lft x1=pcshiftx; top y1=h; +x2=x1; y2=y1-thin; +numeric jjut, jdepth; +jjut=2jut; jdepth=y2+d-thin; +% right stem +rt x4=pcshiftx+sqxside; y4=y1; +x3=x4; bot y3=0; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_jcurve(1,srad,jjut,jdepth); % left stem +draw_istem(4,3,srad); % right stem +draw z1--z3; % diagonal +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "N" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{O} +% The letter `O'. +% \begin{macrocode} +cmchar "Uncial letter O"; +beginchar("O", 2u#+caprat*hstretch*(x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "O" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{P} +% The letter `P'. +% \begin{macrocode} +cmchar "Uncial letter P"; +beginchar("P", 2u#+caprat*hstretch*(x_height#+jut#), caprat*x_height#, + caprat*x_height#); +adjust_fit(0,0); +pcshiftx := u+jut; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% stem +lft x1=pcshiftx; top y1=h; +numeric jjut, jdepth; +jjut=1/3sqxside-thin; jdepth=h+d-thin; +% bowl +x2=x1; y2=3/4h; %% y2=2/3side; +rt x4=w-u; +lft x5=x1+thick; y5=0; +y4=0.4[y3,y5]; +top y3=h; x3=0.5[x2,x4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_jcurve(1,srad,jjut,jdepth); % stem +%%draw z2..z3{right}..z4{down}..{-pdir}z5; % bowl +draw z1a..z3{right}..z4{down}..{-pdir}z5; % bowl +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,100); +endchar; % end "P" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Q} +% The letter `Q'. +% \begin{macrocode} +cmchar "Uncial letter Q"; +beginchar("Q", 2u#+caprat*hstretch*(x_height#), caprat*x_height#, caprat*x_height#); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% right stem +rt x1=w-pcshiftx; top y1=h; +numeric jjut, jdepth; +jjut=2jut; jdepth=h+d-thin; +x2=x1-jjut; y2=y1-jdepth; +% bowl +numeric rad; rad := w/2; +x0=w/2; y0=h/2; +lft x4=pcshiftx; y4=y0; +x3=x5=x0; top y3=h; bot y5=0; +x7=x0+rad; y7=y0; +path p[]; +p1=z1{down}..{-pdir}z2; % stem +p2=z4{down}..z5{right}..{up}z7; +z6'= p1 intersectionpoint p2; +rt x6=x6'; y6=y6'; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1{down}...{-pdir}z2; % right stem +draw z1--z3..z4{down}..{right}z5..z6; % bowl +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(0,1,2,3,4,5,6,6',7,100); +endchar; % end "Q" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{R} +% The letter `R'. +% \begin{macrocode} +cmchar "Uncial letter R"; +beginchar("R", 2u#+caprat*hstretch*(4/3x_height#), caprat*x_height#, + caprat*(2/3x_height#)); +adjust_fit(0,0); +sqyside:=h; sqxside:=hstretch*sqyside; +pcshiftx := u+jut; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% stem +lft x1=pcshiftx; top y1=h; +numeric jjut, jdepth; +jjut=1/5sqxside; jdepth=h+d-thin; +% bowl +x2=x1; y2=3/4h; +rt x4=pcshiftx+3/4sqxside; +lft x5=x1; bot y5=1/6h; +y4=0.4[y3,y5]; +top y3=h; x3=0.5[x2,x4]; +rt x7=w-u; y7=-thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_jcurve(1,srad,jjut,jdepth); % stem +draw z1a..z3{right}..z4{down}..{-pdir}z5; % bowl +draw z5{-ppdir}..{right}z7; % leg +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "R" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{S} +% The letter `S'. +% \begin{macrocode} +cmchar "Uncial letter S"; +beginchar("S", 2u#+caprat*hstretch*(5/6x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +rt x1=w-pcshiftx; top y1=h-thin; +x2=w/2; top y2=h; +lft x3=pcshiftx; y3=0.75h; +x4=w/2; y4=h/2; +rt x5=w-pcshiftx; y5=0.25h; +x6=w/2; bot y6=0; +lft x7= pcshiftx; bot y7 = thin; +path p[]; +p1=z1..z2{left}..z3{down}..z4..z5{down}..z6{left}..z7; +pair vec[]; +vec1= direction 0 of p1; +vec2= direction (length p1) of p1; +z11=z1 shifted vec1; +z17=z7 shifted -vec2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +%%draw_serif(1,11,srad); +%%draw_serif(7,17,srad); +%%draw z1a..z2{left}..z3{down}..z4..z5{down}..z6{left}..z7a; +draw p1; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,11,17,100); +endchar; % end "S" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{T} +% The letter `T'. +% \begin{macrocode} +cmchar "Uncial letter T"; +beginchar("T", u#+caprat*hstretch*(x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u/2; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=x2=w/2; +top y1=h; bot y2=0; +lft x3=pcshiftx; top y3=h-thin; +x4=x2; top y4=h; +rt x5=w-pcshiftx; top y5=h+thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); +draw z3{pdir}..z4{right}..{pdir}z5; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,100); +endchar; % end "T" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{U} +% The letter `U'. This is a modern version as the font did not have a U. +% It uses part of the left half of the W. +% \begin{macrocode} +cmchar "Uncial letter U"; +beginchar("U", 2u#+caprat*hstretch*(x_height#+jut#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% left half first +lft x6=pcshiftx+thick; +top y6=h; +lft x7=pcshiftx; y7=h/2; +x8=pcshiftx+0.5sqxside; bot y8=0; +% the stem +rt x1=w-pcshiftx-jut; y1=h; +x2=x1; bot y2=0; +% a construction point for the curved part +x5=x1+sqxside-thick; y5=y6; +path p[]; +p1=z1--z2; +p2=z6..z7{down}..z8{right}..z5; +z9= p2 intersectionpoint p1; +pair vec[]; +vec2 = direction 0 of p2; +z16=z6 shifted vec2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_serif(6,16,srad); % left half +draw z6a..z7{down}..z8{right}..z9; +draw_istem(1,2,srad); % right stem +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "U" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{V} +% The letter `V'. The right half of the `w' is used for the `v' (or vice-versa +% if you prefer). +% \begin{macrocode} +cmchar "Uncial letter V"; +beginchar("V", 2u#+caprat*hstretch*(x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% right side first +numeric midx; midx:= pcshiftx; +lft x1=midx+jut; top y1=h; +lft x2=midx; y2=h/2; +rt x4=midx+sqxside; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-thick; y5=y1; +path p[]; +p1=z1..z2{down}..z3{right}..z4{up}..z5; +pair vec[]; +vec1 = direction 0 of p1; +z11=z1 shifted vec1; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_serif(1,11,srad); % right half +draw z1a..z2{down}..z3{right}..z4{up}..z5; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,11,100); +endchar; % end "V" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{W} +% The letter `W'. This is a modern version as the font did not have a W. +% \begin{macrocode} +cmchar "Uncial letter W"; +beginchar("W", 2u#+caprat*hstretch*(5/3x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% right side first +numeric midx; midx:= pcshiftx+2/3sqxside; +lft x1=midx+jut; top y1=h; +lft x2=midx; y2=h/2; +rt x4=midx+sqxside; y4=y2; +x3=0.5[x2,x4]; bot y3=0; +x5=x4-thick; y5=y1; +path p[]; +p1=z1..z2{down}..z3{right}..z4{up}..z5; +% left side +lft x6=pcshiftx+thick; +y6=y1; +lft x7=pcshiftx; y7=y2; +x8=pcshiftx+0.5sqxside; y8=y3; +p2=z6..z7{down}..z8{right}..(z5 shifted -pdir); +z9= p2 intersectionpoint p1; +pair vec[]; +vec1 = direction 0 of p1; +vec2 = direction 0 of p2; +z11=z1 shifted vec1; +z16=z6 shifted vec2; +%%ductus:=true; +if ductus: + pickup stylus; +fi +% draw the serifs, then the bowls +draw_serif(1,11,srad); % right half +draw z1a..z2{down}..z3{right}..z4{up}..z5; +draw_serif(6,16,srad); % left half +draw z6a..z7{down}..z8{right}..z9; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,8,9,11,16,100); +endchar; % end "W" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{X} +% The letter `X'. +% \begin{macrocode} +cmchar "Uncial letter X"; +beginchar("X", u#+caprat*hstretch*(5/3x_height#), caprat*x_height#, + caprat*(1/3x_height#)); +adjust_fit(0,0); +pcshiftx := 0; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% thick diagonal +lft x1=pcshiftx+1/2sqxside; rt x2=w-jut; +y1=h; y2=0; +% thin diagonal +lft x3=pcshiftx; bot y3=-d; +z4=z3 shifted (jut*right); +z5=z4 shifted (jut*pdir); +rt x8=w-pcshiftx; top y8=h; +z7=z8 shifted (jut*left); +z6=z7 shifted (-jut*pdir); +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_istem(1,2,srad); % thick diagonal +draw z3---z4..z5---z6..z7---z8; % thin diagonal +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,8,100); +endchar; % end "X" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{Y} +% The letter `Y'. This has a dot on top! +% \begin{macrocode} +cmchar "Uncial letter Y"; +beginchar("Y", 2u#+caprat*hstretch*(4/3x_height#), caprat*x_height#, 2/3caprat*x_height#); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% left stroke +lft x1=pcshiftx; top y1=3/4h; +lft x3=w/2; bot y3=-d; +x2=0.8[x1,x3]; y2=0.5[y1,y3]; +% right stroke +rt x4=w-pcshiftx; y4=y1; +x7=pcshiftx; y7=-d; +path p[]; +p1=z1..z2..z3; +z6= (z7--z4) intersectionpoint p1; +x5=0.4[x6,x4]; y5=0.5[y6,y4]; +% the dot +x8=x6; y8=h; +if ductus: + pickup stylus; +fi +draw z1..z2..z3; % left stroke +draw z4{left}..z6; % right stroke +draw_pdot(8,dot_size); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "Y" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{Z} +% The letter `Z'. +% \begin{macrocode} +cmchar "Uncial letter Z"; +beginchar("Z", 2u#+caprat*hstretch*(4/3x_height#), caprat*x_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +sqyside:=h; sqxside:=hstretch*sqyside; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +% bottom stroke +lft x4=pcshiftx; bot y4=0; +rt x6=w-pcshiftx; y6=y4; +x5=0.5[x4,x6]; y5=y4+thin; +% top stroke +x1=x4; top y1=h; +x3=pcshiftx+sqxside; y3=y1; +x2=0.5[x1,x3]; top y2=h-thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3; % top stroke +draw z4..z5..z6; % bottom stroke +% the diagonal +pickup stylus; +draw z4--z3; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,5,6,100); +endchar; % end "Z" + +% \end{macrocode} +% \end{routine} +% +% +% +% The end of this file +% \begin{macrocode} +%</maj> +% \end{macrocode} +% +% +% +% \subsection{The punctuation file} +% +% The main punctuation marks are defined in this file. +% +% \begin{macrocode} +%<*punct> +% UNCLPUNCT.MF This file contains punctuation marks + +% \end{macrocode} +% +% +% \begin{routine}{,} +% The `,' character. +% \begin{macrocode} + +cmchar "Uncial Comma"; +beginchar(",",2u#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h/2; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "," + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{.} +% The `.' character. +% \begin{macrocode} + +cmchar "Uncial Period"; +beginchar(".",2u#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=u; +x1=w/2; y1=h/2; +draw_pdot(1,dot_size); +penlabels(1); +endchar; % end of "." + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{:} +% The `:' character. +% \begin{macrocode} + +cmchar "Uncial Colon"; +beginchar(":",2u#+hstretch*(dot_size#),x_height#,0); +pcshiftx:=u; +x1=x2=w/2; y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pdot(2,dot_size); +penlabels(1,2); +endchar; % end ":" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{;} +% The `;' character. +% \begin{macrocode} + +cmchar "Uncial Semicolon"; +beginchar(";",2u#+hstretch*(comma_width#+dot_size#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=2/3h; y2=1/3h; +draw_pdot(1,dot_size); +draw_pcomma(2,dot_size,comma_width); +penlabels(1,2); +endchar; % end of ";" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{'} +% The `'' character. +% \begin{macrocode} + +cmchar "Uncial Apostrophe"; +beginchar("'",2u#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h; +draw_pcomma(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "'" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{`} +% The ``' character. +% \begin{macrocode} + +cmchar "Uncial Reverse apostrophe"; +beginchar("`",2u#+hstretch*(comma_width#+dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=pcshiftx+(0.5hstretch*dot_size); y1=h; +draw_plq(1,dot_size,comma_width); +penlabels(1); +endchar; % end of "`" + +% \end{macrocode} +% \end{routine} +% +% The end of this file. +% \begin{macrocode} +%</punct> +% \end{macrocode} +% +% +% \subsection{The ligatures and dashes file} +% +% The ligatured punctuation marks and dashes are defined in this file. +% \begin{macrocode} +%<*lig> +% UNCLLIG.MF Uncial ligatured punctation and dashes + +% \end{macrocode} +% First the ligtables. +% \begin{macrocode} + +ligtable "`": "`"=:oct"134"; +ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#; + +ligtable "-": "-"=:oct"173"; +ligtable oct"173": "-"=:oct"174"; + +% \end{macrocode} +% +% \begin{routine}{''} +% The `''' ligature. +% \begin{macrocode} + +cmchar "Uncial closing quotes"; +beginchar(oct"042",2u#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h; +x2=x1-(2hstretch*dot_size); +draw_pcomma(1,dot_size,comma_width); % right +draw_pcomma(2,dot_size,comma_width); % left +penlabels(1,2); +endchar; % end of "''" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{``} +% The ```' ligature. +% \begin{macrocode} + +cmchar "Uncial opening quotes"; +beginchar(oct"134",2u#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0); +adjust_fit(0,0); +pcshiftx:=u; +x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h; +x2=x1+(2hstretch*dot_size); +draw_plq(1,dot_size,comma_width); % left +draw_plq(2,dot_size,comma_width); % right +penlabels(1,2); +endchar; % end of "``" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{-} +% The `-' character. +% \begin{macrocode} + +cmchar "Uncial hyphen"; +beginchar("-",u#+hstretch*(0.8x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u/2; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +draw z1--z2; % bar +penlabels(1,2); +endchar; % end of "-" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{--} +% The -- ligature. +% \begin{macrocode} + +cmchar "Uncial en dash"; +beginchar(oct"173",u#+hstretch*(x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u/2; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +draw z1--z2; % bar +penlabels(1,2); +endchar; % end of "--" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{---} +% The `---' ligature. The em dash is twice the width of the en dash. +% \begin{macrocode} + +cmchar "Uncial em dash"; +beginchar(oct"174",u#+hstretch*(2x_height#),x_height#,0); +adjust_fit(0,0); +pcshiftx:=u/2; +pickup quill; +lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2; +draw z1--z2; % bar +penlabels(1,2); +endchar; % end of "---" + +% \end{macrocode} +% \end{routine} +% +% +% The end of this file. +% \begin{macrocode} +%</lig> +% \end{macrocode} +% +% \subsection{The digits file} +% +% These are arabic digits in the style of the book-hand. They are a +% modern invention. +% +% \begin{macrocode} +%<*dig> +% UNCLDIG.MF Program file for Uncial digits +% + +% \end{macrocode} +% +% +% \begin{routine}{1} +% The digit `1'. +% \begin{macrocode} +cmchar "Uncial digit 1"; +beginchar("1", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +x1=x2=w/2; +y1=h; bot y2=0; +%%ductus:=true; +draw_tstem(1,2,srad); +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,100); +endchar; % end "1" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{2} +% The digit `2'. +% \begin{macrocode} +cmchar "Uncial digit 2"; +beginchar("2", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% stem +lft x1=pcshiftx+o; top y1=h-2thin; +x2=1/2w; top y2= h+o; +rt x3=w-pcshiftx-o; y3=3/4h; +% foot +lft x5=pcshiftx; bot y5=0; +rt x6=w-pcshiftx; y6=y5; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(5,6,thin); % foot +draw z1..z2{right}..z3{down}..{-pdir}z5wl; % curve +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "2" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{3} +% The digit `3'. +% \begin{macrocode} +cmchar "Uncial digit 3"; +beginchar("3", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% x values +lft x3=pcshiftx; x10=x3; +rt x5=w-pcshiftx; x8=x5-3thin; +x4=0.5[x3,x5]; +x9=0.5[x10,x8]; +lft x6=pcshiftx+3thin; x7=x6; +% y values +bot y3=thin; top y10=h-2thin; +y6=0.5[y3,y10]; y7=y6; +bot y4=-thin; top y9=h+thin; +y5=0.5[y3,y6]; +y8=11/12[y7,y10]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z3..z4{right}..z5{up}...{-pdir}z6; % bottom bowl +draw z7{pdir}..z8{up}..z9{left}..z10; % top bowl +ductus:=false; +penlabels(1,2,3,4,5,6,7,8,9,10,100); +endchar; % end "3" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{4} +% The digit `4'. +% \begin{macrocode} +cmchar "Uncial digit 4"; +beginchar("4", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% the stem +x1=x2=w-pcshiftx-jut; +y1=h; bot y2=0; +% the crossbar +lft x3=pcshiftx; y3=0.33h; +rt x4=w-pcshiftx; y4=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_tstem(1,2,srad); % main stem +draw_wave(3,4,thin); % crossbar +draw z3wl--z1; % diagonal +ductus:=false; +penlabels(1,2,3,4,100); +endchar; % end "4" + +% \end{macrocode} +% \end{routine} +% +% +% +% \begin{routine}{5} +% The digit `5'. +% \begin{macrocode} +cmchar "Uncial digit 5"; +beginchar("5", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% for the top +rt x1=w-pcshiftx; top y1=h; +lft x2=pcshiftx; y2=y1; +% the S curve +x3=x2; y3=0.5h+thin; +x4=0.5[x1,x3]; y4=0.5[y3,y5]; +rt x5=w-pcshiftx; y5=0.3h; +x6=w/2; bot y6=0; +lft x7=pcshiftx; bot y7=2thin; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(2,1,thin); % top squiggle +draw z3{pdir}..z5{down}..z6{left}..z7; % curve +draw z2wl--z3; % vertical +ductus:=false; +penlabels(1,2,3,4,5,6,7,100); +endchar; % end "5" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{6} +% The digit `6'. +% \begin{macrocode} +cmchar "Uncial digit 6"; +beginchar("6", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +rt x1=w-pcshiftx; top y1=h-2thin; +x2=1/2w; top y2= h; +lft x3=pcshiftx; y3=1/2h; +x4=x2; bot y4=0; +rt x5=w-pcshiftx; y5=1/4h; +lft x6=rt x3; bot y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{left}..z3{down}..z4{right}..z5{up}..{-pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "6" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{7} +% The digit `7'. +% \begin{macrocode} +cmchar "Uncial digit 7"; +beginchar("7", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +% top bar +lft x1=pcshiftx; +rt x2=w-pcshiftx; +top y1=top y2=h; +% bowed leg +x4=w/2; bot y4=0; +x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4]; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw_wave(1,2,thin); % top bar +draw z1wr..z3..z4; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "7" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{8} +% The digit `8'. +% \begin{macrocode} +cmchar "Uncial digit 8"; +beginchar("8", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +numeric alpha; alpha:=1; +pickup quill; +lft x1=alpha*pcshiftx+o; rt x3=w-alpha*pcshiftx-o; y1=y3=3/4h; +x2=x4=w/2; top y2=h+o; bot y4=-o; +x5=x2; y5=h/2+2o; +lft x11=pcshiftx; rt x13=w-pcshiftx; y11=y13=1/4h; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z5..z11..z4..z13..z5..cycle; +ductus:=false; +penlabels(1,2,3,4,5,11,13,100); +endchar; % end "8" + +% \end{macrocode} +% \end{routine} +% +% \begin{routine}{9} +% The digit `9'. +% \begin{macrocode} +cmchar "Uncial digit 9"; +beginchar("9", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +pickup quill; +lft x1=pcshiftx; bot y1=2thin; +x2=1/2w; bot y2= 0; +rt x3=w-pcshiftx; y3=1/2h; +x4=x2; top y4=h; +lft x5=pcshiftx; y5=3/4h; +rt x6=lft x3; top y6=y3; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2{right}..z3{up}..z4{left}..z5{down}..{pdir}z6; +ductus:=false; +penlabels(1,2,3,4,5,6,100); +endchar; % end "9" + +% \end{macrocode} +% \end{routine} +% +% +% \begin{routine}{0} +% The digit `0'. +% \begin{macrocode} +cmchar "Uncial digit 0"; +beginchar("0", 2u#+fig_width#, fig_height#, 0); +adjust_fit(0,0); +pcshiftx := u; +y100 = h/2; x100 = pcshiftx+y100; % square center +pickup quill; +lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2; +x2=x4=w/2; top y2=h+o; bot y4=-o; +%%ductus:=true; +if ductus: + pickup stylus; +fi +draw z1..z2..z3..z4..cycle; +ductus:=false; +proofpcbb(100, y100, y100); +penlabels(1,2,3,4,100); +endchar; % end "0" + +% \end{macrocode} +% \end{routine} +% +% +% +% +% The end of this file. +% \begin{macrocode} +%</dig> +% \end{macrocode} +% +% \section{The font definition files} \label{sec:fd} +% +% The font comes in normal and bold weights only. +% +% \begin{macrocode} +%<*fdot1> +\DeclareFontFamily{OT1}{uncl}{} + \DeclareFontShape{OT1}{uncl}{m}{n}{ <-8.5> uncl7 <8.5-15> uncl10 <15-> uncl17 }{} + \DeclareFontShape{OT1}{uncl}{m}{sl}{ <-> sub * uncl/m/n }{} + \DeclareFontShape{OT1}{uncl}{m}{it}{ <-> sub * uncl/m/n }{} + \DeclareFontShape{OT1}{uncl}{m}{sc}{ <-> sub * uncl/m/n }{} + \DeclareFontShape{OT1}{uncl}{m}{u}{ <-> sub * uncl/m/n }{} + \DeclareFontShape{OT1}{uncl}{bx}{n}{ <-8.5> unclb7 <8.5-15> unclb10 <15-> unclb17 }{} + \DeclareFontShape{OT1}{uncl}{bx}{it}{ <-> sub * uncl/bx/n }{} + \DeclareFontShape{OT1}{uncl}{bx}{sl}{ <-> sub * uncl/bx/n }{} + \DeclareFontShape{OT1}{uncl}{b}{n}{ <-> sub * uncl/bx/n }{} +%</fdot1> +% \end{macrocode} +% +% +% \begin{macrocode} +%<*fdt1> +\DeclareFontFamily{T1}{uncl}{} + \DeclareFontShape{T1}{uncl}{m}{n}{ <-8.5> uncl7 <8.5-15> uncl10 <15-> uncl17 }{} + \DeclareFontShape{T1}{uncl}{m}{sl}{ <-> sub * uncl/m/n }{} + \DeclareFontShape{T1}{uncl}{m}{it}{ <-> sub * uncl/m/n }{} + \DeclareFontShape{T1}{uncl}{m}{sc}{ <-> sub * uncl/m/n }{} + \DeclareFontShape{T1}{uncl}{m}{u}{ <-> sub * uncl/m/n }{} + \DeclareFontShape{T1}{uncl}{bx}{n}{ <-8.5> unclb7 <8.5-15> unclb10 <15-> unclb17 }{} + \DeclareFontShape{T1}{uncl}{bx}{it}{ <-> sub * uncl/bx/n }{} + \DeclareFontShape{T1}{uncl}{bx}{sl}{ <-> sub * uncl/bx/n }{} + \DeclareFontShape{T1}{uncl}{b}{n}{ <-> sub * uncl/bx/n }{} +%</fdt1> +% \end{macrocode} +% +% \section{The package code} \label{sec:code} +% +% \subsection{The \Lpack{uncial} package} +% +% The \Lpack{uncial} package is for typesetting short pieces of text +% in the Uncial fonts. +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. +% \begin{macrocode} +%<*usc> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{uncial}[1999/05/15 v1.1 package for uncial fonts] +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\unclfamily} +% Selects the Uncial font family in the OT1 or T1 encoding. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \newcommand{\unclfamily}{\usefont{T1}{uncl}{m}{n}} +\else + \newcommand{\unclfamily}{\usefont{OT1}{uncl}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textuncl} +% Text command for the Uncial font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textuncl}{\unclfamily} +% \end{macrocode} +% \end{macro} +% +% The end of this package. +% \begin{macrocode} +%</usc> +% \end{macrocode} +% +% \subsection{The \Lpack{alluncl} package} +% +% The \Lpack{alluncl} package is intended for use when the entire document +% will be typeset in the book-hand. This is a minimal package. Because the +% book-hand should not contain arabic digits a fuller package would redefine +% anything numbered in \LaTeX{} to use roman instead of arabic numbering. +% Also, because of the large |\baselineskip| many other aspects of \LaTeX{} +% to do with vertical positioning should also be redefined. +% +% +% Announce the name and version of the package, which requires +% \LaTeXe{}. It also uses the \Lpack{uncial} package. +% \begin{macrocode} +%<*uscall> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{alluncl}[1999/05/15 v1.1 package for all Uncial fonts] +\RequirePackage{uncial} +% \end{macrocode} +% +% \begin{macro}{\Tienc} +% A macro for testing the value of |\encodingdefault|. +% \begin{macrocode} +\providecommand{\Tienc}{T1} +% \end{macrocode} +% \end{macro} +% +% Redefine the default fonts to be Uncial, which has only one family +% member. +% \begin{macro}{\rmdefault} +% \begin{macro}{\sfdefault} +% \begin{macro}{\ttdefault} +% \begin{macrocode} +\renewcommand{\rmdefault}{uncl} +\renewcommand{\sfdefault}{uncl} +\renewcommand{\ttdefault}{uncl} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The `leading' in the book-hand is the same as the |x-height|, which is much +% greater than for the CMR fonts. I have borrowed code from Frank Jensen's +% \Lpack{beton} package~\cite{BETON} to do this. +% +% \begin{macro}{\uncial@baselineskip@table} +% A table of the normal font sizes and the corresponding baselineskip. +% \begin{macrocode} +\newcommand{\uncial@baselineskip@table}{% + <\@vpt>9.5% + <\@vipt>11.4% + <\@viipt>13.3% + <\@viiipt>15.2% + <\@xpt>19% + <\@xipt>20.9% + <\@xiipt>22.8% + <\@xivpt>27.36% + <\@xviipt>23.3% + <\@xxpt>38% + <\@xxvpt>47.5} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\uncial@new@setfontsize} +% This is a macro that replaces the |\@setfontsize| macro which is called by +% the font size changing commands. +% \begin{macrocode} +\newcommand{\uncial@new@setfontsize}[3]{% + \edef\@tempa{\def\noexpand\@tempb####1<#2}% + \@tempa>##2<##3\@nil{\def\uncial@baselineskip@value{##2}}% + \edef\@tempa{\noexpand\@tempb\uncial@baselineskip@table<#2}% + \@tempa><\@nil + \ifx\uncial@baselineskip@value\@empty + \def\uncial@baselineskip@value{#3}% + \fi + \uncial@old@setfontsize{#1}{#2}\uncial@baselineskip@value} +% \end{macrocode} +% \end{macro} +% +% We had better give an author a means of using The Computer Modern fonts +% if necessary. +% +% \begin{macro}{\cmrfamily} +% \begin{macro}{\cmssfamily} +% \begin{macro}{\cmttfamily} +% These macros select the Computer Modern Roman, Sans, and Typewriter +% font families in either the T1 or OT1 encodings. +% \begin{macrocode} +\ifx\Tienc\encodingdefault + \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}} +\else + \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}} + \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}} + \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcmr} +% Text command for the Computer Modern Roman font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmr}{\cmrfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmss} +% Text command for the Computer Modern Sans font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmss}{\cmssfamily} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcmtt} +% Text command for the Computer Modern Typewriter font family. +% \begin{macrocode} +\DeclareTextFontCommand{\textcmtt}{\cmttfamily} +% \end{macrocode} +% \end{macro} +% +% +% At the start of the document, change the |\@setfontsize| macro and call +% the normal font to implement the change. +% \begin{macrocode} +\AtBeginDocument{% + \let\uncial@old@setfontsize=\@setfontsize + \let\@setfontsize=\uncial@new@setfontsize} +\AtBeginDocument{\normalsize} +% \end{macrocode} +% +% +% The end of this package. +% \begin{macrocode} +%</uscall> +% \end{macrocode} +% +% +% +% \bibliographystyle{alpha} +% \renewcommand{\refname}{Bibliography} +% \begin{thebibliography}{GMS94} +% \addcontentsline{toc}{section}{\refname} +% +% \bibitem[And69]{ANDERSON69} +% Donald M.~Anderson. +% \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}. +% \newblock Holt, Rinehart and Winston, 1969. +% +% \bibitem[Bol95]{BOLOGNA95} +% Giulia Bologna. +% \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}. +% \newblock Crescent Books, 1995. +% +% \bibitem[Day95]{DAY95} +% Lewis F.~Day. +% \newblock {\em Alphabets Old \& New}. +% \newblock (3rd edition originally published by B.~T.~Batsford, 1910) +% \newblock Senate, 1995. +% +% \bibitem[Dro80]{DROGIN80} +% Marc Drogin. +% \newblock {\em Medieval Calligraphy: Its History and Technique}. +% \newblock Allenheld, Osmun \& Co., 1980. +% +% \bibitem[Dru95]{DRUCKER95} +% Johanna Drucker. +% \newblock {\em The Alphabetic Labyrinth}. +% \newblock Thames \& Hudson, 1995. +% +% \bibitem[Fir93]{FIRMAGE93} +% Richard A.~Firmage. +% \newblock {\em The Alphabet Abecedarium}. +% \newblock David R~Goodine, 1993. +% +% \bibitem[Har95]{HARRIS95} +% David Harris. +% \newblock {\em The Art of Calligraphy}. +% \newblock DK Publishing, 1995. +% +% \bibitem[Jen95]{BETON} +% Frank Jensen. +% \newblock {\em The BETON package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1995. +% +% \bibitem[Joh71]{JOHNSTON75} +% Edward Johnston (ed. Heather Child). +% \newblock {\em Formal Penship and Other Papers}. +% \newblock Penthalic, 1971. +% +% \bibitem[Knu87]{CM} +% Donald E.~Knuth. +% \newblock {\em Computer Modern Typefaces}. +% \newblock Addison-Wesley, 1987. +% +% \bibitem[Knu92]{METAFONT} +% Donald E.~Knuth. +% \newblock {\em The METAFONTbook}. +% \newblock Addison-Wesley, 1992. +% +% \bibitem[GMS94]{GOOSSENS94} +% Michel Goossens, Frank Mittelbach, and Alexander Samarin. +% \newblock {\em The LaTeX Companion}. +% \newblock Addison-Wesley Publishing Company, 1994. +% +% \bibitem[Tho75]{THOMAS75} +% Alan G.~Thomas. +% \newblock {\em Great Books and Book Collectors}. +% \newblock Weidenfield and Nichoson, 1975. +% +% \bibitem[Wil99]{DOCMFP} +% Peter R.~Wilson. +% \newblock {\em The DOCMFP Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \bibitem[Wil99b]{ROMANNUM} +% Peter R.~Wilson. +% \newblock {\em The ROMANNUM Package}. +% \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}). +% \newblock 1999. +% +% \end{thebibliography} +% +% +% \Finale +% \PrintIndex +% +\endinput + +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + diff --git a/Master/texmf-dist/source/latex/bookhands/uncial/uncial.ins b/Master/texmf-dist/source/latex/bookhands/uncial/uncial.ins new file mode 100644 index 00000000000..8d5d48a5ce5 --- /dev/null +++ b/Master/texmf-dist/source/latex/bookhands/uncial/uncial.ins @@ -0,0 +1,103 @@ +%% +%% uncial.ins +%% Copyright 1999 Peter R. Wilson +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Peter Wilson (CUA) +%% now at: peter.r.wilson@boeing.com +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{uncial.ins} +\input docstrip.tex +\preamble + + Copyright 1999 Peter R. Wilson + + This program is provided under the terms of the + LaTeX Project Public License distributed from CTAN + archives in directory macros/latex/base/lppl.txt. + +Author: Peter Wilson (CUA) + now at: peter.r.wilson@boeing.com + +\endpreamble + +\keepsilent + +%%% \Msg{*** Generating the driver file ***} +%%% \generateFile{uncial.drv}{t}{\from{uncial.dtx}{driver}} + +\Msg{*** Generating the Metafont files ***} + +\usepostamble\empty +\generateFile{uncl7.mf}{t}{\from{uncial.dtx}{base7}} +\generateFile{uncl10.mf}{t}{\from{uncial.dtx}{base10}} +\generateFile{uncl17.mf}{t}{\from{uncial.dtx}{base17}} +\generateFile{unclb7.mf}{t}{\from{uncial.dtx}{base7b}} +\generateFile{unclb10.mf}{t}{\from{uncial.dtx}{base10b}} +\generateFile{unclb17.mf}{t}{\from{uncial.dtx}{base17b}} +\generateFile{uncll.mf}{t}{\from{uncial.dtx}{min}} +\generateFile{unclu.mf}{t}{\from{uncial.dtx}{maj}} +\generateFile{uncltitle.mf}{t}{\from{uncial.dtx}{mfd}} +\generateFile{unclpunct.mf}{t}{\from{uncial.dtx}{punct}} +\generateFile{uncllig.mf}{t}{\from{uncial.dtx}{lig}} +\generateFile{uncldig.mf}{t}{\from{uncial.dtx}{dig}} +%%% \generateFile{unclp.mf}{t}{\from{uncial.dtx}{xp}} + +\Msg{*** Generating the Font Definition files ***} +\usepostamble\defaultpostamble + +\generateFile{ot1uncl.fd}{t}{\from{uncial.dtx}{fdot1}} +\generateFile{t1uncl.fd}{t}{\from{uncial.dtx}{fdt1}} + +\Msg{*** Generating the LaTeX2e package files ***} + +\generateFile{uncial.sty}{t}{\from{uncial.dtx}{usc}} +\generateFile{alluncl.sty}{t}{\from{uncial.dtx}{uscall}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into directories searched by TeX:} +\Msg{*} +\Msg{* Move these into the font source area:} +\Msg{* \space\space uncl7.mf} +\Msg{* \space\space uncl10.mf} +\Msg{* \space\space uncl17.mf} +\Msg{* \space\space unclb7.mf} +\Msg{* \space\space unclb10.mf} +\Msg{* \space\space unclb17.mf} +\Msg{* \space\space uncll.mf} +\Msg{* \space\space unclu.mf} +\Msg{* \space\space uncltitle.mf} +\Msg{* \space\space unclpunct.mf} +\Msg{* \space\space uncllig.mf} +\Msg{* \space\space uncldig.mf} +%%% \Msg{* \space\space unclp.mf} +\Msg{*} +\Msg{* Move these into the LaTeX macro area:} +\Msg{* \space\space ot1uncl.fd} +\Msg{* \space\space t1uncl.fd} +\Msg{* \space\space uncial.sty} +\Msg{* \space\space alluncl.sty} +\Msg{*} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{* Process any name.idx file by:} +\Msg{* \space\space\space\space makeindex -s gind.ist name} +\Msg{* Process any name.glo file by:} +\Msg{* \space\space\space\space makeindex -s gglo.ist -o name.gls name.glo} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} + +\endinput |