-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathblute.mf
2020 lines (1999 loc) · 48.9 KB
/
blute.mf
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
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%
% a new font
% (well - actually an old ren. font hacked to baroque!)
% May 17 95
%
mid_bar#:=7/13cap#;
define_good_y_pixels(mid_bar);
%v_bar#:=3/10em#;
v_bar#:=1/10em#;
define_good_x_pixels(v_bar);
flag_top#:=3em#;
define_good_y_pixels(flag_top);
%
pickup pencircle scaled 0.5wid;
tiny_circle := savepen;
%
% pickup pencircle xscaled 1.8wid yscaled .9 wid rotated 45;
% pickup pencircle xscaled 1.62wid yscaled .81 wid rotated 45;
% pickup pencircle xscaled 1.44wid yscaled .72 wid rotated 45;
pickup pencircle xscaled 1.44wid yscaled .62 wid rotated 45;
% pickup pencircle xscaled 1.44wid# yscaled .62 wid# rotated 45;
lute_pen := savepen;
% pickup pencircle xscaled .9wid yscaled .4 wid rotated 45;
% pickup pencircle xscaled .81wid yscaled .36 wid rotated 45;
pickup pencircle xscaled .72wid yscaled .32 wid rotated 45;
lute_test := savepen;
% pickup pencircle xscaled 2wid yscaled 1wid rotated 50;
% pickup pencircle xscaled 1.8wid yscaled .9wid rotated 50;
pickup pencircle xscaled 1.6wid yscaled .8wid rotated 50;
bigger_lute_pen := savepen;
% pickup pencircle xscaled 1.5wid yscaled .7 wid rotated 45;
% pickup pencircle xscaled 1.35wid yscaled .63 wid rotated 45;
pickup pencircle xscaled 1.20wid yscaled .56 wid rotated 45;
flag_pen := savepen;
% pickup pencircle xscaled .3wid yscaled .1 rotated 50;
% pickup pencircle xscaled .27wid yscaled .09 rotated 50;
pickup pencircle xscaled .24wid yscaled .08 rotated 50;
stem_pen := savepen;
%
def do_v_bar =
pickup lute_pen;x3 = x4 = v_bar;top y3 = h;top y4 = 0;
draw z3..z4;
enddef;
%
def do_box =
beginchar (0, em#, 1.0cap#, .3cap#); "em quad";
pickup pencircle xscaled .3wid yscaled .3wid;
x1=x4=0w;x2=x3=w;
y1=y2=0h;y3=y4=h;
x5=x1;y5=-d;
x6=x2;y6=-d;
draw z1..z2;draw z2..z3; draw z3..z4; draw z4..z1;
draw z5..z6;
endchar;enddef;
%
%def do_nothing =
%beginchar (0, em#, 1.0cap#, 0); "nothing";
%endchar;enddef;
%
% FLAGS
%
def do_whole =
beginchar ("W", 1.15em#, 1.0cap#, 0);" whole note";
pickup pencircle xscaled 1.45 wid yscaled .3 wid rotated 5;
x0=0.13w;x1=.88w;
y0=0.28h;y1=.358h;
draw z0..tension 1.13..z1..tension 1.13..cycle;
endchar;enddef;
%
def do_half =
beginchar ("w", .85em#, 1.0cap#, 0);" half note";
% pickup pencircle xscaled 1.9 wid yscaled .9 wid rotated 7;
x2=0.14w;x1=.5w;x0=.92w;
y2=0.3h; y1=.57h;y0=.66h;
x3=x1;y3=0.03h;
x4=x0;y4=.35h;
x5=x0;y5=2.1h;
penpos0(.8wid, 40);
penpos1(1.1wid, 90);
penpos2(1.5wid, 180);
penpos3(.9wid, 250);
penpos4(1.1wid, 350);
penpos5(1.1wid, 350);
penstroke z0e..tension 1.03..z1e..tension 1.03..z2e..z3e..z4e..tension 6..z5e;
endchar;enddef;
%
def do_long =
beginchar ("L", 2.4em#, 1.0cap#, -cap#);" a long";
pickup pencircle xscaled .2wid yscaled 1.8wid;
x0=x2=0w; x1=x3=1w;
top y0=top y1=.8h;bot y2=bot y3=0.1h;
draw z0..z1; draw z2..z3;
pickup pencircle xscaled .4wid yscaled .2wid;
x4=x5=0w; x6=x7=w;
y4=-.1h;y6=d; y5=y7=1h;
draw z4..z5; draw z6..z7;
endchar;enddef;
def do_breve =
beginchar ("J", 1.2em#, 1.0cap#, 0);" a breve";
pickup pencircle xscaled .2wid yscaled 1.8wid;
x0=x2=0w; x1=x3=1w;
top y0=top y1=.8h;bot y2=bot y3=0.1h;
draw z0..z1; draw z2..z3;
pickup pencircle xscaled .4wid yscaled .2wid;
x4=x5=0w; x6=x7=w;
y4=y6=-.1h; y5=y7=1h;
draw z4..z5; draw z6..z7;
endchar;enddef;
%
%
def do_open =
beginchar (212, em#, 1.0cap#, 0);" modern whole note body";
pickup pencircle xscaled 1.2 wid yscaled .5 wid rotated 7;
x2=0.14w;x1=.5w;x0=.88w;
y2=0.3h; y1=.67h;y0=.47h;
x3=x1;y3=0.0h;
penpos0(.9wid, 20);
penpos1(.8wid, 90);
penpos2(1.3wid, 180);
penpos3(1.1wid, 210);
penstroke z0e..tension 1.03..z1e..tension 1.03..z2e..z3e..cycle;
endchar;enddef;
%
%
%
def do_line =
beginchar (194, em#, 2.1cap#, 0);" no flags";
pickup stem_pen;
do_v_bar;
endchar;enddef;
%
def do_one =
beginchar (195, 2.3em#, 2.0cap#, 0);" one flag";
pickup flag_pen;
bot x1=0.07w;y1=0h;
lft x4=0;y4=.17h;
x2=.63w; top y2=h;
rt x3=w; y3=.65h;
x5=x3-.08w;y5=y3-.12h;
draw z1..z4{dir 85 }..tension 1.05..z2..z3..{dir 240}z5;
endchar;enddef;
%
def do_two =
beginchar (196, 1.8em#, 1.8cap#, 0);" two flags";
pickup flag_pen;
lft x1=0w;bot y1=0h;
% lft x4=0;y4=.17h;
x2=.38w; top y2=h;
rt x3=.6w; y3=.5h;
rt x5=w;y5=.28h;
x6=.87w;y6=.2h;
x7=.9w;y7=.16h;
draw z1{up}..tension 1.3..z2..{dir 227}z3;
draw z3{dir 47}..z5..{dir 245}z6;%..z7;
endchar;enddef;
%
def do_three =
beginchar (197, 2em#, 1.6cap#, 0);" three flags";
pickup flag_pen;
bot x1=0.07w;y1=0h;
lft x4=0;y4=.17h;
x2=.34w; top y2=h;
rt x3=.58w; y3=.5h;
rt x5=.9w;y5=.28h;
x6=.78w;y6=.17h;
rt x7=w;y7=.15h;
x8=.93w;y8=-.1h;
draw z1..tension .97..z4{dir 87}..tension 1.01..z2..z3;
draw z3..z5..{dir 255}z6;
draw z6..z7..z8;
endchar;enddef;
%
def do_four =
beginchar (198, .85em#, 2.1cap#, 0);" four flags";
endchar;enddef;
%
def do_five =
beginchar (199, .8em#, 2.1cap#, 0);" five flags";
endchar;enddef;
%
% "modern" notes
%
%
def do_note_body =
x1=w; y1=.63w; % right side
lft x5=0.0w;y5=0.63w; % left side
x6=.4w;y6=0; % bottom
x7=.5w;y7=1.05w; % top
rt x8=w; y8=y7+.18w;
fill z8{dir 200}..z7..tension 1.06..z5..tension 1.02..z6..z1..z8{up}..cycle;
pickup pencircle scaled .9 wid;
rt x2=w;y2=h;
x3=x2;y3=y1 + .21w;
draw z3..z2; % stem
% labels(1,2);
enddef;
%
def do_solid =
beginchar (202, .72em#, 2.1cap#, 0);" quarter note";
do_note_body;
endchar;enddef;
%
def do_flg(suffix $)(expr the_top) =
pickup pencircle xscaled 1.4wid yscaled .7 wid rotated 45;
x$1=.95w;x$2=1.8w;top y$1=the_top;y$2=y$1 - 13/30h;
draw z$1{dir 250}..tension 1.4..{dir 250}z$2;
enddef;
%
def do_solid_o =
beginchar (203, .7em#, 2.1cap#, 0);" eighth note";
do_note_body;
do_flg(2, h);endchar;enddef;
%
def do_solid_oo =
beginchar (204, .7em#, 2.1cap#, 0);" sixteenth note";
do_note_body;
do_flg(1, h); do_flg(2, .8h);
endchar;enddef;
%
def do_solid_ooo =
beginchar (205, .7em#, 2.1cap#, 0);" thirty second note";
do_note_body;
do_flg(1, h);
do_flg(2, .8h); do_flg(3, .6h);
endchar;enddef;
%
def do_solid_oooo =
beginchar (206, .7em#, 2.1cap#, 0);" sixty fourth note";
do_note_body;
do_flg(1, h);
do_flg(2, .83h); do_flg(3, .66h);do_flg(4, .49h);
endchar;enddef;
%
def do_solid_ooooo =
beginchar (207, .7em#, 2.1cap#, 0);" 128 note";
do_note_body;
do_flg(1, h);
do_flg(2, .83h); do_flg(3, .66h);do_flg(4, .49h);
do_flg(5, .33h);
endchar;enddef;
%
%
%
% END FLAGS
%
% LETTERS
%
def do_a =
beginchar ("a", em#, 1.0cap#, 0);"letter a";
pickup lute_pen;
rt x1= w;y1=.73h;
x11=x1-.11w;y11=.8h;
x2=.3w;bot y2=-0.03h;
lft x3=0w;y3=.2h;
x4=x1;y4=y1-.05h;
rt x5= w;y5=.2h;
lft x6= w;bot y6=-0.04h;
draw z4{dir 260}..{left}z2..tension 1.3..
z3..tension 1.4..{right}z11..z1
&z1..tension 2..z5..z6;
endchar;enddef;
%
def do_b =
beginchar ("b", .7em#, 1.0cap#, 0);"letter b";
pickup lute_pen;
x2=2.5w;y2=1.8h;
x1=x2+.1w;y1=1.56h;
x3=.5w;y3=1.2h;
lft x4=0;y4=.5h;
x7=.5w;bot y7=0;
rt x5=w;y5=y4;
x6=x4+.2w;y6=.55h;
draw z1{dir 70}..z2..tension 1.7..z4..z7..z5..z6;
endchar;enddef;
%
def do_c =
beginchar ("c", 1.35em#, 1.0cap#, 0);"letter c";
pickup lute_pen;
lft x1=-.03w;y1=.6h;
x2=x1+.03w;y2=y1-.05h;
x3=x2;y3=0;
x4=.57w;y4=.7h;
rt x5=w;y5=.83h;
x6=x5+.03w;y6=y5-.03h;
draw z1..z2..tension 4..z3&z3{dir 55}..z4..{right}z5..z6;
endchar;enddef;
%
def do_d =
beginchar ("d", .95em#, 1.0cap#, 0);"letter d";
pickup lute_pen;
rt x1=w;y1=.55h;
x2=.43w;bot y2=0;
lft x5=0w;y5=.3h;
x6=.7w;y6=.73h;
x7=0w;top y7=1.6h;
x8=-1.3w;y8=.6h;
draw z8{up}..z7..z1{down}..z2..tension 1.1..z5..tension 1.2..z6;
endchar;enddef;
%
def do_D =
beginchar ("D", .9em#, 1.0cap#, 1.0cap#);"letter D bent over";
pickup lute_pen;
x10=-.2w;y10=-d;
x9=-1.3w;y9=0d;
% x8=-.3w;y8=.5h;
x7=0w;top y7=.9h;
rt x1=w;y1=.55h;
x2=.33w;bot y2=0;
lft x5=0;y5=.3h;
x6=.7w;y6=.73h;
x11=x10-.1w;y11=y10+.1h;
draw z11{down}..z10{dir 160}..z9..z7..
z1{down}..z2..tension 1.1..z5..tension 1.2..z6;
endchar;enddef;
%
def do_DD =
beginchar ("z", .9em#, 1.0cap#, 1.0cap#);"letter D bent over";
pickup lute_pen;
x9=-1.7w;y9=.02h;
% x8=-.3w;y8=.5h;
x7=0w;top y7=.9h;
rt x1=w;y1=.55h;
x2=.33w;bot y2=0;
lft x5=0;y5=.3h;
x6=.7w;y6=.73h;
draw z9{dir 40}..z7..
z1{down}..z2..tension 1.1..z5..tension 1.2..z6;
endchar;enddef;
%
def do_e =
beginchar ("e", 1.6em#, cap#, 0);"letter e";
pickup bigger_lute_pen;
x1=.27w;y1=.1h;
x2=.57w;y2=9/13h;
x4=w;y4=.45h;
draw z1..tension 2.5..z2;draw z2..tension 0.9..z1..tension 1.2..z4;
endchar;enddef;
%
def do_E =
beginchar ("E", .8em#, 1.0cap#, 0.2cap#);"saiznay letter e";
pickup lute_pen;
x1=.17w;top y1=-d;
lft x2=.07w;y2=.4h;
x3=.67w;top y3=.84h;
rt x4=w;y4=.3h;
x6=-.2w;y6=-.8d;
x7=-.7w;y7=-d;
x8=-.8w;y8=0;
x9=-.8w;y9=.63h;
x10=-.7w;y10=y9+.03h;
draw z1..z2..z3..z4..tension 1.4..z6..{left}z7..z9..z10;
endchar;enddef;
%
def do_f =
beginchar ("f", 1.2em#, cap#, .6cap#);"letter f";
% beginchar ("f", .5em#, .5cap#, .38cap#);"letter f";
% pickup pencircle xscaled 1.6wid yscaled .6wid rotated 30;
pickup lute_pen;
% pickup pencircle xscaled .8wid yscaled .3 wid rotated 45;
x1=0w;y1=.65h;
x2=.8w;y2=y1-.35h;
x5=-.5w;y3=y5=-.87d; % -.7h;
x3=-.1w;
rt x4=1.1w;y4=1.685h;
x6=x4+.4w;y6=y4;
draw z1..tension 2.5..z2;draw z5..z3..tension 3.0..z4..z6;
endchar;enddef;
%
def do_F =
% beginchar ("F", em#, 1.0cap#, 2cap#);"letter F";
beginchar ("F", em#, 1.0cap#, 2cap#);"letter F";
pickup pencircle xscaled 1.4wid yscaled.4wid rotated 40;
x1=-.15w;y1=.95h;
x2=.6w;y2=.68h;
x3=.4w; y3=.325h;
x6=.9w;y6=.15h;
x4=w;y4=.0h;
x5=x1;y5=-d;%-2h;
draw z1..tension 3..z2..z3..tension 3..z6..z4;
pickup pencircle xscaled .8wid yscaled .3wid rotated 30;
draw z1..z5;
endchar;enddef;
%
def do_med_f =
beginchar (214, 1.3em#, cap#, .4cap#);"letter medium f";
pickup lute_pen;
% crossbar
x1=0w;y1=.65h;
x2=.8w;y2=y1-.35h;
% body
x5=-.57w;y3=y5=-.87d;
x3=-.1w;
rt x4=1.1w;y4=1.21h;
x6=x4+.4w;y6=y4;
draw z1..tension 2.5..z2;draw z5..z3..tension 3.0..z4..z6;
endchar;enddef;
%
%
def do_short_f =
beginchar (213, 1.4em#, cap#, .6cap#);"letter squat f";
pickup lute_pen;
x1=0w;y1=.65h;
x2=.8w;y2=y1-.35h;
% x5=-.5w;y3=y5=-.87d;
x5=-.7w;y3=y5=-.07d;
x3=-.1w;
% rt x4=1.1w;y4=1.685h;
rt x4=1.17w;y4=0.960h;
x6=x4+.4w;y6=y4;
draw z1..tension 2.5..z2;draw z5..z3..tension 3.0..z4..z6;
endchar;enddef;
%
def do_G =
beginchar ("G", .9em#, 1.0cap#, 1.0cap#);"letter G slanted";
pickup lute_pen;
x0=.7w;bot y0=.03h;
x1=.19w;bot y1=y0;
lft x2=0w;y2=.33h;
x3=.4w;top y3=.76h;
x4=w;y4=.67h;
x6=.5w;y6=-.2d;
x7=-1.1w;y7=-.5d;
x8=-.8w;y8=-.6d;
draw z0..z1..z2..tension 1.2..z3..z4&z4..tension 1.1..z6..z8..z7;
endchar;enddef;
%
def do_g =
beginchar ("g", .9em#, 1.0cap#, cap#);"letter g";
pickup lute_pen;
x0=.8w;bot y0=.03h;
x1=.19w;bot y1=y0;
lft x2=0w;y2=.33h;
x3=.4w;top y3=.76h;
rt x4=w;y4=.67h;
x6=.4w;y6=-.8d;
x7=-.5w;y7=-.8d;
x8=-.1w;y8=-d;
draw z0..z1..z2..tension 1.2..z3..z4&z4..tension 1.3..z6..z8..z7;
endchar;enddef;
%
def do_h =
beginchar ("h",.92em#, cap#, -cap#);"the letter h";
pickup lute_pen;
lft x1=0.7w; y1=1.53h;
lft x2=0;bot y2=0;
z3 = .25[z2,z1];
rt x4=w; y4=y3;
x5 = .75w; bot y5=0;
x6 = w;y6=.1h;
x7=.7[x2,x1]+.3w;y7=.7[y2,y1];
draw z7{dir 40}..z1..tension 5..z2;
draw z3..z4..{dir 300}z5..z6;
endchar;enddef;
%
def do_H =
beginchar ("H", 1.3em#, 1.0cap#, -cap#);"the letter H";
pickup lute_pen;
pickup pencircle xscaled 1.8wid yscaled .9 wid rotated 5;
rt x1=1.12w; y1=1.55h;
lft x2=0.0w;bot y2=0;
z3 = .25[z2,z1];
rt x4=w; y4=y3;
lft x5 = 0w; bot y5=d;
x7=.7[x2,x1]+.3w;y7=.7[y2,y1];
draw z1{dir 230}..tension 4..z2..tension 2..z4
..tension 4.5..{dir 250}z5;
% x1=0;y1=.2h; x2=.8w;y2=.6h;
% x3=.1w;y3=0; x4=.4w;y4=.3d;
% x5=.15w;y5=d; x6=x7=w;y6=y5;
% y7=.8d;
% x8=x7;y8=.3d;
% draw z1..tension 1.9..z2..z1{dir 270}..z3{dir 25}..z4..z5..z6..z7..z8;
endchar;enddef;
%
def do_i =
beginchar ("i",.9em#, 1.0cap#, 0);"the letter i";
pickup pencircle xscaled 1.52 wid yscaled .4 wid rotated 30;;
pickup lute_pen;
x2=.3 w;
x1=.75w;
x3=x4=x1+.14w;
y1=.65h;bot y2=-.02h;
x5=.2w; y5=.7y1;
x6=.8w;y6=y2 + .06h;
y3=y1+.35h;y4=y3-.1h;
draw z5{dir 60}..tension 2..z1..tension 4..z2..tension 3..{dir 110}z6;
draw z3..z4;
endchar;enddef;
%
%
def do_j =
beginchar ("j",.7em#, 1.0cap#, 0);"the letter j";
pickup lute_pen;
x2=.25w;
x1=x3=x4=x5=.5w;
y1=.5h;y2=-.5h;y5=0h;
y3=.8h;y4=.7h;
draw z1..tension 2..z5..{dir 220}z2;draw z3..z4;
endchar;enddef;
%
def do_k =
% beginchar ("k",1.3em#, 1.3cap#, .35cap#);"the letter k";
beginchar ("k",1.1em#, 1.0cap#, .35cap#);"the letter k";
pickup lute_pen;
x1=0w; bot y1=-d;
lft x2=.23w;y2=h;
x3=.6[x6,x2];y3=.42h;
rt x4=.95w;top y4=h;
rt x5=w;bot y5=-d;
x6= x2/3;y6=.1h;
draw z1..z6..tension 4..z3..tension 4..z2;
draw z4..{dir 205}z3&z3{right} ..{right}z5;
endchar;enddef;
%
def do_l =
beginchar ("l", em#, 1.0cap#, 0);"the letter l";
pickup lute_pen;
lft x1=0;bot y1=0;
x2=.55w;y2=.4h;
x3=w;y3=1.8h;
z4=.5[z2,z3];
x7=x4-.2w;y7=.9h;x8=x4+.15w;y8=y7;
lft x9=w;y9=y5+.2h;
rt x5=w; y5=y1;
draw z1{dir 10}..z2..z8..z3&z3..z7..z2..{dir 350}z5..z9;
endchar;enddef;
%
% here is a proposed new l, more centered, shorter
%def do_l =
%beginchar ("l", 1.0em#, 1.0cap#, 0);"the letter l";
% pickup lute_pen;
% x1=-.18w;bot y1=0;
% x2=.19w;y2=.32h;
% x3=.51w;y3=1.54h;
% z4=.5[z2,z3];
% x7=0.12w ;y7=.4y3;
% x8=.59w;y8=y7;
% rt x9=w;y9=y5+.2h;
% rt x5=.91w; y5=y1;
% draw z1{dir 10}..z2..tension .92..z3&z3..z7..z2..z5..z9;
% draw z0..tension2..z1{dir 10}..z2..z8..z3&z3..z7..z2..{dir 350}z5..z9;
%endchar;enddef;
%
def do_m =
beginchar ("m", 1.2em#, 1.0cap#, 0);"the letter m";
pickup pencircle xscaled 1.5wid yscaled .3 wid rotated 50;
pickup lute_pen;
lft x1=0;y1=.62h;
lft x2=.08w;y2=mid_bar-.05h;
rt x6=w;y6=y1;
x22=x2;y22=y6;
x3=x2; bot y3=0;
x4=.5[x2,x6];y4=y2;
x44=x4;y44=y6;
x5=x4;y5=y3;
x66=x6;y66=y44;
x7=x6;y7=y3;
draw z1..z22..tension 4..z3;
draw z2{dir 60}..tension 1.2..z44..tension 4..z5;
draw z4{dir 60}..tension 1.2..z66..tension 4..z7;
endchar;enddef;
%
def do_n =
beginchar ("n", .7em#, 1.0cap#, 0);"the letter n";
pickup pencircle xscaled 1.5wid yscaled .3 wid rotated 50;
pickup lute_pen;
lft x1=0;y1=.62h;
lft x2=.08w;y2=mid_bar-.05h;
rt x6=w;y6=y1;
x22=x2;y22=y6;
x3=x2; bot y3=0;
rt x4=w;y4=y2;
x44=x4;y44=y6;
x5=x4;y5=y3;
draw z1..z22..tension 4..z3;
draw z2{dir 60}..tension 1.7..z44..tension 4..z5;
endchar;enddef;
%
def do_o =
beginchar ("o", .9em#, 1.0cap#, 0);"the letter o";
pickup lute_pen;
x1=0; x2=w;
y1=y2=.4h;
draw z1..z2..cycle;
endchar;enddef;
%
def do_p =
beginchar ("p", .7em#, 1.0cap#, .6cap#);"the letter p";
pickup lute_pen;
x1=0;y1=.5h;
x2=0;y2=-d;%-.6h;
x3=w;y3=.5h;
draw z1..z3..z1..tension 4..z2;
endchar;enddef;
%
% END LETTERS
%
% DOTS
%
%
if unknown dw: dw# = 1.3wid#;fi;
define_blacker_pixels(dw);
def my_dot(suffix $)(expr wid)(expr hi) =
fill fullcircle scaled dw shifted (wid, hi);
enddef;
%
def s_dot(suffix $)(expr wid)(expr hi) =
x$1=wid -.10w;x$2=x$4=wid;x$3=wid +.10w;
y$1=y$3= hi;y$2= hi-.09h;y$4= hi+.09h;
fill z$1..z$2..z$3..z$4..cycle;
enddef;
%
% a dot centered on the left boundary
%
def do_c_dot = % used in repeats and for ornaments
beginchar ("Z", 1.0cap#, 1.0cap#, 0);"a left centered dot";
my_dot(1, 0.0w, 0.5h);
endchar;enddef;
%
%
def do_dot = % for fingerings and dotted flags
beginchar (".", 1.0cap#, 1.0cap#, 0);"a dot";
my_dot(1, 0.3w, 0.5h);
endchar;enddef;
%
def do_two_dot =
beginchar (":", em#, 1.0cap#, 0);"two dots";
my_dot(1, 0.6w, 0.5h);
my_dot(2, 0.1w, 0.5h);
endchar;enddef;
%
def do_three_dot =
beginchar (";", em#, 1.0cap#, 0);"three dots";
my_dot(1, 0.6w, 0.4h);
my_dot(2, 0.1w, 0.4h);
my_dot(3, 0.35w, 0.7h);
endchar;enddef;
%
def do_four_dot =
beginchar ("$", em#, 1.0cap#, 0);"three dots";
my_dot(1, 0.6w, 0.15h);
my_dot(2, 0.1w, 0.15h);
my_dot(3, 0.6w, 0.45h);
my_dot(4, 0.1w, 0.45h);
endchar;enddef;
%
def do_thumb =
beginchar ("|", em#, 1.0cap#, 0);"|";
% pickup pencircle xscaled 1.2wid yscaled 1.2wid;
x1=.5w;x2=x1;
y1=-.5h;y2=.7h;
x0=x1+.04w; y0=y2+.07h;
penpos0(.7wid, 330);
penpos2(1.5wid, 0);
penpos1(1.wid, 20);
penstroke z0e..tension 2..z2e..tension 5 ..z1e;
% % MP 03sep19 made lighter and smaller
% pickup pencircle xscaled 0.9wid yscaled 0.9wid rotated 45;
% x1 = 0.5w; x2 = x1;
% y1 =-0.5h; y2 = 0.4h;
% draw z2..z1;
endchar;enddef;
%
def c_body(expr thick) =
% pickup pencircle xscaled 1.6 yscaled .4wid rotated 20;
x0=1.05w;y0=.73h;
rt x1=.97w;rt x4=w;
y1=.62h;
y2=.6h;
y3=.4h;
y4=.36h;
x2=x3=.15w;
x5=x6=.5w; top y5=.8h;bot y6=.2h;
lft x7=0; y7=.5h;
% draw z0{dir 235}..z1;
% draw z1{dir 110}..z5..z2..z3..z6..{dir 65}z4;
penpos0(1.wid, 25);
penpos1(thick, 25);
penpos2(thick, 135);
penpos3(thick, 225);
penpos4(thick, 315);
penpos5(.5wid, 90);
penpos6(.6wid, 270);
penstroke z0e{dir 240}..z1e;
penstroke z1e..z5e..z2e..z3e..z6e..{dir 65}z4e;
enddef;
%
def do_C =
beginchar ("U", 1.5em#, 2.2cap#, 0);"C";
c_body(1.6 wid);
endchar;enddef;
%
def do_big_C =
beginchar (19, 2.15em#, 3.5cap#, 0);"C";
c_body(1.9wid);
endchar;enddef;
%
def do_big_cut_C =
beginchar (20, 2.15em#, 3.5cap#, 0);"Cut time";
c_body(1.9wid);
pickup pencircle xscaled 1.2wid yscaled .3wid rotated 45;
x15=x16=.57w;
bot y15=0h;top y16=h;
draw z15..z16;
endchar;enddef;
%
def do_cut_C =
beginchar ("u", 1.5em#, 2.2cap#, 0);"Cut time";
c_body(1.6wid);
pickup pencircle xscaled 1.3wid yscaled .3wid rotated 45;
x15=x16=.57w;
bot y15=0h;top y16=h;
draw z15..z16;
endchar;enddef;
%
def do_fermata =
beginchar ("Y", 3em#, 3em#, 0);"a fermata";
pickup pencircle scaled 2.2 wid;
x1=.5w;y1=.5h;
draw z1;
x2=0w; y2=.5h;
x3=.5w;y3=h;
x4=w;y4=y2;
pickup pencircle xscaled 2.2 wid yscaled 1.0 wid rotated 35;
draw z2..z3..z4;
endchar;enddef;
%
def do_b_fermata =
%beginchar ("y", 1.0cap#, 1.0cap#, 0);"a fermata like M Board made";
beginchar ("y", .3in#, .3in#, 0);"a fermata like M Board made";
pickup pencircle scaled 2.2 wid;
x1=.5w;y1=.5h;
draw z1;
x2=0w; y2=.5h;
x3=.5w;y3=h;
x4=w;y4=y2;
x5=x3;y5=0h;
pickup pencircle xscaled 2.2 wid yscaled 1.0 wid rotated 35;
penpos5(.5 wid,45);penpos2(.6 wid,0);penpos3(2.0 wid ,300);penpos4(2.9 wid,230);
penstroke z5e..z2e..z3e..z4e;
endchar;enddef;
%
def do_tail =
beginchar ("Q", 0.5in#, 5.4cap#, 0);"a tail";
pickup pencircle xscaled .7wid yscaled .3 wid rotated 20;
thin_pen := savepen;
pickup pencircle xscaled 1.8wid yscaled .3 wid rotated 40;
thick_pen := savepen;
x1=0;y1=0;
x2=.15w;y2=h;
x3=.3w;y3=.16h;
x4=.46w;y4=.85h;
x5=.59w;y5=.33h;
x6=.66w;y6=.65h;
x7=.72w;y7=.45h;
x8=.92w;y8=.54h;
x12=w;y12=.7h;
pickup thin_pen;
draw z1{dir 60}..tension 7..{dir 0}z2;
pickup thick_pen;
draw z2{dir 0}..tension 7..{dir 0}z3;
pickup thin_pen;
draw z3{dir 0}..tension 5..{dir 0}z4;
pickup thick_pen;
draw z4{dir 0}..tension 5..{dir 0}z5;
pickup thin_pen;
draw z5{dir 0}..tension 5..{dir 0}z6;
pickup thick_pen;
draw z6{dir 0}..tension 5..{dir 0}z7..
z8...z12;
endchar;enddef;
%
def do_another_tail =
beginchar ("q", 5em#, 5.4cap#, 0);"another tail";
pickup pencircle xscaled 1.7wid yscaled .3wid rotated 40;
x1=0;y1=0;
x2=.15w;y2=h;
x3=.3w;y3=.2h;
x4=.45w;y4=.8h;
x5=.6w;y5=.4h;
x6=.7w;y6=.6h;
draw z1{dir 90}..tension 6..z2..tension 6..z3..tension 6..z4..tension 6..z5..tension 6..z6;
endchar;enddef;
%
%
def do_mes_tail =
beginchar (191, 5em#, 6.2cap#, 0);"Mesangeaus tail";
%beginchar (191, .7em#, .6cap#, 0);"Mesangeaus tail";
pickup pencircle xscaled 1.7wid yscaled .3wid rotated 40;
% pickup pencircle xscaled .22wid yscaled .06wid rotated 40;
x0=0;y0=1.05h;
x1=0;y1=0;
x2=.17w;y2=h;
x3=.2w;y3=0;
x4=.5w;y4=.8h;
x5=.55w;y5=.32h;
x6=.7w;y6=.7h;
x7=.78w;y7=.45h;
x8=.95w;y8=.56h;
x9=1.08w;y9=.2h;
draw z0..z1;
draw z1{dir 90}..tension 6..z2..tension 8..{down}z3;
draw z3{up}..tension 6..z4{dir 250}..tension 1.3..{dir 20}z5
..tension 1.5..{up}z6;
draw z6{dir 260}..tension 1.3..z7..{right}z8{down}..z9;
endchar;enddef;
%
def do_hold =
beginchar ("V", 5em#, 5.4cap#, 0);"hold the last note";
pickup lute_pen;
endchar;enddef;
%
% ORNAMENTS
%
def do_relish_a=
beginchar ("#", em#, 1.0cap#, 0);"a hash relish";
pickup lute_pen;
x1=x2=.35w;
x3=x4=.65w;
y1=y3=.8h;
y2=y4=.2h;
x5=x7=.2w;
x6=x8=.8w;
y5=y6=.35h;
y7=y8=.65h;
draw z1..z2;draw z3..z4;
draw z5..z6;draw z7..z8;
endchar;enddef;
%
def do_flat =
beginchar ("?", .55em#, 1.0cap#, 0);"a flat char";
pickup lute_pen;
lft x0=lft x1=0;
y0=0h;y1=1.5h;
draw z0..z1;
lft x2=x0;y2=.5h;
rt x3=.9w;y3=.21h;
pickup pencircle xscaled 1.3wid yscaled .5wid rotated 20;
draw z2{dir 45}..z3.. {dir 220}z0;
endchar;enddef;
%
def do_f_flat =
beginchar (">", .75em#, 1.0cap#, 0);"a wierd flat char";
pickup pencircle xscaled 1.1wid yscaled .3wid rotated 30;
x0=x1=.2w;
y0=-.1h;y1=2.2h;
x6=-0.8w;y6=y1;
fill z1..tension 1.2..z6..tension 1.2..cycle;
draw z0..z1;
x2=x0;y2=.9h;
x3=.9w;y3=.5h;
x4=x2+.1w;y4=y2+ .1h;
draw z2..tension 16..z4..z3.. {dir 220}z0..tension 56..cycle;
x7=x0; y7=y2+.5h;
x8=.7w; y8=y2+.3h;
draw z2..tension 16..z4..z8..{dir 220}z7;
endchar;enddef;
%
def do_relish_b=
beginchar ("+", em#, 1.0cap#, 0);"a cross relish";
pickup lute_pen;
x1=x2=.5w;
x3=.2w;x4=.8w;
y1=.2h;y2=.8h;
y3=y4=.5h;
draw z1..z2;draw z3..z4;
endchar;enddef;
%
def do_X =
beginchar ("x", .9em#, 1.0cap#, 0);"an X";
pickup lute_pen;
x0=x3=0.2w;x2=x1=.8w;
y0=y2=0.1h;y1=y3=0.6h;
draw z0..z1;draw z2..z3;
endchar;enddef;
%
def do_comma =
beginchar ("'", .8em#, 1.0cap#, 0);"a comma relish";
% pickup pencircle scaled 2.0 wid;
% x1=.5w;
% y1=.5h;
% draw z1;
% pickup lute_pen;
% x3=.52w;y3=.545h;
% x2=.6w;y2=.2h;
% draw z3{dir 330}..z2;
pickup pencircle scaled 2.70 wid;
x1=.5w;
y1=.5h;
draw z1;
pickup bigger_lute_pen;
x3=.55w;y3=.61h;
x2=.6w;y2=-.05h;
draw z3{dir 330}..z2;
endchar;enddef;
%
def do_waves =
beginchar ("~", 0.15 in#, 1.0cap#, 0);"a cadenza";
pickup pencircle scaled .8 wid;
x0=0w;y0=0.5h;
x1=.25w;y1=h;
x2=.5w;y2=y0;
x3=.75w;y3=0h;
x4=w;y4=y0;
draw z0{dir 80}..tension 3..z1..tension 3..z2..tension 3..z3..tension 3..{dir 80}z4;
endchar;enddef;
%
% below contributed by Mark Probert Aug 4 2019
%
def do_twomordent =
beginchar (240, 2.8em#, 1.0cap#, 0);"a 2 lobed mordent";
pickup lute_pen;
neww = 0.75w;
z1 = (0.125neww, h);
z2 = (0, 0.6h);
z3 = (0.25neww, 0.42h);
z4 = (0.5neww, 0.6h);
z5 = (0.375neww, 0.2h);
z6 = (0.5neww, 0);
z7 = (0.75neww, 0);
z8 = (neww, 0.2h);
draw z1..z2..z3..z4;
draw z4..z5..z6..z7..z8;
endchar;enddef;
%
def do_threemordent =
beginchar (241, 2.8em#, 1.0cap#, 0);"a 3 lobed mordent";
pickup lute_pen;
%% neww = 0.75w;
z1 = (0.12neww, 1.07h);
z2 = (0, 0.7h);
z3 = (0.18neww, 0.52h);
z4 = (0.34neww, 0.63h);
z5 = (0.27neww, 0.30h);
z6 = (0.35neww, 0.03h);
z7 = (0.50neww, -0.04h);
z8 = (0.67neww, 0.23h);
z9 = (0.61neww, 0.0h);
z10 = (0.70neww, -0.34h);
z11 = (0.95neww, -0.36h);
z12 = (1.08neww, 0.0h);
draw z1..z2..z3..z4;
draw z4..z5..z6..z7..z8;
draw z8..z9..z10..z11..z12;
endchar;enddef;
%
def do_slant =
beginchar (1, 2em#, .8cap#, 0);" a slanted line";
pickup tiny_circle;
x0=0;y0=0;x1=w;y1=h;
draw z0..z1;
endchar;enddef;
%
def do_slant_a =
beginchar (2, 2em#, 1.0cap#, 0);" a more slanted line";
pickup tiny_circle;
x0=0;y0=0;x1=w;y1=h;
draw z0..z1;
endchar;enddef;
%
def do_slant_b =
beginchar (3, 1.8em#, 1.0cap#, 0);" a reverse slanted line";
pickup tiny_circle;
x0=0;y0=h;x1=w;y1=0;
draw z0..z1;
endchar;enddef;
%
def do_slant_c =
beginchar (4, 1.8em#, .3cap#, 0);" a slightly slanted line";
pickup tiny_circle;
x0=0;y0=0;x1=w;y1=h;
draw z0..z1;
endchar;enddef;
%
def do_slant_d =
beginchar (5, 2em#, 1.0cap#, 0);" a more slanted line";
pickup pencircle scaled .9wid;
x0=0;y0=0;x1=1.45w;y1=1.45h;
draw z0..z1;
endchar;enddef;
%
def do_s_c_ubar =
beginchar ("[", em#, 1.0cap#, 0);" begin a curved underline";
pickup tiny_circle;
x0=0w; x1=.4w;x2=w;
y0=.8h; y1 = .4h; y2=.3h;
draw z0..z1..z2;
endchar;enddef;
%
def do_e_c_ubar =
beginchar ("]", em#, 1.0cap#, 0);" end a curved underline";