2 ex# := (dynamic_design_size / 2.4)* pt#;
5 staffspace# := 1.75 / 2.0 * ex#;
8 %% !! synchronize with feta-params.mf
9 linethickness# := 0.3 pt# + 0.04 staffspace#;
10 stafflinethickness# := stafflinethickness#;
12 horizontal_space# := .66 ex#;
15 font_normal_space horizontal_space#;
17 define_pixels (staffspace, linethickness, ex, descender, ascender);
23 % TODO: blot diameter should be fixed, not scalable.
29 serif_thick# = 1.1 linethickness#;
30 define_blacker_pixels (serif_thick);
31 med_thick = round (1.5 linethickness);
32 bottom_blot = 1.3 serif_thick;
36 fet_beginchar("Space", "space")
37 set_char_box(0, horizontal_space#, 0, ex#);
42 % Couldn't find many z examples. This one is losely inspired
43 % by a sfz from Mueller etuden fuer Horn (Edition Hofmeister.)
47 fet_beginchar ("dynamic z", "z");
48 set_char_box (0, .98 ex#, 0, 0.9 ex#);
50 save thin_thick, top_narrow, over_shoot;
53 thin_thick = serif_thick;
54 top_narrow = thin_thick;
55 top_overshoot = .8 serif_thick;
58 bot_overshoot = serif_thick;
65 y2 = y1r - top_overshoot;
68 y3 = h - .7 thin_thick;
69 x3 = w - .6 top_narrow - .5 thin_thick;
75 y5l = .4 bot_overshoot;
77 x6 = w - 3 top_narrow;
80 x8r = w - .35 top_narrow;
84 penpos1(top_thick, 80);
85 penpos3 (thin_thick, angle(z3-z4) + 90);
86 penpos4(thin_thick, angle (z3-z4) + 90);
87 penpos5(bot_thick, 70);
88 penpos6(3/2 bot_thick, 70);
89 penpos8 (thin_thick, 20);
91 penlabels(range 0 thru 9);
99 .. simple_serif (z3l, z3r, 90) .. z2{left} .. z1r{left}
102 q := z3l -- z3r -- z4r -- z4l -- cycle;
103 r := simple_serif (z4r, z4l, 90) .. z5l{right}
106 .. simple_serif (z8r, z8l, 90)
107 .. z6r{left} .. z5r{left} .. cycle;
108 pickup pencircle scaled 1;
109 % draw p ; draw q ; draw r ;
111 fill p; fill q; fill r;
116 % forte f, grabbed from Ed Breitkopf Mozart horn concerto 3.
120 % * the bulbs are open.
122 % * blotting around the serif
126 % TODO: insert blots around the serif
134 fet_beginchar("dynamic f", "f");
135 set_char_box (0, 1.1 ex#, descender#, ex# + ascender#);
137 save left_angle, right_angle;
138 save serif_length, serif_excentricity;
140 save bulb_thick, bulb_diam, fill_up;
143 bulb_diam = 7.5 / 40 ex;
144 bulb_thick = 8.5/40 ex;
145 fill_up = 1.5 serif_thick;
147 left_angle = slant_angle - 6;
148 right_angle = slant_angle - 3;
150 serif_length = 0.96 ex;
151 serif_excentricity = 0.01 ex;
154 % z1 is the "base point"
155 z1 = (0.2 ex, - serif_thick);
157 z2l = z1 + whatever*dir (90 - left_angle);
158 penpos2 (f_thick, 0);
160 y3l = y1 + ex + ascender;
162 penpos3 (med_thick, -90);
163 penpos4 (bulb_thick, -20);
164 z3r = whatever [z4r,z4l];
168 penpos5(bulb_thick, -45);
169 x5r = 0.1 [x4l, x4r];
170 y5l = y4l - bulb_diam;
172 z6 = z2r + whatever* dir (90 - right_angle);
177 penpos7(med_thick, -90);
179 penpos8 (bulb_thick, 160);
181 z7l = whatever [z8r,z8l];
183 penpos9 (bulb_thick, 135);
184 x9r = 0.1 [x8l, x8r];
185 y9l = y8l + bulb_diam;
187 penlabels(2, 3,4,5, 7, 8,9);
191 .. z3l{right} .. z4r{down}
192 .. z5r{left} .. z5l{up}
194 .. z4l{up} .. z3r{left}
196 .. z2r --- z6 .. tension 1.25 .. z7r{left}
197 .. z8r{up} .. z9r{right} .. z9l{down} .. tension 0.8
198 .. z8l{down} .. z7l{right} .. cycle;
199 pickup pencircle scaled 1;
204 % todo round for pixels...
206 pickup pencircle scaled round (1.4 serif_thick);
207 (rt x13) - (lft x14) = serif_length;
210 0.5 [x13, x14] = x2 + serif_excentricity;
222 % - The S is trapezoidal (i.e. narrower at the top)
224 % - The white space is differently shaped at the top (the bulb's inner
225 % curve is filled up.)
227 % - less heavy than the f and p signs.
232 fet_beginchar("dynamic s", "s");
233 set_char_box (0, 17/24 ex#, 0, 1 ex#);
235 save left_angle, right_angle;
236 save s_thick, s_thin;
238 save bulb_diam, bulb_len;
240 over_shoot = 0; % .2 serif_thick;
243 bulb_diam = 11/70 ex;
244 bulb_len = 1.0 bulb_diam;
245 left_angle = slant_angle - 2;
246 right_angle = slant_angle -11;
249 s_thin = serif_thick;
253 penpos1 (bulb_diam, -45);
254 z1 = 0.35 [z2l,z2r] + bulb_len * dir(45);
255 penpos2 (bulb_diam, -25);
256 y2l = 0.845 [y7r, y3r];
258 z2l = base_point + whatever * dir (90-left_angle);
259 penpos3 (s_thin, 100);
261 y3l = ypart base_point - over_shoot ;
263 penpos4 (s_thick, 25);
264 ypart z4l = ypart z1r;
265 z4r = base_point + (w,0) + whatever *dir(90-right_angle);
266 penpos5 (s_thick, 40);
267 z5 = z3l + whatever * dir (90-right_angle);
268 y5 = ypart (0.48 [z7r, z3r]);
271 penpos6 (s_thick, 25);
272 z6l = base_point + whatever *dir(90-left_angle);
275 penpos7 (.9 s_thin, 110);
276 z7l = 0.45 [z6r, z8l] + whatever * dir (90-left_angle);
277 y7r = h + over_shoot;
279 penpos8 (.9 bulb_diam, -25);
280 z8 = .6 [z4l,z4r] + whatever *dir(90-right_angle);
282 y8r = ypart (0.23 [z7r, z3r]);
284 penpos9 (.9 bulb_diam, -45);
285 z9 = .4 [z8r,z8l] + .9 bulb_len * dir (-135);
287 penlabels(1,2,3,4,5,6,7,8,9);
292 p := z2l{down} .. z3l{right} .. z4r{up}
298 .. z9r{right} .. z7r{left}
303 .. z2r{up} .. z1r{up}
304 .. z1l{left} .. cycle;
305 pickup pencircle scaled 1;
313 % piano p, grabbed from Ed Breitkopf Mozart horn concerto 3.
317 % * there is no dishing in the serif (but we do it anyway)
319 % * The cheek is a little fatter than the stem
321 % * The slant is extreme: 20 degrees
323 % * the twiddle (what'sitcalled) is a slightly darker than the serif
325 % * The hole in the cheek has a straight right side.
327 % * Corners are filled up.
332 slant := ypart (dir(slant_angle));
333 currenttransform := currenttransform slanted slant;
338 fet_beginchar("dynamic p", "p")
340 % TODO w really is 13/12 ex
341 % but should do kerning
342 set_char_box (0, 15/12 ex#, descender#, 1.0 ex#);
344 save twiddle_thick, stem_thick, cheek_thick;
346 save serif, dishing_angle, p, q;
347 save cheek_medium, left_serif_protude, right_serif_protude;
348 save lower_overshoot;
354 updir := dir (90 - my_slant_angle );
355 twiddle_thick = med_thick;
356 cheek_medium = 1/6 ex;
359 fill_up := 1.5 serif_thick;
360 straigh_len = 0.5 ex;
361 lower_overshoot := .3 serif_thick;
364 cheek_thick = 13/32 ex;
365 cheek_width = 0.72 ex;
366 left_serif_protude = 18/60 ex;
367 right_serif_protude= 15/60 ex;
369 penpos1 (twiddle_thick, -slant - 5);
370 penpos2 (cheek_medium, 90 - slant );
371 penpos3 (cheek_medium, 90 - slant);
373 x4r - x4l = cheek_thick;
374 penpos4 (whatever, 0);
375 penpos5 (whatever, -38);
376 penpos6 (stem_thick, 0);
377 penpos17 (straigh_len, 90 -slant);
378 whatever [z17l, z17r] = z4l;
382 y6l = - descender + serif_thick/2;
383 z1l = z6l - whatever *dir (90 - my_slant_angle + 20 );
386 z7 = whatever * updir + z6l;
389 z2l = whatever *updir + 0.3 [z7, z1r];
390 y8 = ypart (0.9 [z7, z2l]);
391 z8 = 2/3 [z6l, z6r] + whatever * updir;
395 z3l = 0.58 [(stem_thick, -descender), (stem_thick + cheek_width - cheek_thick, -descender)] + whatever * updir;
397 z4r = whatever*updir + (stem_thick+ cheek_width, -descender);
399 z5l = whatever*updir + z3l;
400 y5r = -lower_overshoot;
401 y5l = y5r + cheek_medium * ypart dir(55);
403 z9 = z6r + whatever*updir;
407 z2r{right} .. {dir( -60)}z8 & z8{dir 35} .. z3r{right}
411 & z9 -- z6r -- z6l -- z7{updir}
412 .. z2l{left} .. tension 1.2 ..
413 % z1r & z1r -- z1l & z1l
414 simple_serif (z1r, z1l, -90)
418 save blot_t, corner_t;
421 corner_t := xpart (p intersectiontimes z9);
423 z19 = point corner_t - 2 blot_t of p;
424 z20 = point corner_t + blot_t of p;
430 pickup pencircle scaled 1;
432 fill z19{up} .. {right}z20{updir} .. z19{-(direction corner_t - 2 blot_t of p)} .. cycle;
434 pickup pencircle scaled 1;
438 z12 = z6r + whatever*updir;
443 z17l .. tension 1.5 .. z17r .. z3l{left}.. tension 1.05 .. z12{-updir} .. tension 1.05 .. z5l{right} .. cycle;
445 penlabels (1, 2, 3, 4, 5, 6, 17);
450 pickup pencircle scaled serif_thick;
451 lft x11 = -left_serif_protude;
452 rt x10 = stem_thick+ right_serif_protude;
453 bot y10 = bot y11 = -descender;
456 serif := simple_serif (z10, z11, dishing_angle);
459 labels(7,8, 9, 10, 11,12);
462 z13 = point 0.05 of serif;
463 z14 = point 0.85 of serif;
464 z15 = z6l + updir * fill_up +( serif_thick/2, 0);
465 z16 = z6r + updir * 1.2fill_up- +( serif_thick/2, 0);
466 labels(13,14, 15, 16);
468 % pickup pencircle scaled 1;
469 draw z13{direction 0.05 of serif} .. z16{updir};
470 draw z14{-(direction 0.85 of serif)} .. z15{updir};
476 % * right stem is fatter and more straight than the left 2 two stems.
478 % * The twiddle at the left is similar to the p twiddle
480 % * The bottoms of the stems are blotted.
485 % This is cut & paste programming. Somehow 3 i shapes in two chars (p and m)
486 % Doesn't seem worth the trouble of writing a macro.
490 fet_beginchar("dynamic m", "m");
491 set_char_box (0, 1.5 ex#, 0, 1.0 ex#);
493 % should share code with p for twiddle.
495 save i_thick, i_angle, i_twiddle_thick,
496 i_twiddle_start_angle, i_twiddle_start_y,
499 save idir, center, right_ending;
501 pair center, idir, right_ending;
505 overshoot = .25 serif_thick;
506 i_thick := 21 / 80 ex;
508 idir := dir(90- i_angle);
510 i_left_space = 16/80 ex;
511 i_twiddle_thick = 1.2 serif_thick;
512 i_twiddle_start_y = 8/16 ex;
513 i_twiddle_start_angle = 0;
516 penpos1 (i_twiddle_thick, -i_twiddle_start_angle);
517 y1 = i_twiddle_start_y;
518 z1r = center - (i_left_space,0) + whatever * idir;
520 y3 = 0.5 bottom_blot + ypart center;
522 z3l = center + whatever * idir;
524 penpos4 (i_thick - bottom_blot, 0);
525 z4 - z3 = whatever * idir;
527 y2l = 1 ex + overshoot;
528 z2l = .08 [z3l, z3r] + whatever * idir;
529 z2r = 5/8 [z1r, z3l] + whatever * idir;
531 z2 = 1/2 [z2l, z2r] ;
533 z5 = z4 + whatever * idir;
536 p := simple_serif (z1l, z1r, 90) .. tension 1.2 .. z2r{right} .. z5l --- z3l
537 .. z4l --- z4r .. z3r --- z5r .. tension 1.2 .. z2l{left} .. cycle;
541 penlabels (1, 2, 3 , 4,5);
543 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
547 idir := dir(90 - i_angle);
548 i_left_space := 14/80 ex;
552 z5l = right_ending + (i_left_space,0);
553 penpos1(serif_thick, - i_twiddle_start_angle);
555 y3 = .5 bottom_blot + ypart center;
557 z3l = z5l + whatever * idir;
559 penpos4(i_thick - bottom_blot, 0);
560 z4 - z3 = whatever * idir;
562 y2l = 1 ex+ overshoot;
564 z2l = .08 [z3l, z3r] + whatever * idir;
565 z2r = 5/8 [z1r, z3l] + whatever * idir;
567 z2 = 1/2 [z2l, z2r] ;
570 p := simple_serif (z1l, z1r, 90) .. tension 1.05 .. z2r{right} .. z5l --- z3l
571 .. z4l --- z4r .. z3r --- z5r .. tension 1.2 .. z2l{left} .. cycle;
575 penlabels (1, 2, 3 , 4,5);
577 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
579 i_thick := 23 / 80 ex;
581 i_left_space := 14/80 ex;
584 idir := dir(90- i_angle);
586 z5l = right_ending + (i_left_space,0);
587 penpos5 (whatever, 10);
588 penpos3 (whatever, 20);
593 penpos1(serif_thick, - i_twiddle_start_angle);
595 z3l = z7l + whatever * idir;
596 z3r = z7r + whatever * idir;
597 z5l = z7l + whatever * idir;
598 z5r = z7r + whatever * idir;
600 save end_twiddle_angle;
601 end_twiddle_angle := 35;
602 penpos6(serif_thick, - end_twiddle_angle);
603 y6l = 23/80 ex + ypart center;
604 z6l = 1.6 [z3l, z3r] + whatever * idir;
608 y3l = 1/8 ex + ypart center;
609 y2l = 1 ex+ overshoot;
610 z2l = .08 [z3l, z3r] + whatever * idir;
611 z2r = 5/8 [z1r, z3l] + whatever * idir;
613 z2 = 1/2 [z2l, z2r] ;
614 z8 = z7 - (0, 1 overshoot);
616 p := simple_serif (z1l, z1r, 90) .. tension 1.05
617 .. z2r{right} .. z5l --- z3l
619 .. simple_serif(z6r, z6l, 90)
623 .. z2l{left} .. cycle;
625 % pickup pencircle scaled 1;
629 penlabels (1, 2, 3 , 4,5,6,7, 8);
638 currenttransform := identity slanted ypart(dir(15));
639 fet_beginchar("dynamic r", "r");
640 set_char_box (0, .75 ex#, 0, 1ex#);
643 save base_point, stem_thick, bulb_diam;
644 save twiddle_thick, attach_len, overshoot, taille;
647 twiddle_thick= 1.1 serif_thick;
648 overshoot = .5 serif_thick;
650 taille = -0.3 serif_thick;
656 y1l = .5 bottom_blot;
658 penpos10(stem_thick - bottom_blot, 0);
662 penpos1 (stem_thick, 0);
663 y2l - y1l = 36/47 ex;
665 penpos2 (stem_thick, 0);
669 penpos3(twiddle_thick, -20);
671 x9 = 0.15 [x1r, x1l] ;
674 x4l = -0.1 [x1l, x1r];
675 y4l = ex + overshoot;
677 x4r = 0.62 [x3r, x2l];
678 y4r = 0.5 [y4l, y2l];
680 penpos5(whatever, -74);
681 y5l - y5r = bulb_diam;
682 y5l = ex + overshoot;
683 x5 = x2r + attach_len;
684 attach_len + bulb_diam/2 + stem_thick = w;
687 penpos6 (bulb_diam, 0);
688 % z7 = z6l + taille* dir(180);
692 z7 = z6 + .4 * bulb_diam * dir (-90 -alpha);
693 z8 = 9/10 [z1r, z2r];
699 p := z1r .. z10r --- z10l .. z1l
703 .. {down}simple_serif(z3r, z3l,-90){up}
715 pickup pencircle scaled 1;
718 penlabels (1,2,3, 4,5,6,7,8, 9, 10);
727 ligtable "m" : "p" kern 0.2 ex#, "f" kern -0.1 ex#;
728 ligtable "f" : "f" kern -0.13 ex#;
729 ligtable "r" : "f" kern 0.1 ex#;
740 %% notes from old dyn code.
742 % "f" obviously has a _lot_ bigger slant than "p" (see Wanske p.239)
743 % however; perhaps we need two f symbols:
744 % - a super-slanted one used in "f" "mf" "sfz" "sf", and
745 % - a more normal-slanted in "ff" "fff" "fp" "fp" (see Wanske p.241)
747 % looking at professionally typeset music reveals that typesetters
748 % are somewhat unsure about slanting in "mf", "fp", "sfz"
750 % "f" and "p" (in any combination) are a lot (factor two) fatter than
751 % "s", "m", and "z". sometimes the "m" and "z" are a bit fatter than
755 % Chester, Breitkopf suggest smaller sizes of these other chars,
756 % using the x-height as reference point.