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--2015 Juergen Reuter <reuter@ipd.uka.de>
6 % The LilyPond font is free software: you can redistribute it and/or modify
7 % it under the terms of the GNU General Public License as published by
8 % the Free Software Foundation, either version 3 of the License, or
9 % (at your option) any later version, or under the SIL Open Font License.
11 % LilyPond is distributed in the hope that it will be useful,
12 % but WITHOUT ANY WARRANTY; without even the implied warranty of
13 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 % GNU General Public License for more details.
16 % You should have received a copy of the GNU General Public License
17 % along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
19 fet_begingroup ("accidentals");
30 fet_beginchar ("Ed. Med. Flat" , "medicaeaM1");
31 set_char_box (0.1 staff_space#, 0.6 staff_space#,
32 0.6 staff_space#, 1.0 staff_space#);
34 save ellipse, pat, outline, T;
35 path ellipse, pat, outline;
38 T := identity xscaled 0.50 linethickness
39 yscaled 0.22 staff_space;
40 pickup pencircle transformed T;
41 ellipse := fullcircle transformed T;
47 fill get_subpath (ellipse, up, down, z1)
48 -- get_subpath (ellipse, down, up, z2)
51 T := identity xscaled 0.50 linethickness
52 yscaled 0.22 staff_space
54 pickup pencircle transformed T;
55 ellipse := fullcircle transformed T;
57 z3 = (0.10 staff_space, -0.50 staff_space);
58 z4 = (0.40 staff_space, +0.40 staff_space);
59 z5 = (0.10 staff_space, +0.40 staff_space);
65 % the original envelope curve created with `draw' contains
66 % cusps which we avoid
67 outline := get_subpath (ellipse, -direction 0 of pat,
68 direction 0 of pat, z3)
69 .. get_subpoint (ellipse, direction 1 of pat, z4)
70 .. get_subpath (ellipse, direction 2 of pat,
71 -direction 1.8 of pat, z5)
72 .. get_subpoint (ellipse, -direction 1 of pat, z4)
79 % make the outline touch the bounding box
80 shift = find_tangent_shift (((w, -d) -- (w, h)), outline,
82 outline := outline shifted shift;
86 labels (1, 2, 3, 4, 5);
98 fet_beginchar ("Ed. Vat. Flat" , "vaticanaM1");
99 z1 = (0.00 staff_space, +0.80 staff_space);
100 z2 = (0.00 staff_space, -0.08 staff_space);
101 z3 = (0.25 staff_space, -0.23 staff_space);
102 z4 = (0.50 staff_space, -0.24 staff_space);
103 z5 = (0.50 staff_space, +0.03 staff_space);
104 z6 = (0.25 staff_space, +0.20 staff_space);
105 z7 = (0.15 staff_space, +0.26 staff_space);
107 save pat, ellipse, T;
111 T := identity xscaled 0.50 linethickness
112 yscaled 0.22 staff_space;
113 pickup pencircle transformed T;
114 ellipse := fullcircle transformed T;
124 % the original envelope curve created with `draw' contains
125 % cusps which we avoid
126 fill get_subpath (ellipse, up, down, z1)
127 -- get_subpath (ellipse, down, direction 1.1 of pat, z2)
129 ... get_subpath (ellipse, direction 2.9 of pat, up, z4)
130 -- get_subpath (ellipse, up, direction 4.1 of pat, z5)
132 .. get_subpath (ellipse,
133 direction 6 of pat, -direction 6 of pat, z7)
141 set_char_box (0.00 staff_space# + 0.25 linethickness#,
142 0.50 staff_space# + 0.25 linethickness#,
143 0.23 staff_space# + 0.11 staff_space#,
144 0.80 staff_space# + 0.11 staff_space#);
146 labels (1, 2, 3, 4, 5, 6, 7);
150 fet_beginchar ("Ed. Vat. Natural" , "vaticana0");
155 T := identity xscaled 0.80 linethickness
156 yscaled 0.22 staff_space;
157 pickup pencircle transformed T;
158 ellipse := fullcircle transformed T;
160 z1 = (0.00 staff_space, +0.65 staff_space);
161 z2 = (0.00 staff_space, -0.35 staff_space);
163 fill get_subpath (ellipse, up, down, z1)
164 -- get_subpath (ellipse, down, up, z2)
167 pickup penrazor scaled 0.22 staff_space
170 z3 = (0.00 staff_space, -0.30 staff_space);
171 z4 = (0.40 staff_space, -0.08 staff_space);
176 addto currentpicture also currentpicture
179 shifted (0.40 staff_space, 0.0 staff_space);
181 set_char_box (0.00 staff_space# + 0.40 linethickness#,
182 0.40 staff_space# + 0.40 linethickness#,
183 0.65 staff_space# + 0.11 staff_space#,
184 0.65 staff_space# + 0.11 staff_space#);
198 fet_beginchar ("Mensural Sharp" , "mensural1");
201 define_pixels (stemthick);
203 stemthick# = linethickness#;
209 T := identity scaled 0.8 stemthick;
210 pickup pencircle transformed T;
211 circle := fullcircle transformed T;
213 z1 = 0.4 staff_space * (0.8, 1);
216 pat := get_subpath (circle, z1 - z2, z2 - z1, z1)
217 -- get_subpath (circle, z2 - z1, z1 - z2, z2)
222 fill pat shifted (0.20 staff_space, 0);
223 fill pat xscaled -1 shifted (0.20 staff_space, 0);
225 set_char_box (0.8 * 0.4 staff_space# + 0.4 stemthick#,
226 (0.8 * 0.4 + 0.2) * staff_space# + 0.4 stemthick#,
227 0.4 staff_space# + 0.4 stemthick#,
228 0.4 staff_space# + 0.4 stemthick#);
234 fet_beginchar ("Mensural Flat" , "mensuralM1");
237 define_pixels (stemthick);
239 stemthick# = linethickness#;
241 save ellipse, pat, outline, T;
242 path ellipse, pat, outline;
245 T := identity xscaled 1.4 stemthick
246 yscaled 0.6 stemthick
248 pickup pencircle transformed T;
249 ellipse := fullcircle transformed T;
251 z1 = (0.00 staff_space, +1.80 staff_space);
252 z2 = (0.00 staff_space, -0.25 staff_space);
253 z3 = (0.35 staff_space, -0.25 staff_space);
254 z4 = (0.35 staff_space, +0.25 staff_space);
255 z5 = (0.00 staff_space, +0.25 staff_space);
267 % we approximate `draw pat'
268 for i = 2 step s until (length pat + 2):
269 dirs[i] := direction (i - 2) of pat;
272 outline := get_subpath (ellipse, up, down, z1)
273 -- get_subpath (ellipse, down, dirs2, z2)
274 for i = (2 + s) step s until (length pat + 2 - s):
275 .. get_subpoint (ellipse, dirs[i],
276 point (i - 2) of pat)
280 for i = (length pat + 2 - s) step -s until 2:
281 .. get_subpoint (ellipse, -dirs[i],
282 point (i - 2) of pat)
284 -- get_subpoint (ellipse, up, z2)
289 set_char_box (0.00 staff_space# + 0.75 stemthick#,
290 0.40 staff_space# + 0.75 stemthick#,
291 0.25 staff_space# + 0.75 stemthick#,
292 1.80 staff_space# + 0.75 stemthick#);
294 labels (1, 2, 3, 4, 5);
298 fet_beginchar ("Hufnagel Flat" , "hufnagelM1");
301 define_pixels (stemthick);
303 stemthick# = linethickness#;
305 save ellipse, pat, T;
309 T := identity xscaled 2.4 stemthick
310 yscaled 0.4 stemthick
312 pickup pencircle transformed T;
313 ellipse := fullcircle transformed T;
315 z1 = (0.00 staff_space, +1.80 staff_space);
316 z2 = (0.00 staff_space, -0.15 staff_space);
317 z3 = (0.25 staff_space, -0.30 staff_space);
318 z4 = (0.50 staff_space, +0.00 staff_space);
319 z5 = (0.30 staff_space, +0.30 staff_space);
320 z6 = (0.00 staff_space, +0.15 staff_space);
329 % we have to find the envelope intersections (if any)
330 t1 = find_envelope_cusp (reverse ellipse, pat, 1/256) + 3;
334 t2 = find_envelope_cusp (ellipse, reverse pat, 1/256);
338 t2 := length pat - t2 + 3;
346 % we approximate `draw pat'
347 for i = 3 step s until 5:
348 dirs[i] := direction (i - 3) of pat;
351 fill get_subpath (ellipse, up, down, z1)
352 -- get_subpath (ellipse, down, z3 - z2, z2)
353 -- get_subpoint (ellipse, z3 - z2, z3)
354 for i = 3 step s until 5:
355 .. get_subpoint (ellipse, dirs[i],
356 point (i - 3) of pat)
358 .. get_subpoint (ellipse, z6 - z5, z5)
359 -- get_subpoint (ellipse, z6 - z5, z6)
360 -- get_subpoint (ellipse, z5 - z6, z6)
361 -- get_subpoint (ellipse, z5 - z6, z5)
362 -- get_subpoint (ellipse, -dirs[5], z5)
363 for i = (5 - s) step -s until t2:
364 .. get_subpoint (ellipse, -dirs[i],
365 point (i - 3) of pat)
367 .. get_subpoint (ellipse, -direction (t2 - 3) of pat,
368 point (t2 - 3) of pat)
369 -- get_subpoint (ellipse, -direction (t1 - 3) of pat,
370 point (t1 - 3) of pat)
371 for i = (floor ((t1 - 3) / s) * s + 3) step -s until (3 + s):
372 .. get_subpoint (ellipse, -dirs[i],
373 point (i - 3) of pat)
375 .. get_subpoint (ellipse, -dirs[3], z3)
376 -- get_subpoint (ellipse, z2 - z3, z3)
377 -- get_subpoint (ellipse, z2 - z3, z2)
378 -- get_subpoint (ellipse, up, z2)
386 set_char_box (0.00 staff_space# + 1.0 stemthick#,
387 0.50 staff_space# + 1.0 stemthick#,
388 0.30 staff_space# + 0.5 stemthick#,
389 1.80 staff_space# + 0.5 stemthick#);
391 labels (1, 2, 3, 4, 5, 6);
397 %%% Glyphs for Kievan Music Notation
402 fet_beginchar ("Kievan sharp", "kievan1");
403 % This draws the sharp.
404 % It never occurs in Synodal music and
405 % can only be found in some early manuscripts.
407 z1 = (0.579 staff_space, 1.459 staff_space);
408 z2 = (1.414 staff_space, -0.904 staff_space);
409 z3 = (0.187 staff_space, 0.904 staff_space);
414 z5 = (1.296 staff_space, 1.613 staff_space);
415 z6 = (0.090 staff_space, -0.864 staff_space);
416 z7 = (1.532 staff_space, 0.892 staff_space);
421 pickup pensquare xscaled 0.167staff_space
422 yscaled 0.167staff_space
429 pickup pensquare xscaled 0.167staff_space
430 yscaled 0.167staff_space
437 set_char_box (0, 1.6 staff_space#,
438 1.6 staff_space#, 1.6 staff_space#);
442 fet_beginchar ("Kievan flat", "kievanM1");
443 % This draws the flat sign.
444 % In Synodal music, the flat only occurs on the high B
445 % but it may be used elsewhere in early manuscripts.
447 z1 = (0.452 staff_space, 1.772 staff_space);
448 z2 = (0.481 staff_space, 1.735 staff_space);
449 z3 = (0.464 staff_space, 1.626 staff_space);
450 z4 = (0.249 staff_space, 0.322 staff_space);
451 z5 = (0.432 staff_space, -0.762 staff_space);
452 z6 = (0.611 staff_space, -0.583 staff_space);
453 z7 = (0.611 staff_space, 0.224 staff_space);
454 z8 = (0.652 staff_space, 0.513 staff_space);
455 z9 = (0.900 staff_space, 0.684 staff_space);
456 z10 = (0.872 staff_space, 0.640 staff_space);
457 z11 = (0.811 staff_space, 0.359 staff_space);
458 z12 = (0.811 staff_space, -0.587 staff_space);
459 z13 = (0.338 staff_space, -1.063 staff_space);
460 z14 = (0.016 staff_space, 0.196 staff_space);
461 z15 = (0.204 staff_space, 1.316 staff_space);
482 set_char_box (0, 1.0 staff_space#,
483 1.0 staff_space#, 1.8 staff_space#);
486 fet_endgroup ("accidentals");