+%
+% 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#);
beamheight := 4 stafflinethickness;
beamwidth := w;
stemwidth := 1.3 stafflinethickness;
- roundness := blot_diameter;
+ roundness := 2blot_diameter;
pair center;
center := (.5 w, 0);
+ 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;
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);
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");