summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/misc/psfont.sty
blob: 429dd46a2ee00dc84029b66110ce48b7d02033d4 (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
% Filename: psfont.sty
% Author: Alan Jeffrey
% E-mail: alanje@cogs.sussex.ac.uk
% Last modified: 14 May 1992

% This is a document style option which defines macros for loading PS fonts.

% Set a flag to declare ourselves loaded:

\def\psfont@loaded{ }

% Load one font:

\def\new@ps@fontshape#1#2#3#4%
   {\new@fontshape{#1}{#2}{#3}{%
      <5>#4 at5pt%
      <6>#4 at6pt%
      <7>#4 at7pt%
      <8>#4 at8pt%
      <9>#4 at9pt%
      <10>#4%
      <11>#4 at10.95pt%
      <12>#4 at12pt%
      <14>#4 at14.4pt%
      <17>#4 at17.28pt%
      <20>#4 at20.736pt%
      <25>#4 at24.8832pt}{}}

% Load a whole family:

\def\load@ps@font#1#2#3#4#5#6#7#8#9%
   {\new@ps@fontshape{#1}{m}{n}{#2}
      \new@ps@fontshape{#1}{m}{it}{#3}
      \new@ps@fontshape{#1}{m}{sl}{#4}
      \new@ps@fontshape{#1}{m}{sc}{#5}
      \new@ps@fontshape{#1}{b}{n}{#6}
      \new@ps@fontshape{#1}{b}{it}{#7}
      \new@ps@fontshape{#1}{b}{sl}{#8}
      \new@ps@fontshape{#1}{b}{sc}{#9}
      \new@ps@fontshape{#1}{bx}{n}{#6}
      \new@ps@fontshape{#1}{bx}{it}{#7}
      \new@ps@fontshape{#1}{bx}{sl}{#8}
      \new@ps@fontshape{#1}{bx}{sc}{#9}
      \expandafter\let\csname every@#1@family\endcsname\every@ps@family
      \extra@def{#1}}

% Some extra characters:

\chardef\currency"A8
\chardef\cents"A2
\chardef\yen"A5
\chardef\florin"A6

% When a new family FOO is loaded, we call \every@FOO@family.

\def\fontfamily#1{\csname every@#1@family\endcsname\edef\f@family{#1}}
\let\family\fontfamily

% The CM families define the following macros:

\let\cm@pounds\pounds
\let\cm@S\S
\let\cm@dag\dag
\let\cm@ddag\ddag
\let\cm@P\P
\let\cm@ldots\ldots
\let\cm@H\H
\let\cm@dot\.
\let\cm@AA\AA

\def\every@cm@family
   {\let\pounds\cm@pounds
      \let\S\cm@S
      \let\dag\cm@dag
      \let\ddag\cm@ddag
      \let\P\cm@P
      \let\ldots\cm@ldots
      \let\H\cm@H
      \let\.\cm@dot
      \let\AA\cm@AA}

\let\every@cmr@family=\every@cm@family
\let\every@cmtt@family=\every@cm@family
\let\every@cmss@family=\every@cm@family

% The PS families define the following macros:

\newdimen\aadimen

\chardef\ps@pounds"A3
\chardef\ps@S"A7
\chardef\ps@dag"B2
\chardef\ps@ddag"B3
\chardef\ps@P"B6
\chardef\ps@ldots"BC
\def\ps@H#1{{\accent"CD #1}}
\def\ps@dot#1{{\accent"C7 #1}}
\def\ps@AA{\leavevmode\setbox0\hbox{h}\aadimen\ht0
    \advance\aadimen-1ex\setbox0\hbox{A}\rlap{\raise.67\aadimen
    \hbox to \wd0{\hss\char'27\hss}}A}

\def\every@ps@family
   {\let\pounds\ps@pounds
      \let\S\ps@S
      \let\dag\ps@dag
      \let\ddag\ps@ddag
      \let\P\ps@P
      \let\ldots\ps@ldots
      \let\H\ps@H
      \let\.\ps@dot
      \let\AA\ps@AA}

% For some reason, the default family is hard wired to be cmr, 
% rather than defined to be \rmdefault...

\def\default@family{\rmdefault}