summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fonttable/fonttable.sty
blob: c515fec427904c49687d381bcea6f68d5e98a706 (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
%%
%% 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) herries dot press at earthlink dot net
%%   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.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.
%% ------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fonttable}[2009/05/06 v1.4 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]{\bgroup
  \pikfont{#1}{#2}{#3}{#4}%
  \edef\f@tfontname{\fontname\font}\normalfont
  \f@tstartfont
  \ftable
  \egroup}

\newcommand*{\f@tstartfont}{\font\f@ttestfont=\f@tfontname
  \f@ttestfont \f@tsetbaselineskip
  \ifdim\fontdimen6\f@ttestfont<10pt \rightskip=0pt plus 20pt
  \else\rightskip=0pt plus 2em \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*{\nodecimals}{%
%%% the original
  \newcommand*{\f@tpsg}{\setbox0=\hbox{\char\f@tn}%
    \ifdim\ht0>7.5pt\f@treposition
    \else\ifdim\dp0>2.5pt\f@treposition\fi\fi
    \box0\global\advance\f@tn 1 }}
\newcommand{\decimals}{%
%%% mine
  \newcommand*{\f@tpsg}{\setbox0=\hbox{\char\f@tn\,\rlap{\tiny \the\f@tn}}%
    \ifdim\ht0>7.5pt\f@treposition
    \else\ifdim\dp0>2.5pt\f@treposition\fi\fi
    \box0\global\advance\f@tn 1 }}
\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}

\newcommand*{\germantext}{%
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}

\newcommand*{\latintext}{%
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}{` ! @ \$ \& * ( ) \_ - + =  [ ] < > \{ \} : ; ' , . ? /}

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