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
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
|
% LAMS3.MF VERSION 1.0
% COPYRIGHT (C) 1989 BY THE TEXPLORATORS CORPORATION
% ALL RIGHTS RESERVED
if unknown cmbase: input cmbase fi
% replace the macro adjust_fit by version used in earlier cmbase files to
% avoid division by zero error caused by newer versions of cmbase
% Patch by Ingo Hadan (Jan 97)
def normal_adjust_fit(expr left_adjustment,right_adjustment) =
l:=-hround(left_adjustment*hppp)-letter_fit;
interim xoffset:=-l;
charwd:=charwd+2letter_fit#+left_adjustment+right_adjustment;
r:=l+hround(charwd*hppp)-shrink_fit;
w:=r-hround(right_adjustment*hppp)-letter_fit;
enddef;
def mono_adjust_fit(expr left_adjustment,right_adjustment) =
numeric expansion_factor;
mono_charwd#=2letter_fit#
+expansion_factor*(charwd+left_adjustment+right_adjustment);
forsuffixes $=u,jut,cap_jut,beak_jut,apex_corr:
$:=$.#*expansion_factor*hppp; endfor
l:=-hround(left_adjustment*expansion_factor*hppp)-letter_fit;
interim xoffset:=-l;
r:=l+mono_charwd-shrink_fit;
w:=r-hround(right_adjustment*expansion_factor*hppp)-letter_fit;
charwd:=mono_charwd#; charic:=mono_charic#;
enddef;
font_identifier:="LAMS"; font_size 10pt#;
u#:=20/36pt#; % unit width
width_adj#:=0pt#; % width adjustment for certain characters
serif_fit#:=0pt#; % extra sidebar near lowercase serifs
cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs
letter_fit#:=0pt#; % extra space added to all sidebars
body_height#:=270/36pt#; % height of tallest characters
asc_height#:=360/36pt#; % height of lowercase ascenders
cap_height#:=246/36pt#; % height of caps
fig_height#:=232/36pt#; % height of numerals
x_height#:=155/36pt#; % height of lowercase without ascenders
math_axis#:=90/36pt#; % axis of symmetry for math symbols
bar_height#:=87/36pt#; % height of crossbar in lowercase e
comma_depth#:=70/36pt#; % depth of comma below baseline
desc_depth#:=0/36pt#; % depth of lowercase descenders
crisp#:=8/36pt#; % diameter of serif corners
tiny#:=8/36pt#; % diameter of rounded corners
fine#:=7/36pt#; % diameter of sharply rounded corners
thin_join#:=7/36pt#; % width of extrafine details
hair#:=9/36pt#; % lowercase hairline breadth
stem#:=24/36pt#; % lowercase stem breadth
curve#:=29/36pt#; % lowercase curve breadth
ess#:=27/36pt#; % breadth in middle of lowercase s
flare#:=32/36pt#; % diameter of bulbs or breadth of terminals
dot_size#:=38/36pt#; % diameter of dots
cap_hair#:=11/36pt#; % uppercase hairline breadth
cap_stem#:=30/36pt#; % uppercase stem breadth
cap_curve#:=35/36pt#; % uppercase curve breadth
cap_ess#:=33/36pt#; % breadth in middle of uppercase s
rule_thickness#:=.4pt#; % thickness of lines in math symbols
dish#:=1/36pt#; % amount erased at top or bottom of serifs
bracket#:=20/36pt#; % vertical distance from serif base to tangent
jut#:=30/36pt#; % protrusion of lowercase serifs
cap_jut#:=37/36pt#; % protrusion of uppercase serifs
beak_jut#:=10/36pt#; % horizontal protrusion of beak serifs
beak#:=70/36pt#; % vertical protrusion of beak serifs
vair#:=8/36pt#; % vertical diameter of hairlines
notch_cut#:=10pt#; % maximum breadth above or below notches
bar#:=11/36pt#; % lowercase bar thickness
slab#:=11/36pt#; % serif and arm thickness
cap_bar#:=11/36pt#; % uppercase bar thickness
cap_band#:=11/36pt#; % uppercase thickness above/below lobes
cap_notch_cut#:=10pt#; % max breadth above/below uppercase notches
serif_drop#:=4/36pt#; % vertical drop of sloped serifs
stem_corr#:=1/36pt#; % for small refinements of stem breadth
vair_corr#:=1/36pt#; % for small refinements of hairline height
apex_corr#:=0pt#; % extra width at diagonal junctions
o#:=8/36pt#; % amount of overshoot for curves
apex_o#:=8/36pt#; % amount of overshoot for diagonal junctions
slant:=0; % tilt ratio $(\Delta x/\Delta y)$
fudge:=1; % factor applied to weights of heavy characters
math_spread:=0; % extra openness of math symbols
superness:=1/sqrt2; % parameter for superellipses
superpull:=1/6; % extra openness inside bowls
beak_darkness:=11/30; % fraction of triangle inside beak serifs
ligs:=2; % level of ligatures to be included
square_dots:=false; % should dots be square?
hefty:=false; % should we try hard not to be overweight?
serifs:=true; % should serifs and bulbs be attached?
monospace:=false; % should all characters have the same width?
variant_g:=true; % should an italic-style g be used?
low_asterisk:=false; % should the asterisk be centered at the axis?
math_fitting:=true; % should math-mode spacing be used?
mode_setup; font_setup;
autorounding:=0;
font_slant slant; font_x_height 0;
font_quad 18u# if not monospace:+4letter_fit# fi;
slant:=mono_charic#:=0; % the remaining characters will not be slanted
currenttransform:=identity yscaled aspect_ratio scaled granularity;
def Shaft (expr ChCode, ChWidthFrac,ChHeightFrac)=
beginchar(ChCode,ChWidthFrac*18u#,ChHeightFrac*18u#,0#);
adjust_fit(0,0); pickup crisp.nib;
x1= 0; x0=(w);
y1=-d; y0=h;
numeric theta,delta; theta=angle(z0-z1); delta=3u++.24asc_height;
if abs(theta-45)<2.5: theta:=45; y1:=y0+x1-x0; fi % near-45$^\circ$ angle
pos1(rule_thickness,90+theta); pos2(1.5rule_thickness,90+theta);
x2= w;
y2=h;
pickup pencircle scaled rule_thickness;
draw z1--z0;
penlabels(1,2); endchar;
enddef;
Shaft(0,2/5,1);
Shaft(13,1/3,1);
Shaft(26,1/4,1);
Shaft(39,1/5,1);
Shaft(52,1/6,1);
def DashedShaft (expr ChCode, ChWidthFrac, ChHeightFrac)=
beginchar(ChCode,ChWidthFrac*18u#,ChHeightFrac*18u#,0#);
adjust_fit(0,0); pickup crisp.nib;
x1= 0; x0=(w);
y1=-d; y0=h;
numeric theta,delta; theta=angle(z0-z1); delta=3u++.24asc_height;
if abs(theta-45)<2.5: theta:=45; y1:=y0+x1-x0; fi % near-45$^\circ$ angle
pos1(rule_thickness,90+theta); pos2(1.5rule_thickness,90+theta);
x2= w;
y2=h;
pickup pencircle scaled rule_thickness;
draw z1--1/6z2;
draw 2/6z2--4/6z2;
draw 5/6z2--z2;
penlabels(1,2); endchar;
enddef;
DashedShaft(1,2/5,1);
DashedShaft(14,1/3,1);
DashedShaft(27,1/4,1);
DashedShaft(40,1/5,1);
DashedShaft(53,1/6,1);
def UpperHead (expr ChCode, ChWidthFrac, ChHeightFrac)=
beginchar(ChCode,ChWidthFrac*18u#,ChHeightFrac*18u#,0#);
adjust_fit(0,0); pickup crisp.nib;
x1=0; x0=w;
y1=-d; y0=h;
numeric theta; theta=angle(z0-z1);
pos1(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir -(90+(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir -(180+(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z2l=z0;
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z3-z9}z3r---{z9-z3}z3l..z2l--cycle;
filldraw z2r..{z4-z9}z4r---{z9-z4}z4l..z2l--cycle;
endchar;
enddef;
UpperHead(2,2/5,1);
UpperHead(15,1/3,1);
UpperHead(28,1/4,1);
UpperHead(41,1/5,1);
UpperHead(54,1/6,1);
def LowerHead (expr ChCode, ChWidthFrac, ChHeightFrac)=
beginchar(ChCode,ChWidthFrac*18u#,ChHeightFrac*18u#,0#);
adjust_fit(0,0); pickup crisp.nib;
x1=w ; x0= 0;
y1=h; y0=-d;
numeric theta; theta=angle(z1-z0);
pos1(rule_thickness,-90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir (90-(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir -(45-theta) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
pos5(bar,90-(45-theta)); z5l=z0; pos6(bar,-(45-theta)); z6l=z0;
z2r=z0;
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z3-z9}z3r---{z9-z3}z3l..z2l--cycle;
filldraw z2r..{z4-z9}z4r---{z9-z4}z4l..z2l--cycle;
endchar;
enddef;
LowerHead(3,2/5,1);
LowerHead(16,1/3,1);
LowerHead(29,1/4,1);
LowerHead(42,1/5,1);
LowerHead(55,1/6,1);
def UpperTopBarb (expr ChCode, ChWidthFrac,ChHeightFrac)=
beginchar(ChCode,ChWidthFrac*18u#,ChHeightFrac*18u#,0#);
adjust_fit(0,0); pickup crisp.nib;
x1=0; x0=w;
y1=-d; y0=h;
numeric theta; theta=angle(z0-z1);
pos1(rule_thickness,90+theta);
pos0(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir -(90+(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir -(180+(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z2l=z0;
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z3-z9}z3r---{z9-z3}z3l..z2l--cycle;
filldraw z2r{dir -(90-theta)}..{z1-z0}z0l--z2l--cycle;
endchar;
enddef;
UpperTopBarb(4,2/5,1);
UpperTopBarb(17,1/3,1);
UpperTopBarb(30,1/4,1);
UpperTopBarb(43,1/5,1);
UpperTopBarb(56,1/6,1);
def UpperBotBarb (expr ChCode, ChWidthFrac,ChHeightFrac)=
beginchar(ChCode,ChWidthFrac*18u#,ChHeightFrac*18u#,0#);
adjust_fit(0,0); pickup crisp.nib;
x1=0; x0=w;
y1=-d; y0=h;
numeric theta; theta=angle(z0-z1);
pos1(rule_thickness,90+theta);
pos0(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir -(90+(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir -(180+(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z2l=z0;
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z4-z9}z4r---{z9-z4}z4l..z2l--cycle;
filldraw z2r{dir (90+theta)}..{z1-z0}z0r--z2l--cycle;
endchar;
enddef;
UpperBotBarb(5,2/5,1);
UpperBotBarb(18,1/3,1);
UpperBotBarb(31,1/4,1);
UpperBotBarb(44,1/5,1);
UpperBotBarb(57,1/6,1);
def LowerTopBarb (expr ChCode, ChWidthFrac,ChHeightFrac)=
beginchar(ChCode,ChWidthFrac*18u#,ChHeightFrac*18u#,0#);
adjust_fit(0,0); pickup crisp.nib;
x1=w ; x0=0;
y1=h; y0=-d;
numeric theta; theta=angle(z1-z0);
pos1(rule_thickness,90+theta);
pos0(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir (90-(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir -(45-theta) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
pos5(bar,90-(45-theta)); z5l=z0; pos6(bar,-(45-theta)); z6l=z0;
z2r=z0;
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z4-z9}z4r---{z9-z4}z4l..z2l--cycle;
filldraw z2l{dir -(90-theta)}..{z1-z0}z0l--z2r--cycle;
endchar;
enddef;
LowerTopBarb(6,2/5,1);
LowerTopBarb(19,1/3,1);
LowerTopBarb(32,1/4,1);
LowerTopBarb(45,1/5,1);
LowerTopBarb(58,1/6,1);
def LowerBotBarb (expr ChCode, ChWidthFrac,ChHeightFrac)=
beginchar(ChCode,ChWidthFrac*18u#,ChHeightFrac*18u#,0#);
adjust_fit(0,0); pickup crisp.nib;
x1=w ; x0=0;
y1=h; y0=-d;
numeric theta,delta;theta=angle(z1-z0);
pos1(rule_thickness,90+theta);
pos0(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir (90-(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir -(45-theta) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
pos5(bar,90-(45-theta)); z5l=z0; pos6(bar,-(45-theta)); z6l=z0;
z2r=z0;
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z3-z9}z3r---{z9-z3}z3l..z2l--cycle;
filldraw z2l{dir (90+theta)}..{z1-z0}z0r--z2r--cycle;
endchar;
enddef;
LowerBotBarb(7,2/5,1);
LowerBotBarb(20,1/3,1);
LowerBotBarb(33,1/4,1);
LowerBotBarb(46,1/5,1);
LowerBotBarb(59,1/6,1);
def LowerTopHook (expr ChCode, ChWidthFrac,ChHeightFrac)=
compute_spread(.45x_height#,.55x_height);
beginchar(ChCode,ChWidthFrac*18u#,ChHeightFrac*18u#,0#);
adjust_fit(0,0); pickup crisp.nib;
x1=(w) ; x0= 0;
y1=h; y0=-d;
numeric theta; theta=angle(z1-z0);
pos1(rule_thickness,-90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir (90+theta) xscaled spread yscaled spread;
pos5(bar,90-(45-theta)); z5l=z0; pos6(bar,-(45-theta)); z6l=z0;
z2l=z0;
z9=.381966[.5[z3,z4],z0];
pickup rule.nib;
z40= 1/2[z0,z4] + dir (180+theta) xscaled 2.5u yscaled 2.5u;
draw z0{z0-z1}..{z4-z0}z40..{z1-z0}z4;
penlabels(0,1,2,3,4,5,6,9); endchar;
enddef;
LowerTopHook(8,2/5,1);
LowerTopHook(21,1/3,1);
LowerTopHook(34,1/4,1);
LowerTopHook(47,1/5,1);
LowerTopHook(60,1/6,1);
def LowerBotHook (expr ChCode, ChWidthFrac, ChHeightFrac)=
compute_spread(.45x_height#,.55x_height);
beginchar(ChCode,ChWidthFrac*18u#,ChHeightFrac*18u#,0#);
adjust_fit(0,0); pickup crisp.nib;
x1=(w) ; x0= 0;
y1=h; y0=-d;
numeric theta; theta=angle(z1-z0);
pos1(rule_thickness,-90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir -(90-theta) xscaled spread yscaled spread;
pos5(bar,90-(45-theta)); z5l=z0; pos6(bar,-(45-theta)); z6l=z0;
z2l=z0;
z9=.381966[.5[z3,z4],z0];
z40= 1/2[z0,z4] + dir (180+theta) xscaled 2.5u yscaled 2.5u;
pickup rule.nib;
draw z0{z0-z1}..{z4-z0}z40..{z1-z0}z4;
penlabels(0,1,2,3,4,5,6,9); endchar;
enddef;
LowerBotHook(9,2/5,1);
LowerBotHook(22,1/3,1);
LowerBotHook(35,1/4,1);
LowerBotHook(48,1/5,1);
LowerBotHook(61,1/6,1);
def UpperTopHook (expr ChCode, ChWidthFrac, ChHeightFrac)=
beginchar(ChCode,ChWidthFrac*18u#,ChHeightFrac*18u#,0#);
adjust_fit(0,0); pickup crisp.nib;
x1= 0; x0=(w);
y1=-d; y0=h;
numeric theta,delta; theta=angle(z0-z1); delta=3u++.24asc_height;
if abs(theta-45)<2.5: theta:=45; y1:=y0+x1-x0; fi % near-45$^\circ$ angle
pos1(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir (90+theta) xscaled (spread) yscaled (spread);
%z3=z0+ dir -(180+(45-theta)) xscaled (delta+eps) yscaled (delta+eps);
z2r=z0;
z9=.381966[.5[z3,z4],z0];
%penstroke z2e..{z3-z9}z3e;
z40= 1/2[z0,z4] + dir theta xscaled 2.5u yscaled 2.5u;
pickup rule.nib;
draw z0{z0-z1}..{z4-z0}z40..{z1-z0}z4;
penlabels(0,1,2,3,4,5,6,9); endchar;
enddef;
UpperTopHook(10,2/5,1);
UpperTopHook(23,1/3,1);
UpperTopHook(36,1/4,1);
UpperTopHook(49,1/5,1);
UpperTopHook(62,1/6,1);
def UpperBotHook (expr ChCode, ChWidthFrac, ChHeightFrac)=
beginchar(ChCode,ChWidthFrac*18u#,ChHeightFrac*18u#,0#);
adjust_fit(0,0); pickup crisp.nib;
x1= 0; x0=(w);
y1=-d; y0=h;
numeric theta,delta; theta=angle(z0-z1); delta=3u++.24asc_height;
if abs(theta-45)<2.5: theta:=45; y1:=y0+x1-x0; fi % near-45$^\circ$ angle
pos1(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir -(90-theta) xscaled (spread) yscaled (spread);
%z3=z0+ dir -(180+(45-theta)) xscaled (delta+eps) yscaled (delta+eps);
z2r=z0;
z9=.381966[.5[z3,z4],z0];
z40= 1/2[z0,z4] + dir theta xscaled 2.5u yscaled 2.5u;
%penstroke z2e..{z3-z9}z3e;
pickup rule.nib;
draw z0{z0-z1}..{z4-z0}z40..{z1-z0}z4;
penlabels(0,1,2,3,4,5,6,9); endchar;
enddef;
UpperBotHook(11,2/5,1);
UpperBotHook(24,1/3,1);
UpperBotHook(37,1/4,1);
UpperBotHook(50,1/5,1);
UpperBotHook(63,1/6,1);
def Squiggle (expr ChCode, ChWidthFrac, ChHeightFrac)=
beginchar(ChCode,ChWidthFrac*18u#,ChHeightFrac*18u#,0#);
adjust_fit(0,0);
x0= 0; x1=(w);
y0=-d; y1=h;
numeric theta,delta; theta=angle(z1-z0);
delta=3u;
z2=.5/6[z0,z1];
z8=5.5/6[z0,z1];
z3=1/6[z0,z1] + dir (90+theta) xscaled (delta+eps) yscaled (delta+eps);
z5=3/6[z0,z1] + dir (90+theta) xscaled (delta+eps) yscaled (delta+eps);
z7=5/6[z0,z1] + dir (90+theta) xscaled (delta+eps) yscaled (delta+eps);
z4=2/6[z0,z1] + dir -(90-theta) xscaled (delta+eps) yscaled (delta+eps);
z6=4/6[z0,z1] + dir -(90-theta) xscaled (delta+eps) yscaled (delta+eps);
pickup pencircle scaled rule_thickness;
draw z0--z2--z3--z4--z5--z6--z7--z8--z1;
penlabels(1,2); endchar;
enddef;
Squiggle(12,2/5,1);
Squiggle(25,1/3,1);
Squiggle(38,1/4,1);
Squiggle(51,1/5,1);
Squiggle(64,1/6,1);
def RevShaft (expr ChCode,ChHeightFrac,ChDepthFrac)=
beginchar(ChCode,18u#,ChHeightFrac*18u#,ChDepthFrac*18u#);
adjust_fit(0,0); pickup crisp.nib;
x1= 0; x0=(w);
y1=h; y0=-d;
pickup pencircle scaled rule_thickness;
draw z1--z0;
penlabels(1,2); endchar;
enddef;
RevShaft(65,0,1/6);
RevShaft(78,0,1/5);
RevShaft(91,0,1/4);
RevShaft(104,0,1/3);
def RevDashedShaft (expr ChCode, ChHeightFrac, ChDepthFrac)=
beginchar(ChCode,18u#,ChHeightFrac*18u#,ChDepthFrac*18u#);
adjust_fit(0,0); pickup crisp.nib;
x1= 0; x0=(w);
y1=h; y0=-d;
numeric theta,delta; theta=angle(z0-z1); delta=3u++.24asc_height;
if abs(theta-45)<2.5: theta:=45; y1:=y0+x1-x0; fi % near-45$^\circ$ angle
pos1(rule_thickness,90+theta); pos2(1.5rule_thickness,90+theta);
x2= w;
y2=-d;
pickup pencircle scaled rule_thickness;
draw z1--1/6z2;
draw 2/6z2--4/6z2;
draw 5/6z2--z2;
penlabels(1,2); endchar;
enddef;
RevDashedShaft(66,0,1/6);
RevDashedShaft(79,0,1/5);
RevDashedShaft(92,0,1/4);
RevDashedShaft(105,0,1/3);
def RevUpperHead (expr ChCode, ChHeightFrac, ChDepthFrac)=
beginchar(ChCode,18u#,ChHeightFrac*18u#,ChDepthFrac*18u#);
adjust_fit(0,0); pickup crisp.nib;
x1=0; x0=w;
y1=h; y0=-d;
numeric theta; theta=angle(z0-z1);
pos1(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir -(90+(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir -(180+(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z2l=z0;
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z3-z9}z3r---{z9-z3}z3l..z2l--cycle;
filldraw z2r..{z4-z9}z4r---{z9-z4}z4l..z2l--cycle;
endchar;
enddef;
RevUpperHead(67,0,1/6);
RevUpperHead(80,0,1/5);
RevUpperHead(93,0,1/4);
RevUpperHead(106,0,1/3);
def RevLowerHead (expr ChCode, ChHeightFrac, ChDepthFrac)=
beginchar(ChCode,18u#,ChHeightFrac*18u#,ChDepthFrac*18u#);
adjust_fit(0,0); pickup crisp.nib;
x1=w ; x0= 0;
y1=-d; y0=h;
numeric theta; theta=angle(z1-z0);
pos1(rule_thickness,-90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir (90-(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir -(45-theta) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
pos5(bar,90-(45-theta)); z5l=z0; pos6(bar,-(45-theta)); z6l=z0;
z2r=z0;
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z3-z9}z3r---{z9-z3}z3l..z2l--cycle;
filldraw z2r..{z4-z9}z4r---{z9-z4}z4l..z2l--cycle;
penlabels(0,1,2,3,4,5,6,9); endchar;
enddef;
RevLowerHead(68,0,1/6);
RevLowerHead(81,0,1/5);
RevLowerHead(94,0,1/4);
RevLowerHead(107,0,1/3);
def RevUpperTopBarb (expr ChCode, ChHeightFrac, ChDepthFrac)=
beginchar(ChCode,18u#,ChHeightFrac*18u#,ChDepthFrac*18u#);
adjust_fit(0,0); pickup crisp.nib;
x1=0; x0=w;
y1=h; y0=-d;
numeric theta; theta=angle(z0-z1);
pos1(rule_thickness,90+theta);
pos0(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir -(90+(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir -(180+(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z2l=z0;
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z3-z9}z3r---{z9-z3}z3l..z2l--cycle;
filldraw z2r{dir (270+theta)}..{z1-z0}z0l--z2l--cycle;
endchar;
enddef;
RevUpperTopBarb(69,0,1/6);
RevUpperTopBarb(82,0,1/5);
RevUpperTopBarb(95,0,1/4);
RevUpperTopBarb(108,0,1/3);
def RevUpperBotBarb (expr ChCode,ChHeightFrac,ChDepthFrac)=
beginchar(ChCode,18u#,ChHeightFrac*18u#,ChDepthFrac*18u#);
adjust_fit(0,0); pickup crisp.nib;
x1=0; x0=w;
y1=h; y0=-d;
numeric theta; theta=angle(z0-z1);
pos1(rule_thickness,90+theta);
pos0(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir -(90+(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir -(180+(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z2l=z0;
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z4-z9}z4r---{z9-z4}z4l..z2l--cycle;
filldraw z2r{dir (90+theta)}..{z1-z0}z0r--z2l--cycle;
endchar;
enddef;
RevUpperBotBarb(70,0,1/6);
RevUpperBotBarb(83,0,1/5);
RevUpperBotBarb(96,0,1/4);
RevUpperBotBarb(109,0,1/3);
def RevLowerTopBarb (expr ChCode, ChHeightFrac, ChDepthFrac)=
beginchar(ChCode,18u#,ChHeightFrac*18u#,ChDepthFrac*18u#);
adjust_fit(0,0); pickup crisp.nib;
x1=w ; x0=0;
y1=-d; y0=h;
numeric theta; theta=angle(z1-z0);
pos1(rule_thickness,90+theta);
pos0(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir (90-(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir -(45-theta) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
pos5(bar,90-(45-theta)); z5l=z0; pos6(bar,-(45-theta)); z6l=z0;
z2r=z0;
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z4-z9}z4r---{z9-z4}z4l..z2l--cycle;
filldraw z2l{dir (180+90+theta)}..{z1-z0}z0l--z2r--cycle;
endchar;
enddef;
RevLowerTopBarb(71,0,1/6);
RevLowerTopBarb(84,0,1/5);
RevLowerTopBarb(97,0,1/4);
RevLowerTopBarb(110,0,1/3);
def RevLowerBotBarb (expr ChCode, ChHeightFrac,ChDepthFrac)=
beginchar(ChCode,18u#,ChHeightFrac*18u#,ChDepthFrac*18u#);
adjust_fit(0,0); pickup crisp.nib;
x1=w ; x0=0;
y1=-d; y0=h;
numeric theta,delta;theta=angle(z1-z0);
pos1(rule_thickness,90+theta);
pos0(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir (90-(45-theta)) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir -(45-theta) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
pos5(bar,90-(45-theta)); z5l=z0; pos6(bar,-(45-theta)); z6l=z0;
z2r=z0;
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z3-z9}z3r---{z9-z3}z3l..z2l--cycle;
filldraw z2l{dir (90+theta)}..{z1-z0}z0r--z2r--cycle;
endchar;
enddef;
RevLowerBotBarb(72,0,1/6);
RevLowerBotBarb(85,0,1/5);
RevLowerBotBarb(98,0,1/4);
RevLowerBotBarb(111,0,1/3);
def RevLowerTopHook (expr ChCode, ChHeightFrac, ChDepthFrac)=
compute_spread(.45x_height#,.55x_height);
beginchar(ChCode,18u#,ChHeightFrac*18u#,ChDepthFrac*18u#);
adjust_fit(0,0); pickup crisp.nib;
x1=(w) ; x0= 0;
y1=-d; y0=h;
numeric theta; theta=angle(z1-z0);
pos1(rule_thickness,-90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir (90+theta) xscaled spread yscaled spread;
pos5(bar,90-(45-theta)); z5l=z0; pos6(bar,-(45-theta)); z6l=z0;
z2l=z0;
z9=.381966[.5[z3,z4],z0];
pickup rule.nib;
z40= 1/2[z0,z4] + dir (180+theta) xscaled 2.5u yscaled 2.5u;
draw z0{z0-z1}..{z4-z0}z40..{z1-z0}z4;
endchar;
enddef;
RevLowerTopHook(73,0,1/6);
RevLowerTopHook(86,0,1/5);
RevLowerTopHook(99,0,1/4);
RevLowerTopHook(112,0,1/3);
def RevLowerBotHook (expr ChCode, ChHeightFrac, ChDepthFrac)=
compute_spread(.45x_height#,.55x_height);
beginchar(ChCode,18u#,ChHeightFrac*18u#,ChDepthFrac*18u#);
adjust_fit(0,0); pickup crisp.nib;
x1=(w) ; x0= 0;
y1=-d; y0=h;
numeric theta,delta; theta=angle(z1-z0); delta=3u++.24asc_height;
if abs(theta-45)<2.5: theta:=45; y1:=y0+x1-x0; fi % near-45$^\circ$ angle
pos1(rule_thickness,-90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir -(90-theta) xscaled spread yscaled spread;
%dir (90-theta) xscaled (delta+eps) yscaled (delta+eps);
%z3=z0+ dir -(45-theta) xscaled (delta+eps) yscaled (delta+eps);
pos5(bar,90-(45-theta)); z5l=z0; pos6(bar,-(45-theta)); z6l=z0;
z2l=z0;
z9=.381966[.5[z3,z4],z0];
z40= 1/2[z0,z4] + dir (180+theta) xscaled 2.5u yscaled 2.5u;
pickup rule.nib;
draw z0{z0-z1}..{z4-z0}z40..{z1-z0}z4;
%penstroke z2e..{z4-z9}z4e;
penlabels(0,1,2,3,4,5,6,9); endchar;
enddef;
RevLowerBotHook(74,0,1/6);
RevLowerBotHook(87,0,1/5);
RevLowerBotHook(100,0,1/4);
RevLowerBotHook(113,0,1/3);
def RevUpperTopHook (expr ChCode, ChHeightFrac, ChDepthFrac)=
beginchar(ChCode,18u#,ChHeightFrac*18u#,ChDepthFrac*18u#);
adjust_fit(0,0); pickup crisp.nib;
x1= 0; x0=(w);
y1=h; y0=-d;
numeric theta; theta=angle(z0-z1);
pos1(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir (90+theta) xscaled (spread) yscaled (spread);
z2r=z0;
z9=.381966[.5[z3,z4],z0];
z40= 1/2[z0,z4] + dir theta xscaled 2.5u yscaled 2.5u;
pickup rule.nib;
draw z0{z0-z1}..{z4-z0}z40..{z1-z0}z4;
endchar;
enddef;
RevUpperTopHook(75,0,1/6);
RevUpperTopHook(88,0,1/5);
RevUpperTopHook(101,0,1/4);
RevUpperTopHook(114,0,1/3);
def RevUpperBotHook (expr ChCode, ChHeightFrac, ChDepthFrac)=
beginchar(ChCode,18u#,ChHeightFrac*18u#,ChDepthFrac*18u#);
adjust_fit(0,0); pickup crisp.nib;
x1= 0; x0=(w);
y1=h; y0=-d;
numeric theta; theta=angle(z0-z1);
pos1(rule_thickness,90+theta);
pos2(1.5rule_thickness,theta);
pos3(bar,theta); pos4(bar,theta);
z4=z0+ dir -(90-theta) xscaled (spread) yscaled (spread);
z2r=z0;
z9=.381966[.5[z3,z4],z0];
z40= 1/2[z0,z4] + dir theta xscaled 2.5u yscaled 2.5u;
pickup rule.nib;
draw z0{z0-z1}..{z4-z0}z40..{z1-z0}z4;
penlabels(0,1,2,3,4,5,6,9); endchar;
enddef;
RevUpperBotHook(76,0,1/6);
RevUpperBotHook(89,0,1/5);
RevUpperBotHook(102,0,1/4);
RevUpperBotHook(115,0,1/3);
def RevSquiggle (expr ChCode, ChHeightFrac,ChDepthFrac)=
beginchar(ChCode,18u#,ChHeightFrac*18u#,ChDepthFrac*18u#);
adjust_fit(0,0);
x0= 0; x1=(w);
y0=h; y1=-d;
numeric theta,delta; theta=angle(z1-z0);
delta=3u;
z2=.5/6[z0,z1];
z8=5.5/6[z0,z1];
z3=1/6[z0,z1] + dir (90+theta) xscaled (delta+eps) yscaled (delta+eps);
z5=3/6[z0,z1] + dir (90+theta) xscaled (delta+eps) yscaled (delta+eps);
z7=5/6[z0,z1] + dir (90+theta) xscaled (delta+eps) yscaled (delta+eps);
z4=2/6[z0,z1] + dir -(90-theta) xscaled (delta+eps) yscaled (delta+eps);
z6=4/6[z0,z1] + dir -(90-theta) xscaled (delta+eps) yscaled (delta+eps);
pickup pencircle scaled rule_thickness;
draw z0--z2--z3--z4--z5--z6--z7--z8--z1;
penlabels(1,2); endchar;
enddef;
RevSquiggle(77,0,1/6);
RevSquiggle(90,0,1/5);
RevSquiggle(103,0,1/4);
RevSquiggle(116,0,1/3);
beginchar(117,0,0,0);
adjust_fit(0,0); pickup rule.nib;
lft x0 =0;
y0=0;
lft x2=0;
y2=y0;
pos2(1.5rule_thickness,90);
pos3(bar,90); pos4(bar,90);
z4=z0+ dir (270-45) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir (270+45) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z3-z9}z3r---{z9-z3}z3l..z2l--cycle;
filldraw z2r..{z4-z9}z4r---{z9-z4}z4l..z2l--cycle;
endchar;
beginchar(118,0,10/3pt#,0);
adjust_fit(0,0); pickup rule.nib;
lft x0 =0; y0=0;
lft x2=0; y2=y0;
pos2(1.5rule_thickness,270);
pos3(bar,270); pos4(bar,270);
z4=z0+ dir (90-45) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir (90+45) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z3-z9}z3r---{z9-z3}z3l..z2l--cycle;
filldraw z2r..{z4-z9}z4r---{z9-z4}z4l..z2l--cycle;
endchar;
beginchar(119,0,0,0);
adjust_fit(0,0); pickup rule.nib;
lft x0 =0;
y0=0;
lft x2=0;
y2=y0;
pos0(rule_thickness,0);
pos2(1.5rule_thickness,90);
pos3(bar,90); pos4(bar,80);
z4=z0+ dir (270-45) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir (270+45) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z4-z9}z4r---{z9-z4}z4l..z2l--cycle;
filldraw z2r{right}..{down}z0r--z2l--cycle;
endchar;
beginchar(120,0,0,0);
adjust_fit(0,0); pickup rule.nib;
lft x0 =0;
y0=0;
lft x2=0;
y2=0;
pos0(rule_thickness,0);
pos2(1.5rule_thickness,90);
pos3(bar,90); pos4(bar,80);
z4=z0+ dir (270-45) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z3=z0+ dir (270+45) scaled ((3u++.24asc_height)+eps-rule_thickness-.5crisp.breadth);
z9=.381966[.5[z3,z4],z0];
pickup crisp.nib;
filldraw z2r..{z3-z9}z3r---{z9-z3}z3l..z2l--cycle;
filldraw z2r{left}..{down}z0l--z2l--cycle;
endchar;
compute_spread(.45x_height#,.55x_height);
beginchar(121,0,10/3pt#,0#);
adjust_fit(0,0); pickup rule.nib;
lft x0=0;
y0=0;
z4=z0+ dir 180 xscaled spread yscaled spread;
pickup rule.nib;
top z40= 1/2[z0,z4] + dir 90 xscaled 2.5u yscaled 2.5u;
draw z0{up}..{z4-z0}z40..{down}z4;
penlabels(0,1,2,3,4,5,6,9); endchar;
compute_spread(.45x_height#,.55x_height);
beginchar(122,0,10/3pt#,0#);
adjust_fit(0,0); pickup rule.nib;
lft x0=0;
y0=0;
z4=z0- dir 180 xscaled spread yscaled spread;
pickup rule.nib;
top z40= 1/2[z0,z4] + dir 90 xscaled 2.5u yscaled 2.5u;
draw z0{up}..{z4-z0}z40..{down}z4;
penlabels(0,1,2,3,4,5,6,9); endchar;
beginchar(123,0,18u#,0#);
adjust_fit(0,0);
pickup rule.nib;
lft x0=lft x1=0;
y0=-d; y1=h;
numeric theta,delta; theta=angle(z1-z0);
delta=3u;
z2=.5/6[z0,z1];
z8=5.5/6[z0,z1];
z3=1/6[z0,z1] + dir (90+theta) xscaled (delta+eps) yscaled (delta+eps);
z5=3/6[z0,z1] + dir (90+theta) xscaled (delta+eps) yscaled (delta+eps);
z7=5/6[z0,z1] + dir (90+theta) xscaled (delta+eps) yscaled (delta+eps);
z4=2/6[z0,z1] + dir -(90-theta) xscaled (delta+eps) yscaled (delta+eps);
z6=4/6[z0,z1] + dir -(90-theta) xscaled (delta+eps) yscaled (delta+eps);
pickup pencircle scaled rule_thickness;
draw z0--z2--z3--z4--z5--z6--z7--z8--z1;
penlabels(1,2); endchar;
bye. (3u++.24asc_height)+eps-rule_thickness
|