5 serif_thick# = 1.1 stafflinethickness#;
6 define_blacker_pixels (serif_thick);
7 med_thick = round (1.5 stafflinethickness);
11 % forte f, grabbed from Ed Breitkopf Mozart horn concerto 3.
15 % * the bulbs are open.
17 % * blotting around the serif
21 % TODO: insert blots around the serif
29 fet_beginchar("dynamic f", "f", "dynf");
30 set_char_box (0, 1.25 ex#, descender#, ex# + ascender#);
32 save left_angle, right_angle;
33 save serif_length, serif_excentricity;
35 save bulb_thick, bulb_diam, fill_up;
38 bulb_diam = 7.5 / 40 ex;
39 bulb_thick = 8.5/40 ex;
40 fill_up = 1.5 serif_thick;
42 left_angle = slant_angle - 6;
43 right_angle = slant_angle - 3;
45 serif_length = 0.96 ex;
46 serif_excentricity = 0.01 ex;
48 z1 = (0.375 ex, - serif_thick);
50 z2l = z1 + whatever*dir (90 - left_angle);
53 y3l = y1 + ex + ascender;
55 penpos3 (med_thick, -90);
56 penpos4 (bulb_thick, -20);
57 z3r = whatever [z4r,z4l];
61 penpos5(bulb_thick, -45);
63 y5l = y4l - bulb_diam;
65 z6 = z2r + whatever* dir (90 - right_angle);
70 penpos7(med_thick, -90);
72 penpos8 (bulb_thick, 160);
74 z7l = whatever [z8r,z8l];
76 penpos9 (bulb_thick, 135);
78 y9l = y8l + bulb_diam;
80 penlabels(2, 3,4,5, 7, 8,9);
84 .. z3l{right} .. z4r{down}
85 .. z5r{left} .. z5l{up}
87 .. z4l{up} .. z3r{left}
89 .. z2r --- z6 .. tension 1.25 .. z7r{left}
90 .. z8r{up} .. z9r{right} .. z9l{down} .. tension 0.8
91 .. z8l{down} .. z7l{right} .. cycle;
92 pickup pencircle scaled 1;
96 pickup pencircle scaled 1.1 serif_thick;
97 (rt x13) - (lft x14) = serif_length;
100 0.5 [x13, x14] = x2 + serif_excentricity;
110 slant := ypart (dir(20));
113 % piano p, grabbed from Ed Breitkopf Mozart horn concerto 3.
117 % * there is no dishing in the serif (but we do it anyway)
119 % * The cheek is a little fatter than the stem
121 % * The slant is extreme: 20 degrees
123 % * the twiddle (what'sitcalled) is a slightly darker than the serif
125 % * The hole in the cheek has a straight right side.
127 % * Corners are filled up.
132 slant := ypart (dir(slant_angle));
133 currenttransform := currenttransform slanted slant;
136 fet_beginchar("dynamic p", "p", "dynp")
138 % TODO w really is 13/12 ex
139 % but should do kerning
140 set_char_box (0, 15/12 ex#, descender#, 1.0 ex#);
142 save twiddle_thick, stem_thick, cheek_thick;
144 save serif, dishing_angle, p, q;
145 save cheek_medium, left_serif_protude, right_serif_protude;
151 updir := dir (90 - my_slant_angle );
152 twiddle_thick = med_thick;
153 cheek_medium = 1/6 ex;
156 fill_up := 1.5 serif_thick;
157 straigh_len = 0.5 ex;
160 cheek_thick = 13/32 ex;
161 cheek_width = 0.72 ex;
162 left_serif_protude = 18/60 ex;
163 right_serif_protude= 15/60 ex;
165 penpos1 (twiddle_thick, -slant - 5);
166 penpos2 (cheek_medium, 90 - slant );
167 penpos3 (cheek_medium, 90 - slant);
169 x4r - x4l = cheek_thick;
170 penpos4 (whatever, 0);
171 penpos5 (cheek_medium, -55);
172 penpos6 (stem_thick, 0);
173 penpos17 (straigh_len, 90 -slant);
174 whatever [z17l, z17r] = z4l;
178 y6l = - descender + serif_thick/2;
179 z1l = z6l - whatever *dir (90 - my_slant_angle + 20 );
182 z7 = whatever * updir + z6l;
185 z2l = whatever *updir + 0.3 [z7, z1r];
186 y8 = ypart (0.9 [z7, z2l]);
187 z8 = 2/3 [z6l, z6r] + whatever * updir;
191 z3l = 0.58 [(stem_thick, -descender), (stem_thick + cheek_width - cheek_thick, -descender)] + whatever * updir;
193 z4r = whatever*updir + (stem_thick+ cheek_width, -descender);
195 z5l = whatever*updir + z3l;
198 z9 = z6r + whatever*updir;
202 z2r{right} .. {dir( -60)}z8 & z8{dir 35} .. z3r{right}
203 .. tension 1.0 .. z4r{-updir} .. z5r{left} .. z9
204 & z9 -- z6r -- z6l -- z7{updir}
205 .. z2l{left} .. tension 1.2 ..
206 % z1r & z1r -- z1l & z1l
207 simple_serif (z1r, z1l, -90)
209 pickup pencircle scaled 1;
213 z12 = z6r + whatever*updir;
218 z17l .. tension 1.5 .. z17r .. z3l{left}.. tension 1.05 .. z12{-updir} .. tension 1.05 .. z5l{right} .. cycle;
220 penlabels (1, 2, 3, 4, 5, 6, 17);
225 pickup pencircle scaled serif_thick;
226 lft x11 = -left_serif_protude;
227 rt x10 = stem_thick+ right_serif_protude;
228 bot y10 = bot y11 = -descender;
231 serif := simple_serif (z10, z11, dishing_angle);
234 labels(7,8, 9, 10, 11,12);
237 z13 = point 0.05 of serif;
238 z14 = point 0.85 of serif;
239 z15 = z6l + updir * fill_up +( serif_thick/2, 0);
240 z16 = z6r + updir * 1.2fill_up- +( serif_thick/2, 0);
241 labels(13,14, 15, 16);
243 % pickup pencircle scaled 1;
244 draw z13{direction 0.05 of serif} .. z16{updir};
245 draw z14{-(direction 0.85 of serif)} .. z15{updir};
251 % * right stem is fatter and more straight than the left 2 two stems.
253 % * The twiddle at the left is similar to the p twiddle
255 % * The bottoms of the stems are blotted.
261 % This is cut & paste programming. Somehow 3 i shapes in two chars (p and m)
262 % Doesn't seem worth the trouble of writing a macro.
266 fet_beginchar("dynamic m", "m", "dynm");
267 set_char_box (0, 1.3 ex#, 0, 1.0 ex#);
269 % should share code with p for twiddle.
271 save i_thick, i_angle, i_twiddle_thick,
272 i_twiddle_start_angle, i_twiddle_start_y,
275 save idir, center, right_ending;
276 pair center, idir, right_ending;
279 i_thick := 21 / 80 ex;
281 idir := dir(90- i_angle);
283 i_left_space = 18/80 ex;
284 i_twiddle_thick = serif_thick;
285 i_twiddle_start_y = 8/16 ex;
286 i_twiddle_start_angle = 0;
288 bottom_blot = serif_thick;
290 penpos1 (i_twiddle_thick, -i_twiddle_start_angle);
291 y1 = i_twiddle_start_y;
292 z1r = center - (i_left_space,0) + whatever * idir;
294 y3 = bottom_blot + ypart center;
296 z3l = center + whatever * idir;
298 penpos4 (i_thick - bottom_blot, 0);
299 z4 - z3 = whatever * idir;
302 z2l = .15 [z3l, z3r] + whatever * idir;
303 z2r = 5/8 [z1r, z3l] + whatever * idir;
305 z2 = 1/2 [z2l, z2r] ;
307 z5 = z4 + whatever * idir;
310 p := simple_serif (z1l, z1r, 90) .. tension 1.2 .. z2r{right} .. z5l --- z3l
311 .. z4l --- z4r .. z3r --- z5r .. tension 1.2 .. z2l{left} .. cycle;
315 penlabels (1, 2, 3 , 4,5);
317 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
322 z5l = right_ending + (i_left_space,0);
323 penpos1(serif_thick, - i_twiddle_start_angle);
325 y3 = bottom_blot + ypart center;
327 z3l = z5l + whatever * idir;
329 penpos4(i_thick - bottom_blot, 0);
330 z4 - z3 = whatever * idir;
333 z2l = .15 [z3l, z3r] + whatever * idir;
334 z2r = 5/8 [z1r, z3l] + whatever * idir;
336 z2 = 1/2 [z2l, z2r] ;
339 p := simple_serif (z1l, z1r, 90) .. tension 1.05 .. z2r{right} .. z5l --- z3l
340 .. z4l --- z4r .. z3r --- z5r .. tension 1.2 .. z2l{left} .. cycle;
344 penlabels (1, 2, 3 , 4,5);
346 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
348 i_thick := 23 / 80 ex;
350 i_left_space := 14/80 ex;
351 end_overshoot = .25 serif_thick;
354 idir := dir(90- i_angle);
356 z5l = right_ending + (i_left_space,0);
357 penpos5 (whatever, 10);
358 penpos3 (whatever, 20);
363 penpos1(serif_thick, - i_twiddle_start_angle);
365 z3l = z7l + whatever * idir;
366 z3r = z7r + whatever * idir;
367 z5l = z7l + whatever * idir;
368 z5r = z7r + whatever * idir;
370 save end_twiddle_angle;
371 end_twiddle_angle := 35;
372 penpos6(.9 serif_thick, - end_twiddle_angle);
373 y6l = 23/80 ex + ypart center;
374 z6l = 1.6 [z3l, z3r] + whatever * idir;
378 y3l = 1/8 ex + ypart center;
379 y2l = 1 ex+ end_overshoot;
380 z2l = .08 [z3l, z3r] + whatever * idir;
381 z2r = 5/8 [z1r, z3l] + whatever * idir;
383 z2 = 1/2 [z2l, z2r] ;
384 z8 = z7 - (0, 2 end_overshoot);
386 p := simple_serif (z1l, z1r, 90) .. tension 1.05
387 .. z2r{right} .. z5l --- z3l
389 .. simple_serif(z6r, z6l, 90)
393 .. z2l{left} .. cycle;
395 % pickup pencircle scaled 1;
399 penlabels (1, 2, 3 , 4,5,6,7, 8);
404 %% notes from old dyn code.
406 % "f" obviously has a _lot_ bigger slant than "p" (see Wanske p.239)
407 % however; perhaps we need two f symbols:
408 % - a super-slanted one used in "f" "mf" "sfz" "sf", and
409 % - a more normal-slanted in "ff" "fff" "fp" "fp" (see Wanske p.241)
411 % looking at professionally typeset music reveals that typesetters
412 % are somewhat unsure about slanting in "mf", "fp", "sfz"
414 % "f" and "p" (in any combination) are a lot (factor two) fatter than
415 % "s", "m", and "z". sometimes the "m" and "z" are a bit fatter than
419 % Chester, Breitkopf suggest smaller sizes of these other chars,
420 % using the x-height as reference point.