3 % TODO: blot diameter should be fixed, not scalable.
9 serif_thick# = 1.1 linethickness#;
10 define_blacker_pixels (serif_thick);
11 med_thick = round (1.5 linethickness);
12 bottom_blot = 1.3 serif_thick;
16 fet_beginchar("Space", "space", "space")
17 set_char_box(0, horizontal_space#, 0, ex#);
22 % Couldn't find many z examples. This one is losely inspired
23 % by a sfz from Mueller etuden fuer Horn (Edition Hofmeister.)
27 fet_beginchar ("dynamic z", "z", "z");
28 set_char_box (0, .98 ex#, 0, 0.9 ex#);
30 save thin_thick, top_narrow, over_shoot;
33 thin_thick = serif_thick;
34 top_narrow = thin_thick;
35 top_overshoot = .8 serif_thick;
38 bot_overshoot = serif_thick;
45 y2 = y1r - top_overshoot;
48 y3 = h - .7 thin_thick;
49 x3 = w - .6 top_narrow - .5 thin_thick;
55 y5l = .4 bot_overshoot;
57 x6 = w - 3 top_narrow;
60 x8r = w - .35 top_narrow;
64 penpos1(top_thick, 80);
65 penpos3 (thin_thick, angle(z3-z4) + 90);
66 penpos4(thin_thick, angle (z3-z4) + 90);
67 penpos5(bot_thick, 70);
68 penpos6(3/2 bot_thick, 70);
69 penpos8 (thin_thick, 20);
71 penlabels(range 0 thru 9);
79 .. simple_serif (z3l, z3r, 90) .. z2{left} .. z1r{left}
82 q := z3l -- z3r -- z4r -- z4l -- cycle;
83 r := simple_serif (z4r, z4l, 90) .. z5l{right}
86 .. simple_serif (z8r, z8l, 90)
87 .. z6r{left} .. z5r{left} .. cycle;
88 pickup pencircle scaled 1;
89 % draw p ; draw q ; draw r ;
91 fill p; fill q; fill r;
96 % forte f, grabbed from Ed Breitkopf Mozart horn concerto 3.
100 % * the bulbs are open.
102 % * blotting around the serif
106 % TODO: insert blots around the serif
114 fet_beginchar("dynamic f", "f", "f");
115 set_char_box (0, 1.1 ex#, descender#, ex# + ascender#);
117 save left_angle, right_angle;
118 save serif_length, serif_excentricity;
120 save bulb_thick, bulb_diam, fill_up;
123 bulb_diam = 7.5 / 40 ex;
124 bulb_thick = 8.5/40 ex;
125 fill_up = 1.5 serif_thick;
127 left_angle = slant_angle - 6;
128 right_angle = slant_angle - 3;
130 serif_length = 0.96 ex;
131 serif_excentricity = 0.01 ex;
134 % z1 is the "base point"
135 z1 = (0.2 ex, - serif_thick);
137 z2l = z1 + whatever*dir (90 - left_angle);
138 penpos2 (f_thick, 0);
140 y3l = y1 + ex + ascender;
142 penpos3 (med_thick, -90);
143 penpos4 (bulb_thick, -20);
144 z3r = whatever [z4r,z4l];
148 penpos5(bulb_thick, -45);
149 x5r = 0.1 [x4l, x4r];
150 y5l = y4l - bulb_diam;
152 z6 = z2r + whatever* dir (90 - right_angle);
157 penpos7(med_thick, -90);
159 penpos8 (bulb_thick, 160);
161 z7l = whatever [z8r,z8l];
163 penpos9 (bulb_thick, 135);
164 x9r = 0.1 [x8l, x8r];
165 y9l = y8l + bulb_diam;
167 penlabels(2, 3,4,5, 7, 8,9);
171 .. z3l{right} .. z4r{down}
172 .. z5r{left} .. z5l{up}
174 .. z4l{up} .. z3r{left}
176 .. z2r --- z6 .. tension 1.25 .. z7r{left}
177 .. z8r{up} .. z9r{right} .. z9l{down} .. tension 0.8
178 .. z8l{down} .. z7l{right} .. cycle;
179 pickup pencircle scaled 1;
184 % todo round for pixels...
186 pickup pencircle scaled round (1.4 serif_thick);
187 (rt x13) - (lft x14) = serif_length;
190 0.5 [x13, x14] = x2 + serif_excentricity;
202 % - The S is trapezoidal (i.e. narrower at the top)
204 % - The white space is differently shaped at the top (the bulb's inner
205 % curve is filled up.)
207 % - less heavy than the f and p signs.
212 fet_beginchar("dynamic s", "s", "s");
213 set_char_box (0, 17/24 ex#, 0, 1 ex#);
215 save left_angle, right_angle;
216 save s_thick, s_thin;
218 save bulb_diam, bulb_len;
220 over_shoot = 0; % .2 serif_thick;
223 bulb_diam = 11/70 ex;
224 bulb_len = 1.0 bulb_diam;
225 left_angle = slant_angle - 2;
226 right_angle = slant_angle -11;
229 s_thin = serif_thick;
233 penpos1 (bulb_diam, -45);
234 z1 = 0.35 [z2l,z2r] + bulb_len * dir(45);
235 penpos2 (bulb_diam, -25);
236 y2l = 0.845 [y7r, y3r];
238 z2l = base_point + whatever * dir (90-left_angle);
239 penpos3 (s_thin, 100);
241 y3l = ypart base_point - over_shoot ;
243 penpos4 (s_thick, 25);
244 ypart z4l = ypart z1r;
245 z4r = base_point + (w,0) + whatever *dir(90-right_angle);
246 penpos5 (s_thick, 40);
247 z5 = z3l + whatever * dir (90-right_angle);
248 y5 = ypart (0.48 [z7r, z3r]);
251 penpos6 (s_thick, 25);
252 z6l = base_point + whatever *dir(90-left_angle);
255 penpos7 (.9 s_thin, 110);
256 z7l = 0.45 [z6r, z8l] + whatever * dir (90-left_angle);
257 y7r = h + over_shoot;
259 penpos8 (.9 bulb_diam, -25);
260 z8 = .6 [z4l,z4r] + whatever *dir(90-right_angle);
262 y8r = ypart (0.23 [z7r, z3r]);
264 penpos9 (.9 bulb_diam, -45);
265 z9 = .4 [z8r,z8l] + .9 bulb_len * dir (-135);
267 penlabels(1,2,3,4,5,6,7,8,9);
272 p := z2l{down} .. z3l{right} .. z4r{up}
278 .. z9r{right} .. z7r{left}
283 .. z2r{up} .. z1r{up}
284 .. z1l{left} .. cycle;
285 pickup pencircle scaled 1;
293 % piano p, grabbed from Ed Breitkopf Mozart horn concerto 3.
297 % * there is no dishing in the serif (but we do it anyway)
299 % * The cheek is a little fatter than the stem
301 % * The slant is extreme: 20 degrees
303 % * the twiddle (what'sitcalled) is a slightly darker than the serif
305 % * The hole in the cheek has a straight right side.
307 % * Corners are filled up.
312 slant := ypart (dir(slant_angle));
313 currenttransform := currenttransform slanted slant;
318 fet_beginchar("dynamic p", "p", "p")
320 % TODO w really is 13/12 ex
321 % but should do kerning
322 set_char_box (0, 15/12 ex#, descender#, 1.0 ex#);
324 save twiddle_thick, stem_thick, cheek_thick;
326 save serif, dishing_angle, p, q;
327 save cheek_medium, left_serif_protude, right_serif_protude;
328 save lower_overshoot;
334 updir := dir (90 - my_slant_angle );
335 twiddle_thick = med_thick;
336 cheek_medium = 1/6 ex;
339 fill_up := 1.5 serif_thick;
340 straigh_len = 0.5 ex;
341 lower_overshoot := .3 serif_thick;
344 cheek_thick = 13/32 ex;
345 cheek_width = 0.72 ex;
346 left_serif_protude = 18/60 ex;
347 right_serif_protude= 15/60 ex;
349 penpos1 (twiddle_thick, -slant - 5);
350 penpos2 (cheek_medium, 90 - slant );
351 penpos3 (cheek_medium, 90 - slant);
353 x4r - x4l = cheek_thick;
354 penpos4 (whatever, 0);
355 penpos5 (whatever, -38);
356 penpos6 (stem_thick, 0);
357 penpos17 (straigh_len, 90 -slant);
358 whatever [z17l, z17r] = z4l;
362 y6l = - descender + serif_thick/2;
363 z1l = z6l - whatever *dir (90 - my_slant_angle + 20 );
366 z7 = whatever * updir + z6l;
369 z2l = whatever *updir + 0.3 [z7, z1r];
370 y8 = ypart (0.9 [z7, z2l]);
371 z8 = 2/3 [z6l, z6r] + whatever * updir;
375 z3l = 0.58 [(stem_thick, -descender), (stem_thick + cheek_width - cheek_thick, -descender)] + whatever * updir;
377 z4r = whatever*updir + (stem_thick+ cheek_width, -descender);
379 z5l = whatever*updir + z3l;
380 y5r = -lower_overshoot;
381 y5l = y5r + cheek_medium * ypart dir(55);
383 z9 = z6r + whatever*updir;
387 z2r{right} .. {dir( -60)}z8 & z8{dir 35} .. z3r{right}
391 & z9 -- z6r -- z6l -- z7{updir}
392 .. z2l{left} .. tension 1.2 ..
393 % z1r & z1r -- z1l & z1l
394 simple_serif (z1r, z1l, -90)
398 save blot_t, corner_t;
401 corner_t := xpart (p intersectiontimes z9);
403 z19 = point corner_t - 2 blot_t of p;
404 z20 = point corner_t + blot_t of p;
410 pickup pencircle scaled 1;
412 fill z19{up} .. {right}z20{updir} .. z19{-(direction corner_t - 2 blot_t of p)} .. cycle;
414 pickup pencircle scaled 1;
418 z12 = z6r + whatever*updir;
423 z17l .. tension 1.5 .. z17r .. z3l{left}.. tension 1.05 .. z12{-updir} .. tension 1.05 .. z5l{right} .. cycle;
425 penlabels (1, 2, 3, 4, 5, 6, 17);
430 pickup pencircle scaled serif_thick;
431 lft x11 = -left_serif_protude;
432 rt x10 = stem_thick+ right_serif_protude;
433 bot y10 = bot y11 = -descender;
436 serif := simple_serif (z10, z11, dishing_angle);
439 labels(7,8, 9, 10, 11,12);
442 z13 = point 0.05 of serif;
443 z14 = point 0.85 of serif;
444 z15 = z6l + updir * fill_up +( serif_thick/2, 0);
445 z16 = z6r + updir * 1.2fill_up- +( serif_thick/2, 0);
446 labels(13,14, 15, 16);
448 % pickup pencircle scaled 1;
449 draw z13{direction 0.05 of serif} .. z16{updir};
450 draw z14{-(direction 0.85 of serif)} .. z15{updir};
456 % * right stem is fatter and more straight than the left 2 two stems.
458 % * The twiddle at the left is similar to the p twiddle
460 % * The bottoms of the stems are blotted.
465 % This is cut & paste programming. Somehow 3 i shapes in two chars (p and m)
466 % Doesn't seem worth the trouble of writing a macro.
470 fet_beginchar("dynamic m", "m", "m");
471 set_char_box (0, 1.5 ex#, 0, 1.0 ex#);
473 % should share code with p for twiddle.
475 save i_thick, i_angle, i_twiddle_thick,
476 i_twiddle_start_angle, i_twiddle_start_y,
479 save idir, center, right_ending;
481 pair center, idir, right_ending;
485 overshoot = .25 serif_thick;
486 i_thick := 21 / 80 ex;
488 idir := dir(90- i_angle);
490 i_left_space = 16/80 ex;
491 i_twiddle_thick = 1.2 serif_thick;
492 i_twiddle_start_y = 8/16 ex;
493 i_twiddle_start_angle = 0;
496 penpos1 (i_twiddle_thick, -i_twiddle_start_angle);
497 y1 = i_twiddle_start_y;
498 z1r = center - (i_left_space,0) + whatever * idir;
500 y3 = 0.5 bottom_blot + ypart center;
502 z3l = center + whatever * idir;
504 penpos4 (i_thick - bottom_blot, 0);
505 z4 - z3 = whatever * idir;
507 y2l = 1 ex + overshoot;
508 z2l = .08 [z3l, z3r] + whatever * idir;
509 z2r = 5/8 [z1r, z3l] + whatever * idir;
511 z2 = 1/2 [z2l, z2r] ;
513 z5 = z4 + whatever * idir;
516 p := simple_serif (z1l, z1r, 90) .. tension 1.2 .. z2r{right} .. z5l --- z3l
517 .. z4l --- z4r .. z3r --- z5r .. tension 1.2 .. z2l{left} .. cycle;
521 penlabels (1, 2, 3 , 4,5);
523 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
527 idir := dir(90 - i_angle);
528 i_left_space := 14/80 ex;
532 z5l = right_ending + (i_left_space,0);
533 penpos1(serif_thick, - i_twiddle_start_angle);
535 y3 = .5 bottom_blot + ypart center;
537 z3l = z5l + whatever * idir;
539 penpos4(i_thick - bottom_blot, 0);
540 z4 - z3 = whatever * idir;
542 y2l = 1 ex+ overshoot;
544 z2l = .08 [z3l, z3r] + whatever * idir;
545 z2r = 5/8 [z1r, z3l] + whatever * idir;
547 z2 = 1/2 [z2l, z2r] ;
550 p := simple_serif (z1l, z1r, 90) .. tension 1.05 .. z2r{right} .. z5l --- z3l
551 .. z4l --- z4r .. z3r --- z5r .. tension 1.2 .. z2l{left} .. cycle;
555 penlabels (1, 2, 3 , 4,5);
557 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
559 i_thick := 23 / 80 ex;
561 i_left_space := 14/80 ex;
564 idir := dir(90- i_angle);
566 z5l = right_ending + (i_left_space,0);
567 penpos5 (whatever, 10);
568 penpos3 (whatever, 20);
573 penpos1(serif_thick, - i_twiddle_start_angle);
575 z3l = z7l + whatever * idir;
576 z3r = z7r + whatever * idir;
577 z5l = z7l + whatever * idir;
578 z5r = z7r + whatever * idir;
580 save end_twiddle_angle;
581 end_twiddle_angle := 35;
582 penpos6(serif_thick, - end_twiddle_angle);
583 y6l = 23/80 ex + ypart center;
584 z6l = 1.6 [z3l, z3r] + whatever * idir;
588 y3l = 1/8 ex + ypart center;
589 y2l = 1 ex+ overshoot;
590 z2l = .08 [z3l, z3r] + whatever * idir;
591 z2r = 5/8 [z1r, z3l] + whatever * idir;
593 z2 = 1/2 [z2l, z2r] ;
594 z8 = z7 - (0, 1 overshoot);
596 p := simple_serif (z1l, z1r, 90) .. tension 1.05
597 .. z2r{right} .. z5l --- z3l
599 .. simple_serif(z6r, z6l, 90)
603 .. z2l{left} .. cycle;
605 % pickup pencircle scaled 1;
609 penlabels (1, 2, 3 , 4,5,6,7, 8);
618 currenttransform := identity slanted ypart(dir(15));
619 fet_beginchar("dynamic r", "r", "r");
620 set_char_box (0, .75 ex#, 0, 1ex#);
623 save base_point, stem_thick, bulb_diam;
624 save twiddle_thick, attach_len, overshoot, taille;
627 twiddle_thick= 1.1 serif_thick;
628 overshoot = .5 serif_thick;
630 taille = -0.3 serif_thick;
636 y1l = .5 bottom_blot;
638 penpos10(stem_thick - bottom_blot, 0);
642 penpos1 (stem_thick, 0);
643 y2l - y1l = 36/47 ex;
645 penpos2 (stem_thick, 0);
649 penpos3(twiddle_thick, -20);
651 x9 = 0.15 [x1r, x1l] ;
654 x4l = -0.1 [x1l, x1r];
655 y4l = ex + overshoot;
657 x4r = 0.62 [x3r, x2l];
658 y4r = 0.5 [y4l, y2l];
660 penpos5(whatever, -74);
661 y5l - y5r = bulb_diam;
662 y5l = ex + overshoot;
663 x5 = x2r + attach_len;
664 attach_len + bulb_diam/2 + stem_thick = w;
667 penpos6 (bulb_diam, 0);
668 % z7 = z6l + taille* dir(180);
672 z7 = z6 + .4 * bulb_diam * dir (-90 -alpha);
673 z8 = 9/10 [z1r, z2r];
679 p := z1r .. z10r --- z10l .. z1l
683 .. {down}simple_serif(z3r, z3l,-90){up}
695 pickup pencircle scaled 1;
698 penlabels (1,2,3, 4,5,6,7,8, 9, 10);
707 ligtable "m" : "p" kern 0.2 ex#, "f" kern -0.1 ex#;
708 ligtable "f" : "f" kern -0.13 ex#;
709 ligtable "r" : "f" kern 0.1 ex#;
720 %% notes from old dyn code.
722 % "f" obviously has a _lot_ bigger slant than "p" (see Wanske p.239)
723 % however; perhaps we need two f symbols:
724 % - a super-slanted one used in "f" "mf" "sfz" "sf", and
725 % - a more normal-slanted in "ff" "fff" "fp" "fp" (see Wanske p.241)
727 % looking at professionally typeset music reveals that typesetters
728 % are somewhat unsure about slanting in "mf", "fp", "sfz"
730 % "f" and "p" (in any combination) are a lot (factor two) fatter than
731 % "s", "m", and "z". sometimes the "m" and "z" are a bit fatter than
735 % Chester, Breitkopf suggest smaller sizes of these other chars,
736 % using the x-height as reference point.