summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fonttable/fonttable.sty
blob: 9d858d9d097434961881fb755ed14f3e9b955e3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
%%
%% This is file `fonttable.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% fonttable.dtx  (with options: `pack')
%% ------------------------------------------------------------------
%%   Author: Peter Wilson (Herries Press)
%%   Maintainer: Will Robertson (will dot robertson at latex-project dot org)
%%   Copyright 2005--2009 Peter R. Wilson
%% 
%%   This work may be distributed and/or modified under the
%%   conditions of the Latex Project Public License, either
%%   version 1.3c of this license or (at your option) any
%%   later version: <http://www.latex-project.org/lppl.txt>
%% 
%%   This work has the LPPL maintenance status "maintained".
%%   The Current Maintainer of this work is Will Robertson.
%% 
%%   This work consists of the files listed in the README file.
%% ------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fonttable}
  [2017/06/06 v1.6c displays a font]
\providecommand*{\sevenrm}{\fontsize{7}{9pt}\rmfamily}
\newcount\f@tm \newcount\f@tn \newcount\f@tp \newdimen\f@tdim

\newcommand*{\fonttable}[1]{%
  \def\f@tfontname{#1}%
  \bgroup
  \f@tstartfont
  \ftable
  \egroup}

\DeclareRobustCommand{\pikfont}[4]{%
  \fontencoding{#1}\fontfamily{#2}\fontseries{#3}\fontshape{#4}\selectfont}

\newcommand*{\xfonttable}[4]{%
  \begingroup
    \pikfont{#1}{#2}{#3}{#4}%
    \edef\f@tfontname{\fontname\font}%
    \edef\@tempa{ \string a\string t}%
    \edef\@tempb{\noexpand\in@{\@tempa}{\f@tfontname}}%
    \@tempb
    \ifin@
      \edef\f@tfontname{\expandafter\f@tstripsize\f@tfontname}%
    \fi
    \normalfont
    \f@tstartfont
    \ftable
  \endgroup
}
\edef\@tempa{%
  \def\noexpand\f@tstripsize
    ##1 \string a\string t##2\string p\string t{##1}%
}
\@tempa
\newcommand*{\f@tstartfont}{%
  \@tempdima=\f@size pt
  \font\f@ttestfont=\f@tfontname\space at 0.9999\@tempdima\relax
  \f@ttestfont \f@tsetbaselineskip
  \ifdim\fontdimen6\f@ttestfont<10pt\relax
    \rightskip=0pt plus 20pt\relax
  \else
    \rightskip=0pt plus 2em\relax
  \fi
  \spaceskip=\fontdimen2\f@ttestfont % space between words (\raggedright)
  \xspaceskip=\fontdimen2\f@ttestfont
  \advance\xspaceskip by\fontdimen7\f@ttestfont
}
\newcommand*{\f@tsetbaselineskip}{\setbox0=\hbox{\f@tn=0
  \loop\char\f@tn \ifnum \f@tn<255 \advance\f@tn 1 \repeat}
  \baselineskip=6pt \advance\baselineskip\ht0 \advance\baselineskip\dp0 }

\newcommand*{\f@toct}[1]{\hbox{\rmfamily\'{}\kern-.2em\itshape
           #1\/\kern.05em}} % octal constant
\newcommand*{\f@thex}[1]{\hbox{\rmfamily\H{}\ttfamily#1}} % hexadecimal constant
\def\f@tsetdigs#1"#2{\gdef\h{#2}% \h=hex prefix; \0\1=corresponding octal
 \f@tm=\f@tn \divide\f@tm by 64 \xdef\0{\the\f@tm}%
 \multiply\f@tm by-64 \advance\f@tm by\f@tn \divide\f@tm by 8 \xdef\1{\the\f@tm}}
\newcommand*{\f@ttestrow}{\setbox0=\hbox{\penalty 1\def\\{\char"\h}%
 \\0\\1\\2\\3\\4\\5\\6\\7\\8\\9\\A\\B\\C\\D\\E\\F%
 \global\f@tp=\lastpenalty}} % \f@tp=1 if none of the characters exist

\newif\ifhexoct
\newcommand*{\hexoct}{\hexocttrue}
\newcommand*{\nohexoct}{\hexoctfalse}
\hexoct

\newcommand*{\f@toddline}{\cr
  \noalign{\nointerlineskip}
  \multispan{19}\hrulefill&
  \setbox0=\hbox{\lower 2.3pt\hbox{\f@thex{\h x}}}\smash{\box0}
  \cr
  \noalign{\nointerlineskip}}

\newif\iff@tskipping

\newcommand*{\fontrange}[2]{%
  \ifnum#1<#2\relax
  \ifnum#1<\z@
    \f@tm=\z@
  \else
    \f@tm=#1
    \divide \f@tm \sixt@@n
    \multiply \f@tm \sixt@@n
  \fi
  \edef\f@tlow{\the\f@tm}
  \f@tm=#2
  \divide \f@tm \sixt@@n
  \advance \f@tm \@ne
  \multiply \f@tm \sixt@@n
  \ifnum \f@tm > \@cclvi  \f@tm=\@cclvi \fi
  \edef\f@thigh{\the\f@tm}
 \else
   \PackageError{fonttable}{%
      Improper values for fontrange. Default values substituted}{\@ehc}
   \def\f@tlow{0} \def\f@thigh{256}
  \fi}
\fontrange{0}{256}

\newcommand*{\f@tloopforsixteen}{%
  \ifnum\f@tn<\f@tlow \global\f@tn=\f@tlow\fi
  \loop\f@tskippingfalse
  \ifnum\f@tn<\f@thigh \f@tm=\f@tn \divide\f@tm \sixt@@n \chardef\next=\f@tm
  \expandafter\f@tsetdigs\meaning\next \f@ttestrow
  \ifnum\f@tp=\@ne \f@tskippingtrue \fi\fi
  \iff@tskipping \global\advance\f@tn \sixt@@n \repeat}

\newcommand*{\f@tevenline}{%
  \f@tloopforsixteen
  \ifnum\f@tn=\f@thigh \let\next=\f@tendchart\else\let\next=\f@tmorechart\fi
  \next}
\newcommand*{\f@tevenlinenonum}{%
  \f@tloopforsixteen
  \ifnum\f@tn=\f@thigh
    \\\hline
  \else
    \\\hline
    \f@tmorechartnonum
  \fi}

\newcommand*{\f@tmorechart}{\cr\noalign{\hrule\penalty5000}
 \f@tchartline \f@toddline \f@tm=\1 \advance\f@tm 1 \xdef\1{\the\f@tm}
 \f@tchartline \f@tevenline}
\newcommand*{\f@tmorechartnonum}{%
  \f@tsimpleline \\ \hline
  \f@tsimpleline \f@tevenlinenonum}

\newcommand*{\f@tchartline}{%
  &\f@toct{\0\1x}&&\f@tpsg{}&&\f@tpsg{}&&\f@tpsg{}&&\f@tpsg{}&&\f@tpsg{}&&\f@tpsg{}&&\f@tpsg{}&&\f@tpsg{}&&}
\newcommand*{\f@tsimpleline}{%
  \f@tpsg{}\f@tchartstrut& \f@tpsg{} & \f@tpsg{} & \f@tpsg{} & \f@tpsg{} & \f@tpsg{} & \f@tpsg{} & \f@tpsg{}}

\newcommand*{\f@tchartstrut}{\lower4.5pt\vbox to14pt{}}
\newdimen\ftablewidth
  \ftablewidth=\hsize
\newdimen\fntcolwidth
  \setlength{\fntcolwidth}{0.08\ftablewidth}
\newcommand*{\f@tcol}{%
  \multicolumn{1}{c}{\hspace*{\fntcolwidth}}}
\newcommand*{\f@tstartchartnonum}{%
  \f@tcol &\f@tcol &\f@tcol &\f@tcol &\f@tcol &\f@tcol &\f@tcol &\f@tcol}

\newcommand*{\f@tftablenum}{$$\global\f@tn=\z@
  \halign to\ftablewidth\bgroup
    \f@tchartstrut##\tabskip0pt plus10pt&
    &\hfil##\hfil&\vrule##\cr
    \lower6.5pt\null
    &&&\f@toct0&&\f@toct1&&\f@toct2&&\f@toct3&&\f@toct4&&\f@toct5&&\f@toct6&&\f@toct7&%
    \f@tevenline}
\newcommand*{\f@tftablenonum}{%
  \global\f@tn=\z@
  \begin{tabular}{|c|c|c|c|c|c|c|c|}
    \f@tstartchartnonum
    \f@tevenlinenonum
  \end{tabular}}
\newcommand*{\ftable}{\ifhexoct\f@tftablenum\else\f@tftablenonum\fi}

\newcommand*{\f@tendchart}{\cr\noalign{\hrule}
  \raise11.5pt\null&&&\f@thex 8&&\f@thex 9&&\f@thex A&&\f@thex B&
  &\f@thex C&&\f@thex D&&\f@thex E&&\f@thex F&\cr
  \egroup$$\par}

\newcommand*{\f@tpsg}{%
  \setbox\z@=\hbox{\f@placechar{\char\f@tn}{\the\f@tn}}%
  \ifdim\ht\z@>7.5pt\relax
    \f@treposition
  \else
    \ifdim\dp\z@>2.5pt\relax
      \f@treposition
    \fi
  \fi
  \box\z@
  \global\advance\f@tn\@ne
}
\newcommand*\f@placedecimal[2]{#1\ {\tiny #2}}
\newcommand*{\nodecimals}{%
  \renewcommand*\f@placechar{\@firstoftwo}%
}
\newcommand{\decimals}{%
  \renewcommand*\f@placechar{\f@placedecimal}%
}
\newcommand*\f@placechar{}
\decimals
\newcommand*{\f@treposition}{\setbox0=\vbox{\kern2pt\box0}\f@tdim=\dp0
  \advance\f@tdim 2pt \dp0=\f@tdim}

\def\fonttext#1{%
  \def\f@tfontname{#1}%
  \bgroup
  \f@tstartfont
  \knutext
  \egroup}

\def\regulartext#1{%
  \bgroup
  #1
  \knutext
  \egroup}

\def\knutext{{
On November 14, 1885, Senator \& Mrs.~Leland Stanford called together
at their San Francisco mansion the 24~prominent men who had been
chosen as the first trustees of The Leland Stanford Junior University.
They handed to the board the Founding Grant of the University, which
they had executed three days before. This document---with various
amendments, legislative acts, and court decrees---remains as the
University's charter.  In bold, sweeping language it stipulates that
the objectives of the University are ``to qualify students for
personal success and direct usefulness in life; and to promote the
publick welfare by exercising an influence in behalf of humanity and
civilization, teaching the blessings of liberty regulated by law, and
inculcating love and reverence for the great principles of government
as derived from the inalienable rights of man to life, liberty, and
the pursuit of happiness.''

\moreknutext

\capknutext

\knunames
\par}}

\def\@moreknutext{?`But aren't Kafka's Schlo{\ss} and {\AE}sop's
{\OE}uvres often na{\"\i}ve vis-\`a-vis the d{\ae}monic ph{\oe}nix's
official r\^ole in fluffy souffl\'es? }

\newcommand{\@capknutext}{%
(!`THE DAZED BROWN FOX QUICKLY GAVE 12345--67890 JUMPS!)}
\let\capknutext\@capknutext

\def\@knunames{ {\AA}ngel\aa\ Beatrice Claire
  Diana \'Erica Fran\c{c}oise Ginette H\'el\`ene Iris
  Jackie K\=aren {\L}au\.ra Mar{\'\i}a N\H{a}ta{\l}{\u\i}e {\O}ctave
  Pauline Qu\^eneau Roxanne Sabine T\~a{\'\j}a Ur\v{s}ula
  Vivian Wendy Xanthippe Yv{\o}nne Z\"azilie\par}

\DeclareTextSymbol{\guillemotleft}{OT1}{`\'}
\DeclareTextSymbol{\guillemotright}{OT1}{`\`}
\providecommand{\flqq}{\guillemotleft}
\providecommand{\frqq}{\guillemotright}

\providecommand*{\germantext}{%
  \PackageWarning{fonttable}{\protect\germantext\space is deprecated,
                 \MessageBreak use \protect\germanparatext\space instead}}
\newcommand*{\germanparatext}{%
Dies hier ist ein Blindtext zum Testen von Textausgaben. Wer
diesen Text liest, ist selbst schuld. Der Text gibt lediglich den
Grauwert der Schrift an. Ist das wirklich so? Ist es
gleich\-g\"ul\-tig ob ich schreibe: \frqq Dies ist ein
Blindtext\flqq\ oder \frqq Huardest gefburn\flqq? Kjift --
mitnichten! Ein Blindtext bietet mir wichtige Informationen. An
ihm messe ich die Lesbarkeit einer Schrift, ihre Anmutung, wie
harmonisch die Figuren zueinander stehen und pr\"u\-fe, wie breit
oder schmal sie l\"auft. Ein Blindtext sollte m\"og\-lichst viele
verschiedene Buchstaben enthalten und in der Originalsprache
gesetzt sein. Er mu\ss\ keinen Sinn ergeben, sollte aber lesbar
sein. Fremdsprachige Texte wie \frqq Lorem ipsum\flqq\ dienen
nicht dem eigentlichen Zweck, da sie eine
falsche Anmutung vermitteln.\par}

\providecommand*{\latintext}{%
  \PackageWarning{fonttable}{\protect\latintext\space may be overridden by the
   babel package \MessageBreak use
                 \protect\latinparatext\space instead}}
\newcommand*{\latinparatext}{%
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam
lobortis facilisis sem. Nullam nec mi et neque pharetra
sollicitudin. Praesent imperdiet mi nec ante. Donec ullamcorper,
felis non sodales commodo, lectus velit ultrices augue, a
dignissim nibh lectus placerat pede. Vivamus nunc nunc, molestie
ut, ultricies vel, semper in, velit. Ut porttitor. Praesent in
sapien. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Duis fringilla tristique neque. Sed interdum libero ut metus.
Pellentesque placerat. Nam rutrum augue a leo. Morbi sed elit sit
amet ante lobortis sollicitudin. Praesent blandit blandit mauris.
Praesent lectus tellus, aliquet aliquam, luctus a, egestas a,
turpis. Mauris lacinia lorem sit amet ipsum. Nunc quis urna dictum
turpis accumsan semper.\par}

\newcommand*{\simpletext}{\let\moreknutext\relax \let\knunames\relax}
\newcommand*{\fulltext}{\let\moreknutext\@moreknutext \let\knunames\@knunames}
\fulltext

\def\fonttexts#1#2{%
  \def\f@tfontname{#1}%
  \bgroup
  \f@tstartfont
  #2
  \egroup}

\def\regulartexts#1#2{%
  \bgroup
  #1 #2
  \egroup}

\newcommand*{\aztext}{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}
\newcommand*{\AZtext}{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}
\newcommand*{\digitstext}{0 1 2 3 4 5 6 7 8 9}
\newcommand*{\punctext}{` ! @ \$ \& * ( ) \_ - + =  [ ] < > \{ \} : ; ' , . ? /}

%%%%%%%% using \@tempcnta for Knuth's \m and \@tempcntb for his \n
\newcommand*{\fnthours}{\@tempcntb=\time \divide\@tempcntb 60
  \@tempcnta=-\@tempcntb \multiply\@tempcnta 60 \advance\@tempcnta \time
  \f@ttwodigits\@tempcntb:\f@ttwodigits\@tempcnta}
\newcommand*{\f@ttwodigits}[1]{\ifnum #1<10 0\fi \number#1}

\newcommand*{\f@tgettsechars}[3]{%
  \chardef\f@ttchar=#1 \chardef\f@tschar=#2 \chardef\f@techar=#3}

\newcommand*{\glyphmixture}[3]{\f@tgettsechars{#1}{#2}{#3}%
                               \f@tdomix\f@tmixpattern}
\newcommand*{\f@tmixpattern}{\0\1\0\0\1\1\0\0\0\1\1\1\0\1}
\newcommand*{\f@tdomix}[1]{\par\chardef\0=\f@ttchar \@tempcntb=\f@tschar
   \loop \chardef\1=\@tempcntb #1\endgraf
   \ifnum \@tempcntb<\f@techar \advance\@tempcntb \@ne \repeat}

\newcommand*{\glyphalternation}[3]{\f@tgettsechars{#1}{#2}{#3}%
                                   \f@tdomix\f@taltpattern}
\newcommand*{\f@taltpattern}{\0\1\0\1\0\1\0\1\0\1\0\1\0\1\0\1\0}

\newcommand*{\f@tdisc}{\discretionary{\f@ttchar}{\f@ttchar}{\f@ttchar}}

\newcommand*{\glyphseries}[3]{\f@tgettsechars{#1}{#2}{#3}%
  \f@tdisc\f@tdoseries\f@tschar\f@techar\par}
\newcommand*{\f@tdoseries}[2]{\@tempcntb=#1\relax
  \loop\char\@tempcntb\f@tdisc
    \ifnum\@tempcntb<#2\advance\@tempcntb \@ne \repeat}

\newcommand*{\glyphalphabet}{\f@tcomplower}
\newcommand*{\GLYPHALPHABET}{\f@tcompupper}
\newcommand*{\f@tcomplower}[1]{\chardef\f@ttchar=#1
  \f@tdisc\f@tdoseries{`a}{`z}\f@tdoseries{31}{34}\par}
\newcommand*{\f@tcompupper}[1]{\chardef\f@ttchar=#1
  \f@tdisc\f@tdoseries{`A}{`Z}\f@tdoseries{35}{37}\par}

\newcommand*{\glyphlowers}{\f@tdocomprehensive\f@tclc{`a}{`z}{31}{34}}
\newcommand*{\glyphuppers}{\f@tdocomprehensive\f@tcuc{`A}{`Z}{35}{37}}
\newcommand*{\glyphdigits}{\f@tdocomprehensive\f@tdgs{`0}{`4}{`5}{`9}}
\newcommand*{\f@tdocomprehensive}[5]{\par\chardef\f@ttchar=#2
  \loop{#1} \ifnum\f@ttchar<#3\@tempcnta=\f@ttchar\advance\@tempcnta \@ne
  \chardef\f@ttchar=\@tempcnta \repeat
  \chardef\f@ttchar=#4
  \loop{#1} \ifnum\f@ttchar<#5\@tempcnta=\f@ttchar\advance\@tempcnta \@ne
  \chardef\f@ttchar=\@tempcnta \repeat}
\newcommand*{\f@tclc}{\f@tdisc\f@tdoseries{`a}{`z}\f@tdoseries{31}{34}\par}
\newcommand*{\f@tcuc}{\f@tdisc\f@tdoseries{`A}{`Z}\f@tdoseries{35}{37}\par}
\newcommand*{\f@tdgs}{\f@tdisc\f@tdoseries{`0}{`9}\par}

\newcommand*{\glyphpunct}{\par\f@tdopunct{min}\f@tdopunct{pig}\f@tdopunct{hid}
                     \f@tdopunct{HIE}\f@tdopunct{TIP}\f@tdopunct{fluff}
  \$1,234.56 + 7/8 = 9\% @ \#0\par}
\newcommand*{\f@tdopunct}[1]{#1,\ #1:\ #1;\ `#1'\
  ?`#1?\ !`#1!\ (#1)\ [#1]\ #1*\ #1.\par}

\endinput
%%
%% End of file `fonttable.sty'.