summaryrefslogtreecommitdiff
path: root/mf
diff options
context:
space:
mode:
Diffstat (limited to 'mf')
-rw-r--r--mf/feta-klef.mf65
-rw-r--r--mf/feta-nummer-code.mf51
2 files changed, 63 insertions, 53 deletions
diff --git a/mf/feta-klef.mf b/mf/feta-klef.mf
index ffd017f366..a85736dd81 100644
--- a/mf/feta-klef.mf
+++ b/mf/feta-klef.mf
@@ -269,12 +269,6 @@ fet_endchar;
%
% Inspired by Baerenreiter
%
-% FIXME bulb should curve (see bass clef)
-% FIXME start (inside) should be little thinner
-%
-
-
-
% Beste lezers, kijk,
%
@@ -286,11 +280,11 @@ fet_endchar;
%
% -- vrij naar Van Kooten & De Bie
%
-
+def debugfill = fill enddef;
def draw_gclef (expr exact_center, reduction)=
save reduced_ss, downstroke_dir, downstroke_angle, center;
save breapth_factor, inner_thick_end, thinness, thickness, thinnib;
- save inner_start_angle, thinness, thinpen;
+ save inner_start_angle, thinness;
reduced_ss# = staff_space# * reduction;
define_pixels(reduced_ss);
pair downstroke_dir, center;
@@ -298,7 +292,7 @@ def draw_gclef (expr exact_center, reduction)=
center := (hround_pixels(xpart exact_center),
vround_pixels(ypart exact_center));
- thinness = 1.3 stafflinethickness;
+ thinness = 1.4 stafflinethickness;
downstroke_dir = unitvector (14, -75);
downstroke_angle = angle downstroke_dir;
@@ -309,7 +303,7 @@ def draw_gclef (expr exact_center, reduction)=
thickness = .4 reduced_ss;
thinnib = thinness;
- thinpen = thinness;
+
set_horizontal_spacing;
set_char_box(
@@ -348,12 +342,11 @@ def draw_gclef (expr exact_center, reduction)=
x9 = .7 [x10, x7r];
top y9l = 5 reduced_ss;
- y11 = ypart center -20/14 reduced_ss;
+ y11 = ypart center - 20/14 reduced_ss;
y12 = ypart center - 34/14 reduced_ss;
- y13 = y12 + .65 reduced_ss;
- x11 - x13r = 1.25 reduced_ss + 0.5 thinnib;
-
- x12r = xpart (.52 [z13r , z11] + .75 reduced_ss * downstroke_dir) ;
+ y13 = .48 [y12,y4r];
+ x11 - x13r = 1.5 reduced_ss + 0.5 thinnib;
+ x12r = xpart (.45 [z13r , z11] + .75 reduced_ss * downstroke_dir) ;
z10= center + whatever * dir (downstroke_angle + .5);
y10 = ypart center + 3.35 reduced_ss;
@@ -363,8 +356,7 @@ def draw_gclef (expr exact_center, reduction)=
z10 = .5 [z10l, z10r];
-
- z11 = center + whatever * downstroke_dir;
+ z11 = center + whatever * downstroke_dir + (.2 reduced_ss, 0);
penpos1(thinnib, inner_start_angle);
penpos2(thickness, 90);
@@ -373,13 +365,14 @@ def draw_gclef (expr exact_center, reduction)=
penpos9(1.4 thickness, -70);
-
- penpos13(3 thinnib, 180);
+ save lipje;
+ pair lipje;
+ lipje= .5 [z9l, z9r] + .25 ((z9r- z9l) rotated -90);
+ penpos13(2 thinnib, 180);
pickup pencircle scaled 1;
- fill
-% draw
+ debugfill
z2l{right}
.. z3l
.. z4l{left}
@@ -387,7 +380,7 @@ def draw_gclef (expr exact_center, reduction)=
.. z7l{up}
%.. z8l
.. tension 1.2
- .. z9l
+ .. z9l -- lipje
--z9r % {dir (downstroke_angle+ 0)}
.. tension 0.8
%.. z8r
@@ -397,14 +390,13 @@ def draw_gclef (expr exact_center, reduction)=
z1r -- z1l
.. tension 0.85 ..cycle;
- save p, staffline_time, q;
+ save p, staffline_time, q, down_staff_line_intersection;
path p,q;
+ pair down_staff_line_intersection;
p := z4{left} .. z5{up} .. z7{up} ;
-
q := (-reduced_ss, 2 reduced_ss) .. (2 reduced_ss,2 reduced_ss);
draw p;
-% z14 = point xpart (p intersectiontimes q) of p;
% we don't do this with a path: variations in thickness
@@ -414,16 +406,20 @@ def draw_gclef (expr exact_center, reduction)=
save bot_angle;
- bot_angle = downstroke_angle- 87;
+ bot_angle = -180; % downstroke_angle- 87;
penpos12(thinnib, bot_angle + 90);
p := z9 .. z10{down}
- .. z6
- .. z11{dir (-93)}
+ .. z11{dir (-87)}
.. z12{dir(bot_angle)}
+ .. z13{up}
;
-
+ save down_intersection_t;
+ down_intersection_t := xpart (p intersectiontimes q) ;
+ down_staff_line_intersection = point down_intersection_t of p;
+ z14 = down_staff_line_intersection;
+ penpos14(thinnib, angle (direction down_intersection_t of p) + 90);
save start_angle;
start_angle=angle (direction xpart (p intersectiontimes z11) of p);
@@ -435,11 +431,11 @@ def draw_gclef (expr exact_center, reduction)=
draw p;
penpos6(thinnib, angle (loop_end_dir) + 90);
- fill
-% draw
+ pickup pencircle scaled 1;
+ debugfill
z9l
.. {down}z10l
- .. z6l{loop_end_dir} -- z6r{-loop_end_dir}
+ .. z14l{loop_end_dir} -- z14r{-loop_end_dir}
.. z10r{up}
.. tension .98
.. z9r
@@ -449,14 +445,13 @@ def draw_gclef (expr exact_center, reduction)=
fill simple_serif(z1r, z1l, 80) -- cycle;
-% draw
- fill
+ debugfill
z11r{dir(start_angle)}
.. z12r{dir(bot_angle)}
..new_bulb (z13r, 0.45 reduced_ss, 0.38 reduced_ss, 3 stafflinethickness, 1, -1) {down}
- .. tension 0.98
+% .. tension 0.98
.. z12l{-dir (bot_angle)}
.. z11l{-dir(start_angle)}
diff --git a/mf/feta-nummer-code.mf b/mf/feta-nummer-code.mf
index be09b5d1ba..cafc8a7aaa 100644
--- a/mf/feta-nummer-code.mf
+++ b/mf/feta-nummer-code.mf
@@ -23,8 +23,6 @@ define_pixels(height,thick,thick,thin,hair,flare);
define_pixels(foot_top,foot_width);
define_pixels(kuulleke);
-
-
%
% Yet Another Bulb Routine with smooth inside curve.
%
@@ -131,10 +129,10 @@ def draw_six =
z2=(w/2,y1);
- penpos3( 15/16 thick,0);
+ penpos3 (15/16 thick,0);
% yup, should use the path fract [] "everywhere"
x3r=w;
- y3r = .48 [y4r, y2r];
+ y3r = .5 [y4r, y2r];
penpos4(hair,-90);
z4r=(x2,0);
penpos6(hair,90);
@@ -425,10 +423,11 @@ fet_beginchar("Numeral 4", "4", "four")
fet_endchar;
fet_beginchar("Numeral 5", "5", "five")
- set_char_box(0, 7/10height#*widen, 0, height#);
+ set_char_box(0, 27/40 height#*widen, 0, height#);
message "w:"&decimal w;
message "h:"&decimal h;
calc_kuulleke(w-thin,0);
+
z1=(w/2+1/8thick,h);
save alpha; alpha=0;
penpos5(thin,0);
@@ -445,18 +444,33 @@ fet_beginchar("Numeral 5", "5", "five")
penpos8(thin,90);
z8l=(x7r,y7r-1/16thick);
penpos9(thin,90);
- z9=(x11+3/16thick,10/16[y5,y7]);
+
+
+ y9=10/16[y5,y7];
+ x9 = .36 [x8r, x10r] ;
+
penpos10(thick,0);
- z10r=(w,1/2[y9r,y11r]);
+ x10r = w+ hair/2;
+ y10r = 1/2[y9r,y11r];
penpos11(hair,-90);
- z11r=(9/8thick,0);
- penlabels(8,9,10,11);
+ y11r = 0;
+ x11r = .7 [0, x10l];
+
+ penlabels(8,9,10,11, 12);
save beta; beta=45;
- save t; t=tense;
- fill z8r{dir(beta)}..z9r{right}..tension t..z10r{down}
- .. super_curvelet(z10r, z11r, 0.76, 1)
- .. flare_path(z11r,180,-90,hair,flare, 1)
- ..z11l{right}..tension t..z10l{up}..tension t
+
+ save inner_t, outer_t;
+ inner_t= 1.0;
+ outer_t= .85;
+ fill z8r{dir(beta)}..z9r{right}
+ ..tension outer_t
+ ..z10r{down}
+ .. number_flare_path (z11r, 180, -90, hair, flare, x11l,
+ .18 h, 0.06, 1.5, 1)
+ ..z11l{right}
+ ..tension inner_t
+ ..z10l{up}
+ ..tension inner_t
..z9l{left}..z8l{dir(180+beta+10)}..cycle;
fet_endchar;
@@ -527,21 +541,22 @@ fet_beginchar("Numeral 8", "8", "eight")
save alpha; alpha=60;
save beta; beta=alpha-15;
z1=(w/2,h/2+thick/8);
- penpos2(hair,90+180+beta);
+ penpos2(14/8 thin,0);
z2=(w/3,h/2+thin);
penpos3(3/2thin,0);
z3l=(0,h/4+thin/2);
penpos4(hair,90);
- z4l=(x1,0);
+
+ z4l=(x1 ,0);
penpos5(thick,90+90+alpha);
z5=z1+w/4*dir(alpha-90);
penpos6(thick,90+90+alpha);
z6=z1+(w/4-thin/2)*dir(90+alpha);
penpos7(hair,90);
- z7r=(x1,h);
+ z7r= (x1 + .02 w ,h);
penpos8(3/2thin,0);
z8r=(w-thin/2,3/4h+thin/2);
- penpos9(hair,90+180+beta);
+ penpos9( 13/8 thin,0);
z9=(2/3w,h/2);
penlabels(1,2,3,4,5,6,7,8,9);
save t; t=tense;