Debian Codegraph @

texmf-dist/source/fonts/archaic/nabatean.dtx

raw
1 % \iffalse meta-comment
2 %
3 % nabatean.dtx
4 %
5 % Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
6 % Copyright 1999--2005 Peter R. Wilson
7 %
8 % This work may be distributed and/or modified under the
9 % conditions of the Latex Project Public License, either
10 % version 1.3 of this license or (at your option) any
11 % later version.
12 % The latest version of the license is in
13 % http://www.latex-project.org/lppl.txt
14 % and version 1.3 or later is part of all distributions of
15 % LaTeX version 2003/06/01 or later.
16 %
17 % This work has the LPPL maintenance status "author-maintained".
18 %
19 % This work consists of the files listed in the README file.
20 %
21 %
22 %
23 %<*driver>
24 \documentclass[twoside]{ltxdoc}
25 \usepackage{url}
26 \usepackage[draft=false,
27 plainpages=false,
28 pdfpagelabels,
29 bookmarksnumbered,
30 hyperindex=false
31 ]{hyperref}
32 \providecommand{\phantomsection}{}
33 \OnlyDescription %% comment this out for the full glory
34 \EnableCrossrefs
35 \CodelineIndex
36 \setcounter{StandardModuleDepth}{1}
37 \makeatletter
38 \@mparswitchfalse
39 \makeatother
40 \renewcommand{\MakeUppercase}[1]{#1}
41 \pagestyle{headings}
42 \newenvironment{addtomargins}[1]{%
43 \begin{list}{}{%
44 \topsep 0pt%
45 \addtolength{\leftmargin}{#1}%
46 \addtolength{\rightmargin}{#1}%
47 \listparindent \parindent
48 \itemindent \parindent
49 \parsep \parskip}%
50 \item[]}{\end{list}}
51 \begin{document}
52 \raggedbottom
53 \DocInput{nabatean.dtx}
54 \end{document}
55 %</driver>
56 %
57 % \fi
58 %
59 % \CheckSum{242}
60 %
61 % \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath}
62 % \DoNotIndex{\@centercr,\@cite}
63 % \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue}
64 % \DoNotIndex{\@input,\@ixpt,\@m}
65 % \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint}
66 % \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb}
67 % \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt}
68 % \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt}
69 % \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace}
70 % \DoNotIndex{\advance,\Alph,\alph}
71 % \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
72 % \DoNotIndex{\bullet}
73 % \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption}
74 % \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass}
75 % \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist}
76 % \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
77 % \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter}
78 % \DoNotIndex{\fbox}
79 % \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef}
80 % \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
81 % \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi}
82 % \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi}
83 % \DoNotIndex{\input}
84 % \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark}
85 % \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright}
86 % \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
87 % \DoNotIndex{\NeedsTeXFormat,\newdimen}
88 % \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number}
89 % \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@}
90 % \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip}
91 % \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
92 % \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
93 % \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font}
94 % \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman}
95 % \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength}
96 % \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space}
97 % \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase}
98 % \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt}
99 % \DoNotIndex{\viipt,\vipt,\vskip,\vspace}
100 % \DoNotIndex{\wd,\xiipt,\year,\z@}
101 %
102 % \changes{v1.0}{1999/03/14}{First public release}
103 % \changes{v1.1}{2000/09/30}{Minor changes to glyph encodings}
104 % \changes{v1.2}{2005/06/16}{Added map file}
105 %
106 % \def\fileversion{v1.0} \def\filedate{1999/03/14}
107 % \def\fileversion{v1.1} \def\filedate{2000/09/30}
108 % \def\fileversion{v1.2} \def\filedate{2005/06/16}
109 % \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package
110 % \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option
111 % \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file
112 % \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter
113 % \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle
114 % \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment
115 % \newcommand{\BC}{\textsc{bc}}
116 % \newcommand{\AD}{\textsc{ad}}
117 % \newcommand{\thisfont}{Nabatean}
118 %
119 % \title{The \Lpack{Nabatean} fonts\thanks{This
120 % file has version number \fileversion, last revised
121 % \filedate.}}
122 %
123 % \author{%
124 % Peter Wilson\thanks{\texttt{herries dot press at earthlink dot net}}\\
125 % Herries Press }
126 % \date{\filedate}
127 % \maketitle
128 % \begin{abstract}
129 % The \Lpack{nabatean} bundle provides a set of fonts for the
130 % Nabatean script which was used between the fourth centuries~\BC{}
131 % and~\AD{} in the Middle East. It is one in a series for archaic scripts.
132 % \end{abstract}
133 % \tableofcontents
134 %
135 %
136 %
137 % \section{Introduction}
138 %
139 % The Phoenician alphabet and characters is a direct ancestor of our modern day
140 % Latin alphabet and fonts.
141 % The font presented here is one of a series of fonts intended to show how
142 % the modern Latin alphabet has evolved from its original Phoenician form
143 % to its present day appearance.
144 %
145 % This manual is typeset according to the conventions of the
146 % \LaTeX{} \textsc{docstrip} utility which enables the automatic
147 % extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}.
148 %
149 % Section~\ref{sec:usc} describes the usage of the package.
150 % Commented code for the fonts and the package is in later sections.
151 %
152 % \subsection{An alphabetic tree}
153 %
154 % Scholars are reasonably agreed that all the world's alphabets are descended
155 % from a Semitic alphabet invented about 1600~\BC{} in the Middle
156 % East~\cite{DRUCKER95}. The word `Semitic' refers
157 % to the family of languages used in the geographical area from
158 % Sinai in the south, up the Mediterranean coast to Asia Minor in the north and
159 % west to the valley of the Euphrates.
160 %
161 % The Phoenician alphabet was stable by about 1100~\BC{} and the script was
162 % written right to left. In earlier times the writing direction was variable,
163 % and so were
164 % the shapes and orientation of the characters. The alphabet consisted of
165 % 22 letters and they were named after things. For example, their first two
166 % letters were called \textit{aleph} (ox), and \textit{beth} (house).
167 % The Phoenician script had
168 % only one case --- unlike our modern fonts which have both upper- and
169 % lower-cases. In modern terms the Phoenician abecedary was: \\
170 % A B G D E Y Z H $\Theta$ I K L M N X O P ts Q R S T \\
171 % where the `Y' (\textit{vau}) character was sometimes written as `F', and
172 % `ts' stands for the \textit{tsade} character.
173 %
174 % The Greek alphabet is one of the descendants of the Phoenician alphabet;
175 % another was Aramaic which is the ancestor of the Arabic, Persian and Indian
176 % scripts.
177 % Initially Greek was written right to left but around the 6th C~\BC{} became
178 % \textit{boustrophedron}, meaning that the lines
179 % alternated in direction. At about 500~\BC{} the writing direction stabilised
180 % as left to
181 % right. The Greeks modified the Phoenician alphabet to match the vocalisation
182 % of their language. They kept the Phoenician names of the letters, suitably
183 % `greekified', so \textit{aleph} became the familar \textit{alpha} and
184 % \textit{beth} became \textit{beta}. At this
185 % point the names of the letters had no meaning. Their were several variants
186 % of the Greek character glyphs until they were finally fixed in Athens in
187 % 403~\BC.
188 % The Greeks did not develop a lower-case
189 % script until about 600--700~\AD.
190 %
191 % The Etruscans based their alphabet on the Greek one, and again modified it.
192 % However, the Etruscans wrote right to left, so their borrowed characters are
193 % mirror images of the original Greek ones. Like the Phoenicians, the Etruscan
194 % script consisted of only one case; they died out before ever needing a
195 % lower-case script. The Etruscan script was used up until the first century
196 % \AD, even though the Etruscans themselves had dissapeared by that time.
197 %
198 %
199 % In turn, the Romans based their alphabet on the Etruscan one, but as they
200 % wrote left to right, the characters were again mirrored (although the early
201 % Roman inscriptions are boustrophedron).
202 %
203 % As the English alphabet is descended from the Roman alphabet
204 % it has a pedigree of some three and a half thousand years.
205 %
206 % \section{The \Lpack{nabatean} package} \label{sec:usc}
207 %
208 % The \thisfont{} script is a descendant of the Aramaic script,
209 % which in turn descended from the Phoenician script, and is a predecessor
210 % of the modern Arabian script. It was used between approximately the
211 % fourth centuries~\BC{} and~\AD. The version presented is roughly
212 % typical of the frst century~\AD.
213 %
214 % The alphabet consisted of 22 characters.
215 % Table~\ref{tab} lists, in the \thisfont{} alphabetical order, the
216 % transliterated value of the characters and, where I know it, the
217 % modern name of the character.
218 %
219 % \begin{table}
220 % \centering
221 % \caption{The \thisfont{} script and alphabet}\label{tab}
222 % \begin{tabular}{clcll} \hline
223 % Value & Name? & ASCII & Command & Command \\ \hline
224 % \textit{a} &
225 % aleph &
226 % ' a & |\Arq| |\Aa| &
227 % |\Aaleph|
228 % \\
229 % \textit{b} &
230 % beth &
231 % b & |\Ab| &
232 % |\Abeth|
233 % \\
234 % \textit{g} &
235 % gimel &
236 % g & |\Ag| &
237 % |\Agimel|
238 % \\
239 % \textit{d} &
240 % daleth &
241 % d & |\Ad| &
242 % |\Adaleth|
243 % \\
244 % \textit{h} &
245 % he &
246 % h & |\Ah| &
247 % |\Ahe|
248 % \\
249 % \textit{w} &
250 % vav &
251 % w & |\Aw| &
252 % |\Avav|
253 % \\
254 % \textit{z} &
255 % zayin &
256 % z & |\Az| &
257 % |\Azayin|
258 % \\
259 % \textit{\d{h}} &
260 % heth &
261 % H & |\Ahd| &
262 % |\Aheth|
263 % \\
264 % \textit{\d{t}} &
265 % teth &
266 % T & |\Atd| &
267 % |\Ateth|
268 % \\
269 % \textit{y} &
270 % yod &
271 % y & |\Ay| &
272 % |\Ayod|
273 % \\
274 % \textit{k} &
275 % kaph &
276 % k & |\Ak| &
277 % |\Akaph|
278 % \\
279 % \textit{l} &
280 % lamed &
281 % l & |\Al| &
282 % |\Alamed|
283 % \\
284 % \textit{m} &
285 % mem &
286 % m & |\Am| &
287 % |\Amem|
288 % \\
289 % \textit{n} &
290 % nun &
291 % n & |\An| &
292 % |\Anun|
293 % \\
294 % \textit{s} &
295 % samekh &
296 % s & |\As| &
297 % |\Asamekh|
298 % \\
299 % \textit{`} &
300 % ayin &
301 % ` o & |\Alq| |\Ao| &
302 % |\Aayin|
303 % \\
304 % \textit{p} &
305 % pe &
306 % p & |\Ap| &
307 % |\Ape|
308 % \\
309 % \textit{\d{s}} &
310 % sade &
311 % x & |\Asd| &
312 % |\Asade|
313 % \\
314 % \textit{q} &
315 % qoph &
316 % q & |\Aq| &
317 % |\Aqoph|
318 % \\
319 % \textit{r} &
320 % resh &
321 % r & |\Ar| &
322 % |\Aresh|
323 % \\
324 % \textit{\v{s}} &
325 % shin &
326 % S & |\Asv| &
327 % |\Ashin|
328 % \\
329 % \textit{t} &
330 % tav &
331 % t & |\At| &
332 % |\Atav|
333 % \\
334 % \hline
335 % \end{tabular}
336 % \end{table}
337 %
338 %
339 %
340 % \DescribeMacro{\nabfamily}
341 % This command selects the \thisfont{} font family. The family name is |nab|.
342 %
343 % \DescribeMacro{\textnab}
344 % The command |\textnab{|\meta{text}|}| typesets \meta{text} in the
345 % \thisfont{} font.
346 %
347 %
348 % I have provided three ways of accessing the \thisfont{} glyphs:
349 % (a) by ASCII characters,
350 % (b) by commands whose names are based on the transliterated values, and
351 % (c) by commands whose names are based on the (modern) name of the
352 % character.
353 % These are shown in Table~\ref{tab}.
354 %
355 %
356 % \DescribeMacro{\translitnab}
357 % The command |\translitnab{|\meta{commands}|}| will typeset the
358 % transliteration of the \thisfont{} character commands (those in the
359 % last two columns of Table~\ref{tab}).
360 %
361 % \DescribeMacro{\translitnabfont}
362 % The font used for the transliteration is defined by this macro,
363 % which is initialsed to an italic font (i.e., |\itshape|).
364 %
365 % \StopEventually{
366 % \bibliographystyle{alpha}
367 % \begin{thebibliography}{GMS94}
368 %
369 % \bibitem[Dru95]{DRUCKER95}
370 % Johanna Drucker.
371 % \newblock \emph{The Alphabetic Labyrinth}.
372 % \newblock Thames and Hudson, 1995.
373 %
374 % \bibitem[Fir93]{FIRMAGE93}
375 % Richard A.~Firmage.
376 % \newblock \emph{The Alphabet Abecedarium}.
377 % \newblock David R.~Goodine, 1993.
378 %
379 % \bibitem[GMS94]{GOOSSENS94}
380 % Michel Goossens, Frank Mittelbach, and Alexander Samarin.
381 % \newblock \emph{The LaTeX Companion}.
382 % \newblock Addison-Wesley Publishing Company, 1994.
383 %
384 % \bibitem[Hea90]{HEALEY90}
385 % John F.~Healey.
386 % \newblock \emph{Reading the Past: The Early Alphabet}.
387 % \newblock University of California Press/British Museum, 1990.
388 % \newblock (ISBN 0-520-07309-6)
389 %
390 % \end{thebibliography}
391 % \PrintIndex
392 %
393 % }
394 %
395 %
396 % \section{The Metafont code} \label{sec:mf}
397 %
398 % \subsection{The parameter file}
399 %
400 % We deal with the parameter file first, and start by announcing
401 % what it is for.
402 % \begin{macrocode}
403 %<*up>
404 %%% NAB10.MF Computer Nabatean font 10 point design size.
405
406 % \end{macrocode}
407 % Specify the font size.
408 % \begin{macrocode}
409
410 font_identifier:="nabatean"; font_size 10pt#;
411
412 % \end{macrocode}
413 %
414 %
415 % \begin{macro}{u}
416 % \begin{macro}{ht}
417 % \begin{macro}{s}
418 % \begin{macro}{o}
419 % \begin{macro}{px}
420 % \begin{macro}{font-normal-space}
421 % \begin{macro}{font-normal-shrink}
422 % \begin{macro}{font-x-height}
423 % \begin{macro}{font-quad}
424 % Define the very simple font parameters.
425 % \begin{macrocode}
426 u#:=.2pt#; % unit width
427 ht#:=7pt#; % height of characters (CM cap-height is approx 6.8pt)
428 s#:=1.5pt#; % width correction (right and left)
429 o#:=1/20pt#; % overshoot
430 px#:=.6pt#; % horizontal width of pen
431 font_normal_space:=7pt#; % width of a blank space
432 font_normal_shrink:=.9pt#; % width correction for blank space
433 font_x_height:=4.5pt#; % height of one ex
434 font_quad:=10pt#; % an em
435
436 % \end{macrocode}
437 % \end{macro}
438 % \end{macro}
439 % \end{macro}
440 % \end{macro}
441 % \end{macro}
442 % \end{macro}
443 % \end{macro}
444 % \end{macro}
445 % \end{macro}
446 %
447 % For a full font, normally the driver file would come here. In this
448 % case I have embedded it.
449 % \begin{macrocode}
450
451 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
452 % end of parameters
453 % start of driver code
454 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
455
456 % \end{macrocode}
457 %
458 %
459 % \subsection{The driver file}
460 %
461 % If there was a seperate driver file, this would be its contents.
462 %
463 % \begin{macrocode}
464
465 font_coding_scheme:="Nabatean glyphs";
466 mode_setup;
467
468 % \end{macrocode}
469 %
470 % \begin{macro}{ho}
471 % \begin{macro}{leftloc}
472 % \begin{macro}{py}
473 % Perform additional setup.
474 % \begin{macrocode}
475 ho#:=o#; % horizontal overshoot
476 leftloc#:=s#; % leftmost xcoord of character
477 py#:=.8px#; % vertical thickness of the pen
478
479 define_pixels(s,u);
480 define_blacker_pixels(px,py);
481 define_good_x_pixels(leftloc);
482 define_corrected_pixels(o); % turn on overshoot correction
483 define_horizontal_corrected_pixels(ho);
484
485 % \end{macrocode}
486 % \end{macro}
487 % \end{macro}
488 % \end{macro}
489 %
490 % \begin{macro}{midloc}
491 % \begin{macro}{rightloc}
492 % Variables for the middle xcoord and rightmost xcoord of a character.
493 % \begin{macrocode}
494 numeric midloc, rightloc;
495 % \end{macrocode}
496 % \end{macro}
497 % \end{macro}
498 %
499 % \begin{macro}{stylus}
500 % Define the pen.
501 % \begin{macrocode}
502 pickup pencircle xscaled px yscaled py;
503 stylus:=savepen;
504
505 % \end{macrocode}
506 % \end{macro}
507 %
508 % \begin{macro}{beginglyph}
509 % A macro to save some typing of beginchar arguments.
510 % \begin{macrocode}
511 def beginglyph(expr code, unit_width) =
512 beginchar(code, unit_width*ht#+2s#, ht#, 0);
513 midloc:=1/2w; rightloc:=(w-s);
514 pickup stylus enddef;
515
516 % \end{macrocode}
517 % \end{macro}
518 %
519 % \begin{macro}{cmchar}
520 % |cmchar| should precede each character
521 % \begin{macrocode}
522 let cmchar=\;
523
524 % \end{macrocode}
525 % \end{macro}
526 %
527 % \begin{macrocode}
528 newinternal defaultsmoothrad;
529 numeric smoothrad, defaultsmoothrad;
530 defaultsmoothrad := 2px;
531 smoothrad := 2px;
532
533 tertiarydef p ~ q =
534 begingroup
535 c_ := fullcircle scaled 2smoothrad shifted point 0 of q;
536 a_ := ypart(c_ intersectiontimes p);
537 b_ := ypart(c_ intersectiontimes q);
538 if a_ < 0: point 0 of p{direction 0 of p} else: subpath(0,a_) of p fi
539 ... if b_ < 0: {direction infinity of q}point infinity of q
540 else: subpath(b_,infinity) of q fi
541 endgroup
542 enddef;
543
544 def smoothly(text t) =
545 hide(n_:=0; for z=t: z_[incr n_]:= z; endfor)
546 (z_1 for k=2 upto n_-1: --z_[k]) ~ (z_[k] endfor --z_[n_])
547 enddef;
548
549 % \end{macrocode}
550 %
551 % That would be the end of a seperate driver file, except for
552 % calling the glyph code file.
553 %
554 % \subsection{The glyph code}
555 %
556 % The following code generates the glyphs for the Nabatean font.
557 % The characters
558 % are defined in the Phoenician alphabetic ordering.
559 %
560 % \begin{macrocode}
561
562 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
563 % end of title code
564 % start of glyph code
565 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
566
567 % \end{macrocode}
568 %
569 % \begin{macro}{'}
570 % The \thisfont{} letter \textit{aleph}.
571 % Like a fancy X.
572 % \begin{macrocode}
573
574 cmchar "Nabatean letter aleph (coded as ')";
575 beginglyph("'",1.0);
576 z1=(leftloc,1/2h);
577 z3=(rightloc,0);
578 z2=1/2[z1,z3];
579 z11=(leftloc,0); z12=(x2,y11);
580 z21=(1/3[x2,x3], y2);
581 z22=(x21,h);
582 draw z1{right}..z2..{right}z3;
583 draw z11--z12; draw z21--z22;
584 labels(1,2,3,4,5,11,12,21,22);
585 endchar;
586
587 % \end{macrocode}
588 % \end{macro}
589 %
590 % \begin{macro}{a}
591 % The \thisfont{}letter \textit{aleph}.
592 % \begin{macrocode}
593
594 cmchar "Nabatean letter aleph (coded as a)";
595 beginglyph("a",1.0);
596 z1=(leftloc,1/2h);
597 z3=(rightloc,0);
598 z2=1/2[z1,z3];
599 z11=(leftloc,0); z12=(x2,y11);
600 z21=(1/3[x2,x3], y2);
601 z22=(x21,h);
602 draw z1{right}..z2..{right}z3;
603 draw z11--z12; draw z21--z22;
604 labels(1,2,3,4,5,11,12,21,22);
605 endchar;
606
607 % \end{macrocode}
608 % \end{macro}
609 %
610 % \begin{macro}{b}
611 % The \thisfont{} letter \textit{bet}.
612 % Like a sickle.
613 % \begin{macrocode}
614
615 cmchar "Nabatean letter bet (coded as b)";
616 beginglyph("b",1.0);
617 z1=(midloc,h);
618 z2=(x1,7/8h);
619 z4=(rightloc, 1/2h);
620 z6=(leftloc,0);
621 draw z1--z2;
622 draw z2{right}..z4{down}..{left}z6;
623 labels(1,2,3,4,5,6); endchar;
624
625 % \end{macrocode}
626 % \end{macro}
627 %
628 % \begin{macro}{g}
629 % The \thisfont{} letter \textit{gimel}.
630 % Like a Y on its side.
631 % \begin{macrocode}
632
633 cmchar "Nabatean letter gimel (coded as g)";
634 beginglyph("g", 0.8);
635 z1=(1/3[leftloc,rightloc], h);
636 z2=(rightloc,0);
637 z11=1/2[z1,z2];
638 z12=(leftloc,y11);
639 draw z1--z2; draw z11--z12;
640 labels(1,2,3,4,11,12); endchar;
641
642 % \end{macrocode}
643 % \end{macro}
644 %
645 % \begin{macro}{d}
646 % The \thisfont{} letter \textit{dalet}.
647 % \begin{macrocode}
648
649 cmchar "Nabatean letter dalet (coded as d)";
650 beginglyph("d",0.6);
651 z1=(leftloc,h);
652 z2=(x1,3/4h);
653 z3=(rightloc,y2);
654 z5=(rightloc,0);
655 draw smoothly(z1, z2, z3, z5);
656 labels(1,2,3,4,5,11,12); endchar;
657
658 % \end{macrocode}
659 % \end{macro}
660 %
661 % \begin{macro}{h}
662 % The \thisfont{} letter \textit{he}.
663 % Like a T with a post leaning against it.
664 % \begin{macrocode}
665
666 cmchar "Nabatean letter he (coded as h)";
667 beginglyph("h",0.8);
668 z1=(midloc,h);
669 z2=(rightloc,1/3h);
670 z3=1/4[z1,z2];
671 z4=(leftloc,y3);
672 z11=1/2[z3,z4];
673 z12=(x11,0);
674 draw z1--z2;
675 draw z3--z4;
676 draw z11--z12;
677 labels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;
678
679 % \end{macrocode}
680 % \end{macro}
681 %
682 % \begin{macro}{w}
683 % The \thisfont{} letter \textit{vav}.
684 % Shepherds crook.
685 % \begin{macrocode}
686
687 cmchar "Nabatean letter vav (coded as w)";
688 beginglyph("w",0.3);
689 z1=(leftloc,3/4h);
690 z3=(rightloc,y1);
691 z2=(1/2[x1,x3], h);
692 z4=(rightloc,0);
693 draw z1{up}..z2{right}..{down}z3--z4;
694 labels(1,2,3,4,5,6,7,8,9,10); endchar;
695
696 % \end{macrocode}
697 % \end{macro}
698 %
699 % \begin{macro}{z}
700 % The \thisfont{} letter \textit{zayin}.
701 % Short, slightly bent, vertical line.
702 % \begin{macrocode}
703
704 cmchar "Nabatean letter zayin (coded as z)";
705 beginglyph("z",0.1);
706 z1=(leftloc,3/4h);
707 z3=(x1,1/4h);
708 z2=(rightloc,1/2[y1,y3]);
709 draw smoothly(z1, z2, z3);
710 labels(1,2,3,4,5,6,7,8,9,10); endchar;
711
712 % \end{macrocode}
713 % \end{macro}
714 %
715 % \begin{macro}{H}
716 % The \thisfont{} letter \textit{het} (h sub dot).
717 % \begin{macrocode}
718
719 cmchar "Nabatean letter het (h sub dot?) (coded as H)";
720 beginglyph("H", 0.7);
721 z7=(rightloc,1/8h); z8=(rightloc,h);
722 z1=(leftloc,0);
723 z2=(3/16[x1,x8], 0);
724 z3=(1/2[x1,x2], h);
725
726 z11=7/8[z2,z3];
727 z13=(x8,y11);
728 z12 =(1/2[x11,x13], h);
729
730 draw smoothly(z1, z2, z3); draw z7--z8;
731 draw z11{right}..z12{right}..{right}z13;
732 labels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar;
733
734 % \end{macrocode}
735 % \end{macro}
736 %
737 %
738 %
739 % \begin{macro}{T}
740 % The \thisfont{} letter \textit{tet} (t sub dot).
741 % Like the numeral 6.
742 % \begin{macrocode}
743
744 cmchar "Nabatean letter tet (t sub dot) (coded as T)";
745 beginglyph("T",1.0);
746 numeric n[];
747 n1=1/4h;
748 z1=(leftloc,h); z2=(leftloc,0);
749 z3=(rightloc,1/4h);
750 z4=(x3,y3+n1);
751 z5'=1/4[z2,z3]; z5=(x5', y5'+n1);
752 draw smoothly(z1, z2, z3, z4, z5);
753 labels(1,2,3,4,5,6,7,8,9); endchar;
754
755 % \end{macrocode}
756 % \end{macro}
757 %
758 % \begin{macro}{y}
759 % The \thisfont{} letter \textit{yod}.
760 % Like an S.
761 % \begin{macrocode}
762
763 cmchar "Nabatean letter yod (coded as y)";
764 beginglyph("y",0.6);
765 z1=(3/4[leftloc,rightloc], h);
766 z2=(1/4[leftloc,rightloc], 1/2h);
767 z3=(rightloc,1/2h);
768 z4=(rightloc,1/3h);
769 z6=(leftloc,0);
770 draw smoothly(z1, z2, z3, z4, z6);
771 labels(1,2,3,4,5,6); endchar;
772
773 % \end{macrocode}
774 % \end{macro}
775 %
776 %
777 % \begin{macro}{k}
778 % The \thisfont{} letter \textit{kaf}.
779 % \begin{macrocode}
780
781 cmchar "Nabatean letter kaf (coded as k)";
782 beginglyph("k",0.6);
783 z1=(1/4[leftloc,rightloc], h);
784 z2=(x1, 7/8h);
785 z3=(rightloc,y2);
786 z4=(rightloc,0);
787 z5=(leftloc,0);
788 draw smoothly(z1, z2, z3, z4, z5);
789 labels(1,2,3,4,5); endchar;
790
791 % \end{macrocode}
792 % \end{macro}
793 %
794 % \begin{macro}{l}
795 % The \thisfont{} letter \textit{lamed}.
796 % \begin{macrocode}
797
798 cmchar "Nabatean letter lamed (coded as l)";
799 beginglyph("l",0.5);
800 z1=(1/4[leftloc,rightloc], h);
801 z2=(x1, 1/3h);
802 z3=(rightloc,y2);
803 z4=(rightloc,0);
804 z5=(leftloc,0);
805 draw smoothly(z1, z2, z3, z5);
806 labels(1,2,3,4,5,6); endchar;
807
808 % \end{macrocode}
809 % \end{macro}
810 %
811 % \begin{macro}{m}
812 % The \thisfont{} letter \textit{mem}.
813 % Like \textit{bet} with a line through the top bar.
814 % \begin{macrocode}
815
816 cmchar"Nabatean letter mem (coded as m)";
817 beginglyph("m",0.8);
818 z1=(leftloc,1/4h);
819 z2=(midloc,h);
820 z3=(rightloc,y2);
821 z4=(rightloc,0);
822 z5=(1/2[x1,x2],0);
823 draw smoothly(z1, z2, z3, z4, z5);
824 z11=7/8[z1,z2]; z12=(2/3[x1,x11], y2);
825 draw z11--z12;
826 labels(1,2,3,4,5,11,12); endchar;
827
828 % \end{macrocode}
829 % \end{macro}
830 %
831 % \begin{macro}{n}
832 % The \thisfont{} letter \textit{nun}.
833 %
834 % \begin{macrocode}
835
836 cmchar "Nabatean letter nun (coded as n)";
837 beginglyph("n",0.3);
838 z1=(leftloc,1/4h);
839 z2=(rightloc,y1);
840 z3=(x2,3/4h);
841 draw smoothly(z1, z2, z3);
842 labels(1,2,3,4,5,11,12); endchar;
843
844 % \end{macrocode}
845 % \end{macro}
846 %
847 %
848 % \begin{macro}{s}
849 % The \thisfont{} letter \textit{samekh}.
850 % Figure of eight.
851 % \begin{macrocode}
852
853 cmchar "Nabatean letter samekh (coded as s)";
854 beginglyph("s", 0.8);
855 z1=(leftloc,h);
856 z2=(1/4[leftloc,rightloc], y1);
857 z3=(x2,0);
858 z4=(rightloc,3/4h);
859 z5=(x1,y4);
860 z6=(x2,y4);
861 draw smoothly(z6, z5, z1, z2, z6);
862 draw smoothly(z6, z3, z4, z6);
863 labels(1,2,3,4,5,6,11,12); endchar;
864
865 % \end{macrocode}
866 % \end{macro}
867 %
868 %
869 % \begin{macro}{`}
870 % The \thisfont{} letter \textit{ayin}.
871 % Like a Y.
872 % \begin{macrocode}
873
874 cmchar "Nabatean letter ayin (coded as `)";
875 beginglyph("`",0.6);
876 z1=(leftloc,0);
877 z2=(rightloc,h);
878 z3=3/4[z1,z2];
879 z4=(1/2[x1,x2], h);
880 draw z1--z2; draw z3--z4;
881 labels(1,2,3,4,5,6,7); endchar;
882
883 % \end{macrocode}
884 % \end{macro}
885 %
886 % \begin{macro}{o}
887 % The \thisfont{} letter \textit{ayin}.
888 % \begin{macrocode}
889
890 cmchar "Nabatean letter ayin (coded as o)";
891 beginglyph("o",0.6);
892 z1=(leftloc,0);
893 z2=(rightloc,h);
894 z3=3/4[z1,z2];
895 z4=(1/2[x1,x2], h);
896 draw z1--z2; draw z3--z4;
897 labels(1,2,3,4,5,6,7); endchar;
898
899 % \end{macrocode}
900 % \end{macro}
901 %
902 % \begin{macro}{p}
903 % The \thisfont{} letter \textit{pe}.
904 % A more upright \textit{bet}.
905 % \begin{macrocode}
906
907 cmchar "Nabatean letter pe (coded as p)";
908 beginglyph("p", 0.6);
909 z1=(leftloc,1/8h);
910 z2=(2/3[leftloc,rightloc], 0);
911 z3=(rightloc,2/8h);
912 z4=(7/8[leftloc,rightloc], 6/8h);
913 z5=(x4,h);
914 z7=(5/8[leftloc,rightloc], y4);
915 draw z1...z2{right}...z3{up}...{up}z4;
916 draw smoothly(z4, z5, z7);
917 labels(1,2,3,4,5,6,7); endchar;
918
919 % \end{macrocode}
920 % \end{macro}
921 %
922 % \begin{macro}{x}
923 % The \thisfont{} letter \textit{tsadi}.
924 % Fishing hook with a flat top.
925 % \begin{macrocode}
926
927 cmchar "Nabatean letter tsadi (S sub dot) (coded as x)";
928 beginglyph("x", 0.8);
929 z1=(leftloc, 1/4h);
930 z3=(3/4[leftloc,rightloc], y1);
931 z2=(1/2[x1,x3], 0);
932 z4=(x3,h);
933 z5=(rightloc,y4);
934 draw z1...z2{right}...{up}z3;
935 draw smoothly(z3, z4, z5);
936 labels(1,2,3,4,5,6); endchar;
937
938 % \end{macrocode}
939 % \end{macro}
940 %
941 % \begin{macro}{q}
942 % The \thisfont{} letter \textit{qof}.
943 % Like \textit{tsadi} except there is a ring at the top.
944 % \begin{macrocode}
945
946 cmchar "Nabatean letter qof (coded as q)";
947 beginglyph("q", 0.8);
948 z1=(leftloc, 1/4h);
949 z3=(3/4[leftloc,rightloc], y1);
950 z2=(1/2[x1,x3], 0);
951 z4=(x3,h);
952 z5=(rightloc,y4);
953 z6=(x5,6/8h);
954 z7=(x4,y6);
955 draw z1...z2{right}...{up}z3;
956 draw smoothly(z3, z4, z5, z6, z7);
957 labels(1,2,3,4,5,6,7); endchar;
958
959 % \end{macrocode}
960 % \end{macro}
961 %
962 %
963 %
964 % \begin{macro}{r}
965 % The \thisfont{} letter \textit{resh}.
966 % Practically identical to \textit{dalet}.
967 % \begin{macrocode}
968
969 cmchar "Nabatean letter resh (coded as r)";
970 beginglyph("r",0.6);
971 z1=(leftloc,h);
972 z2=(x1,3/4h);
973 z3=(rightloc,y2);
974 z5=(rightloc,0);
975 draw smoothly(z1, z2, z3, z5);
976 labels(1,2,3,4,5,11,12); endchar;
977
978 % \end{macrocode}
979 % \end{macro}
980 %
981 %
982 % \begin{macro}{S}
983 % The \thisfont{} letter \textit{shin} (s sup v).
984 % Like an F.
985 % \begin{macrocode}
986
987 cmchar "Nabatean letter shin (s sup v) (coded as S)";
988 beginglyph("S", 0.8);
989 path pth[];
990 z1=(leftloc,0);
991 z2=(1/3[leftloc,rightloc], 0);
992 z3=(x2,h);
993
994 z11=1/2[z2,z3];
995 z12=(rightloc,h);
996
997 z21=1/2[z11,z3];
998 z22=1/2[z3,z12];
999
1000 draw smoothly(z1, z2, z3);
1001 draw z11--z12;
1002 draw z21--z22;
1003 labels(1,2,3,4,5,6,7,11,12); endchar;
1004
1005 % \end{macrocode}
1006 % \end{macro}
1007 %
1008 % \begin{macro}{t}
1009 % The \thisfont{} letter \textit{tav}.
1010 %
1011 % \begin{macrocode}
1012
1013 cmchar "Nabatean letter tav (coded as t)";
1014 beginglyph("t", 1.0);
1015 z1=(leftloc,0);
1016 z2=(1/4[leftloc,rightloc], 0);
1017 z3=(x2,h);
1018 z4=(rightloc,h);
1019 z5=(x4,0);
1020 z6=1/2[z2,z5];
1021 draw smoothly(z1, z2, z3, z4, z5, z6);
1022 labels(1,2,3,4,5,6); endchar;
1023
1024
1025 % \end{macrocode}
1026 % \end{macro}
1027 %
1028 %
1029 % The end of the glyphs, and the file.
1030 %
1031 % \begin{macrocode}
1032 end
1033
1034 %</up>
1035 % \end{macrocode}
1036 %
1037 %
1038 %
1039 % \section{The font definition files} \label{sec:fd}
1040 %
1041 % \begin{macrocode}
1042 %<*fdot1>
1043 \DeclareFontFamily{OT1}{nab}{}
1044 \DeclareFontShape{OT1}{nab}{m}{n}{ <-> nab10 }{}
1045 \DeclareFontShape{OT1}{nab}{bx}{n}{ <-> sub nab/m/n }{}
1046 \DeclareFontShape{OT1}{nab}{b}{n}{ <-> sub nab/m/n }{}
1047 \DeclareFontShape{OT1}{nab}{m}{sl}{ <-> sub nab/m/n }{}
1048 \DeclareFontShape{OT1}{nab}{m}{it}{ <-> sub nab/m/n }{}
1049 %</fdot1>
1050 % \end{macrocode}
1051 %
1052 %
1053 % \begin{macrocode}
1054 %<*fdt1>
1055 \DeclareFontFamily{T1}{nab}{}
1056 \DeclareFontShape{T1}{nab}{m}{n}{ <-> nab10 }{}
1057 \DeclareFontShape{T1}{nab}{bx}{n}{ <-> sub nab/m/n }{}
1058 \DeclareFontShape{T1}{nab}{b}{n}{ <-> sub nab/m/n }{}
1059 \DeclareFontShape{T1}{nab}{m}{sl}{ <-> sub nab/m/n }{}
1060 \DeclareFontShape{T1}{nab}{m}{it}{ <-> sub nab/m/n }{}
1061 %</fdt1>
1062 % \end{macrocode}
1063 %
1064 %
1065 % \section{The \Lpack{nabatean} package code} \label{sec:code}
1066 %
1067 % Announce the name and version of the package, which requires
1068 % \LaTeXe{}.
1069 % \begin{macrocode}
1070 %<*usc>
1071 \NeedsTeXFormat{LaTeX2e}
1072 \ProvidesPackage{nabatean}[2000/09/30 v1.0 package for Nabatean fonts]
1073 % \end{macrocode}
1074 %
1075 %
1076 % \begin{macro}{\nabfamily}
1077 % Selects the font family in the T1 encoding.
1078 % \begin{macrocode}
1079 \newcommand{\nabfamily}{\usefont{T1}{nab}{m}{n}}
1080 % \end{macrocode}
1081 % \end{macro}
1082 %
1083 % \begin{macro}{\textnab}
1084 % Text command for the font family.
1085 % \begin{macrocode}
1086 \DeclareTextFontCommand{\textnab}{\nabfamily}
1087
1088 % \end{macrocode}
1089 % \end{macro}
1090 %
1091 % The commands for the signs.
1092 % \begin{macrocode}
1093 \chardef\Arq=`' \chardef\Aa=`a \chardef\Aaleph=`'
1094 \chardef\Ab=`b \chardef\Abeth=`b
1095 \chardef\Ag=`g \chardef\Agimel=`g
1096 \chardef\Ad=`d \chardef\Adaleth=`d
1097 \chardef\Ah=`h \chardef\Ahe=`h
1098 \chardef\Aw=`w \chardef\Avav=`w
1099 \chardef\Az=`z \chardef\Azayin=`z
1100 \chardef\Ahd=`H \chardef\Aheth=`H
1101 \chardef\Atd=`T \chardef\Ateth=`T
1102 \chardef\Ay=`y \chardef\Ayod=`y
1103 \chardef\Ak=`k \chardef\Akaph=`k
1104 \chardef\Al=`l \chardef\Alamed=`l
1105 \chardef\Am=`m \chardef\Amem=`m
1106 \chardef\An=`n \chardef\Anun=`n
1107 \chardef\As=`s \chardef\Asamekh=`s
1108 \chardef\Alq=`` \chardef\Ao=`o \chardef\Aayin=``
1109 \chardef\Ap=`p \chardef\Ape=`p
1110 \chardef\Asd=`x \chardef\Asade=`x
1111 \chardef\Aq=`q \chardef\Aqoph=`q
1112 \chardef\Ar=`r \chardef\Aresh=`r
1113 \chardef\Asv=`S \chardef\Ashin=`S
1114 \chardef\At=`t \chardef\Atav=`t
1115
1116 % \end{macrocode}
1117 %
1118 % \begin{macro}{\translitnab}
1119 % \begin{macro}{\translinabfont}
1120 % |\translitnab{|\meta{commands}|}| transliterates
1121 % \meta{commands} using the |\translitnab| font.
1122 % \begin{macrocode}
1123 \newcommand{\translitnab}[1]{{%
1124 \@translitN\translitnabfont #1}}
1125 \newcommand{\translitnabfont}{\itshape}
1126
1127 % \end{macrocode}
1128 % \end{macro}
1129 % \end{macro}
1130 %
1131 % \begin{macro}{\@translitN}
1132 % This macro redefines all the character commands to produce
1133 % the transliterated value instead of the glyph. There must be no
1134 % spaces in the definition.
1135 % \begin{macrocode}
1136 \newcommand{\@translitN}{%
1137 \def\Arq{'}\def\Aa{\Arq}\def\Aaleph{\Arq}%
1138 \def\Ab{b}\def\Abeth{\Ab}%
1139 \def\Ag{g}\def\Agimel{\Ag}%
1140 \def\Ad{d}\def\Adaleth{\Ad}%
1141 \def\Ah{h}\def\Ahe{\Ah}%
1142 \def\Aw{w}\def\Avav{\Aw}%
1143 \def\Az{z}\def\Azayin{\Az}%
1144 \def\Ahd{\d{h}}\def\Aheth{\Ahd}%
1145 \def\Atd{\d{t}}\def\Ateth{\Atd}%
1146 \def\Ay{y}\def\Ayod{\Ay}%
1147 \def\Ak{k}\def\Akaph{\Ak}%
1148 \def\Al{l}\def\Alamed{\Al}%
1149 \def\Am{m}\def\Amem{\Am}%
1150 \def\An{n}\def\Anun{\An}%
1151 \def\As{s}\def\Asamekh{\As}%
1152 \def\Alq{`}\def\Ao{\Alq}\def\Aayin{\Alq}%
1153 \def\Ap{p}\def\Ape{\Ap}%
1154 \def\Asd{\d{s}}\def\Asade{\Asd}%
1155 \def\Aq{q}\def\Aqoph{\Aq}%
1156 \def\Ar{r}\def\Aresh{\Ar}%
1157 \def\Asv{\v{s}}\def\Ashin{\Asv}%
1158 \def\At{t}\def\Atav{\At}%
1159 }
1160
1161 % \end{macrocode}
1162 % \end{macro}
1163 %
1164 %
1165 %
1166 % The end of this package.
1167 % \begin{macrocode}
1168 %</usc>
1169 % \end{macrocode}
1170 %
1171 % \section{Map files}
1172 %
1173 % This is rather short.
1174 % \changes{v1.2}{2005/06/16}{Added map file}
1175 %
1176 % \begin{macrocode}
1177 %<*map>
1178 nab10 Archaic-Nabatean <nab10.pfb
1179 %</map>
1180 % \end{macrocode}
1181 %
1182 % The end!
1183 %
1184 % \Finale
1185 %
1186 \endinput
1187
1188 %% \CharacterTable
1189 %% {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
1190 %% 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
1191 %% Digits \0\1\2\3\4\5\6\7\8\9
1192 %% Exclamation \! Double quote \" Hash (number) \#
1193 %% Dollar \$ Percent \% Ampersand \&
1194 %% Acute accent \' Left paren \( Right paren \)
1195 %% Asterisk \* Plus \+ Comma \,
1196 %% Minus \- Point \. Solidus \/
1197 %% Colon \: Semicolon \; Less than \<
1198 %% Equals \= Greater than \> Question mark \?
1199 %% Commercial at \@ Left bracket \[ Backslash \\
1200 %% Right bracket \] Circumflex \^ Underscore \_
1201 %% Grave accent \` Left brace \{ Vertical bar \|
1202 %% Right brace \} Tilde \~}
1203
1204