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