]> git.donarmstrong.com Git - lilypond.git/blob - mf/parmesan-custodes.mf
release: 1.5.32
[lilypond.git] / mf / parmesan-custodes.mf
1 % -*-Fundamental-*-
2 % parmesan-custodes.mf -- implement ancient custodes
3
4 % source file of LilyPond's pretty-but-neat music font
5
6 % (c) 2000--2002 Juergen Reuter <reuter@ipd.uka.de>
7
8
9 save black_notehead_width;
10 numeric black_notehead_width;
11
12 fet_begingroup ("custodes")
13
14 noteheight#:=staff_space#+ (1 + overdone_heads) *stafflinethickness#;
15 define_pixels(noteheight);
16
17
18 %%%%%%%%
19 %
20 %
21 % Hufnagel style
22 %
23 %
24
25 % stem up
26 fet_beginchar("Custos Hufnagel", "hufnagel", "hufnagel")
27         save b_h,a_w;
28         a_b:=1.54; % b_h*a_b/a_w = wd/ht
29         b_h:=0.85;
30         a_w:=1.09;
31
32         save a, beta, ht, wd;
33         ht# =noteheight#;
34         2beta#=ht#*b_h;
35         a# = beta#*a_b;
36         wd# = 2a# / a_w;
37         set_char_box(0, wd#, ht#/2, ht#/2);
38         black_notehead_width# := wd#;
39
40         save rh_width, rh_height, rh_edge; % rhombus dimensions
41         rh_width#=0.7ht#; % ht*tan(35)
42         rh_height#=1.0ht#;
43         rh_edge#=0.61ht#; % (ht/2)/cos(35)
44
45         define_pixels(rh_width, rh_height, rh_edge);
46         pickup pencircle
47           xscaled stafflinethickness
48           yscaled rh_edge rotated -35;
49         z1=(0.5rh_width,+0.25rh_height);
50         z2=(1.0rh_width,-0.25rh_height);
51         z3=(2.0rh_width,+0.50rh_height);
52         draw z1 -- z2 -- z3;
53 fet_endchar;
54
55 % stem down
56 fet_beginchar("Reverse Custos Hufnagel", "rhufnagel", "rhufnagel")
57         save b_h,a_w;
58         a_b:=1.54; % b_h*a_b/a_w = wd/ht
59         b_h:=0.85;
60         a_w:=1.09;
61
62         save a, beta, ht, wd;
63         ht# =noteheight#;
64         2beta#=ht#*b_h;
65         a# = beta#*a_b;
66         wd# = 2a# / a_w;
67         set_char_box(0, wd#, ht#/2, ht#/2);
68         black_notehead_width# := wd#;
69
70         save rh_width, rh_height, rh_edge; % rhombus dimensions
71         rh_width#=0.7ht#; % ht*tan(35)
72         rh_height#=1.0ht#;
73         rh_edge#=0.61ht#; % (ht/2)/cos(35)
74
75         define_pixels(rh_width, rh_height, rh_edge);
76         pickup pencircle
77           xscaled stafflinethickness
78           yscaled rh_edge rotated +35;
79         z1=(0.5rh_width,-0.25rh_height);
80         z2=(1.0rh_width,+0.25rh_height);
81         z3=(2.0rh_width,-0.50rh_height);
82         draw z1 -- z2 -- z3;
83 fet_endchar;
84
85
86 %%%%%%%%
87 %
88 % Medicaea style
89 %
90
91 % stem up
92 fet_beginchar("Custos Med.", "medicaea", "medicaea")
93         save b_h, a_w;
94         a_b := 1.54; % b_h*a_b/a_w = wd/ht
95         b_h := 0.85;
96         a_w := 1.09;
97
98         save a, beta, ht, wd;
99         ht# = noteheight# * mag;
100         2beta# = ht# * b_h;
101         a# = beta# * a_b;
102         wd# = 0.4a# / a_w;
103         set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small
104         black_notehead_width# := wd#;
105
106         define_pixels(ht, wd);
107
108         % head
109         pickup pencircle xscaled blot_diameter yscaled 1.0ht;
110         z1 = (0.0wd, 0.0ht);
111         z2 = z1 + (1.0wd - blot_diameter/2, 0);
112         draw z1 .. z2;
113
114         % stem
115         pickup pencircle scaled stafflinethickness;
116         z3 = (1.0wd - stafflinethickness/2, 0.0ht);
117         z4 = z3 + (0, +1.0ht);
118         draw z3 .. z4;
119 fet_endchar;
120
121
122 % stem down
123 fet_beginchar("Reverse Custos Med.", "rmedicaea", "rmedicaea")
124         save b_h, a_w;
125         a_b := 1.54; % b_h*a_b/a_w = wd/ht
126         b_h := 0.85;
127         a_w := 1.09;
128
129         save a, beta, ht, wd;
130         ht# = noteheight# * mag;
131         2beta# = ht# * b_h;
132         a# = beta# * a_b;
133         wd# = 0.4a# / a_w;
134         set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small
135         black_notehead_width# := wd#;
136
137         define_pixels(ht, wd);
138
139         % head
140         pickup pencircle xscaled blot_diameter yscaled 1.0ht;
141         z1 = (0.0wd, 0.0ht);
142         z2 = z1 + (1.0wd - blot_diameter/2, 0);
143         draw z1 .. z2;
144
145         % stem
146         pickup pencircle scaled stafflinethickness;
147         z3 = (1.0wd - stafflinethickness/2, 0.0ht);
148         z4 = z3 + (0, -1.0ht);
149         draw z3 .. z4;
150 fet_endchar;
151
152
153 %%%%%%%%
154 %
155 % Editio Vaticana style
156 %
157
158 % stem up
159 fet_beginchar("Custos Ed. Vat.", "vaticana", "vaticana")
160         save b_h, a_w;
161         a_b := 1.54; % b_h*a_b/a_w = wd/ht
162         b_h := 0.85;
163         a_w := 1.09;
164
165         save a, beta, ht, wd;
166         ht# = noteheight# * mag;
167         2beta# = ht# * b_h;
168         a# = beta# * a_b;
169         wd# = 0.4a# / a_w;
170         set_char_box(0, wd#, ht#/2, ht#/2);
171         black_notehead_width# := wd#;
172
173         define_pixels(ht, wd);
174         pickup pencircle scaled stafflinethickness;
175
176         z1 = (0.0wd, +0.05ht);
177         z2 = (1.0wd + 0.5stafflinethickness, 0.0ht);
178         penpos1(0.5ht, 90);
179         penpos2(0.5ht, 90);
180         penstroke z1e{z2 - z1} .. {right}z2e;
181
182         z3=(1.0wd, +0.0ht);
183         z4=(1.0wd, +1.0ht);
184         draw z3 -- z4;
185 fet_endchar;
186
187
188 % stem down
189 fet_beginchar("Reverse Custos Ed. Vat.", "rvaticana", "rvaticana")
190         save b_h, a_w;
191         a_b := 1.54; % b_h*a_b/a_w = wd/ht
192         b_h := 0.85;
193         a_w := 1.09;
194
195         save a, beta, ht, wd;
196         ht# = noteheight# * mag;
197         2beta# = ht# * b_h;
198         a# = beta# * a_b;
199         wd# = 0.4a# / a_w;
200         set_char_box(0, wd#, ht#/2, ht#/2);
201         black_notehead_width# := wd#;
202
203         define_pixels(ht, wd);
204         pickup pencircle scaled stafflinethickness;
205
206         z1 = (0.0wd, -0.05ht);
207         z2 = (1.0wd + 0.5stafflinethickness, -0.0ht);
208         penpos1(0.5ht, 90);
209         penpos2(0.5ht, 90);
210         penstroke z1e{z2 - z1} .. {right}z2e;
211
212         z3=(1.0wd, -0.0ht);
213         z4=(1.0wd, -1.0ht);
214         draw z3 -- z4;
215 fet_endchar;
216
217
218 %%%%%%%%
219 %
220 % Mensural style
221 %
222
223 % stem up
224 fet_beginchar("Custos Mensural", "mensural", "mensural")
225         save b_h,a_w;
226         a_b:=1.54; % b_h*a_b/a_w = wd/ht
227         b_h:=0.85;
228         a_w:=1.09;
229
230         save a, beta, ht, wd;
231         ht# =noteheight#;
232         2beta#=ht#*b_h;
233         a# = beta#*a_b;
234         wd# = 2a# / a_w;
235         set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small
236         black_notehead_width# := wd#;
237
238         define_pixels(ht, wd);
239         pickup pencircle xscaled stafflinethickness yscaled 0.4ht rotated -35;
240         z1=(0.0wd,-0.2ht);
241         z2=(0.2wd,+0.2ht);
242         z3=(0.4wd,-0.2ht);
243         z4=(0.6wd,+0.2ht);
244         z5=(0.8wd,-0.2ht);
245         z6=(1.6wd,+1.4ht);
246         draw z1 -- z2 -- z3 -- z4 -- z5 -- z6;
247 fet_endchar;
248
249 % stem down
250 fet_beginchar("Reverse Custos Mensural", "rmensural", "rmensural")
251         save b_h,a_w;
252         a_b:=1.54; % b_h*a_b/a_w = wd/ht
253         b_h:=0.85;
254         a_w:=1.09;
255
256         save a, beta, ht, wd;
257         ht# =noteheight#;
258         2beta#=ht#*b_h;
259         a# = beta#*a_b;
260         wd# = 2a# / a_w;
261         set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small
262         black_notehead_width# := wd#;
263
264         define_pixels(ht, wd);
265         pickup pencircle xscaled stafflinethickness yscaled 0.4ht rotated +35;
266         z1=(0.0wd,+0.2ht);
267         z2=(0.2wd,-0.2ht);
268         z3=(0.4wd,+0.2ht);
269         z4=(0.6wd,-0.2ht);
270         z5=(0.8wd,+0.2ht);
271         z6=(1.6wd,-1.4ht);
272         draw z1 -- z2 -- z3 -- z4 -- z5 -- z6;
273 fet_endchar;
274
275 fet_endgroup ("custodes")