1 % Feta (not the Font-En-Tja) music font -- ancient accidentals
2 % This file is part of LilyPond, the GNU music typesetter.
4 % Copyright (C) 2001--2012 Juergen Reuter <reuter@ipd.uka.de>
7 % LilyPond is free software: you can redistribute it and/or modify
8 % it under the terms of the GNU General Public License as published by
9 % the Free Software Foundation, either version 3 of the License, or
10 % (at your option) any later version.
12 % LilyPond is distributed in the hope that it will be useful,
13 % but WITHOUT ANY WARRANTY; without even the implied warranty of
14 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 % GNU General Public License for more details.
17 % You should have received a copy of the GNU General Public License
18 % along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 fet_begingroup ("accidentals");
31 fet_beginchar ("Ed. Med. Flat" , "medicaeaM1");
32 set_char_box (0.1 staff_space#, 0.6 staff_space#,
33 0.6 staff_space#, 1.0 staff_space#);
35 save ellipse, pat, outline, T;
36 path ellipse, pat, outline;
39 T := identity xscaled 0.50 linethickness
40 yscaled 0.22 staff_space;
41 pickup pencircle transformed T;
42 ellipse := fullcircle transformed T;
48 fill get_subpath (ellipse, up, down, z1)
49 -- get_subpath (ellipse, down, up, z2)
52 T := identity xscaled 0.50 linethickness
53 yscaled 0.22 staff_space
55 pickup pencircle transformed T;
56 ellipse := fullcircle transformed T;
58 z3 = (0.10 staff_space, -0.50 staff_space);
59 z4 = (0.40 staff_space, +0.40 staff_space);
60 z5 = (0.10 staff_space, +0.40 staff_space);
66 % the original envelope curve created with `draw' contains
67 % cusps which we avoid
68 outline := get_subpath (ellipse, -direction 0 of pat,
69 direction 0 of pat, z3)
70 .. get_subpoint (ellipse, direction 1 of pat, z4)
71 .. get_subpath (ellipse, direction 2 of pat,
72 -direction 1.8 of pat, z5)
73 .. get_subpoint (ellipse, -direction 1 of pat, z4)
80 % make the outline touch the bounding box
81 shift = find_tangent_shift (((w, -d) -- (w, h)), outline,
83 outline := outline shifted shift;
87 labels (1, 2, 3, 4, 5);
99 fet_beginchar ("Ed. Vat. Flat" , "vaticanaM1");
100 z1 = (0.00 staff_space, +0.80 staff_space);
101 z2 = (0.00 staff_space, -0.08 staff_space);
102 z3 = (0.25 staff_space, -0.23 staff_space);
103 z4 = (0.50 staff_space, -0.24 staff_space);
104 z5 = (0.50 staff_space, +0.03 staff_space);
105 z6 = (0.25 staff_space, +0.20 staff_space);
106 z7 = (0.15 staff_space, +0.26 staff_space);
108 save pat, ellipse, T;
112 T := identity xscaled 0.50 linethickness
113 yscaled 0.22 staff_space;
114 pickup pencircle transformed T;
115 ellipse := fullcircle transformed T;
125 % the original envelope curve created with `draw' contains
126 % cusps which we avoid
127 fill get_subpath (ellipse, up, down, z1)
128 -- get_subpath (ellipse, down, direction 1.1 of pat, z2)
130 ... get_subpath (ellipse, direction 2.9 of pat, up, z4)
131 -- get_subpath (ellipse, up, direction 4.1 of pat, z5)
133 .. get_subpath (ellipse,
134 direction 6 of pat, -direction 6 of pat, z7)
142 set_char_box (0.00 staff_space# + 0.25 linethickness#,
143 0.50 staff_space# + 0.25 linethickness#,
144 0.23 staff_space# + 0.11 staff_space#,
145 0.80 staff_space# + 0.11 staff_space#);
147 labels (1, 2, 3, 4, 5, 6, 7);
151 fet_beginchar ("Ed. Vat. Natural" , "vaticana0");
156 T := identity xscaled 0.80 linethickness
157 yscaled 0.22 staff_space;
158 pickup pencircle transformed T;
159 ellipse := fullcircle transformed T;
161 z1 = (0.00 staff_space, +0.65 staff_space);
162 z2 = (0.00 staff_space, -0.35 staff_space);
164 fill get_subpath (ellipse, up, down, z1)
165 -- get_subpath (ellipse, down, up, z2)
168 pickup penrazor scaled 0.22 staff_space
171 z3 = (0.00 staff_space, -0.30 staff_space);
172 z4 = (0.40 staff_space, -0.08 staff_space);
177 addto currentpicture also currentpicture
180 shifted (0.40 staff_space, 0.0 staff_space);
182 set_char_box (0.00 staff_space# + 0.40 linethickness#,
183 0.40 staff_space# + 0.40 linethickness#,
184 0.65 staff_space# + 0.11 staff_space#,
185 0.65 staff_space# + 0.11 staff_space#);
199 fet_beginchar ("Mensural Sharp" , "mensural1");
202 define_pixels (stemthick);
204 stemthick# = linethickness#;
210 T := identity scaled 0.8 stemthick;
211 pickup pencircle transformed T;
212 circle := fullcircle transformed T;
214 z1 = 0.4 staff_space * (0.8, 1);
217 pat := get_subpath (circle, z1 - z2, z2 - z1, z1)
218 -- get_subpath (circle, z2 - z1, z1 - z2, z2)
223 fill pat shifted (0.20 staff_space, 0);
224 fill pat xscaled -1 shifted (0.20 staff_space, 0);
226 set_char_box (0.8 * 0.4 staff_space# + 0.4 stemthick#,
227 (0.8 * 0.4 + 0.2) * staff_space# + 0.4 stemthick#,
228 0.4 staff_space# + 0.4 stemthick#,
229 0.4 staff_space# + 0.4 stemthick#);
235 fet_beginchar ("Mensural Flat" , "mensuralM1");
238 define_pixels (stemthick);
240 stemthick# = linethickness#;
242 save ellipse, pat, outline, T;
243 path ellipse, pat, outline;
246 T := identity xscaled 1.4 stemthick
247 yscaled 0.6 stemthick
249 pickup pencircle transformed T;
250 ellipse := fullcircle transformed T;
252 z1 = (0.00 staff_space, +1.80 staff_space);
253 z2 = (0.00 staff_space, -0.25 staff_space);
254 z3 = (0.35 staff_space, -0.25 staff_space);
255 z4 = (0.35 staff_space, +0.25 staff_space);
256 z5 = (0.00 staff_space, +0.25 staff_space);
268 % we approximate `draw pat'
269 for i = 2 step s until (length pat + 2):
270 dirs[i] := direction (i - 2) of pat;
273 outline := get_subpath (ellipse, up, down, z1)
274 -- get_subpath (ellipse, down, dirs2, z2)
275 for i = (2 + s) step s until (length pat + 2 - s):
276 .. get_subpoint (ellipse, dirs[i],
277 point (i - 2) of pat)
281 for i = (length pat + 2 - s) step -s until 2:
282 .. get_subpoint (ellipse, -dirs[i],
283 point (i - 2) of pat)
285 -- get_subpoint (ellipse, up, z2)
290 set_char_box (0.00 staff_space# + 0.75 stemthick#,
291 0.40 staff_space# + 0.75 stemthick#,
292 0.25 staff_space# + 0.75 stemthick#,
293 1.80 staff_space# + 0.75 stemthick#);
295 labels (1, 2, 3, 4, 5);
299 fet_beginchar ("Hufnagel Flat" , "hufnagelM1");
302 define_pixels (stemthick);
304 stemthick# = linethickness#;
306 save ellipse, pat, T;
310 T := identity xscaled 2.4 stemthick
311 yscaled 0.4 stemthick
313 pickup pencircle transformed T;
314 ellipse := fullcircle transformed T;
316 z1 = (0.00 staff_space, +1.80 staff_space);
317 z2 = (0.00 staff_space, -0.15 staff_space);
318 z3 = (0.25 staff_space, -0.30 staff_space);
319 z4 = (0.50 staff_space, +0.00 staff_space);
320 z5 = (0.30 staff_space, +0.30 staff_space);
321 z6 = (0.00 staff_space, +0.15 staff_space);
330 % we have to find the envelope intersections (if any)
331 t1 = find_envelope_cusp (reverse ellipse, pat, 1/256) + 3;
335 t2 = find_envelope_cusp (ellipse, reverse pat, 1/256);
339 t2 := length pat - t2 + 3;
347 % we approximate `draw pat'
348 for i = 3 step s until 5:
349 dirs[i] := direction (i - 3) of pat;
352 fill get_subpath (ellipse, up, down, z1)
353 -- get_subpath (ellipse, down, z3 - z2, z2)
354 -- get_subpoint (ellipse, z3 - z2, z3)
355 for i = 3 step s until 5:
356 .. get_subpoint (ellipse, dirs[i],
357 point (i - 3) of pat)
359 .. get_subpoint (ellipse, z6 - z5, z5)
360 -- get_subpoint (ellipse, z6 - z5, z6)
361 -- get_subpoint (ellipse, z5 - z6, z6)
362 -- get_subpoint (ellipse, z5 - z6, z5)
363 -- get_subpoint (ellipse, -dirs[5], z5)
364 for i = (5 - s) step -s until t2:
365 .. get_subpoint (ellipse, -dirs[i],
366 point (i - 3) of pat)
368 .. get_subpoint (ellipse, -direction (t2 - 3) of pat,
369 point (t2 - 3) of pat)
370 -- get_subpoint (ellipse, -direction (t1 - 3) of pat,
371 point (t1 - 3) of pat)
372 for i = (floor ((t1 - 3) / s) * s + 3) step -s until (3 + s):
373 .. get_subpoint (ellipse, -dirs[i],
374 point (i - 3) of pat)
376 .. get_subpoint (ellipse, -dirs[3], z3)
377 -- get_subpoint (ellipse, z2 - z3, z3)
378 -- get_subpoint (ellipse, z2 - z3, z2)
379 -- get_subpoint (ellipse, up, z2)
387 set_char_box (0.00 staff_space# + 1.0 stemthick#,
388 0.50 staff_space# + 1.0 stemthick#,
389 0.30 staff_space# + 0.5 stemthick#,
390 1.80 staff_space# + 0.5 stemthick#);
392 labels (1, 2, 3, 4, 5, 6);
398 %%% Glyphs for Kievan Music Notation
403 fet_beginchar ("Kievan sharp", "kievan1");
404 % This draws the sharp.
405 % It never occurs in Synodal music and
406 % can only be found in some early manuscripts.
408 z1 = (0.579 staff_space, 1.459 staff_space);
409 z2 = (1.414 staff_space, -0.904 staff_space);
410 z3 = (0.187 staff_space, 0.904 staff_space);
415 z5 = (1.296 staff_space, 1.613 staff_space);
416 z6 = (0.090 staff_space, -0.864 staff_space);
417 z7 = (1.532 staff_space, 0.892 staff_space);
422 pickup pensquare xscaled 0.167staff_space
423 yscaled 0.167staff_space
430 pickup pensquare xscaled 0.167staff_space
431 yscaled 0.167staff_space
438 set_char_box (0, 1.6 staff_space#,
439 1.6 staff_space#, 1.6 staff_space#);
443 fet_beginchar ("Kievan flat", "kievanM1");
444 % This draws the flat sign.
445 % In Synodal music, the flat only occurs on the high B
446 % but it may be used elsewhere in early manuscripts.
448 z1 = (0.452 staff_space, 1.772 staff_space);
449 z2 = (0.481 staff_space, 1.735 staff_space);
450 z3 = (0.464 staff_space, 1.626 staff_space);
451 z4 = (0.249 staff_space, 0.322 staff_space);
452 z5 = (0.432 staff_space, -0.762 staff_space);
453 z6 = (0.611 staff_space, -0.583 staff_space);
454 z7 = (0.611 staff_space, 0.224 staff_space);
455 z8 = (0.652 staff_space, 0.513 staff_space);
456 z9 = (0.900 staff_space, 0.684 staff_space);
457 z10 = (0.872 staff_space, 0.640 staff_space);
458 z11 = (0.811 staff_space, 0.359 staff_space);
459 z12 = (0.811 staff_space, -0.587 staff_space);
460 z13 = (0.338 staff_space, -1.063 staff_space);
461 z14 = (0.016 staff_space, 0.196 staff_space);
462 z15 = (0.204 staff_space, 1.316 staff_space);
483 set_char_box (0, 1.0 staff_space#,
484 1.0 staff_space#, 1.8 staff_space#);
487 fet_endgroup ("accidentals");