]> git.donarmstrong.com Git - lilypond.git/blobdiff - mf/feta-nummer-code.mf
* Another grand 2003 update.
[lilypond.git] / mf / feta-nummer-code.mf
index 167c2e48b77508f7fc48b01bdf21220ad490b6ee..df6a72df144ce353c6d72f8f5d030f72e292f272 100644 (file)
@@ -4,7 +4,7 @@
 %
 % source file of the Feta (not the Font-En-Tja) music font
 % 
-% (c) 1997--2002 Jan Nieuwenhuizen <janneke@gnu.org>
+% (c)  1997--2003 Jan Nieuwenhuizen <janneke@gnu.org>
 
 %
 % These numbers were taken from a part that that the EJE violas played
@@ -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.
 %
@@ -35,21 +33,22 @@ define_pixels(kuulleke);
 % direction = is ink on left or right side (1 or -1)
 %
 
+% 
+% move_away_to = amount left (for 2) 
+% turn_to  = amount down (for  2 )
+% 
 def number_flare_path(expr pos,alpha,beta,line,flare,
 
                        move_away_to,
-                       turn_to,
-                       away_from_start_pos, direction) =
+                       turn_to, taille, taille_ratio,
+                       direction) =
        begingroup;
        clearxy;
 
-       z5 = z2 + 0.43* flare *dir (alpha - 1.5 beta);
-
-       save taille;
+%      z5 = z2 + 0.43* flare *dir (alpha - 1.5 beta);
 
-       taille = 0.06;
        z4 = (0.75 - taille)  [z2r, z2l] + whatever* dir (alpha - beta) ;
-       z4 = (0.00 + .4 taille) [z3l, z3r] + whatever* dir(alpha);
+       z4 = (taille_ratio * taille) [z3l, z3r] + whatever* dir(alpha);
        penpos1(line,180+beta+alpha);
        z1r=pos;
 
@@ -120,7 +119,7 @@ def draw_foot(expr xpos) =
        enddef;
 
 def draw_six =
-       set_char_box(0, 2/3height#*widen, 0, height#);
+       set_char_box(0, .68  height#*widen, 0, height#);
        message "w:"&decimal w;
        message "h:"&decimal h;
 
@@ -129,28 +128,44 @@ def draw_six =
        penpos2(hair,90);
        
        z2=(w/2,y1);
-       penpos3(7/8thick,0);
+
+       penpos3 (15/16 thick,0);
        % yup, should use the path fract [] "everywhere"
-       z3r=(w,1/2[0,y1]);
+       x3r=w;
+       y3r = .5 [y4r, y2r];
        penpos4(hair,-90);
        z4r=(x2,0);
        penpos6(hair,90);
-       z6r=(w-flare,h);
-       penpos7(7/8thick,180);
-       z7r=(0,h/2);
-       penpos10(7/8thick,180);
+       x6r = .56 w;
+       y6r = h;
+       penpos7(thick,180);
+
+       x7r=0;
+       y7r = .50 h;
+
+       penpos10(thick,180);
        z10r=(0,y3);
        penlabels(1,2,3,4,5,6,7,8,9,10,11);
 
 
-       save t; t=tense;
-       fill z7{right}..z2r{right}..tension t..z3r{down}
-               ..tension t..z4r{left}
-               ..tension t..z7r{up}
-               .. super_curvelet(z7r, z6r, 0.76, 1)
-               .. flare_path (z6r,0,-90,hair,flare, 1)
-
-               ..tension t..z7l{down}..z10l{up}..cycle;
+       save outer_t; outer_t= 0.88;
+       save t ; t := tense; 
+       fill
+%      draw
+               z7{right}..z2r{right}
+               ..tension outer_t
+               ..z3r{down}
+               ..tension outer_t
+               ..z4r{left}
+%              ..tension t
+               ..z7r{up}
+%              .. flare_path (z6r,0,-90,hair,flare, 1)
+               .. number_flare_path (z6r, 0,-90,hair,flare,
+                       w - x6r -hair/2, .16 h, 0.05, 2.5, 1)
+
+%              ..tension t
+               ..z7l{down}
+                .. {down}z10l -- cycle;
 
        unfill z2l{right}..tension t..z3l{down}..tension t
                ..z4l{left}..tension t..z10l{up}..tension t..cycle;
@@ -160,7 +175,7 @@ save dot_diam;
 dot_diam# = 7/8flare#;
 define_pixels(dot_diam);
 
-code := 32;
+code := 31; % , 32
 fet_beginchar("Space", "space", "space")
        set_char_box(0, space#,  0,height#);
 fet_endchar;
@@ -204,8 +219,7 @@ fet_endchar;
 code := 47; % 0 = 48
 
 fet_beginchar("Numeral 0", "0", "zero")
-%      set_char_box(0, 4/5height#*widen, 0, height#);
-       set_char_box(0, 11/15height#*widen, 0, height#);
+       set_char_box(0, 11/15height# * widen, 0, height#);
        message "w:"&decimal w;
        message "h:"&decimal h;
        penpos1(thin,90);
@@ -256,7 +270,7 @@ fet_beginchar("Numeral 1", "1", "one")
 fet_endchar;
 
 fet_beginchar("Numeral 2", "2", "two")
-       set_char_box(0, 11/15height#*widen, 0, height#);
+       set_char_box(0, 22/30 height#*widen, 0, height#);
        message "w:"&decimal w;
        message "h:"&decimal h;
        clearxy;
@@ -278,11 +292,11 @@ fet_beginchar("Numeral 2", "2", "two")
                ..z3l{dir(180+gamma)}..{dir(180+alpha - 5)}z2l
                ..{dir(180+beta)}z1l..cycle;
 
-       penpos4(0.85 thick,0);
+       penpos4(thick,0);
        z4r=(w-thin/2, .71 h);
        penpos5(hair,90);
        y5r = h;
-       x5r = 1/2 hair + 1.0 flare + flare_start* flare;
+       x5r = 9/20 w ;
 
        penlabels(1,2,3,4);
        penlabels(5,6);
@@ -291,10 +305,9 @@ fet_beginchar("Numeral 2", "2", "two")
        save p;
        path p ;
        p := z1l{dir(beta)}..tension t..z4r{up}
-               .. number_flare_path(z5r,180,90,hair, flare,
+               .. number_flare_path(z5r,180,90,hair, 1.05 flare,
                                x5r  - 1/2 hair,
-                               .20 h, 
-                               flare_start* flare, 1)
+                               .21 h, 0.006, 0.4, 1)
                .. z4l{down}..tension t
                ..{dir(180+beta)}z1r..cycle;
 
@@ -304,41 +317,71 @@ fet_beginchar("Numeral 2", "2", "two")
 
 fet_endchar;
 
+
+%%
+% TODO: should widen a bit. The right edge of the 3 bumps into next glyph in
+% combinations 
+%
 fet_beginchar("Numeral 3", "3", "three")
        set_char_box(0, 2/3height#*widen, 0, height#);
        message "w:"&decimal w;
        message "h:"&decimal h;
        penpos1(hair,-90);
-       z1l=(17/16thick,h);
+
+%      flare_start = 0.25 ;
+       x1l = 36/80 w;
+       y1l = h;
+       
+%      z1l=(17/16thick,h);
        penpos2(7/8thick,180);
-       z2l=(w-thick/8,3/4h+thick/16);
+       x2l= w-thick/8;
+       y2l = 3/4h + thick*  3/32; 
        penpos3(thin,90);
        z3=(w/2,h/2+1/8thick);
        penpos4(thin,90);
        z4=(5/8thick+1/2thin,y3);
        penpos5(thick,0);
-       z5r=(w,1/4h+thick/16);
+       x5r=w;
+       y5r = 17/64 h + thick/16;
+
        penpos6(hair,-90);
-       z6r=(9/8thick,0);
+
+       x6r= 37/80 w;
+       y6r = 0;
        penpos7(3/2thin,90);
-       z7=(x5,y3);
+       x7 = .83 w ;
+       y7 = y3;
        penlabels(1,2,3,4,5,6,7);
        save alpha; alpha=25;
        save t; t=tense;
+       save outer_t; outer_t := 0.93;
        pickup pencircle scaled 1;
+
 %      draw
        fill
-               flare_path (z1l, 180, 90, hair, 7/8 flare, -1) 
-               .. super_curvelet(z1l, z2l, 0.76, -1)
-               .. z2l{down}..z7r{dir(180+alpha)}
-               ..z7l{dir(-alpha)}..z5r{down}..tension t..
-
-               flare_path (z6r, 180, -90, hair, flare, 1) ..tension t..
-
-               z5l{up}
-               ..tension t..z3l{left}..z4l{left}
-               ..z4r{right}..z3r{right}..tension t..z2r{up}
-               ..tension t.. cycle
+               number_flare_path (z1l, 180, 90, hair,  7/8 flare, x1l - .5 hair,
+                       .16 h, 0.06, 1.5,  -1)
+               ..tension outer_t
+               .. z2l{down}
+               .. tension outer_t
+               ..z7r{dir(180+alpha)}
+               ..z7l{dir(-alpha)}
+               .. tension outer_t 
+               ..z5r{down}
+               .. tension outer_t
+               .. number_flare_path (z6r, 180, -90, hair,  flare, x6l,
+                       .18 h, 0.06, 1.5,  1)
+
+               .. z5l{up}
+               ..tension t
+               ..z3l{left}
+               ..z4l{left}
+               ..z4r{right}
+               ..z3r{right}
+               ..tension t
+               ..z2r{up}
+               ..tension t
+               .. cycle
 ;
 fet_endchar;
 
@@ -387,10 +430,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);
@@ -407,18 +451,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;
@@ -489,21 +548,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;
@@ -524,3 +584,6 @@ fet_endchar;
 
 fet_endgroup("number")
 
+ligtable "3" : "3" kern 0.1 space#,  "0" kern 0.1 space#; 
+ligtable "2" : "7" kern 0.15 space#;
+