]> git.donarmstrong.com Git - lilypond.git/blob - mf/parmesan-heads.mf
release: 1.5.32
[lilypond.git] / mf / parmesan-heads.mf
1 % -*-Fundamental-*-
2 % parmesan-heads.mf -- implement ancient note heads
3
4 % source file of LilyPond's pretty-but-neat music font
5
6 % (c) 2001--2002 Juergen Reuter <reuter@ipd.uka.de>
7
8
9 save black_notehead_width;
10 numeric black_notehead_width;
11
12 fet_begingroup ("noteheads")
13
14 noteheight#:=staff_space#+ (1 + overdone_heads) *stafflinethickness#;
15 define_pixels(noteheight);
16
17
18 %%%%%%%%
19 %
20 %
21 %
22 % MENSURAL NOTATION
23 %
24 %
25 %
26 brevis_wid# := 2 staff_space#;
27
28 def draw_brevis(expr brevwid) =
29         save beamheight, head_width;
30         save holeheight, stem_width;
31         save serif_size, serif_protrude;
32
33         head_width# = brevwid;
34         holeheight = 3 stafflinethickness;
35         stem_width = 1.4 stafflinethickness;
36
37
38         define_pixels(head_width);
39         set_char_box(0, head_width#, noteheight#/2, noteheight#/2);
40         
41         2 beamheight + holeheight = noteheight;
42         serif_size = (holeheight - stafflinethickness)/2;
43         serif_protrude = 1.5 serif_size;
44         penpos1(stem_width, 0);
45         penpos2(stem_width, 0);
46         penpos3(beamheight, 90);
47         penpos4(beamheight, 90);
48         penpos5(stem_width, 180);
49
50         z1l = (0, 0);
51         z2l = (0, -stafflinethickness/2);
52         z3r = z2r + serif_size *(1,-1);
53         y4r = y3r;
54         x4r = head_width/2;
55         z5l = z3l + (-serif_size, -serif_protrude);
56
57         penlabels(1,2,3,4, 5);
58         fill z1r -- z1l -- z5r{down} .. z5l{up} .. z3l{right}
59                 -- z4l -- z4r -- z3r{left} .. z2r{up} -- cycle;
60
61         addto currentpicture also currentpicture yscaled -1;
62         show z4r; show z4l;
63         addto currentpicture also currentpicture 
64                 shifted (-x4r,0) xscaled -1 shifted (x4l,0);
65
66 enddef;
67
68
69 %
70 % Some sources (eg Musix/OpusTeX think that the appendage should be on
71 % the left, some say right. Right wins democratically.
72 %
73 def draw_longa (expr wid) =
74         draw_brevis(wid);
75         save theta;
76
77         x7r = head_width;
78         y7 = y5;
79 %       z7 = z5;
80         z6 - z7 = (stem_width/2, -staff_space);
81         theta = angle(z6-z7)+ 90;
82         penpos7(stem_width, theta);
83         penpos6(1.2 stem_width, theta);
84         
85         fill z7r .. z6r{z6-z7} .. {z7-z6} z6l -- z7l -- cycle;
86         penlabels(6,7);
87 enddef;
88
89 %
90 % En wij presenteren U: de opvolgster van Emily
91 %
92 % (ze is wel breed)
93
94 fet_beginchar("Maxima notehead", "-3mensural", "mensuralmaximahead");
95         draw_longa (1.3 brevis_wid#)
96 fet_endchar;
97
98 fet_beginchar("Longa notehead", "-2mensural", "mensurallongahead");
99         draw_longa (brevis_wid#)
100 fet_endchar;
101
102 fet_beginchar("Brevis notehead", "-1mensural", "mensuralbrevishead")
103         draw_brevis(brevis_wid#);
104 fet_endchar;
105
106 def draw_neo_mensural_black_head (expr wid) =
107         save head_width;
108         head_width# = wid;
109         set_char_box (0, head_width#, noteheight#/2, noteheight#/2);
110
111
112         y3 = y1 =0;
113         x2 = x4 = (x1 + x3) /2;
114         define_pixels (head_width);
115         pickup pencircle scaled blot_diameter;
116         top y2 = h;
117         bot y4 = -d;
118         lft x1 = 0;
119         rt x3 = w;
120
121         filldraw z1 -- z2 -- z3 -- z4 -- cycle;
122 enddef;
123
124 def draw_neo_mensural_open_head (expr wid)=
125         draw_neo_mensural_black_head (wid);
126         save diamNW, diamSW;
127         diamNW = length (z2 - z1) + blot_diameter;
128         diamSW = length (z4 - z1) + blot_diameter;
129         
130         save hole_widthNW, hole_widthSW;
131         hole_widthNW = 0.34 diamNW ;
132         hole_widthSW + 2.6 stafflinethickness = diamSW;
133
134         (z7 + z5)/2 = (w/2, 0);
135         (z8 + z6)/2 = (w/2, 0);
136         (z6 - z5) = hole_widthNW * unitvector (z2 - z1);
137         (z7 - z6) = hole_widthSW * unitvector (z4 - z1);
138
139         labels (1,2,3,4,5,6,7,8);
140
141         unfill z5 -- z6 -- z7 -- z8 --cycle;
142 enddef;
143
144 fet_beginchar("Neo-mensural open head","0neo_mensural","neomensuralminimhead")
145       draw_neo_mensural_open_head (staff_space#);
146 fet_endchar;
147
148 fet_beginchar("Neo-mensural open head","1neo_mensural","neomensuralsemiminimhead")
149       draw_neo_mensural_open_head (staff_space#);
150 fet_endchar;
151
152 fet_beginchar("Neo-mensural black head","2neo_mensural","neofusahead")
153       draw_neo_mensural_black_head (staff_space#);
154 fet_endchar;
155
156
157 def draw_mensural_head (expr wid, open) =
158       save head_width;
159       head_width# = wid;
160       set_char_box (head_width#/2, head_width#/2,
161                     noteheight#/2, noteheight#/2);
162
163       define_pixels(head_width, noteheight);
164
165       x1 = -x3;
166       y1 = x2 = y3 = x4 = 0;
167       y4 = -y2;
168       y2 = 1.4 noteheight/2;
169       tand(30) = x3 / y2;
170
171       pickup pencircle
172              xscaled 0.15 head_width
173              yscaled 0.30 head_width
174              rotated -30;
175
176       % pencircle width correction
177       save zc, zd; pair zc, zd;
178       zc = (+0.150 head_width * sind(30), +0.150 head_width * cosd(30));
179       zd = (+0.075 head_width * sind(30), -0.075 head_width * cosd(30));
180
181       if open:
182               draw (z1+zc+zd) -- (z2-zc+zd) --
183                    (z3-zc-zd) -- (z4+zc-zd) -- cycle;
184       else:
185               filldraw (z1+zc+zd) -- (z2-zc+zd) --
186                        (z3-zc-zd) -- (z4+zc-zd) -- cycle;
187       fi;
188 enddef;
189
190
191 fet_beginchar("Mensural open head","0mensural","mensuralminimhead")
192         draw_mensural_head (staff_space#, true);
193 fet_endchar;
194
195 fet_beginchar("Mensural open head","1mensural","mensuralsemiminimhead")
196         draw_mensural_head (staff_space#, true);
197 fet_endchar;
198
199 fet_beginchar("Mensural black head","2mensural","fusahead")
200         draw_mensural_head (staff_space#, false);
201 fet_endchar;
202
203
204 %%%%%%%%%%%%
205 %
206 %
207 % ledger (leger) lines
208 %
209 fet_beginchar("Ledger ending", "ledgerending", "ledgerending")
210 set_char_box (5/2 ledgerlinethickness#, 5/2 ledgerlinethickness#,
211                 ledgerlinethickness#/2,ledgerlinethickness#/2);
212         pickup pencircle scaled 1.3 blot_diameter;
213
214         rt x2 = w;
215         lft x1 = -b;
216         x3 = x2;
217         bot y1 = -d;
218         y2 = y1;
219
220         top y3 = h;
221         y4 = y3;
222         x4 = x1;
223
224         filldraw z1 --- z2 --- z3 --- z4 --- cycle ;
225 fet_endchar;
226
227
228 %%%%%%%%
229 %
230 %
231 %
232 % EDITIO VATICANA (including solesmes extensions)
233 %
234 %
235 %
236
237 % parameterized punctum
238 def punctum_char (expr verbose_name, internal_name, mudela_name,
239                   left_stem, right_stem, linea, cavum,
240                   straight, auctum, direction_up, excentric, up_shift, mag) =
241
242         fet_beginchar(verbose_name, internal_name, mudela_name)
243                 save b_h, a_w;
244                 a_b := 1.54; % b_h*a_b/a_w = wd/ht
245                 b_h := 0.85;
246                 a_w := 1.09;
247
248                 save a, beta, ht, wd;
249                 ht# = noteheight# * mag;
250                 2beta# = ht# * b_h;
251                 a# = beta# * a_b;
252                 wd# = 2a# / a_w;
253                 set_char_box(0.50wd#, 0.10wd#, 0.5ht#, 0);
254                 black_notehead_width# := wd#;
255
256                 % direction
257                 save direction, direction_sign;
258                 pair direction;
259                 if direction_up:
260                         direction = up;
261                         direction_sign# = 1;
262                 else:
263                         direction = down;
264                         direction_sign# = -1;
265                 fi;
266
267                 % convexity and excentricity
268                 save u_convexity, u_excentricity;
269                 if straight:
270                         u_convexity# = -0.01ht#;
271                         u_excentricity# = 0.0ht#; % dummy
272                 elseif auctum:
273                         u_convexity# = -0.03ht#;
274                         u_excentricity# = +0.25ht#;
275                 else:
276                         u_convexity# = -0.05ht#;
277                         u_excentricity# = 0.0ht#; % dummy
278                 fi;
279                 save convexity, excentricity;
280                 convexity# = direction_sign# * u_convexity#;
281                 excentricity# = direction_sign# * u_excentricity#;
282
283                 % y shift offset
284                 save yoffs;
285                 if up_shift:
286                         yoffs# = 0.08ht#;
287                 else:
288                         yoffs# = 0.00ht#;
289                 fi
290
291                 define_pixels(convexity, excentricity, yoffs, ht, wd);
292                 pickup pencircle scaled stafflinethickness;
293
294                 path p;
295                 save height, yoffs_bt;
296                 define_pixels (height, yoffs_bt);
297                 height# = max (0.5ht# - stafflinethickness#, 0);
298                 yoffs_bt# = yoffs# - (height# - stafflinethickness#)/2 -
299                             convexity#;
300                 xpart z1a = xpart z1b;
301                 xpart z2a = xpart z2b;
302                 xpart z3a = xpart z3b;
303                 ypart z1a + height = ypart z1b;
304                 ypart z2a + height = ypart z2b;
305                 ypart z3a + height = ypart z3b;
306
307                 if auctum:
308                         z1a = (0.00wd + stafflinethickness/2, yoffs_bt);
309                         z2a = (0.20wd, yoffs_bt + 1.0*convexity);
310                         z3a = (0.40wd - stafflinethickness/2,
311                                yoffs_bt + 1.0*excentricity);
312                         p = z1a .. {right}z2a .. {direction}z3a --
313                             z3b{-direction} .. z2b{left} .. z1b -- cycle;
314                 elseif excentric:
315                         z1a = (0.00wd + stafflinethickness/2,
316                                yoffs_bt - 1.0*convexity);
317                         z2a = (0.08wd, yoffs_bt + 1.4*convexity);
318                         z3a = (0.40wd - stafflinethickness/2, yoffs_bt);
319                         p = z1a{direction} .. z2a{right} .. z3a --
320                             z3b .. {left}z2b .. {-direction}z1b -- cycle;
321                 else:
322                         z1a = (0.00wd + stafflinethickness/2, yoffs_bt);
323                         z2a = (0.20wd, yoffs_bt + 1.0*convexity);
324                         z3a = (0.40wd - stafflinethickness/2, yoffs_bt);
325                         p = z1a .. z2a .. z3a --
326                             z3b .. z2b .. z1b -- cycle;
327                 fi;
328
329                 if cavum:
330                         draw p;
331                 else:
332                         filldraw p;
333                 fi;
334
335
336                 pickup pencircle scaled stafflinethickness;
337
338                 if left_stem:
339                         z5=(0.00wd + stafflinethickness/2, yoffs);
340                         z6=(0.00wd + stafflinethickness/2, yoffs - 1.5ht);
341                         draw z5 -- z6;
342                 fi;
343
344                 if right_stem:
345                         z5=(0.40wd - stafflinethickness/2, yoffs);
346                         z6=(0.40wd - stafflinethickness/2, yoffs - 1.5ht);
347                         draw z5 -- z6;
348                 fi;
349
350                 if linea:
351                         save linea_width, linea_height;
352                         linea_width# = stafflinethickness#;
353                         linea_height# = 0.85 ht#;
354                         define_pixels (linea_width, linea_height);
355                         draw_block ((-0.10wd - linea_width/2,
356                                      yoffs - linea_height/2),
357                                     (-0.10wd + linea_width/2,
358                                      yoffs + linea_height/2));
359                         draw_block ((+0.50wd - linea_width/2,
360                                      yoffs - linea_height/2),
361                                     (+0.50wd + linea_width/2,
362                                      yoffs + linea_height/2));
363                 fi;
364         fet_endchar;
365 enddef;
366
367 % parameterized punctum inclinatum
368 def inclinatum_char(expr verbose_name, internal_name, mudela_name,
369                     small, stropha, auctum) =
370
371         fet_beginchar(verbose_name, internal_name, mudela_name)
372
373                 save b_h, a_w;
374                 a_b := 1.54; % b_h*a_b/a_w = wd/ht
375                 b_h := 0.85;
376                 a_w := 1.09;
377
378                 save a, beta, ht, wd;
379                 ht# = noteheight#;
380                 2beta# = ht# * b_h;
381                 a# = beta# * a_b;
382                 wd# = 2a# / a_w;
383                 set_char_box(0.3wd#, 0.3wd#, 0.5 ht#, 0.5 ht#);
384                 black_notehead_width# := wd#;
385
386                 save za, alpha, size;
387                 pair za;
388                 alpha = 35;
389                 define_pixels(ht, wd);
390
391                 if small:
392                         size# = 0.23ht#;
393                 else:
394                         size# = 0.45ht#;
395                 fi;
396
397                 define_pixels(size);
398
399                 pickup pencircle
400                         xscaled blot_diameter
401                         yscaled size rotated -alpha;
402                 za = (0, size - blot_diameter/2) / 2 rotated alpha;
403                 draw -za .. za;
404
405                 if stropha:
406                         pickup pencircle
407                                 xscaled (size/3)
408                                 yscaled size rotated alpha;
409                         save za, off_angle; pair za;
410                         off_angle := 15;
411                         za = (0, -size) / 2 rotated -(alpha + off_angle);
412                         undraw za;
413                 fi;
414
415                 if auctum:
416                         pickup pencircle scaled stafflinethickness;
417                         save za, zb;
418                         pair za, zb;
419                         za = ((0, -size) rotated -alpha) +
420                              (0, stafflinethickness/2);
421                         xpart zb = 0;
422                         ypart zb = ypart za;
423                         draw za{(0,-1) rotated alpha} ..
424                              {(0,1) rotated -alpha}zb;
425                 fi;
426         fet_endchar;
427 enddef;
428
429 % punctum
430 punctum_char("Ed. Vat. punctum", "0vaticana_punctum", "vatpunctumhead",
431              false, false, false, false, false,
432              false, false, false, false, 1.0);
433
434 % punctum cavum (for OpusTeX compatibility)
435 %punctum_char("Ed. Vat. punctum cavum", "0vaticana_punctum_cavum",
436 %            "vatpunctumcavumhead",
437 %            false, false, false, true, false,
438 %            false, false, false, false, 1.0);
439
440 % linea punctum (for OpusTeX compatibility)
441 %punctum_char("Ed. Vat. linea punctum", "0vaticana_linea_punctum",
442 %            "vatlineapunctumhead",
443 %            false, false, true, false, false,
444 %            false, false, false, false, 1.0);
445
446 % linea punctum cavum (for OpusTeX compatibility)
447 %punctum_char("Ed. Vat. linea punctum cavum", "0vaticana_linea_punctum_cavum",
448 %            "vatlineapunctumcavumhead",
449 %            false, false, true, true, false,
450 %            false, false, false, false, 1.0);
451
452 % punctum inclinatum
453 inclinatum_char("Ed. Vat. inclinatum", "0vaticana_inclinatum",
454                 "vatinclinatumhead",
455                 false, false, false);
456
457 % virga (i.e. right stemmed punctum)
458 punctum_char("Ed. Vat. virga", "0vaticana_virga", "vatvirgahead",
459              false, true, false, false, false,
460              false, false, false, false, 1.0);
461
462 % left stemmed punctum as used in clivis (flexa) ligature
463 punctum_char("Ed. Vat. reverse virga", "0vaticana_rvirga", "vatrvirgahead",
464              true, false, false, false, false,
465              false, false, false, false, 1.0);
466
467 % pes lower punctum
468 punctum_char("Ed. Vat. pes lower punctum", "0vaticana_lpes", "vatlpeshead",
469              false, false, false, false, true,
470              false, true, false, false, 1.0);
471
472 % pes upper punctum
473 punctum_char("Ed. Vat. pes upper punctum", "0vaticana_upes", "vatupeshead",
474              false, false, false, false, true,
475              false, false, false, false, 1.0);
476
477 % pes upper punctum (shifted variation)
478 %
479 % Note: This note head is used instead of the regular pes upper
480 % punctum to avoid collision with the lower punctum note of the pes when
481 % the upper punctum sits directly on top of the lower punctum.
482 %
483 punctum_char("Ed. Vat. var pes upper punctum", "0vaticana_vupes",
484              "vatvupeshead",
485              false, false, false, false, true,
486              false, false, false, true, 1.0);
487
488 % small punctum as used in epiphonus/cephalicus
489 punctum_char("Ed. Vat. plica", "0vaticana_plica", "vatplicahead",
490              false, false, false, false, true,
491              false, false, false, false, 0.5);
492
493 % excentric punctum as used in epiphonus
494 punctum_char("Ed. Vat. epiphonus", "0vaticana_epiphonus", "vatepiphonushead",
495              false, false, false, false, false,
496              false, true, true, false, 1.0);
497
498 % excentric punctum as used in cephalicus
499 punctum_char("Ed. Vat. cephalicus", "0vaticana_cephalicus",
500              "vatcephalicushead",
501              false, false, false, false, false,
502              false, false, true, false, 1.0);
503
504 % quilisma
505 fet_beginchar("Ed. Vat. quilisma", "0vaticana_quilisma", "vatquilismahead")
506         save b_h,a_w;
507         a_b:=1.54; % b_h*a_b/a_w = wd/ht
508         b_h:=0.85;
509         a_w:=1.09;
510
511         save a, beta, ht, wd;
512         ht# = noteheight#;
513         2beta# = ht#*b_h;
514         a# = beta#*a_b;
515         wd# = 2a# / a_w;
516         set_char_box(0.4wd#, 0.00wd#, 0.5 ht#, 0.5 ht#);
517         black_notehead_width# := wd#;
518
519         define_pixels(ht, wd);
520         pickup pencircle xscaled stafflinethickness yscaled 0.4ht;
521         z1 = (0.00wd, -0.11ht);
522         z2 = (0.00wd, +0.06ht);
523         z3 = (0.10wd, -0.05ht);
524         z4 = (0.16wd, +0.11ht);
525         z5 = (0.24wd, -0.01ht);
526         z6 = (0.30wd, +0.15ht);
527         z7 = (0.40wd, +0.04ht);
528         z8 = (0.40wd, +0.21ht);
529         draw z1 -- z2 -- z3 -- z4 -- z5 -- z6 -- z7 -- z8;
530 fet_endchar;
531
532 % solesmes punctum inclinatum parvum
533 %inclinatum_char("Solesmes punctum inclinatum parvum", "0solesmes_incl_parvum",
534 %               "solinclparvumhead",
535 %               true, false, false);
536
537 % solesmes punctum auctum ascendens
538 %punctum_char("Solesmes punctum auctum ascendens", "0solesmes_auct_asc",
539 %            "solauctaschead",
540 %            false, false, false, false, false,
541 %            true, true, false, false, 1.0);
542
543 % solesmes punctum auctum descendens
544 %punctum_char("Solesmes punctum auctum descendens", "0solesmes_auct_desc",
545 %            "solauctdeschead",
546 %            false, false, false, false, false,
547 %            true, false, false, false, 1.0);
548
549 % solesmes punctum inclinatum auctum
550 %inclinatum_char("Solesmes punctum incl. auctum", "0solesmes_incl_auctum",
551 %               "solpunctuminclinatumauctumhead",
552 %               false, false, true);
553
554 % solesmes stropha
555 %inclinatum_char("Solesmes stropha", "0solesmes_stropha",
556 %               "solstrophahead",
557 %               false, true, false);
558
559 % solesmes stropha aucta
560 %inclinatum_char("Solesmes stropha aucta", "0solesmes_stropha_aucta",
561 %               "solstrophaauctahead",
562 %               false, true, true);
563
564 % solesmes oriscus
565 fet_beginchar("Solesmes oriscus", "0solesmes_oriscus",
566         "soloriscushead")
567         save b_h, a_w;
568         a_b := 1.54; % b_h*a_b/a_w = wd/ht
569         b_h := 0.85;
570         a_w := 1.09;
571
572         save a, beta, ht, wd;
573         ht# = noteheight# * mag;
574         2beta# = ht# * b_h;
575         a# = beta# * a_b;
576         wd# = 2a# / a_w;
577         set_char_box(0.5wd#, 0.0wd#, 0.5ht#, 0.5ht#);
578         black_notehead_width# := wd#;
579
580         save convexity;
581         convexity# = +0.05ht#;
582
583         define_pixels(ht, wd, convexity);
584         pickup pencircle xscaled blot_diameter yscaled 0.50ht;
585         z1 = (0.00wd, -convexity);
586         z2 = (0.16wd, +convexity);
587         z3 = (0.33wd, -convexity);
588         z4 = (0.50wd, +convexity);
589         draw z1 .. z2 .. z3 .. z4;
590 fet_endchar;
591
592 %%%%%%%%
593 %
594 %
595 %
596 % EDITIO MEDICAEA
597 %
598 %
599 %
600
601 % inclinatum
602 fet_beginchar("Ed. Med. inclinatum", "0medicaea_inclinatum",
603         "medinclinatumhead")
604         save b_h, a_w;
605         a_b := 1.54; % b_h*a_b/a_w = wd/ht
606         b_h := 0.85;
607         a_w := 1.09;
608
609         save a, beta, ht, wd;
610         ht# = noteheight#;
611         2beta# = ht# * b_h;
612         a# = beta# * a_b;
613         wd# = 2a# / a_w;
614         set_char_box(wd#/2, wd#/2, 0.5 ht#, 0.5 ht#);
615         black_notehead_width# := wd#;
616
617         save za, alpha, size;
618         pair za;
619         define_pixels(ht, wd);
620         alpha = 35;
621         size = 0.7ht;
622         pickup pencircle
623                 xscaled blot_diameter
624                 yscaled size rotated -alpha;
625         za = (0, size) / 2 rotated alpha;
626         draw -za .. za;
627
628 fet_endchar;
629
630 % parametrized punctum
631 def punctum_char (expr verbose_name, internal_name, mudela_name,
632         left_up_stem, left_down_stem) =
633
634         fet_beginchar(verbose_name, internal_name, mudela_name)
635
636                 save a, beta, ht, wd;
637                 ht# = 2 staff_space#;
638                 wd# = ht#;
639                 set_char_box(0.0, 0.4wd#, 0.5ht#, 0.5ht#);
640                 black_notehead_width# := wd#;
641
642                 define_pixels(ht, wd);
643                 pickup pencircle
644                         xscaled blot_diameter
645                         yscaled 0.50ht;
646                 z1 = (0.00wd + blot_diameter/2, 0);
647                 z2 = (0.40wd - blot_diameter/2, 0);
648                 draw z1 .. z2;
649
650                 pickup pencircle
651                         xscaled stafflinethickness
652                         yscaled blot_diameter;
653
654                 if left_down_stem:
655                         z4=(0.00wd + stafflinethickness/2, blot_diameter/2);
656                         z5=(0.00wd + stafflinethickness/2, - 1.25ht);
657                         draw z4 .. z5;
658                 elseif left_up_stem:
659                         z4=(0.00wd + stafflinethickness/2, blot_diameter/2);
660                         z5=(0.00wd + stafflinethickness/2, + 1.25ht);
661                         draw z4 .. z5;
662                 fi;
663
664         fet_endchar;
665 enddef;
666
667 % punctum
668 punctum_char("Ed. Med. punctum", "0medicaea_punctum", "medpunctumhead",
669         false, false);
670
671 % left up-stemmed punctum
672 punctum_char("Ed. Med. reverse virga", "0medicaea_rvirga", "medrvirgahead",
673         true, false);
674
675 % virga (i.e. left down-stemmed punctum)
676 punctum_char("Ed. Med. virga", "0medicaea_virga", "medvirgahead",
677         false, true);
678
679 %%%%%%%%
680 %
681 %
682 %
683 % HUFNAGEL
684 %
685 %
686 %
687
688 % punctum
689 % parametrized punctum
690 def punctum_char (expr verbose_name, internal_name, mudela_name,
691         down_stem) =
692
693         fet_beginchar(verbose_name, internal_name, mudela_name)
694                 save b_h, a_w;
695                 a_b := 1.54; % b_h*a_b/a_w = wd/ht
696                 b_h := 0.85;
697                 a_w := 1.09;
698
699                 save a, beta, ht, wd;
700                 ht# = noteheight#;
701                 2beta# = ht# * b_h;
702                 a# = beta# * a_b;
703                 wd# = 2a# / a_w;
704                 set_char_box(wd#/2, wd#/2, 0.5 ht#, 0.5 ht#);
705                 black_notehead_width# := wd#;
706
707                 save za, zb, zc, alpha, size;
708                 pair za, zb, zc;
709                 define_pixels(ht, wd);
710                 alpha = 55;
711                 size = 0.7ht;
712                 pickup pencircle
713                         xscaled blot_diameter
714                         yscaled size rotated -alpha;
715                 za = (0, size) / 2 rotated alpha;
716                 draw -za .. za;
717
718                 if down_stem:
719                         zb = (0.00wd, 0);
720                         zc = (0.00wd, - 1.25ht);
721                         draw zb -- zc;
722                 fi;
723         fet_endchar;
724 enddef;
725
726 % punctum
727 punctum_char("Hufnagel punctum", "0hufnagel_punctum", "hufpunctumhead", false)
728
729 % virga
730 punctum_char("Hufnagel virga", "0hufnagel_virga", "hufvirgahead", true)
731
732 % pes lower punctum
733 fet_beginchar("Hufnagel pes lower punctum", "0hufnagel_lpes", "huflpeshead")
734         save b_h, a_w;
735         a_b := 1.54; % b_h*a_b/a_w = wd/ht
736         b_h := 0.85;
737         a_w := 1.09;
738
739         save a, beta, ht, wd;
740         ht# = noteheight#;
741         2beta# = ht# * b_h;
742         a# = beta# * a_b;
743         wd# = 2a# / a_w;
744         set_char_box(wd#, wd#, 0.7 ht#, 0.7 ht#);
745         black_notehead_width# := wd#;
746
747         save za, alpha, size;
748         pair za;
749         define_pixels(ht, wd);
750         alpha = 35;
751         size = 0.7ht;
752         pickup pencircle
753                 xscaled blot_diameter
754                 yscaled size rotated -alpha;
755         za = (size, 0);
756         draw -za .. za;
757 fet_endchar;
758
759 fet_endgroup ("noteheads")