]> git.donarmstrong.com Git - lilypond.git/blobdiff - mf/parmesan-clefs.mf
[mf] Improve comments; fix minor typos; formatting.
[lilypond.git] / mf / parmesan-clefs.mf
index 23ae77ba606885d56468594c941d92c3e0c7a7b9..1da30906bb4a457f8ab7cc6188bbaac7f4eb589f 100644 (file)
@@ -1,10 +1,21 @@
-% -%-Fundamental-%- -*-Metafont-*-
-% parmesan-clefs.mf -- implement ancient clefs
-% 
-% source file of LilyPond's pretty-but-neat music font
+% Feta (not the Font-En-Tja) music font --  ancient clefs
+% This file is part of LilyPond, the GNU music typesetter.
 %
-% (c) 2001--2006 Juergen Reuter <reuter@ipd.uka.de>
+% Copyright (C) 2001--2012 Juergen Reuter <reuter@ipd.uka.de>
 %
+%
+% LilyPond is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% LilyPond is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 
 fet_begingroup ("clefs");
 
@@ -65,8 +76,8 @@ def draw_vaticana_do_clef (expr exact_center, reduction) =
        path pat, ellipse, clef;
        transform T;
 
-       T:= identity xscaled 0.6 linethickness
-                    yscaled 0.6 reduced_il;
+       T := identity xscaled 0.6 linethickness
+                     yscaled 0.6 reduced_il;
        pickup pencircle transformed T;
        ellipse := reverse fullcircle transformed T;
 
@@ -141,8 +152,8 @@ def draw_vaticana_fa_clef (expr exact_center, reduction) =
        path ellipse, pat;
        transform T;
 
-       T:= identity xscaled 0.6 linethickness
-                    yscaled 0.5 reduced_il;
+       T := identity xscaled 0.6 linethickness
+                     yscaled 0.5 reduced_il;
        pickup pencircle transformed T;
        ellipse := reverse fullcircle transformed T;
 
@@ -236,8 +247,8 @@ def draw_medicaea_do_clef (expr exact_center, reduction) =
        path ellipse;
        transform T;
 
-       T:= identity xscaled reduced_slt
-                    yscaled flag_height;
+       T := identity xscaled reduced_slt
+                     yscaled flag_height;
        pickup pencircle transformed T;
        ellipse := reverse fullcircle transformed T;
 
@@ -304,25 +315,25 @@ def draw_medicaea_fa_clef (expr exact_center, reduction) =
        define_pixels (xoffs, yoffs);
 
        % stem
-       pickup pencircle scaled linethickness;
+       pickup pencircle scaled reduced_slt;
 
        x11 = x12 = xoffs + 0.4 reduced_il;
        y11 = yoffs = bot y12 + 1.5 reduced_il;
 
-       draw_rounded_block (bot lft z12, top rt z11, linethickness);
+       draw_rounded_block (bot lft z12, top rt z11, reduced_slt);
 
        % left-handed punctum
        save ellipse, T;
        path ellipse;
        transform T;
 
-       T:= identity xscaled reduced_slt
-                    yscaled reduced_il;
+       T := identity xscaled reduced_slt
+                     yscaled reduced_il;
        pickup pencircle transformed T;
        ellipse := reverse fullcircle transformed T;
 
        lft z13 = (xoffs, yoffs);
-       rt z14 = z11 + (linethickness / 2, 0);
+       rt z14 = z11 + (reduced_slt / 2, 0);
 
        fill get_subpath (ellipse, left, right, z13)
             -- get_subpath (ellipse, right, left, z14)
@@ -620,8 +631,8 @@ def draw_neomensural_c_clef (expr exact_center, reduction) =
        path ellipse, pat;
        transform T;
 
-       T:= identity xscaled stem_width
-                    yscaled blot_diameter;
+       T := identity xscaled stem_width
+                     yscaled blot_diameter;
        pickup pencircle transformed T;
        ellipse := fullcircle transformed T;
 
@@ -713,8 +724,8 @@ def draw_petrucci_c_clef (expr exact_center, flare_align, reduction) =
        path ellipse;
        transform T;
 
-       T:= identity xscaled 1.4 linethickness
-                    yscaled blot_diameter;
+       T := identity xscaled 1.4 linethickness
+                     yscaled blot_diameter;
        pickup pencircle transformed T;
        ellipse := fullcircle transformed T;
 
@@ -867,8 +878,8 @@ def draw_mensural_c_clef (expr exact_center, reduction) =
        path ellipse;
        transform T;
 
-       T:= identity xscaled 1.4 linethickness
-                    yscaled blot_diameter;
+       T := identity xscaled 1.4 linethickness
+                     yscaled blot_diameter;
        pickup pencircle transformed T;
        ellipse := fullcircle transformed T;
 
@@ -950,9 +961,9 @@ def draw_diamond (expr exact_center, reduction) =
        path ellipse;
        transform T;
 
-       T:= identity xscaled beamheight
-                    yscaled stem_width
-                    rotated 45;
+       T := identity xscaled beamheight
+                     yscaled stem_width
+                     rotated 45;
        pickup pencircle transformed T;
        ellipse := reverse fullcircle transformed T;
 
@@ -1035,12 +1046,13 @@ def draw_petrucci_f_clef (expr exact_center, reduction) =
        path ellipse;
        transform T;
 
-       T:= identity xscaled stem_width
-                    yscaled blot_diameter;
+       T := identity xscaled stem_width
+                     yscaled blot_diameter;
        pickup pencircle transformed T;
        ellipse := fullcircle transformed T;
 
-       rt z8 = (xoffs + reduced_il, yoffs - 4 reduced_slt);
+       rt x8 = xoffs + reduced_il;
+       y8 = y3;
        rt z9 = (xoffs + reduced_il, yoffs - 4 reduced_il);
 
        penpos8 (stem_width, 0);
@@ -1130,9 +1142,9 @@ def draw_mensural_f_clef (expr exact_center, reduction) =
        path ellipse;
        transform T;
 
-       T:= identity xscaled 0.2 width
-                    yscaled stem_width
-                    rotated 45;
+       T := identity xscaled 0.2 width
+                     yscaled stem_width
+                     rotated 45;
        pickup pencircle transformed T;
        ellipse := fullcircle transformed T;
 
@@ -1238,9 +1250,9 @@ def draw_petrucci_g_clef (expr exact_center, reduction) =
        path ellipse, paths[], sub_path, outlines[], sub_outlines[];
        transform T;
 
-       T:= identity xscaled 0.5 reduced_slt
-                    yscaled 0.22 reduced_il
-                    rotated -35;
+       T := identity xscaled 0.5 reduced_slt
+                     yscaled 0.22 reduced_il
+                     rotated -35;
        pickup pencircle transformed T;
        ellipse := fullcircle transformed T;
 
@@ -1309,9 +1321,9 @@ def draw_petrucci_g_clef (expr exact_center, reduction) =
        (times42, times24) = sub_outlines4 intersectiontimes sub_outlines2;
        (times43, times34) = sub_outlines4 intersectiontimes sub_outlines3;
 
-       T:= identity xscaled 0.75 reduced_slt
-                    yscaled 0.33 reduced_il
-                    rotated -35;
+       T := identity xscaled 0.75 reduced_slt
+                     yscaled 0.33 reduced_il
+                     rotated -35;
        pickup pencircle transformed T;
        ellipse := fullcircle transformed T;
 
@@ -1513,9 +1525,9 @@ def draw_hufnagel_do_clef (expr exact_center, reduction) =
        path ellipse, pat;
        transform T;
 
-       T:= identity xscaled 0.6 reduced_il
-                    yscaled 0.1 reduced_il
-                    rotated 40;
+       T := identity xscaled 0.6 reduced_il
+                     yscaled 0.1 reduced_il
+                     rotated 40;
        pickup pencircle transformed T;
        ellipse := fullcircle transformed T;
 
@@ -1595,9 +1607,9 @@ def draw_hufnagel_fa_clef (expr exact_center, reduction) =
        path ellipse, pat;
        transform T;
 
-       T:= identity xscaled 0.6 reduced_il
-                    yscaled 0.1 reduced_il
-                    rotated 40;
+       T := identity xscaled 0.6 reduced_il
+                     yscaled 0.1 reduced_il
+                     rotated 40;
        pickup pencircle transformed T;
        ellipse := fullcircle transformed T;
 
@@ -1689,4 +1701,56 @@ fet_beginchar ("Hufnagel do/fa clef", "hufnagel.do.fa_change");
 fet_endchar;
 
 
+%%%%%%%%
+%%
+%% Medieval East-Slavic (Kievan) Notation clefs
+%% Code by Aleksandr Andreev <aleksandr.andreev@gmail.com>
+%%
+%%%%%%%%
+
+def draw_kievan_do_clef =
+       z1 = (1.108 staff_space, 0.554 staff_space);
+       z2 = (1.063 staff_space, -0.122 staff_space);
+       z3 = (1.467 staff_space, -1.621 staff_space);
+       z4 = (1.002 staff_space, -2.253 staff_space);
+
+       y5 = y3;
+       x4 - x5 = x3 - x4;
+
+       z6 = (0.917 staff_space, -0.383 staff_space);
+       z7 = (0.012 staff_space, -0.448 staff_space);
+       z8 = (0, -0.167 staff_space);
+       z9 = (0.057 staff_space, 0.464 staff_space);
+       z10 = (0.994 staff_space, 0.387 staff_space);
+       z11 = (1.023 staff_space, 0.554 staff_space);
+
+       fill z1
+            .. z2{down}
+            .. z3
+            & z3 -- z4
+            & z4 -- z5
+            & z5 .. {up}z6
+            & z6{left} .. z7
+            & z7 .. z8{up} .. z9
+            & z9 .. {right}z10
+            & z10 .. z11
+            & z11 -- cycle;
+
+       set_char_box (0, 1.5 staff_space#,
+                     2.25 staff_space#, 0.55 staff_space#);
+enddef;
+
+
+fet_beginchar ("kievan tsefaut clef", "kievan.do");
+       % This draws the Tse-Fa-Ut clef; it is a variant alto clef that
+       % always occurs on the third line of the staff.
+       draw_kievan_do_clef;
+fet_endchar;
+
+
+fet_beginchar ("mensural c clef", "kievan.do_change");
+       % This is the same thing as a do clef?
+       draw_kievan_do_clef;
+fet_endchar;
+
 fet_endgroup ("clefs");