]> git.donarmstrong.com Git - lilypond.git/blobdiff - mf/feta-toevallig.mf
release: 1.1.46
[lilypond.git] / mf / feta-toevallig.mf
index 1238eb366b9e0a4ac44f95df18f9c6081a86824f..d4f94c536281dca98ce7e7cf4d43f1c8d0a43249 100644 (file)
@@ -1,3 +1,12 @@
+% 
+% feta-toevallig.mf --  implement Accidentals
+% 
+% source file of the Feta (Font-En-Tja) music font
+% 
+% (c) 1997, 1998 Han-Wen Nienhuys <hanwen@stack.nl>
+% 
+
+
 %
 % Accidentals from various sources, notably
 %
 
 fet_begingroup("accidentals");
 
+%
+% The beams of most sharps have horizontal endings (as if drawn with 
+% a square pen).  [Wanske] does not mention this, so we'll just ignore 
+% this fact
+%
 fet_beginchar("Sharp" , "1", "sharp");
        set_char_box(0, 1.1 interline#, 1.5 interline#, 
                1.5 interline#);
@@ -24,7 +38,7 @@ fet_beginchar("Sharp" , "1", "sharp");
        beamheight := 4 stafflinethickness;
        beamwidth := w;
        stemwidth := 1.3 stafflinethickness;
-       roundness := blot_diameter;
+       roundness := 2blot_diameter;
        pair center;
        center := (.5 w, 0);
        
@@ -50,8 +64,9 @@ fet_beginchar("Sharp" , "1", "sharp");
                +  vspan -- -hspan -vspan -- hspan - vspan -- cycle )
                shifted center;
 
-       draw_rounded_path((beam shifted (0,-interbeam/2)), roundness);
-       draw_rounded_path((beam shifted (0,interbeam/2)), roundness);
+       pickup pencircle scaled roundness;
+       filldraw (beam shifted (0,-interbeam/2));
+       filldraw (beam shifted (0,interbeam/2));
 
        pickup pencircle scaled stemwidth;
        x3 = x4 = xpart center;
@@ -219,9 +234,11 @@ fet_beginchar("Double sharp", "2", "sharpsharp")
        z5 = z1 reflectedabout((0,0), (1,1));
 
        labels(1,2,3,4,5);
-       draw_rounded_path(  
-               z1{dir 45} .. {right}z2 -- z3 -- z4{down} .. {dir 225}z5 .. cycle,
-       1/20 interline);
+       pickup pencircle scaled 1/20 interline;
+       filldraw  
+               z1{dir 45} .. {right}z2 -- z3 -- 
+               z4{down} .. {dir 225}z5 .. cycle;
+       
 
        addto currentpicture also currentpicture yscaled (-d/h);
        addto currentpicture also currentpicture xscaled (-1);
@@ -230,7 +247,38 @@ fet_beginchar("Double sharp", "2", "sharpsharp")
        currentpicture := currentpicture  shifted (w/2,0);
 
 
-       fet_endchar;
+
+fet_endchar;
+
+
+def draw_paren =
+       save leftindent;
+       leftindent# := .2 interline#;
+       define_pixels(leftindent);
+       set_char_box(0, .5 interline#+stafflinethickness#,
+         interline#, interline#);
+       z1 = (leftindent,h);
+       z2 = (w-stafflinethickness,0);
+       z3 = (leftindent,-d);
+
+       penpos1(stafflinethickness, 35);
+       penpos2(2 stafflinethickness, 0);
+       penpos3(stafflinethickness, -35);
+
+       penlabels(1,2,3);
+       fill z2l{down} .. simple_serif(z3l, z3r, 90) .. z2r{up}
+       .. simple_serif(z1r, z1l, 90) .. z2l{down} -- cycle;
+enddef;
+  
+fet_beginchar("Right paranthesis", ")", "rightparen")
+       draw_paren;
+fet_endchar;
+
+fet_beginchar("Left paranthesis", "(", "leftparen")
+       draw_paren;
+        currentpicture := currentpicture xscaled -1;
+        set_char_box(charwd, charbp, chardp, charht);
+fet_endchar;
 
 
 fet_endgroup("accidentals");