summaryrefslogtreecommitdiff
path: root/dviware/quicspool/wwfonts/troman.mf
blob: bce9d447b7ced626433e99ba0659bfa7adb05871 (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
% $Header: troman.mf,v 1.1 88/01/15 13:15:20 simpson Rel $
% $Log:	troman.mf,v $
% Revision 1.1  88/01/15  13:15:20  simpson
% initial release
% 
% Revision 0.1  88/01/07  08:15:18  simpson
% beta test
% 
% The Computer Modern Roman family of fonts (by D. E. Knuth, 1979--1985)

if ligs>1: font_coding_scheme:="Troff text";
else: font_coding_scheme:=if ligs=0: "TeX typewriter text"
  else: "TeX text without f-ligatures" fi;
 spanish_shriek=oct"016"; spanish_query=oct"017"; fi
minus=oct"004"; vertical=oct"174";

mode_setup; font_setup;

% We need to create space characters with no bitmap for \| and \^.  I put
% them in oct"000" and oct"177" since these characters are not normally
% used by ditroff.
% My own creation (...creation being a generous term), for \|, 1/6 em
beginchar(oct"000", 16/6u#, 0, 0);
endchar;

% My own creation, for \^, 1/12 em
beginchar(oct"177", 16/12u#, 0, 0);
endchar;

% From the font lasy10.mf, file lasy.mf
cmchar "Box";
beginchar(oct"024",2.1math_axis#+4u#,v_center(7u#));
italcorr math_axis#*slant;
adjust_fit(0,0); pickup rule.nib;
numeric a; a=round(2.1math_axis);
x1=x4=good.x 2u; x2=x3=x1+a;
y3=y4=.5(cap_height-a); y1=y2=y3+a;
draw z1--z2--z3--z4--cycle;
labels(1,2,3,4); endchar;

% Stolen from font cmsy10, file symbol.mf
cmchar "Open bullet";
beginchar(oct"025",9u#,v_center(7u#));
adjust_fit(0,0); pickup rule.nib; autorounded;
lft x6=hround u; x2=w-x6; top y8=h; y2=math_axis;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); endchar;

% Stolen from the font cmr10, file accent.mf
cmchar "Umlaut (double dot) accent";
numeric dot_diam#,dot_diam;
dot_diam#=max(dot_size#,cap_curve#);
beginchar(oct"026",9u#,min(asc_height#,10/7x_height#+.5dot_diam#),0);
dot_diam=max(tiny.breadth,hround(max(dot_size,cap_curve)-2stem_corr));
italcorr h#*slant+.5dot_diam#-2.25u#;
adjust_fit(0,0);
pickup tiny.nib; pos1(dot_diam,0); pos2(dot_diam,90);
x1=x2=2.75u; top y2r=h+1;
if bot y2l<x_height+o+slab: y2l:=min(y2r-eps,x_height+o+slab+.5tiny); fi
y1=.5[y2l,y2r]; dot(1,2);  % left dot
pos3(dot_diam,0); penpos4(y2r-y2l,90); y3=y4=y1; x3=x4=w-x1;
dot(3,4);  % right dot
penlabels(1,2,3,4); endchar;

% Stolen from the font cmr10.mf, file accent.mf
cmchar "Cedilla accent";
beginchar(oct"027",8u#,0,.875desc_depth#);
adjust_fit(0,0);
x1=.5w+.5u;
if serifs: pickup crisp.nib; pos1(stem,0); pos2(stem,0);
 pos3(vair,90); pos4(stem,0); pos5(vair,-90);
 x1=x2; z3l=z2l; x4=x2+1.5u; x5=x3-1.5u;
 bot y1=-o; bot y2=-vround 2/7d-o; y4=.5[y3,y5]; bot y5=-d-o;
 filldraw stroke z1e--z2e;  % stem
 filldraw stroke z3e{right}...z4e{down}...{left}z5e;  % hook
else: pickup fine.nib; pos1(vair,0); top y1=-o-2;
 pos2(.5[vair,stem],0); bot y2=-d-o; x2=x1-1.25u;
 filldraw stroke z1e--z2e; fi  % diagonal
penlabels(1,2,3,4,5); endchar;

% My own creation, a zero width period.  Used for dots in pic(1).
cmchar "Dot for pic boxes";
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
define_whole_blacker_pixels(dot_diam);
beginchar(oct"030",0,dot_diam#,0);
period_width#:=5u#; define_pixels(period_width);
pickup fine.nib;
pos1(dot_diam,0); pos2(dot_diam,90);
lft x1l=hround(.5period_width-.5dot_diam); bot y2l=0; z1=z2; dot(1,2);  % dot
penlabels(1,2); endchar;

% My own creation.  The fractions look like hell.
cmchar "1/4 symbol";
beginchar(oct"021", 12u#, body_height#, paren_depth#);
italcorr body_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
rt x1=hround(w-u)+eps; top y1=h+eps;
lft x2=hround u-eps; bot y2=-d-eps;
draw z1--z2;  % diagonal
x3=x4=1/4w; y3=38/40h; y4=23/40h; 
draw z3--z4;  % number 1
x5=x6=32/40w; y7=y8=1/8h; y5=-.2d; y6=.37h; x7=26/40w; x8=.85w;
draw z5--z6--z7--z8;
endchar;

% My own creation
cmchar "1/2 symbol";
beginchar(oct"022", 12u#, body_height#, paren_depth#);
italcorr body_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
rt x1=hround(w-u)+eps; top y1=h+eps;
lft x2=hround u-eps; bot y2=-d-eps;
draw z1--z2;  % diagonal
x3=x4=1/4w; y3=38/40h; y4=23/40h; 
draw z3--z4;  % number 1
x5=x9=.65w; x10=x7=.85w; x6=.74w;
y9=y10=-.2d; y6=.37h; y5=.32h; y7=.30h;
draw z5{dir 45}..z6..z7{dir -90}..{dir 225}z9; % number 2
draw z9--z10;
endchar;

% My own creation.
cmchar "3/4 symbol";
beginchar(oct"023", 12u#, body_height#, paren_depth#);
italcorr body_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
rt x1=hround(w-u)+eps; top y1=h+eps;
lft x2=hround u-eps; bot y2=-d-eps;
draw z1--z2;  % diagonal
draw (quartercircle rotated -90 & halfcircle) scaled .1875h shifted 
(.25w,.8562h); % number 3
draw (halfcircle rotated -180 & quartercircle) scaled .1875h shifted 
(.25w,.6687h);
x5=x6=32/40w; y7=y8=1/8h; y5=-.2d; y6=.37h; x7=26/40w; x8=.85w;
draw z5--z6--z7--z8;
endchar;

% From the font cmsy10, file sym.mf
iff known vertical: cmchar "Vertical line";
beginchar(vertical,5u#,body_height#,paren_depth#);
italcorr body_height#*slant+.5rule_thickness#-2u#;
adjust_fit(0,0); pickup rule.nib;
x1=x2=good.x .5w; top y1=h+eps; bot y2=-d-eps;
draw z1--z2;  % stem
labels(1,2); endchar;

% My own creation
cmchar "Rule";
beginchar(oct"005",12u#,x_height#,.7u#);
italcorr .5x_height#*slant-.5u#;
adjust_fit(0,0);
numeric below_baseline; below_baseline#:=.2u#;
define_pixels(below_baseline);
define_blacker_pixels(thickness);
pickup crisp.nib; pos1(vair,90); pos2(vair,90);
top y1r=top y2r=vround(-below_baseline); rt x2=hround(w+6u#);
lft x1=hround(0);
filldraw stroke z1e--z2e;  % bar
penlabels(1,2); endchar;

% My own creation
cmchar "Underscore";
beginchar("_",12u#,x_height#,.7u#);
italcorr .5x_height#*slant-.5u#;
adjust_fit(0,0);
numeric below_baseline; below_baseline#:=.2u#;
define_pixels(below_baseline);
pickup crisp.nib; pos1(vair,90); pos2(vair,90);
top y1r=top y2r=vround(-below_baseline); x2=hround(w);
x1=hround 0;
filldraw stroke z1e--z2e;  % bar
penlabels(1,2); endchar;

% Hyphen from cmr10, file comlig.mf
cmchar "Hyphen";
beginchar("-",6u#,x_height#,0);
italcorr .5x_height#*slant-.5u#;
adjust_fit(0,0);
numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi;
pickup crisp.nib; pos1(thickness,90); pos2(thickness,90);
top y1r=top y2r=vround(.5h+.5thickness); rt x2=hround(w-u)+eps;
if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi;
filldraw stroke z1e--z2e;  % bar
penlabels(1,2); endchar;

% My own creation
cmchar "Cent sign";
beginchar(oct"020",18u#,asc_height#,desc_depth#); autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
circle_points; 
x9=x11=.65[x6,x4]; x10=x12=.35[x4,x2]; 
y9=y10=.35[y6,y8]; y11=y12=.65[y4,y6];
x13=x14=.5[x6,x2]-.3u; y13=y4+2u; y14=y8-2u;
draw z10..z9..z11..z12; draw z13--z14;
labels(1,2,3,4,5,6,7,8,9,10,11,12,13,14); endchar;

% My own creation
cmchar "Copyright";
beginchar(oct"016",18u#,asc_height#,desc_depth#); autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
circle_points; draw_circle;  % circle
x9=x11=.65[x6,x4]; x10=x12=.35[x4,x2]; 
y9=y10=.35[y6,y8]; y11=y12=.65[y4,y6];
draw z10..z9..z11..z12;
labels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;

% My own creation
cmchar "Registered";
beginchar(oct"017",18u#,asc_height#,desc_depth#); autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
circle_points; draw_circle;  % circle
x9=x11=x12=.7[x6,x8]; x10=x13=.3[x4,x2]; 
y12=y13=.5[y4,y6]; y9=.5[y6,y8]; y11=.5[y12,y9]; y10=.5[y11,y9];
x14=.08[x4,x2]; y14=y9; 
path p;
p=z9--z14{dir 0}..z10..{dir 180}z11;
z15=point 2.6 of p;
draw z12--z9; draw z13--z15; draw p;
labels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); endchar;

% Stolen from the font cmr10, file accent.mf (actually the acute accent)
cmchar "Footmark";
beginchar(oct"015",9u#,min(asc_height#,2x_height#),0);
italcorr h#*slant-if serifs: 1.5 fi u#;
adjust_fit(0,0);
if serifs: pickup crisp.nib; x1+.5stem=hround(w-2u); x2=2/3[x1,w-x1];
 y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair);
 numeric theta; theta=angle(z2-z1)+90;
 pos1(stem,theta); pos2(hair,theta);
 filldraw circ_stroke z1e--z2e;  % diagonal
else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
 rt x1r=hround(w-1.5u); lft x2l=hround(.5w-.25u-.5vair);
 top y1=h; bot y2=vround 2/3[h,x_height];
 filldraw stroke z1e--z2e; fi  % diagonal
penlabels(1,2); endchar;

% Stolen from the font cmsy10, file symbol.mf
cmchar "Dagger mark";
beginchar(oct"014",8u#,asc_height#,desc_depth#);
adjust_fit(0,0); pickup fine.nib;
pos1(stem,0); pos2(thin_join,0); pos3(stem,0); pos4(hair,0);
pos5(stem,90); pos2'(thin_join,90); pos6(stem,90); z2'=z2;
x1=x2=x3=x4; x1-.5stem=hround(.5w-.5stem); w:=r:=2x1;
x5-.5stem=hround u; x6=w-x5;
y1+.5stem=h+oo; y2=y5=y6; y3=.57y2; bot y4=-d-o;
y5+.5stem=floor(x_height+.5stem);
filldraw circ_stroke z1e{down}..z2e{down}..z3e{down}..z4e;  % stem
filldraw circ_stroke z5e{right}..{right}z2'e;  % left bulb
filldraw circ_stroke z6e{left}..{left}z2'e;  % right bulb
penlabels(1,2,3,4,5,6); endchar;

% Stolen from the font cmr10, file accent.mf (the Scandinavian circle accent)
cmchar "Degree";
beginchar(oct"013",13u#+4/3(asc_height#-x_height#)*slant,asc_height#,0);
adjust_fit(cap_serif_fit#,cap_serif_fit#);
numeric circ_hair,circ_vair;
circ_hair=hround min(hair,u+.5); circ_vair=vround min(vair,(h-x_height)/6+.5);
penpos1(circ_vair,90); penpos3(circ_vair,-90);
penpos2(circ_hair,180); penpos4(circ_hair,0);
x2r=hround(.5w-1.5u-.5circ_hair);
x4r=w-x2r; x1=x3=.5w; y1r=h+apex_o; y2=y4=.5[y1,y3];
y3r=vround(1/3[x_height,h]+apex_o);
penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
 & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle;  % bowl
penlabels(1,2,3,4); endchar;

% My own creation
cmchar "Square";
beginchar(oct"010",9u#,v_center(7u#));
italcorr math_axis#*slant;
adjust_fit(0,0); pickup rule.nib;
draw unitsquare scaled 7u shifted (.5w-7u/2,math_axis-7u/2);
endchar;

% Stolen from the font cmsy10, file symbol.mf
cmchar "Bullet";
beginchar(oct"007",9u#,v_center(7u#));
adjust_fit(0,0); pickup rule.nib; autorounded;
lft x6=hround u; x2=w-x6; top y8=h; y2=math_axis; circle_points;
filldraw z8{right}...z1{z2-z8}...z2{down}...z3{z4-z2}...z4{left}
  ...z5{z6-z4}...z6{up}...z7{z8-z6}...cycle;  % circle and interior
labels(1,2,3,4,5,6,7,8); endchar;

% Stolen from the font cmsy10, file sym.mf
iff known minus: cmchar "Minus sign";
beginarithchar(minus); pickup rule.nib;
lft x1=hround 1.5u-eps; x2=w-x1; y1=y2=math_axis;
draw z1--z2;  % bar
labels(1,2); endchar;

input romanu;  % upper case (majuscules)
input romanl;  % lower case (minuscules)
input romand;  % numerals
input romanp;  % ampersand, question marks, currency sign
input tpunct;  % punctuation symbols common to roman and italic text
if ligs>1: input tromlig; fi  % letter ligatures
if ligs>0: input tcomlig; fi  % ligatures common with italic text
if ligs<=1: input romsub; fi  % substitutes for ligatures

font_slant slant; font_x_height x_height#;
if monospace: font_normal_space 9u#; % no stretching or shrinking
 font_quad 18u#;
 font_extra_space 9u#;
else: font_normal_space 6u#+2letter_fit#;
 font_normal_stretch 3u#; font_normal_shrink 2u#;
 font_quad 18u#+4letter_fit#;
 font_extra_space 2u#;
 k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning
 ligtable "k": if serifs: "v": "a" kern -u#, fi\\"w": "e" kern k#,
  "a" kern k#, "o" kern k#, "c" kern k#;
 ligtable "P": "A" kern kk#,
  "y": "o" kern k#, "e" kern k#, "a" kern k#, "." kern kk#, "," kern kk#;
 ligtable "F": "V": "W": if serifs: "o" kern kk#, "e" kern kk#, "u" kern kk#,
    "r" kern kk#, "a" kern kk#, "A" kern kkk#,
   else: "o" kern k#, "e" kern k#, "u" kern k#,
    "r" kern k#, "a" kern k#, "A" kern kk#, fi
  "K": "X": "O" kern k#, "C" kern k#, "G" kern k#, "Q" kern k#;
 ligtable "T": "y" kern if serifs: k# else: kk# fi,
  "Y": "e" kern kk#, "o" kern kk#,
   "r" kern kk#, "a" kern kk#, "A" kern kk#, "u" kern kk#;
 ligtable "O": "D": "X" kern k#, "W" kern k#, "A" kern k#,
   "V" kern k#, "Y" kern k#;
 if serifs: ligtable "h": "m": "n":
   "t" kern k#, "u" kern k#, "b" kern k#, "y" kern k#, "v" kern k#, "w" kern k#;
  ligtable "c": "h" kern k#, "k" kern k#; fi
 ligtable "o": "b": "p": "e" kern -k#, "o" kern -k#, "x" kern k#,
   "d" kern -k#, "c" kern -k#, "q" kern -k#,
  "a": if serifs: "v" kern k#, "j" kern u#, else: "r" kern k#, fi
  "t": "y" kern k#,
  "u": "w" kern k#;
 ligtable "A": if serifs: "R": fi\\ "t" kern k#,
  "C" kern k#, "O" kern k#, "G" kern k#, "U" kern k#, "Q" kern k#,
  "L": "T" kern kk#, "Y" kern kk#, "V" kern kkk#, "W" kern kkk#;
 ligtable "g": "j" kern -k#; % logjam
 ligtable "I": "I" kern -k#; fi % Richard III
 % there are ligature/kern programs for |"f"| in the {\tt romlig} file
 % and for |"-"|, |"`"|, and |"'"| in the {\tt comlig} file
bye.