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;
10 fet_beginchar("Space", "space", "space")
11 set_char_box(0, horizontal_space#, 0, ex#);
16 % Couldn't find many z examples. This one is losely inspired
17 % by a sfz from Mueller etuden fuer Horn (Edition Hofmeister.)
21 fet_beginchar ("dynamic z", "z", "dynz");
22 set_char_box (0, .98 ex#, 0, 0.9 ex#);
24 save thin_thick, top_narrow, over_shoot;
27 thin_thick = serif_thick;
28 top_narrow = thin_thick;
29 top_overshoot = .8 serif_thick;
32 bot_overshoot = serif_thick;
39 y2 = y1r - top_overshoot;
42 y3 = h - .7 thin_thick;
43 x3 = w - .6 top_narrow - .5 thin_thick;
49 y5l = .4 bot_overshoot;
51 x6 = w - 3 top_narrow;
54 x8r = w - .35 top_narrow;
58 penpos1(top_thick, 80);
59 penpos3 (thin_thick, angle(z3-z4) + 90);
60 penpos4(thin_thick, angle (z3-z4) + 90);
61 penpos5(bot_thick, 70);
62 penpos6(3/2 bot_thick, 70);
63 penpos8 (thin_thick, 20);
65 penlabels(range 0 thru 9);
73 .. simple_serif (z3l, z3r, 90) .. z2{left} .. z1r{left}
76 q := z3l -- z3r -- z4r -- z4l -- cycle;
77 r := simple_serif (z4r, z4l, 90) .. z5l{right}
80 .. simple_serif (z8r, z8l, 90)
81 .. z6r{left} .. z5r{left} .. cycle;
82 pickup pencircle scaled 1;
83 % draw p ; draw q ; draw r ;
85 fill p; fill q; fill r;
90 % forte f, grabbed from Ed Breitkopf Mozart horn concerto 3.
94 % * the bulbs are open.
96 % * blotting around the serif
100 % TODO: insert blots around the serif
108 fet_beginchar("dynamic f", "f", "dynf");
109 set_char_box (0, 1.1 ex#, descender#, ex# + ascender#);
111 save left_angle, right_angle;
112 save serif_length, serif_excentricity;
114 save bulb_thick, bulb_diam, fill_up;
117 bulb_diam = 7.5 / 40 ex;
118 bulb_thick = 8.5/40 ex;
119 fill_up = 1.5 serif_thick;
121 left_angle = slant_angle - 6;
122 right_angle = slant_angle - 3;
124 serif_length = 0.96 ex;
125 serif_excentricity = 0.01 ex;
128 % z1 is the "base point"
129 z1 = (0.2 ex, - serif_thick);
131 z2l = z1 + whatever*dir (90 - left_angle);
132 penpos2 (f_thick, 0);
134 y3l = y1 + ex + ascender;
136 penpos3 (med_thick, -90);
137 penpos4 (bulb_thick, -20);
138 z3r = whatever [z4r,z4l];
142 penpos5(bulb_thick, -45);
143 x5r = 0.1 [x4l, x4r];
144 y5l = y4l - bulb_diam;
146 z6 = z2r + whatever* dir (90 - right_angle);
151 penpos7(med_thick, -90);
153 penpos8 (bulb_thick, 160);
155 z7l = whatever [z8r,z8l];
157 penpos9 (bulb_thick, 135);
158 x9r = 0.1 [x8l, x8r];
159 y9l = y8l + bulb_diam;
161 penlabels(2, 3,4,5, 7, 8,9);
165 .. z3l{right} .. z4r{down}
166 .. z5r{left} .. z5l{up}
168 .. z4l{up} .. z3r{left}
170 .. z2r --- z6 .. tension 1.25 .. z7r{left}
171 .. z8r{up} .. z9r{right} .. z9l{down} .. tension 0.8
172 .. z8l{down} .. z7l{right} .. cycle;
173 pickup pencircle scaled 1;
178 % todo round for pixels...
180 pickup pencircle scaled round (1.4 serif_thick);
181 (rt x13) - (lft x14) = serif_length;
184 0.5 [x13, x14] = x2 + serif_excentricity;
196 % - The S is trapezoidal (i.e. narrower at the top)
198 % - The white space is differently shaped at the top (the bulb's inner
199 % curve is filled up.)
201 % - less heavy than the f and p signs.
206 fet_beginchar("dynamic s", "s", "dyns");
207 set_char_box (0, 17/24 ex#, 0, 1 ex#);
209 save left_angle, right_angle;
210 save s_thick, s_thin;
212 save bulb_diam, bulb_len;
214 over_shoot = 0; % .2 serif_thick;
217 bulb_diam = 11/70 ex;
218 bulb_len = 1.0 bulb_diam;
219 left_angle = slant_angle - 2;
220 right_angle = slant_angle -11;
223 s_thin = serif_thick;
227 penpos1 (bulb_diam, -45);
228 z1 = 0.35 [z2l,z2r] + bulb_len * dir(45);
229 penpos2 (bulb_diam, -25);
230 y2l = 0.845 [y7r, y3r];
232 z2l = base_point + whatever * dir (90-left_angle);
233 penpos3 (s_thin, 100);
235 y3l = ypart base_point - over_shoot ;
237 penpos4 (s_thick, 25);
238 ypart z4l = ypart z1r;
239 z4r = base_point + (w,0) + whatever *dir(90-right_angle);
240 penpos5 (s_thick, 40);
241 z5 = z3l + whatever * dir (90-right_angle);
242 y5 = ypart (0.48 [z7r, z3r]);
245 penpos6 (s_thick, 25);
246 z6l = base_point + whatever *dir(90-left_angle);
249 penpos7 (.9 s_thin, 110);
250 z7l = 0.45 [z6r, z8l] + whatever * dir (90-left_angle);
251 y7r = h + over_shoot;
253 penpos8 (.9 bulb_diam, -25);
254 z8 = .6 [z4l,z4r] + whatever *dir(90-right_angle);
256 y8r = ypart (0.23 [z7r, z3r]);
258 penpos9 (.9 bulb_diam, -45);
259 z9 = .4 [z8r,z8l] + .9 bulb_len * dir (-135);
261 penlabels(1,2,3,4,5,6,7,8,9);
266 p := z2l{down} .. z3l{right} .. z4r{up}
272 .. z9r{right} .. z7r{left}
277 .. z2r{up} .. z1r{up}
278 .. z1l{left} .. cycle;
279 pickup pencircle scaled 1;
287 % piano p, grabbed from Ed Breitkopf Mozart horn concerto 3.
291 % * there is no dishing in the serif (but we do it anyway)
293 % * The cheek is a little fatter than the stem
295 % * The slant is extreme: 20 degrees
297 % * the twiddle (what'sitcalled) is a slightly darker than the serif
299 % * The hole in the cheek has a straight right side.
301 % * Corners are filled up.
306 slant := ypart (dir(slant_angle));
307 currenttransform := currenttransform slanted slant;
312 fet_beginchar("dynamic p", "p", "dynp")
314 % TODO w really is 13/12 ex
315 % but should do kerning
316 set_char_box (0, 15/12 ex#, descender#, 1.0 ex#);
318 save twiddle_thick, stem_thick, cheek_thick;
320 save serif, dishing_angle, p, q;
321 save cheek_medium, left_serif_protude, right_serif_protude;
322 save lower_overshoot;
328 updir := dir (90 - my_slant_angle );
329 twiddle_thick = med_thick;
330 cheek_medium = 1/6 ex;
333 fill_up := 1.5 serif_thick;
334 straigh_len = 0.5 ex;
335 lower_overshoot := .3 serif_thick;
338 cheek_thick = 13/32 ex;
339 cheek_width = 0.72 ex;
340 left_serif_protude = 18/60 ex;
341 right_serif_protude= 15/60 ex;
343 penpos1 (twiddle_thick, -slant - 5);
344 penpos2 (cheek_medium, 90 - slant );
345 penpos3 (cheek_medium, 90 - slant);
347 x4r - x4l = cheek_thick;
348 penpos4 (whatever, 0);
349 penpos5 (whatever, -38);
350 penpos6 (stem_thick, 0);
351 penpos17 (straigh_len, 90 -slant);
352 whatever [z17l, z17r] = z4l;
356 y6l = - descender + serif_thick/2;
357 z1l = z6l - whatever *dir (90 - my_slant_angle + 20 );
360 z7 = whatever * updir + z6l;
363 z2l = whatever *updir + 0.3 [z7, z1r];
364 y8 = ypart (0.9 [z7, z2l]);
365 z8 = 2/3 [z6l, z6r] + whatever * updir;
369 z3l = 0.58 [(stem_thick, -descender), (stem_thick + cheek_width - cheek_thick, -descender)] + whatever * updir;
371 z4r = whatever*updir + (stem_thick+ cheek_width, -descender);
373 z5l = whatever*updir + z3l;
374 y5r = -lower_overshoot;
375 y5l = y5r + cheek_medium * ypart dir(55);
377 z9 = z6r + whatever*updir;
381 z2r{right} .. {dir( -60)}z8 & z8{dir 35} .. z3r{right}
385 & z9 -- z6r -- z6l -- z7{updir}
386 .. z2l{left} .. tension 1.2 ..
387 % z1r & z1r -- z1l & z1l
388 simple_serif (z1r, z1l, -90)
392 save blot_t, corner_t;
395 corner_t := xpart (p intersectiontimes z9);
397 z19 = point corner_t - 2 blot_t of p;
398 z20 = point corner_t + blot_t of p;
404 pickup pencircle scaled 1;
406 fill z19{up} .. {right}z20{updir} .. z19{-(direction corner_t - 2 blot_t of p)} .. cycle;
408 pickup pencircle scaled 1;
412 z12 = z6r + whatever*updir;
417 z17l .. tension 1.5 .. z17r .. z3l{left}.. tension 1.05 .. z12{-updir} .. tension 1.05 .. z5l{right} .. cycle;
419 penlabels (1, 2, 3, 4, 5, 6, 17);
424 pickup pencircle scaled serif_thick;
425 lft x11 = -left_serif_protude;
426 rt x10 = stem_thick+ right_serif_protude;
427 bot y10 = bot y11 = -descender;
430 serif := simple_serif (z10, z11, dishing_angle);
433 labels(7,8, 9, 10, 11,12);
436 z13 = point 0.05 of serif;
437 z14 = point 0.85 of serif;
438 z15 = z6l + updir * fill_up +( serif_thick/2, 0);
439 z16 = z6r + updir * 1.2fill_up- +( serif_thick/2, 0);
440 labels(13,14, 15, 16);
442 % pickup pencircle scaled 1;
443 draw z13{direction 0.05 of serif} .. z16{updir};
444 draw z14{-(direction 0.85 of serif)} .. z15{updir};
450 % * right stem is fatter and more straight than the left 2 two stems.
452 % * The twiddle at the left is similar to the p twiddle
454 % * The bottoms of the stems are blotted.
459 % This is cut & paste programming. Somehow 3 i shapes in two chars (p and m)
460 % Doesn't seem worth the trouble of writing a macro.
464 fet_beginchar("dynamic m", "m", "dynm");
465 set_char_box (0, 1.5 ex#, 0, 1.0 ex#);
467 % should share code with p for twiddle.
469 save i_thick, i_angle, i_twiddle_thick,
470 i_twiddle_start_angle, i_twiddle_start_y,
473 save idir, center, right_ending;
475 pair center, idir, right_ending;
479 overshoot = .25 serif_thick;
480 i_thick := 21 / 80 ex;
482 idir := dir(90- i_angle);
484 i_left_space = 16/80 ex;
485 i_twiddle_thick = 1.2 serif_thick;
486 i_twiddle_start_y = 8/16 ex;
487 i_twiddle_start_angle = 0;
490 penpos1 (i_twiddle_thick, -i_twiddle_start_angle);
491 y1 = i_twiddle_start_y;
492 z1r = center - (i_left_space,0) + whatever * idir;
494 y3 = 0.5 bottom_blot + ypart center;
496 z3l = center + whatever * idir;
498 penpos4 (i_thick - bottom_blot, 0);
499 z4 - z3 = whatever * idir;
501 y2l = 1 ex + overshoot;
502 z2l = .08 [z3l, z3r] + whatever * idir;
503 z2r = 5/8 [z1r, z3l] + whatever * idir;
505 z2 = 1/2 [z2l, z2r] ;
507 z5 = z4 + whatever * idir;
510 p := simple_serif (z1l, z1r, 90) .. tension 1.2 .. z2r{right} .. z5l --- z3l
511 .. z4l --- z4r .. z3r --- z5r .. tension 1.2 .. z2l{left} .. cycle;
515 penlabels (1, 2, 3 , 4,5);
517 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
521 idir := dir(90 - i_angle);
522 i_left_space := 14/80 ex;
526 z5l = right_ending + (i_left_space,0);
527 penpos1(serif_thick, - i_twiddle_start_angle);
529 y3 = .5 bottom_blot + ypart center;
531 z3l = z5l + whatever * idir;
533 penpos4(i_thick - bottom_blot, 0);
534 z4 - z3 = whatever * idir;
536 y2l = 1 ex+ overshoot;
538 z2l = .08 [z3l, z3r] + whatever * idir;
539 z2r = 5/8 [z1r, z3l] + whatever * idir;
541 z2 = 1/2 [z2l, z2r] ;
544 p := simple_serif (z1l, z1r, 90) .. tension 1.05 .. z2r{right} .. z5l --- z3l
545 .. z4l --- z4r .. z3r --- z5r .. tension 1.2 .. z2l{left} .. cycle;
549 penlabels (1, 2, 3 , 4,5);
551 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
553 i_thick := 23 / 80 ex;
555 i_left_space := 14/80 ex;
558 idir := dir(90- i_angle);
560 z5l = right_ending + (i_left_space,0);
561 penpos5 (whatever, 10);
562 penpos3 (whatever, 20);
567 penpos1(serif_thick, - i_twiddle_start_angle);
569 z3l = z7l + whatever * idir;
570 z3r = z7r + whatever * idir;
571 z5l = z7l + whatever * idir;
572 z5r = z7r + whatever * idir;
574 save end_twiddle_angle;
575 end_twiddle_angle := 35;
576 penpos6(serif_thick, - end_twiddle_angle);
577 y6l = 23/80 ex + ypart center;
578 z6l = 1.6 [z3l, z3r] + whatever * idir;
582 y3l = 1/8 ex + ypart center;
583 y2l = 1 ex+ overshoot;
584 z2l = .08 [z3l, z3r] + whatever * idir;
585 z2r = 5/8 [z1r, z3l] + whatever * idir;
587 z2 = 1/2 [z2l, z2r] ;
588 z8 = z7 - (0, 1 overshoot);
590 p := simple_serif (z1l, z1r, 90) .. tension 1.05
591 .. z2r{right} .. z5l --- z3l
593 .. simple_serif(z6r, z6l, 90)
597 .. z2l{left} .. cycle;
599 % pickup pencircle scaled 1;
603 penlabels (1, 2, 3 , 4,5,6,7, 8);
612 currenttransform := identity slanted ypart(dir(15));
613 fet_beginchar("dynamic r", "r", "dynr");
614 set_char_box (0, .75 ex#, 0, 1ex#);
617 save base_point, stem_thick, bulb_diam;
618 save twiddle_thick, attach_len, overshoot, taille;
621 twiddle_thick= 1.1 serif_thick;
622 overshoot = .5 serif_thick;
624 taille = -0.3 serif_thick;
630 y1l = .5 bottom_blot;
632 penpos10(stem_thick - bottom_blot, 0);
636 penpos1 (stem_thick, 0);
637 y2l - y1l = 36/47 ex;
639 penpos2 (stem_thick, 0);
643 penpos3(twiddle_thick, -20);
645 x9 = 0.15 [x1r, x1l] ;
648 x4l = -0.1 [x1l, x1r];
649 y4l = ex + overshoot;
651 x4r = 0.62 [x3r, x2l];
652 y4r = 0.5 [y4l, y2l];
654 penpos5(whatever, -74);
655 y5l - y5r = bulb_diam;
656 y5l = ex + overshoot;
657 x5 = x2r + attach_len;
658 attach_len + bulb_diam/2 + stem_thick = w;
661 penpos6 (bulb_diam, 0);
662 % z7 = z6l + taille* dir(180);
666 z7 = z6 + .4 * bulb_diam * dir (-90 -alpha);
667 z8 = 9/10 [z1r, z2r];
673 p := z1r .. z10r --- z10l .. z1l
677 .. {down}simple_serif(z3r, z3l,-90){up}
689 pickup pencircle scaled 1;
692 penlabels (1,2,3, 4,5,6,7,8, 9, 10);
701 ligtable "m" : "p" kern 0.2 ex#, "f" kern -0.1 ex#;
702 ligtable "f" : "f" kern -0.13 ex#;
703 ligtable "r" : "f" kern 0.1 ex#;
714 %% notes from old dyn code.
716 % "f" obviously has a _lot_ bigger slant than "p" (see Wanske p.239)
717 % however; perhaps we need two f symbols:
718 % - a super-slanted one used in "f" "mf" "sfz" "sf", and
719 % - a more normal-slanted in "ff" "fff" "fp" "fp" (see Wanske p.241)
721 % looking at professionally typeset music reveals that typesetters
722 % are somewhat unsure about slanting in "mf", "fp", "sfz"
724 % "f" and "p" (in any combination) are a lot (factor two) fatter than
725 % "s", "m", and "z". sometimes the "m" and "z" are a bit fatter than
729 % Chester, Breitkopf suggest smaller sizes of these other chars,
730 % using the x-height as reference point.