3 serif_thick# = 1.1 stafflinethickness#;
4 define_blacker_pixels (serif_thick);
5 med_thick = round (1.5 stafflinethickness);
6 bottom_blot = 1.3 serif_thick;
11 % Couldn't find many z examples. This one is losely inspired
12 % by a sfz from Mueller etuden fuer Horn (Edition Hofmeister.)
16 fet_beginchar ("dynamic z", "z", "dynz");
17 set_char_box (0, .98 ex#, 0, 0.9 ex#);
19 save thin_thick, top_narrow, over_shoot;
22 thin_thick = serif_thick;
23 top_narrow = thin_thick;
24 top_overshoot = .8 serif_thick;
27 bot_overshoot = serif_thick;
34 y2 = y1r - top_overshoot;
37 y3 = h - .7 thin_thick;
38 x3 = w - .6 top_narrow - .5 thin_thick;
44 y5l = .4 bot_overshoot;
46 x6 = w - 3 top_narrow;
49 x8r = w - .35 top_narrow;
53 penpos1(top_thick, 80);
54 penpos3 (thin_thick, angle(z3-z4) + 90);
55 penpos4(thin_thick, angle (z3-z4) + 90);
56 penpos5(bot_thick, 70);
57 penpos6(3/2 bot_thick, 70);
58 penpos8 (thin_thick, 20);
60 penlabels(range 0 thru 9);
68 .. simple_serif (z3l, z3r, 90) .. z2{left} .. z1r{left}
71 q := z3l -- z3r -- z4r -- z4l -- cycle;
72 r := simple_serif (z4r, z4l, 90) .. z5l{right}
75 .. simple_serif (z8r, z8l, 90)
76 .. z6r{left} .. z5r{left} .. cycle;
77 pickup pencircle scaled 1;
78 % draw p ; draw q ; draw r ;
80 fill p; fill q; fill r;
85 % forte f, grabbed from Ed Breitkopf Mozart horn concerto 3.
89 % * the bulbs are open.
91 % * blotting around the serif
95 % TODO: insert blots around the serif
103 fet_beginchar("dynamic f", "f", "dynf");
104 set_char_box (0, 1.1 ex#, descender#, ex# + ascender#);
106 save left_angle, right_angle;
107 save serif_length, serif_excentricity;
109 save bulb_thick, bulb_diam, fill_up;
112 bulb_diam = 7.5 / 40 ex;
113 bulb_thick = 8.5/40 ex;
114 fill_up = 1.5 serif_thick;
116 left_angle = slant_angle - 6;
117 right_angle = slant_angle - 3;
119 serif_length = 0.96 ex;
120 serif_excentricity = 0.01 ex;
123 % z1 is the "base point"
124 z1 = (0.2 ex, - serif_thick);
126 z2l = z1 + whatever*dir (90 - left_angle);
127 penpos2 (f_thick, 0);
129 y3l = y1 + ex + ascender;
131 penpos3 (med_thick, -90);
132 penpos4 (bulb_thick, -20);
133 z3r = whatever [z4r,z4l];
137 penpos5(bulb_thick, -45);
138 x5r = 0.1 [x4l, x4r];
139 y5l = y4l - bulb_diam;
141 z6 = z2r + whatever* dir (90 - right_angle);
146 penpos7(med_thick, -90);
148 penpos8 (bulb_thick, 160);
150 z7l = whatever [z8r,z8l];
152 penpos9 (bulb_thick, 135);
153 x9r = 0.1 [x8l, x8r];
154 y9l = y8l + bulb_diam;
156 penlabels(2, 3,4,5, 7, 8,9);
160 .. z3l{right} .. z4r{down}
161 .. z5r{left} .. z5l{up}
163 .. z4l{up} .. z3r{left}
165 .. z2r --- z6 .. tension 1.25 .. z7r{left}
166 .. z8r{up} .. z9r{right} .. z9l{down} .. tension 0.8
167 .. z8l{down} .. z7l{right} .. cycle;
168 pickup pencircle scaled 1;
173 % todo round for pixels...
175 pickup pencircle scaled round (1.4 serif_thick);
176 (rt x13) - (lft x14) = serif_length;
179 0.5 [x13, x14] = x2 + serif_excentricity;
191 % - The S is trapezoidal (i.e. narrower at the top)
193 % - The white space is differently shaped at the top (the bulb's inner
194 % curve is filled up.)
196 % - less heavy than the f and p signs.
201 fet_beginchar("dynamic s", "s", "dyns");
202 set_char_box (0, 17/24 ex#, 0, 1 ex#);
204 save left_angle, right_angle;
205 save s_thick, s_thin;
207 save bulb_diam, bulb_len;
209 over_shoot = 0; % .2 serif_thick;
212 bulb_diam = 11/70 ex;
213 bulb_len = 1.0 bulb_diam;
214 left_angle = slant_angle - 2;
215 right_angle = slant_angle -11;
218 s_thin = serif_thick;
222 penpos1 (bulb_diam, -45);
223 z1 = 0.35 [z2l,z2r] + bulb_len * dir(45);
224 penpos2 (bulb_diam, -25);
225 y2l = 0.845 [y7r, y3r];
227 z2l = base_point + whatever * dir (90-left_angle);
228 penpos3 (s_thin, 100);
230 y3l = ypart base_point - over_shoot ;
232 penpos4 (s_thick, 25);
233 ypart z4l = ypart z1r;
234 z4r = base_point + (w,0) + whatever *dir(90-right_angle);
235 penpos5 (s_thick, 40);
236 z5 = z3l + whatever * dir (90-right_angle);
237 y5 = ypart (0.48 [z7r, z3r]);
240 penpos6 (s_thick, 25);
241 z6l = base_point + whatever *dir(90-left_angle);
244 penpos7 (.9 s_thin, 110);
245 z7l = 0.45 [z6r, z8l] + whatever * dir (90-left_angle);
246 y7r = h + over_shoot;
248 penpos8 (.9 bulb_diam, -25);
249 z8 = .6 [z4l,z4r] + whatever *dir(90-right_angle);
251 y8r = ypart (0.23 [z7r, z3r]);
253 penpos9 (.9 bulb_diam, -45);
254 z9 = .4 [z8r,z8l] + .9 bulb_len * dir (-135);
256 penlabels(1,2,3,4,5,6,7,8,9);
261 p := z2l{down} .. z3l{right} .. z4r{up}
267 .. z9r{right} .. z7r{left}
272 .. z2r{up} .. z1r{up}
273 .. z1l{left} .. cycle;
274 pickup pencircle scaled 1;
282 % piano p, grabbed from Ed Breitkopf Mozart horn concerto 3.
286 % * there is no dishing in the serif (but we do it anyway)
288 % * The cheek is a little fatter than the stem
290 % * The slant is extreme: 20 degrees
292 % * the twiddle (what'sitcalled) is a slightly darker than the serif
294 % * The hole in the cheek has a straight right side.
296 % * Corners are filled up.
301 slant := ypart (dir(slant_angle));
302 currenttransform := currenttransform slanted slant;
307 fet_beginchar("dynamic p", "p", "dynp")
309 % TODO w really is 13/12 ex
310 % but should do kerning
311 set_char_box (0, 15/12 ex#, descender#, 1.0 ex#);
313 save twiddle_thick, stem_thick, cheek_thick;
315 save serif, dishing_angle, p, q;
316 save cheek_medium, left_serif_protude, right_serif_protude;
317 save lower_overshoot;
323 updir := dir (90 - my_slant_angle );
324 twiddle_thick = med_thick;
325 cheek_medium = 1/6 ex;
328 fill_up := 1.5 serif_thick;
329 straigh_len = 0.5 ex;
330 lower_overshoot := .3 serif_thick;
333 cheek_thick = 13/32 ex;
334 cheek_width = 0.72 ex;
335 left_serif_protude = 18/60 ex;
336 right_serif_protude= 15/60 ex;
338 penpos1 (twiddle_thick, -slant - 5);
339 penpos2 (cheek_medium, 90 - slant );
340 penpos3 (cheek_medium, 90 - slant);
342 x4r - x4l = cheek_thick;
343 penpos4 (whatever, 0);
344 penpos5 (whatever, -38);
345 penpos6 (stem_thick, 0);
346 penpos17 (straigh_len, 90 -slant);
347 whatever [z17l, z17r] = z4l;
351 y6l = - descender + serif_thick/2;
352 z1l = z6l - whatever *dir (90 - my_slant_angle + 20 );
355 z7 = whatever * updir + z6l;
358 z2l = whatever *updir + 0.3 [z7, z1r];
359 y8 = ypart (0.9 [z7, z2l]);
360 z8 = 2/3 [z6l, z6r] + whatever * updir;
364 z3l = 0.58 [(stem_thick, -descender), (stem_thick + cheek_width - cheek_thick, -descender)] + whatever * updir;
366 z4r = whatever*updir + (stem_thick+ cheek_width, -descender);
368 z5l = whatever*updir + z3l;
369 y5r = -lower_overshoot;
370 y5l = y5r + cheek_medium * ypart dir(55);
372 z9 = z6r + whatever*updir;
376 z2r{right} .. {dir( -60)}z8 & z8{dir 35} .. z3r{right}
380 & z9 -- z6r -- z6l -- z7{updir}
381 .. z2l{left} .. tension 1.2 ..
382 % z1r & z1r -- z1l & z1l
383 simple_serif (z1r, z1l, -90)
387 save blot_t, corner_t;
390 corner_t := xpart (p intersectiontimes z9);
392 z19 = point corner_t - 2 blot_t of p;
393 z20 = point corner_t + blot_t of p;
399 pickup pencircle scaled 1;
401 fill z19{up} .. {right}z20{updir} .. z19{-(direction corner_t - 2 blot_t of p)} .. cycle;
403 pickup pencircle scaled 1;
407 z12 = z6r + whatever*updir;
412 z17l .. tension 1.5 .. z17r .. z3l{left}.. tension 1.05 .. z12{-updir} .. tension 1.05 .. z5l{right} .. cycle;
414 penlabels (1, 2, 3, 4, 5, 6, 17);
419 pickup pencircle scaled serif_thick;
420 lft x11 = -left_serif_protude;
421 rt x10 = stem_thick+ right_serif_protude;
422 bot y10 = bot y11 = -descender;
425 serif := simple_serif (z10, z11, dishing_angle);
428 labels(7,8, 9, 10, 11,12);
431 z13 = point 0.05 of serif;
432 z14 = point 0.85 of serif;
433 z15 = z6l + updir * fill_up +( serif_thick/2, 0);
434 z16 = z6r + updir * 1.2fill_up- +( serif_thick/2, 0);
435 labels(13,14, 15, 16);
437 % pickup pencircle scaled 1;
438 draw z13{direction 0.05 of serif} .. z16{updir};
439 draw z14{-(direction 0.85 of serif)} .. z15{updir};
445 % * right stem is fatter and more straight than the left 2 two stems.
447 % * The twiddle at the left is similar to the p twiddle
449 % * The bottoms of the stems are blotted.
454 % This is cut & paste programming. Somehow 3 i shapes in two chars (p and m)
455 % Doesn't seem worth the trouble of writing a macro.
459 fet_beginchar("dynamic m", "m", "dynm");
460 set_char_box (0, 1.5 ex#, 0, 1.0 ex#);
462 % should share code with p for twiddle.
464 save i_thick, i_angle, i_twiddle_thick,
465 i_twiddle_start_angle, i_twiddle_start_y,
468 save idir, center, right_ending;
470 pair center, idir, right_ending;
474 overshoot = .25 serif_thick;
475 i_thick := 21 / 80 ex;
477 idir := dir(90- i_angle);
479 i_left_space = 16/80 ex;
480 i_twiddle_thick = 1.2 serif_thick;
481 i_twiddle_start_y = 8/16 ex;
482 i_twiddle_start_angle = 0;
485 penpos1 (i_twiddle_thick, -i_twiddle_start_angle);
486 y1 = i_twiddle_start_y;
487 z1r = center - (i_left_space,0) + whatever * idir;
489 y3 = 0.5 bottom_blot + ypart center;
491 z3l = center + whatever * idir;
493 penpos4 (i_thick - bottom_blot, 0);
494 z4 - z3 = whatever * idir;
496 y2l = 1 ex + overshoot;
497 z2l = .08 [z3l, z3r] + whatever * idir;
498 z2r = 5/8 [z1r, z3l] + whatever * idir;
500 z2 = 1/2 [z2l, z2r] ;
502 z5 = z4 + whatever * idir;
505 p := simple_serif (z1l, z1r, 90) .. tension 1.2 .. z2r{right} .. z5l --- z3l
506 .. z4l --- z4r .. z3r --- z5r .. tension 1.2 .. z2l{left} .. cycle;
510 penlabels (1, 2, 3 , 4,5);
512 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
516 idir := dir(90 - i_angle);
517 i_left_space := 14/80 ex;
521 z5l = right_ending + (i_left_space,0);
522 penpos1(serif_thick, - i_twiddle_start_angle);
524 y3 = .5 bottom_blot + ypart center;
526 z3l = z5l + whatever * idir;
528 penpos4(i_thick - bottom_blot, 0);
529 z4 - z3 = whatever * idir;
531 y2l = 1 ex+ overshoot;
533 z2l = .08 [z3l, z3r] + whatever * idir;
534 z2r = 5/8 [z1r, z3l] + whatever * idir;
536 z2 = 1/2 [z2l, z2r] ;
539 p := simple_serif (z1l, z1r, 90) .. tension 1.05 .. z2r{right} .. z5l --- z3l
540 .. z4l --- z4r .. z3r --- z5r .. tension 1.2 .. z2l{left} .. cycle;
544 penlabels (1, 2, 3 , 4,5);
546 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
548 i_thick := 23 / 80 ex;
550 i_left_space := 14/80 ex;
553 idir := dir(90- i_angle);
555 z5l = right_ending + (i_left_space,0);
556 penpos5 (whatever, 10);
557 penpos3 (whatever, 20);
562 penpos1(serif_thick, - i_twiddle_start_angle);
564 z3l = z7l + whatever * idir;
565 z3r = z7r + whatever * idir;
566 z5l = z7l + whatever * idir;
567 z5r = z7r + whatever * idir;
569 save end_twiddle_angle;
570 end_twiddle_angle := 35;
571 penpos6(serif_thick, - end_twiddle_angle);
572 y6l = 23/80 ex + ypart center;
573 z6l = 1.6 [z3l, z3r] + whatever * idir;
577 y3l = 1/8 ex + ypart center;
578 y2l = 1 ex+ overshoot;
579 z2l = .08 [z3l, z3r] + whatever * idir;
580 z2r = 5/8 [z1r, z3l] + whatever * idir;
582 z2 = 1/2 [z2l, z2r] ;
583 z8 = z7 - (0, 1 overshoot);
585 p := simple_serif (z1l, z1r, 90) .. tension 1.05
586 .. z2r{right} .. z5l --- z3l
588 .. simple_serif(z6r, z6l, 90)
592 .. z2l{left} .. cycle;
594 % pickup pencircle scaled 1;
598 penlabels (1, 2, 3 , 4,5,6,7, 8);
607 currenttransform := identity slanted ypart(dir(15));
608 fet_beginchar("dynamic r", "r", "dynr");
609 set_char_box (0, .75 ex#, 0, 1ex#);
612 save base_point, stem_thick, bulb_diam;
613 save twiddle_thick, attach_len, overshoot, taille;
616 twiddle_thick= 1.1 serif_thick;
617 overshoot = .5 serif_thick;
619 taille = -0.3 serif_thick;
625 y1l = .5 bottom_blot;
627 penpos10(stem_thick - bottom_blot, 0);
631 penpos1 (stem_thick, 0);
632 y2l - y1l = 36/47 ex;
634 penpos2 (stem_thick, 0);
638 penpos3(twiddle_thick, -20);
640 x9 = 0.15 [x1r, x1l] ;
643 x4l = -0.1 [x1l, x1r];
644 y4l = ex + overshoot;
646 x4r = 0.62 [x3r, x2l];
647 y4r = 0.5 [y4l, y2l];
649 penpos5(whatever, -74);
650 y5l - y5r = bulb_diam;
651 y5l = ex + overshoot;
652 x5 = x2r + attach_len;
653 attach_len + bulb_diam/2 + stem_thick = w;
656 penpos6 (bulb_diam, 0);
657 % z7 = z6l + taille* dir(180);
661 z7 = z6 + .4 * bulb_diam * dir (-90 -alpha);
662 z8 = 9/10 [z1r, z2r];
668 p := z1r .. z10r --- z10l .. z1l
672 .. {down}simple_serif(z3r, z3l,-90){up}
684 pickup pencircle scaled 1;
687 penlabels (1,2,3, 4,5,6,7,8, 9, 10);
696 ligtable "m" : "p" kern 0.2 ex#, "f" kern -0.1 ex#;
697 ligtable "f" : "f" kern -0.13 ex#;
698 ligtable "r" : "f" kern 0.1 ex#;
709 %% notes from old dyn code.
711 % "f" obviously has a _lot_ bigger slant than "p" (see Wanske p.239)
712 % however; perhaps we need two f symbols:
713 % - a super-slanted one used in "f" "mf" "sfz" "sf", and
714 % - a more normal-slanted in "ff" "fff" "fp" "fp" (see Wanske p.241)
716 % looking at professionally typeset music reveals that typesetters
717 % are somewhat unsure about slanting in "mf", "fp", "sfz"
719 % "f" and "p" (in any combination) are a lot (factor two) fatter than
720 % "s", "m", and "z". sometimes the "m" and "z" are a bit fatter than
724 % Chester, Breitkopf suggest smaller sizes of these other chars,
725 % using the x-height as reference point.