]> git.donarmstrong.com Git - lilypond.git/blob - mf/feta-din-code.mf
''
[lilypond.git] / mf / feta-din-code.mf
1 %
2 % piano p, grabbed from Ed Breitkopf Mozart horn concerto 3.
3 %
4 % Notes:
5 %
6 % * there is no dishing in the serif (but we do it anyway)
7 %
8 % * The cheek is a little fatter than the stem 
9
10 % * The slant is extreme: 20 degrees
11 %
12 % * the twiddle (what'sitcalled) is a slightly darker than the serif
13 %
14 % * The hole in the cheek has a straight right side.
15 %
16 % * Corners are filled up.
17 %
18 %
19
20 code := 111;
21 save slant;
22 slant := 20;
23 currenttransform := identity;
24
25
26 save serif_thick;
27 serif_thick# = 1.1 stafflinethickness#;
28 define_blacker_pixels (serif_thick);
29 med_thick = round (1.5 stafflinethickness);
30
31 fet_beginchar("dynamic p", "p", "dynp")
32         %
33         % TODO w really   is 13/12 ex
34         % but should do kerning
35         set_char_box (0, 15/12 ex#, descender#, 1.0 ex#);
36
37         save twiddle_thick, stem_thick, cheek_thick;
38         save updir, fill_up;
39         save serif, dishing_angle, p, q;
40         save cheek_medium, left_serif_protude, right_serif_protude;
41
42         pair updir;
43         path serif,q,p;
44
45         updir := dir (90 - slant );
46         twiddle_thick = med_thick;
47         cheek_medium = 1/6 ex;
48
49         dishing_angle = 5;
50         fill_up := 1.5 serif_thick;
51         straigh_len = 0.5 ex;
52
53         stem_thick = 2/6 ex;
54         cheek_thick = 11/32 ex;
55         cheek_width = 0.72 ex;
56         left_serif_protude = 18/60 ex;
57         right_serif_protude= 15/60 ex;
58         
59         penpos1 (twiddle_thick, -slant - 5);
60         penpos2 (cheek_medium, 90 - slant );
61         penpos3 (cheek_medium, 90 - slant);
62
63 %       x4r - x4l = cheek_thick; 
64         penpos4 (cheek_thick, -slant);
65         penpos5 (cheek_medium, -55);
66         penpos6 (stem_thick, 0);
67         penpos17 (straigh_len, 90 -slant);
68         z17 = z4l;
69
70         x6l = 0;
71         y6l = - descender + serif_thick/2;
72         x1l = x6l;
73         y1r = 0.5 ex;
74         y2r = ex;
75         z7 = whatever * updir + z6l;
76         y7 = 43/60  ex;
77         
78         z2l = whatever *updir + 0.3 [z7, z1r];
79         y8 = ypart (0.9 [z7, z2l]);
80         z8 = 2/3 [z6l, z6r] + whatever * updir;
81
82
83         y3r = ex;
84         z3l = 0.58 [(stem_thick, -descender), (stem_thick + cheek_width - cheek_thick, -descender)] + whatever * updir;
85         y4r = 1/3 ex;
86         z4r = whatever*updir + (stem_thick+  cheek_width, -descender);
87
88         z5l = whatever*updir  + z3l;
89         y5l = 1/12 ex;
90
91         z9 = z6r + whatever*updir;
92         y9 = y5l;
93
94         p :=
95                 z2r{right} .. {dir( -60)}z8 & z8{dir 35} .. z3r{right}
96                 .. tension 0.9 .. z4r{-updir} .. z5r{left} .. z9
97                 & z9 -- z6r -- z6l -- z7{updir} 
98                 ..  z2l{left} .. tension 1.2 ..
99                 % z1r & z1r -- z1l & z1l
100                 simple_serif (z1r, z1l, -90)
101                 .. cycle;
102         pickup pencircle scaled 1;
103         fill p;
104
105         y12  = 0.5 ex;
106         z12 = z6r + whatever*updir;
107
108         save inner_tension;
109         inner_tension = 1.4;
110         q :=
111                 z17l --- z17r  .. z3l{left}.. tension 1.05 .. z12{-updir} .. tension 1.05 .. z5l{right} .. cycle; 
112         unfill q;
113         penlabels (1, 2, 3, 4, 5, 6, 17);
114
115
116
117
118         pickup pencircle scaled serif_thick;
119         lft x11 = -left_serif_protude;
120         rt x10 = stem_thick+ right_serif_protude;
121         bot y10 = bot y11 = -descender;
122
123         
124         serif := simple_serif (z10, z11, dishing_angle);
125         draw serif;
126
127         labels(7,8, 9, 10, 11,12);
128
129         
130         z13 = point 0.05 of serif;
131         z14 = point 0.85 of serif;
132         z15 = z6l + updir * fill_up +( serif_thick/2, 0);
133         z16 = z6r + updir * 1.2fill_up- +( serif_thick/2, 0);
134         labels(13,14, 15, 16);
135
136 %       pickup pencircle scaled 1;
137         draw z13{direction 0.05 of serif} .. z16{updir};
138         draw z14{-(direction 0.85 of serif)} .. z15{updir};
139 fet_endchar;
140
141 % forte f, grabbed from Ed Breitkopf Mozart horn concerto 3.
142 %
143 % NOTES:
144 %
145 % * the bulbs are open.
146 %
147 % * blotting around the serif
148 %
149 %
150 %
151 % TODO: insert blots around the serif
152 %
153 %
154 %
155
156 code := 101;
157 fet_beginchar("dynamic f", "f", "dynf");
158         set_char_box (0, 1.25 ex#, descender#, ex# + ascender#);
159
160         save left_angle, right_angle;
161         save serif_length, serif_excentricity;
162         save f_thick;
163         save bulb_thick, bulb_diam, fill_up;
164         save p;
165         path p; 
166         bulb_diam = 7.5 / 40 ex;
167         fill_up = 1.5 serif_thick;
168         left_angle = slant  - 6;
169         right_angle = slant - 3;
170         f_thick = 3/8 ex;
171         bulb_thick = 8/40 ex;
172         serif_length = 0.96 ex;
173         serif_excentricity = 0.01 ex;
174
175         z1 = (0.375 ex, - serif_thick);
176         y2 = y1 + ex;
177
178         z2l = z1 + whatever*dir (90 - left_angle);
179         penpos2 (f_thick, 0);
180
181         y3l = y1 + ex + ascender;
182         x3l = x1 + 1 ex;
183         penpos3 (med_thick, -90);
184         penpos4 (bulb_thick, -20);
185         z3r = whatever [z4r,z4l];
186
187         x4l - x3l = 1/10 ex;
188
189         penpos5(bulb_thick, -45);
190         x5r = 0.1 [x4l, x4r];
191         y5l = y4l - bulb_diam;
192
193         z6 = z2r + whatever* dir (90 - right_angle);
194         y6 = y1 + 3/8 ex;
195
196         x7 = x1 - 1/4 ex;
197         y7r = y1 -descender;
198         penpos7(med_thick, -90);
199
200         penpos8 (bulb_thick, 160);
201         x8l = x7l - 1/10 ex;
202         z7l = whatever [z8r,z8l];
203
204         penpos9 (bulb_thick, 135);
205         x9r = 0.1 [x8l, x8r];
206         y9l = y8l + bulb_diam;
207         labels(1,6,9);
208         penlabels(2, 3,4,5, 7, 8,9);
209
210         p := z1 --- z2l 
211                 .. tension 1.1
212                 .. z3l{right} .. z4r{down}
213                 .. z5r{left} .. z5l{up}
214                 .. tension 0.8
215                 .. z4l{up} .. z3r{left}
216                 .. tension 1.1
217                 .. z2r --- z6 .. tension 1.25 ..  z7r{left}
218                 .. z8r{up} .. z9r{right} .. z9l{down} .. tension 0.8
219                 .. z8l{down} .. z7l{right} .. cycle;
220         pickup pencircle scaled 1;
221         fill p;
222 %       draw p;
223
224         pickup pencircle scaled 1.1 serif_thick;
225         (rt x13) - (lft x14) = serif_length;
226         y13 = y14;
227         y14 = y2;
228         0.5 [x13, x14] = x2 + serif_excentricity;
229
230         draw z13 .. z14;
231
232         penlabels(16);
233         labels(13,14,15);
234 fet_endchar;
235
236 %
237 % NOTES:
238 %
239 % * right stem is fatter and more straight than the left 2 two  stems.
240 %
241 % * The twiddle  at the left is similar to the p twiddle 
242 %
243 % * The bottoms of the stems are blotted. 
244 %
245
246
247 %
248 %
249 % This is cut & paste programming. Somehow 3 i shapes in two chars (p and m)
250 % Doesn't seem worth the trouble of writing a macro.
251 %
252 code := 108;
253 fet_beginchar("dynamic m", "m", "dynm");
254         set_char_box (0, 1.3 ex#, 0, 1.0 ex#);
255
256         % should share code with p for twiddle.
257
258         save i_thick, i_angle, i_twiddle_thick,
259                 i_twiddle_start_angle, i_twiddle_start_y, 
260                 i_left_space;
261         save p;
262         save idir, center, right_ending;
263         pair center, idir, right_ending;
264         path p;
265
266         i_thick := 21 / 80 ex;
267         i_angle := 20;
268         idir := dir(90- i_angle);
269
270         i_left_space = 16/80 ex;
271         i_twiddle_thick = serif_thick;
272         i_twiddle_start_y =  1/2 ex;
273         i_twiddle_start_angle = 20;
274         bottom_blot = serif_thick;
275
276         penpos1 (i_twiddle_thick, -i_twiddle_start_angle);
277         center =(0,0);
278
279         y1 = i_twiddle_start_y;
280         z1r = center - (i_left_space,0)  + whatever * idir;
281
282         y3 = bottom_blot + ypart center; 
283         penpos3(i_thick, 0);
284         z3l = center + whatever * idir;
285         y4 = ypart center;
286         penpos4(i_thick - bottom_blot, 0);
287         z4 - z3 = whatever * idir;
288
289         y2l = 1 ex;
290         z2l = .25 [z3l, z3r] + whatever * idir;
291         z2r = 3/4 [z1r, z3l] + whatever * idir;
292         y2r = y5l + 1/9 ex;
293         z2 = 1/2 [z2l, z2r] ;
294         penpos5(i_thick, 0);
295         z5 = z4 + whatever * idir;
296         y5 = 55 / 80 ex;
297
298         p := simple_serif (z1l, z1r, 90) .. tension 1.05 .. z2r{right} .. z5l --- z3l
299                 ..  z4l --- z4r .. z3r --- z5r .. z2l{left} .. cycle;
300
301         fill p;
302         right_ending := z5r;
303 %       penlabels (1, 2, 3 , 4,5);
304         clearxy;
305
306
307         z1r = right_ending;
308         z5l = right_ending + (i_left_space,0);
309         penpos1(serif_thick, - i_twiddle_start_angle);
310
311         y3 = bottom_blot + ypart center; 
312         penpos3(i_thick, 0);
313         z3l = z5l + whatever * idir;
314         y4 = ypart center;
315         penpos4(i_thick - bottom_blot, 0);
316         z4 - z3 = whatever * idir;
317
318         y2l = 1 ex;
319         z2l = .25 [z3l, z3r] + whatever * idir;
320         z2r = 3/4 [z1r, z3l] + whatever * idir;
321         y2r = y5l + 1/9 ex;
322         z2 = 1/2 [z2l, z2r] ;
323         penpos5(i_thick, 0);
324
325         p := simple_serif (z1l, z1r, 90) .. tension 1.05 .. z2r{right} .. z5l --- z3l
326                 ..  z4l --- z4r .. z3r --- z5r .. z2l{left} .. cycle;
327
328         fill p;
329         right_ending := z5r;
330 %       penlabels (1, 2, 3 , 4,5);
331         clearxy;
332 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
333
334         i_thick := 25 / 80 ex;
335         i_angle := 15;
336         i_left_space := 14/80 ex;
337         end_overshoot = 1/2 serif_thick;
338
339
340         idir := dir(90- i_angle);
341         z1r = right_ending;
342         z5l = right_ending + (i_left_space,0);
343         penpos5 (whatever, 10);
344         penpos3 (whatever, 20);
345
346         y7 = 0; 
347         penpos7(i_thick ,0);
348         
349         penpos1(serif_thick, - i_twiddle_start_angle);
350         
351         z3l = z7l + whatever * idir;
352         z3r = z7r + whatever * idir;
353         z5l = z7l + whatever * idir;
354         z5r = z7r + whatever * idir;
355
356         save end_twiddle_angle;
357         end_twiddle_angle := 35;
358         penpos6(serif_thick, - end_twiddle_angle);
359         y6l = 23/80 ex + ypart center;
360         z6l = 1.6 [z3l, z3r]  + whatever * idir;
361         
362
363
364         y3l =  1/8 ex + ypart center; 
365         y2l = 1 ex+  end_overshoot;
366         z2l = .08 [z3l, z3r] + whatever * idir;
367         z2r = 3/4 [z1r, z3l] + whatever * idir;
368         y2r = y5l + 1/9 ex;
369         z2 = 1/2 [z2l, z2r] ;
370         z8 = z7 - (0, 2 end_overshoot);
371
372         p := simple_serif (z1l, z1r, 90) .. tension 1.05
373                 .. z2r{right} .. z5l --- z3l
374                 .. z8{right}
375                 .. simple_serif(z6r, z6l, 90)
376                 .. tension 0.85
377                 .. z3r --- z5r
378                 .. tension 1.09
379                 .. z2l{left} .. cycle;
380
381 %       pickup pencircle scaled 1;
382 %       draw p;
383         fill p;
384         right_ending := z5r;
385 %       penlabels (1, 2, 3 , 4,5,6,7, 8);
386         clearxy;
387
388 fet_endchar;
389
390 %% notes from old dyn code.
391
392 % "f" obviously has a _lot_ bigger slant than "p" (see Wanske p.239)
393 % however; perhaps we need two f symbols:
394 %  - a super-slanted one used in "f" "mf" "sfz" "sf", and
395 %  - a more normal-slanted in "ff" "fff" "fp" "fp" (see Wanske p.241)
396 %
397 % looking at professionally typeset music reveals that typesetters 
398 % are somewhat unsure about slanting in "mf", "fp", "sfz"
399
400 % "f" and "p" (in any combination) are a lot (factor two) fatter than
401 % "s", "m", and "z".  sometimes the "m" and "z" are a bit fatter than
402 % "s".
403
404
405 % Chester, Breitkopf suggest smaller sizes of these other chars,
406 % using the x-height as reference point.