home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / tex / oztex.sit / TeX-docs / fontsample.tex < prev    next >
Text File  |  1989-04-19  |  11KB  |  242 lines

  1. % This file produces font samples.
  2. % Select fonts by uncommenting the lines near the end.
  3.  
  4. \nopagenumbers
  5. \parindent=0pt
  6. \hsize=6.3in
  7. \vsize=9.7in
  8.  
  9. \def\init{\font\testfont=\fontname
  10.   \leftline{\tt\fontname}
  11.   \bigskip\bigskip
  12.   \testfont}
  13.  
  14. \newcount\m \newcount\n \newcount\p \newdimen\dim
  15. \def\oct#1{\hbox{\rm\'{}\kern-.2em\it#1\/\kern.05em}} % octal constant
  16. \def\hex#1{\hbox{\rm\H{}\tt#1}} % hexadecimal constant
  17. \def\setdigs#1"#2{\gdef\h{#2}% \h=hex prefix; \0\1=corresponding octal
  18.   \m=\n \divide\m by 64 \xdef\0{\the\m}%
  19.   \multiply\m by-64 \advance\m by\n \divide\m by 8 \xdef\1{\the\m}}
  20. \def\testrow{\setbox0=\hbox{\penalty 1\def\\{\char"\h}%
  21.   \\0\\1\\2\\3\\4\\5\\6\\7\\8\\9\\A\\B\\C\\D\\E\\F%
  22.   \global\p=\lastpenalty}} % \p=1 if none of the characters exist
  23. \def\oddline{\cr
  24.   \noalign{\nointerlineskip}
  25.   \multispan{19}\hrulefill&
  26.   \setbox0=\hbox{\lower 2.3pt\hbox{\hex{\h x}}}\smash{\box0}\cr
  27.   \noalign{\nointerlineskip}}
  28. \newif\ifskipping
  29.  
  30. \def\halfevenline{\loop\skippingfalse
  31.   \ifnum\n<128 \m=\n \divide\m 16 \chardef\next=\m
  32.   \expandafter\setdigs\meaning\next \testrow
  33.   \ifnum\p=1
  34.   \skippingfalse   % if \skippingtrue then empty rows are removed
  35.   \fi\fi
  36.   \ifskipping \global\advance\n 16 \repeat
  37.   \ifnum\n=128 \let\next=\endchart\else\let\next=\halfmorechart\fi
  38.   \next}
  39. \def\halfmorechart{\cr\noalign{\hrule\penalty5000}
  40.   \chartline \oddline \m=\1 \advance\m 1 \xdef\1{\the\m}
  41.   \chartline \halfevenline}
  42.  
  43. \def\evenline{\loop\skippingfalse
  44.   \ifnum\n<256 \m=\n \divide\m 16 \chardef\next=\m
  45.   \expandafter\setdigs\meaning\next \testrow
  46.   \ifnum\p=1
  47.   \skippingfalse   % if \skippingtrue then empty rows are removed
  48.   \fi\fi
  49.   \ifskipping \global\advance\n 16 \repeat
  50.   \ifnum\n=256 \let\next=\endchart\else\let\next=\morechart\fi
  51.   \next}
  52.  
  53. \def\morechart{\cr\noalign{\hrule\penalty5000}
  54.   \chartline \oddline \m=\1 \advance\m 1 \xdef\1{\the\m}
  55.   \chartline \evenline}
  56. \def\chartline{&\oct{\0\1x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&}
  57. \def\chartstrut{\lower4.5pt\vbox to14pt{}}
  58.  
  59. \def\halftable{$$\global\n=0
  60.   \halign to\hsize\bgroup
  61.   \chartstrut##\tabskip0pt plus10pt&
  62.   &\hfil##\hfil&\vrule##\cr
  63.   \lower6.5pt\null
  64.   &&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\halfevenline}
  65.  
  66. \def\table{$$\global\n=0
  67.   \halign to\hsize\bgroup
  68.   \chartstrut##\tabskip0pt plus10pt&
  69.   &\hfil##\hfil&\vrule##\cr
  70.   \lower6.5pt\null
  71.   &&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\evenline}
  72.  
  73. \def\endchart{\cr\noalign{\hrule}
  74.   \raise11.5pt\null&&&\hex 8&&\hex 9&&\hex A&&\hex B&
  75.   &\hex C&&\hex D&&\hex E&&\hex F&\cr\egroup$$\par\vfil\eject}
  76.  
  77. \def\:{\setbox0=\hbox{\char\n}%
  78.   \ifdim\ht0>7.5pt\reposition
  79.   \else\ifdim\dp0>2.5pt\reposition\fi\fi
  80.   \box0\global\advance\n 1 }
  81. \def\reposition{\setbox0=\vbox{\kern2pt\box0}\dim=\dp0
  82.   \advance\dim 2pt \dp0=\dim}
  83. \def\centerlargechars{
  84.   \def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}}}
  85.  
  86. \def\text#1{{\baselineskip=#1\rightskip=0pt plus5em
  87. Our task is to create a paragraph illustrating what a typical piece of text
  88. looks like in a particular \TeX\ font.  It should be stressed that not all
  89. \TeX\ fonts can be used for typesetting text.  We need to show most of the
  90. characters in this font---for instance, something like ``the quick brown fox
  91. jumps over a lazy dog'' would use all the lower-case letters.
  92. How about ``THE QUICK BROWN FOX JUMPS OVER 9876543210 LAZY DOGS'' to make
  93. sure we show all the upper-case letters and digits?  Such a paragraph would
  94. hardly be typical!  Then there's ligatures (try and fit in words like fluffy,
  95. waffle, firefly, difficult) and examples of kerning (boxer, AWAY, vowel).
  96. But how do we put all this stuff into a paragraph that makes sense!?\par
  97. }\bigskip\bigskip}
  98.  
  99.  
  100. % Computer Modern fonts currently have 128 characters, so we use \halftable.
  101. % Parameter to \text is the \baselineskip and should be 2pt more than font size.
  102. % It is not possible to produce a DVI file with all the fonts listed below
  103. % because TeX has a limitation of 100 fonts.
  104.  
  105. % \def\fontname{cmb10}     \init\text{12pt}\halftable
  106. % \def\fontname{cmbsy10}   \init\halftable              % no \text
  107. % \def\fontname{cmbx10}    \init\text{12pt}\halftable
  108. % \def\fontname{cmbx12}    \init\text{14pt}\halftable
  109. % \def\fontname{cmbx5}     \init\text{7pt}\halftable
  110. % \def\fontname{cmbx6}     \init\text{8pt}\halftable
  111. % \def\fontname{cmbx7}     \init\text{9pt}\halftable
  112. % \def\fontname{cmbx8}     \init\text{10pt}\halftable
  113. % \def\fontname{cmbx9}     \init\text{11pt}\halftable
  114. % \def\fontname{cmbxsl10}  \init\text{12pt}\halftable
  115. % \def\fontname{cmbxti10}  \init\text{12pt}\halftable
  116. % \def\fontname{cmcsc10}   \init\text{12pt}\halftable
  117. % \def\fontname{cmdunh10}  \init\text{12pt}\halftable
  118. % \def\fontname{cmex10}    \init\halftable              % no \text
  119. % \def\fontname{cmff10}    \init\text{12pt}\halftable
  120. % \def\fontname{cmfi10}    \init\text{12pt}\halftable
  121. % \def\fontname{cmfib8}    \init\text{10pt}\halftable
  122. % \def\fontname{cminch}    \init\halftable              % no \text
  123. % \def\fontname{cmitt10}   \init\text{12pt}\halftable
  124. % \def\fontname{cmmi10}    \init\halftable              % no \text
  125. % \def\fontname{cmmi12}    \init\halftable              % no \text
  126. % \def\fontname{cmmi5}     \init\halftable              % no \text
  127. % \def\fontname{cmmi6}     \init\halftable              % no \text
  128. % \def\fontname{cmmi7}     \init\halftable              % no \text
  129. % \def\fontname{cmmi8}     \init\halftable              % no \text
  130. % \def\fontname{cmmi9}     \init\halftable              % no \text
  131. % \def\fontname{cmmib10}   \init\halftable              % no \text
  132. % \def\fontname{cmr10}     \init\text{12pt}\halftable
  133. % \def\fontname{cmr12}     \init\text{14pt}\halftable
  134. % \def\fontname{cmr17}     \init\text{19pt}\halftable
  135. % \def\fontname{cmr5}      \init\text{7pt}\halftable
  136. % \def\fontname{cmr6}      \init\text{8pt}\halftable
  137. % \def\fontname{cmr7}      \init\text{9pt}\halftable
  138. % \def\fontname{cmr8}      \init\text{10pt}\halftable
  139. % \def\fontname{cmr9}      \init\text{11pt}\halftable
  140. % \def\fontname{cmsl10}    \init\text{12pt}\halftable
  141. % \def\fontname{cmsl12}    \init\text{14pt}\halftable
  142. % \def\fontname{cmsl8}     \init\text{10pt}\halftable
  143. % \def\fontname{cmsl9}     \init\text{11pt}\halftable
  144. % \def\fontname{cmsltt10}  \init\text{12pt}\halftable
  145. % \def\fontname{cmss10}    \init\text{12pt}\halftable
  146. % \def\fontname{cmss12}    \init\text{14pt}\halftable
  147. % \def\fontname{cmss17}    \init\text{19pt}\halftable
  148. % \def\fontname{cmss8}     \init\text{10pt}\halftable
  149. % \def\fontname{cmss9}     \init\text{11pt}\halftable
  150. % \def\fontname{cmssbx10}  \init\text{12pt}\halftable
  151. % \def\fontname{cmssdc10}  \init\text{12pt}\halftable
  152. % \def\fontname{cmssi10}   \init\text{12pt}\halftable
  153. % \def\fontname{cmssi12}   \init\text{14pt}\halftable
  154. % \def\fontname{cmssi17}   \init\text{19pt}\halftable
  155. % \def\fontname{cmssi8}    \init\text{10pt}\halftable
  156. % \def\fontname{cmssi9}    \init\text{11pt}\halftable
  157. % \def\fontname{cmssq8}    \init\text{10pt}\halftable
  158. % \def\fontname{cmssqi8}   \init\text{10pt}\halftable
  159. % \def\fontname{cmsy10}    \init\halftable              % no \text
  160. % \def\fontname{cmsy5}     \init\halftable              % no \text
  161. % \def\fontname{cmsy6}     \init\halftable              % no \text
  162. % \def\fontname{cmsy7}     \init\halftable              % no \text
  163. % \def\fontname{cmsy8}     \init\halftable              % no \text
  164. % \def\fontname{cmsy9}     \init\halftable              % no \text
  165. % \def\fontname{cmtcsc10}  \init\text{12pt}\halftable
  166. % \def\fontname{cmtex10}   \init\text{12pt}\halftable
  167. % \def\fontname{cmtex8}    \init\text{10pt}\halftable
  168. % \def\fontname{cmtex9}    \init\text{11pt}\halftable
  169. % \def\fontname{cmti10}    \init\text{12pt}\halftable
  170. % \def\fontname{cmti12}    \init\text{14pt}\halftable
  171. % \def\fontname{cmti7}     \init\text{9pt}\halftable
  172. % \def\fontname{cmti8}     \init\text{10pt}\halftable
  173. % \def\fontname{cmti9}     \init\text{11pt}\halftable
  174. % \def\fontname{cmtt10}    \init\text{12pt}\halftable
  175. % \def\fontname{cmtt12}    \init\text{14pt}\halftable
  176. % \def\fontname{cmtt8}     \init\text{10pt}\halftable
  177. % \def\fontname{cmtt9}     \init\text{11pt}\halftable
  178. % \def\fontname{cmu10}     \init\text{12pt}\halftable
  179. % \def\fontname{cmvtt10}   \init\text{12pt}\halftable
  180. % \def\fontname{circle10}  \init\halftable              % no \text
  181. % \def\fontname{circlew10} \init\halftable              % no \text
  182. % \def\fontname{lasy10}    \init\halftable              % no \text
  183. % \def\fontname{lasy5}     \init\halftable              % no \text
  184. % \def\fontname{lasy6}     \init\halftable              % no \text
  185. % \def\fontname{lasy7}     \init\halftable              % no \text
  186. % \def\fontname{lasy8}     \init\halftable              % no \text
  187. % \def\fontname{lasy9}     \init\halftable              % no \text
  188. % \def\fontname{lasyb10}   \init\halftable              % no \text
  189. % \def\fontname{line10}    \init\halftable              % no \text
  190. % \def\fontname{linew10}   \init\halftable              % no \text
  191. % \def\fontname{logo10}    \init\halftable              % no \text
  192. % \def\fontname{logo8}     \init\halftable              % no \text
  193. % \def\fontname{logo9}     \init\halftable              % no \text
  194. % \def\fontname{logobf10}  \init\halftable              % no \text
  195. % \def\fontname{logosl10}  \init\halftable              % no \text
  196.  
  197. % PostScript fonts can have up to 256 characters.
  198.  
  199. % These fonts are resident in all PostScript printers:
  200.  
  201. % \def\fontname{ps-times-r}    \init\text{12pt}\table
  202. % \def\fontname{ps-times-b}    \init\text{12pt}\table
  203. % \def\fontname{ps-times-bi}   \init\text{12pt}\table
  204. % \def\fontname{ps-times-i}    \init\text{12pt}\table
  205. % \def\fontname{ps-times-s}    \init\text{12pt}\table
  206. % \def\fontname{ps-courier}    \init\text{12pt}\table
  207. % \def\fontname{ps-courier-b}  \init\text{12pt}\table
  208. % \def\fontname{ps-courier-bo} \init\text{12pt}\table
  209. % \def\fontname{ps-courier-o}  \init\text{12pt}\table
  210. % \def\fontname{ps-helv}       \init\text{12pt}\table
  211. % \def\fontname{ps-helv-b}     \init\text{12pt}\table
  212. % \def\fontname{ps-helv-bo}    \init\text{12pt}\table
  213. % \def\fontname{ps-helv-o}     \init\text{12pt}\table
  214. % \def\fontname{ps-symbol}     \init\table              % no \text
  215.  
  216. % These fonts are in LaserWriter Plus and later models:
  217.  
  218. % \def\fontname{ps-avantg-b}   \init\text{12pt}\table
  219. % \def\fontname{ps-avantg-bo}  \init\text{12pt}\table
  220. % \def\fontname{ps-avantg-d}   \init\text{12pt}\table
  221. % \def\fontname{ps-avantg-do}  \init\text{12pt}\table
  222. % \def\fontname{ps-bookman-d}  \init\text{12pt}\table
  223. % \def\fontname{ps-bookman-di} \init\text{12pt}\table
  224. % \def\fontname{ps-bookman-l}  \init\text{12pt}\table
  225. % \def\fontname{ps-bookman-li} \init\text{12pt}\table
  226. % \def\fontname{ps-helv-n}     \init\text{12pt}\table
  227. % \def\fontname{ps-helv-nb}    \init\text{12pt}\table
  228. % \def\fontname{ps-helv-nbo}   \init\text{12pt}\table
  229. % \def\fontname{ps-helv-no}    \init\text{12pt}\table
  230. % \def\fontname{ps-ncs-b}      \init\text{12pt}\table
  231. % \def\fontname{ps-ncs-bo}     \init\text{12pt}\table
  232. % \def\fontname{ps-ncs-i}      \init\text{12pt}\table
  233. % \def\fontname{ps-ncs-r}      \init\text{12pt}\table
  234. % \def\fontname{ps-pal-b}      \init\text{12pt}\table
  235. % \def\fontname{ps-pal-bi}     \init\text{12pt}\table
  236. % \def\fontname{ps-pal-i}      \init\text{12pt}\table
  237. % \def\fontname{ps-pal-r}      \init\text{12pt}\table
  238. % \def\fontname{ps-zapfch-mi}  \init\text{12pt}\table
  239. % \def\fontname{ps-zapfdb}     \init\table              % no \text
  240.  
  241. \end
  242.