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 % forte f, grabbed from Ed Breitkopf Mozart horn concerto 3.
14 % * the bulbs are open.
16 % * blotting around the serif
20 % TODO: insert blots around the serif
28 fet_beginchar("dynamic f", "f", "dynf");
29 set_char_box (0, 1.1 ex#, descender#, ex# + ascender#);
31 save left_angle, right_angle;
32 save serif_length, serif_excentricity;
34 save bulb_thick, bulb_diam, fill_up;
37 bulb_diam = 7.5 / 40 ex;
38 bulb_thick = 8.5/40 ex;
39 fill_up = 1.5 serif_thick;
41 left_angle = slant_angle - 6;
42 right_angle = slant_angle - 3;
44 serif_length = 0.96 ex;
45 serif_excentricity = 0.01 ex;
48 % z1 is the "base point"
49 z1 = (0.2 ex, - serif_thick);
51 z2l = z1 + whatever*dir (90 - left_angle);
54 y3l = y1 + ex + ascender;
56 penpos3 (med_thick, -90);
57 penpos4 (bulb_thick, -20);
58 z3r = whatever [z4r,z4l];
62 penpos5(bulb_thick, -45);
64 y5l = y4l - bulb_diam;
66 z6 = z2r + whatever* dir (90 - right_angle);
71 penpos7(med_thick, -90);
73 penpos8 (bulb_thick, 160);
75 z7l = whatever [z8r,z8l];
77 penpos9 (bulb_thick, 135);
79 y9l = y8l + bulb_diam;
81 penlabels(2, 3,4,5, 7, 8,9);
85 .. z3l{right} .. z4r{down}
86 .. z5r{left} .. z5l{up}
88 .. z4l{up} .. z3r{left}
90 .. z2r --- z6 .. tension 1.25 .. z7r{left}
91 .. z8r{up} .. z9r{right} .. z9l{down} .. tension 0.8
92 .. z8l{down} .. z7l{right} .. cycle;
93 pickup pencircle scaled 1;
98 % todo round for pixels...
100 pickup pencircle scaled round (1.4 serif_thick);
101 (rt x13) - (lft x14) = serif_length;
104 0.5 [x13, x14] = x2 + serif_excentricity;
116 % - The S is trapezoidal (i.e. narrower at the top)
118 % - The white space is differently shaped at the top (the bulb's inner
119 % curve is filled up.)
121 % - less heavy than the f and p signs.
126 fet_beginchar("dynamic s", "s", "dyns");
127 set_char_box (0, 17/24 ex#, 0, 1 ex#);
129 save left_angle, right_angle;
130 save s_thick, s_thin;
132 save bulb_diam, bulb_len;
134 over_shoot = 0; % .2 serif_thick;
137 bulb_diam = 11/70 ex;
138 bulb_len = 1.0 bulb_diam;
139 left_angle = slant_angle - 2;
140 right_angle = slant_angle -11;
143 s_thin = serif_thick;
147 penpos1 (bulb_diam, -45);
148 z1 = 0.35 [z2l,z2r] + bulb_len * dir(45);
149 penpos2 (bulb_diam, -25);
150 y2l = 0.845 [y7r, y3r];
152 z2l = base_point + whatever * dir (90-left_angle);
153 penpos3 (s_thin, 100);
155 y3l = ypart base_point - over_shoot ;
157 penpos4 (s_thick, 25);
158 ypart z4l = ypart z1r;
159 z4r = base_point + (w,0) + whatever *dir(90-right_angle);
160 penpos5 (s_thick, 40);
161 z5 = z3l + whatever * dir (90-right_angle);
162 y5 = ypart (0.48 [z7r, z3r]);
165 penpos6 (s_thick, 25);
166 z6l = base_point + whatever *dir(90-left_angle);
169 penpos7 (.9 s_thin, 110);
170 z7l = 0.45 [z6r, z8l] + whatever * dir (90-left_angle);
171 y7r = h + over_shoot;
173 penpos8 (.9 bulb_diam, -25);
174 z8 = .6 [z4l,z4r] + whatever *dir(90-right_angle);
176 y8r = ypart (0.23 [z7r, z3r]);
178 penpos9 (.9 bulb_diam, -45);
179 z9 = .4 [z8r,z8l] + .9 bulb_len * dir (-135);
181 penlabels(1,2,3,4,5,6,7,8,9);
186 p := z2l{down} .. z3l{right} .. z4r{up}
192 .. z9r{right} .. z7r{left}
197 .. z2r{up} .. z1r{up}
198 .. z1l{left} .. cycle;
199 pickup pencircle scaled 1;
207 % piano p, grabbed from Ed Breitkopf Mozart horn concerto 3.
211 % * there is no dishing in the serif (but we do it anyway)
213 % * The cheek is a little fatter than the stem
215 % * The slant is extreme: 20 degrees
217 % * the twiddle (what'sitcalled) is a slightly darker than the serif
219 % * The hole in the cheek has a straight right side.
221 % * Corners are filled up.
226 slant := ypart (dir(slant_angle));
227 currenttransform := currenttransform slanted slant;
232 fet_beginchar("dynamic p", "p", "dynp")
234 % TODO w really is 13/12 ex
235 % but should do kerning
236 set_char_box (0, 15/12 ex#, descender#, 1.0 ex#);
238 save twiddle_thick, stem_thick, cheek_thick;
240 save serif, dishing_angle, p, q;
241 save cheek_medium, left_serif_protude, right_serif_protude;
242 save lower_overshoot;
248 updir := dir (90 - my_slant_angle );
249 twiddle_thick = med_thick;
250 cheek_medium = 1/6 ex;
253 fill_up := 1.5 serif_thick;
254 straigh_len = 0.5 ex;
255 lower_overshoot := .3 serif_thick;
258 cheek_thick = 13/32 ex;
259 cheek_width = 0.72 ex;
260 left_serif_protude = 18/60 ex;
261 right_serif_protude= 15/60 ex;
263 penpos1 (twiddle_thick, -slant - 5);
264 penpos2 (cheek_medium, 90 - slant );
265 penpos3 (cheek_medium, 90 - slant);
267 x4r - x4l = cheek_thick;
268 penpos4 (whatever, 0);
269 penpos5 (whatever, -38);
270 penpos6 (stem_thick, 0);
271 penpos17 (straigh_len, 90 -slant);
272 whatever [z17l, z17r] = z4l;
276 y6l = - descender + serif_thick/2;
277 z1l = z6l - whatever *dir (90 - my_slant_angle + 20 );
280 z7 = whatever * updir + z6l;
283 z2l = whatever *updir + 0.3 [z7, z1r];
284 y8 = ypart (0.9 [z7, z2l]);
285 z8 = 2/3 [z6l, z6r] + whatever * updir;
289 z3l = 0.58 [(stem_thick, -descender), (stem_thick + cheek_width - cheek_thick, -descender)] + whatever * updir;
291 z4r = whatever*updir + (stem_thick+ cheek_width, -descender);
293 z5l = whatever*updir + z3l;
294 y5r = -lower_overshoot;
295 y5l = y5r + cheek_medium * ypart dir(55);
297 z9 = z6r + whatever*updir;
301 z2r{right} .. {dir( -60)}z8 & z8{dir 35} .. z3r{right}
305 & z9 -- z6r -- z6l -- z7{updir}
306 .. z2l{left} .. tension 1.2 ..
307 % z1r & z1r -- z1l & z1l
308 simple_serif (z1r, z1l, -90)
312 save blot_t, corner_t;
315 corner_t := xpart (p intersectiontimes z9);
317 z19 = point corner_t - 2 blot_t of p;
318 z20 = point corner_t + blot_t of p;
324 pickup pencircle scaled 1;
326 fill z19{up} .. {right}z20{updir} .. z19{-(direction corner_t - 2 blot_t of p)} .. cycle;
328 pickup pencircle scaled 1;
332 z12 = z6r + whatever*updir;
337 z17l .. tension 1.5 .. z17r .. z3l{left}.. tension 1.05 .. z12{-updir} .. tension 1.05 .. z5l{right} .. cycle;
339 penlabels (1, 2, 3, 4, 5, 6, 17);
344 pickup pencircle scaled serif_thick;
345 lft x11 = -left_serif_protude;
346 rt x10 = stem_thick+ right_serif_protude;
347 bot y10 = bot y11 = -descender;
350 serif := simple_serif (z10, z11, dishing_angle);
353 labels(7,8, 9, 10, 11,12);
356 z13 = point 0.05 of serif;
357 z14 = point 0.85 of serif;
358 z15 = z6l + updir * fill_up +( serif_thick/2, 0);
359 z16 = z6r + updir * 1.2fill_up- +( serif_thick/2, 0);
360 labels(13,14, 15, 16);
362 % pickup pencircle scaled 1;
363 draw z13{direction 0.05 of serif} .. z16{updir};
364 draw z14{-(direction 0.85 of serif)} .. z15{updir};
370 % * right stem is fatter and more straight than the left 2 two stems.
372 % * The twiddle at the left is similar to the p twiddle
374 % * The bottoms of the stems are blotted.
379 % This is cut & paste programming. Somehow 3 i shapes in two chars (p and m)
380 % Doesn't seem worth the trouble of writing a macro.
384 fet_beginchar("dynamic m", "m", "dynm");
385 set_char_box (0, 1.5 ex#, 0, 1.0 ex#);
387 % should share code with p for twiddle.
389 save i_thick, i_angle, i_twiddle_thick,
390 i_twiddle_start_angle, i_twiddle_start_y,
393 save idir, center, right_ending;
395 pair center, idir, right_ending;
399 overshoot = .25 serif_thick;
400 i_thick := 21 / 80 ex;
402 idir := dir(90- i_angle);
404 i_left_space = 16/80 ex;
405 i_twiddle_thick = 1.2 serif_thick;
406 i_twiddle_start_y = 8/16 ex;
407 i_twiddle_start_angle = 0;
410 penpos1 (i_twiddle_thick, -i_twiddle_start_angle);
411 y1 = i_twiddle_start_y;
412 z1r = center - (i_left_space,0) + whatever * idir;
414 y3 = 0.5 bottom_blot + ypart center;
416 z3l = center + whatever * idir;
418 penpos4 (i_thick - bottom_blot, 0);
419 z4 - z3 = whatever * idir;
421 y2l = 1 ex + overshoot;
422 z2l = .08 [z3l, z3r] + whatever * idir;
423 z2r = 5/8 [z1r, z3l] + whatever * idir;
425 z2 = 1/2 [z2l, z2r] ;
427 z5 = z4 + whatever * idir;
430 p := simple_serif (z1l, z1r, 90) .. tension 1.2 .. z2r{right} .. z5l --- z3l
431 .. z4l --- z4r .. z3r --- z5r .. tension 1.2 .. z2l{left} .. cycle;
435 penlabels (1, 2, 3 , 4,5);
437 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
441 idir := dir(90 - i_angle);
442 i_left_space := 14/80 ex;
446 z5l = right_ending + (i_left_space,0);
447 penpos1(serif_thick, - i_twiddle_start_angle);
449 y3 = .5 bottom_blot + ypart center;
451 z3l = z5l + whatever * idir;
453 penpos4(i_thick - bottom_blot, 0);
454 z4 - z3 = whatever * idir;
456 y2l = 1 ex+ overshoot;
458 z2l = .08 [z3l, z3r] + whatever * idir;
459 z2r = 5/8 [z1r, z3l] + whatever * idir;
461 z2 = 1/2 [z2l, z2r] ;
464 p := simple_serif (z1l, z1r, 90) .. tension 1.05 .. z2r{right} .. z5l --- z3l
465 .. z4l --- z4r .. z3r --- z5r .. tension 1.2 .. z2l{left} .. cycle;
469 penlabels (1, 2, 3 , 4,5);
471 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
473 i_thick := 23 / 80 ex;
475 i_left_space := 14/80 ex;
478 idir := dir(90- i_angle);
480 z5l = right_ending + (i_left_space,0);
481 penpos5 (whatever, 10);
482 penpos3 (whatever, 20);
487 penpos1(serif_thick, - i_twiddle_start_angle);
489 z3l = z7l + whatever * idir;
490 z3r = z7r + whatever * idir;
491 z5l = z7l + whatever * idir;
492 z5r = z7r + whatever * idir;
494 save end_twiddle_angle;
495 end_twiddle_angle := 35;
496 penpos6(serif_thick, - end_twiddle_angle);
497 y6l = 23/80 ex + ypart center;
498 z6l = 1.6 [z3l, z3r] + whatever * idir;
502 y3l = 1/8 ex + ypart center;
503 y2l = 1 ex+ overshoot;
504 z2l = .08 [z3l, z3r] + whatever * idir;
505 z2r = 5/8 [z1r, z3l] + whatever * idir;
507 z2 = 1/2 [z2l, z2r] ;
508 z8 = z7 - (0, 1 overshoot);
510 p := simple_serif (z1l, z1r, 90) .. tension 1.05
511 .. z2r{right} .. z5l --- z3l
513 .. simple_serif(z6r, z6l, 90)
517 .. z2l{left} .. cycle;
519 % pickup pencircle scaled 1;
523 penlabels (1, 2, 3 , 4,5,6,7, 8);
532 currenttransform := identity slanted ypart(dir(15));
533 fet_beginchar("dynamic r", "r", "dynr");
534 set_char_box (0, .75 ex#, 0, 1ex#);
537 save base_point, stem_thick, bulb_diam;
538 save twiddle_thick, attach_len, overshoot, taille;
541 twiddle_thick= 1.1 serif_thick;
542 overshoot = .5 serif_thick;
544 taille = -0.3 serif_thick;
550 y1l = .5 bottom_blot;
552 penpos10(stem_thick - bottom_blot, 0);
556 penpos1 (stem_thick, 0);
557 y2l - y1l = 36/47 ex;
559 penpos2 (stem_thick, 0);
563 penpos3(twiddle_thick, -20);
565 x9 = 0.15 [x1r, x1l] ;
568 x4l = -0.1 [x1l, x1r];
569 y4l = ex + overshoot;
571 x4r = 0.62 [x3r, x2l];
572 y4r = 0.5 [y4l, y2l];
574 penpos5(whatever, -74);
575 y5l - y5r = bulb_diam;
576 y5l = ex + overshoot;
577 x5 = x2r + attach_len;
578 attach_len + bulb_diam/2 + stem_thick = w;
581 penpos6 (bulb_diam, 0);
582 % z7 = z6l + taille* dir(180);
586 z7 = z6 + .4 * bulb_diam * dir (-90 -alpha);
587 z8 = 9/10 [z1r, z2r];
593 p := z1r .. z10r --- z10l .. z1l
597 .. {down}simple_serif(z3r, z3l,-90){up}
609 pickup pencircle scaled 1;
612 penlabels (1,2,3, 4,5,6,7,8, 9, 10);
621 ligtable "m" : "p" kern 0.15 ex#, "f" kern -0.1 ex#;
622 ligtable "f" : "f" kern -0.13 ex#;
623 ligtable "r" : "f" kern 0.1 ex#;
634 %% notes from old dyn code.
636 % "f" obviously has a _lot_ bigger slant than "p" (see Wanske p.239)
637 % however; perhaps we need two f symbols:
638 % - a super-slanted one used in "f" "mf" "sfz" "sf", and
639 % - a more normal-slanted in "ff" "fff" "fp" "fp" (see Wanske p.241)
641 % looking at professionally typeset music reveals that typesetters
642 % are somewhat unsure about slanting in "mf", "fp", "sfz"
644 % "f" and "p" (in any combination) are a lot (factor two) fatter than
645 % "s", "m", and "z". sometimes the "m" and "z" are a bit fatter than
649 % Chester, Breitkopf suggest smaller sizes of these other chars,
650 % using the x-height as reference point.