% source file of the Feta (defintively not an abbreviation for Font-En-Tja)
% music font
%
-% (c) 1997 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
% Jan Nieuwenhuizen <janneke@gnu.org>
%
alpha := 10;
radius# = 1.25 staff_space#;
- crook_thinness# = 1.5stafflinethickness#;
- crook_fatness# = 4 stafflinethickness#;
+ crook_thinness# = 1.5linethickness#;
+ crook_fatness# = 0.25 staff_space# + 1.5 linethickness#;
radius# + crook_fatness#/2 = h#;
radius# + crook_thinness#/2 = w#;
def draw_short_fermata =
save fat_factor, thinness, dot_radius;
set_char_box(staff_space#, staff_space#, 0, 2.2 staff_space#);
- dot_radius# = 8/3*stafflinethickness#;
+
+ dot_radius# = 0.133 staff_space# + 1.33 linethickness#;
define_pixels(dot_radius)
fat_factor = .11;
- thinness = 1.5 stafflinethickness;
+ thinness = 1.5 linethickness;
pickup pencircle scaled thinness;
rt x2 = w;
define_pixels(wd, dot_radius)
wd# = 2.5 staff_space#;
- stemthick = 1.5 stafflinethickness;
- beamheight = 4 stafflinethickness;
- dot_radius# = 8/3*stafflinethickness#;
+ stemthick = 1.5 linethickness;
+ beamheight = 0.3 staff_space+ linethickness;
+ dot_radius# = 0.133 staff_space#+ + 1.333 *linethickness#;
set_char_box(wd#/2, wd#/2, 0, 3/2 staff_space#);
draw_rounded_block((-b, h-beamheight), (w, h), blot_diameter);
save ibeamheight, obeamheight;
save ihwd, ohwd, iht, oht; % inner/outer half_width/height
save stemthick, dot_radius;
- define_pixels(ihwd, ohwd, iht, oht, dot_radius)
+ define_pixels(ihwd, ohwd, iht, oht)
ihwd# = 1.0 staff_space#;
ohwd# = 1.5 staff_space#;
iht# = 0.9 staff_space#;
oht# = 1.6 staff_space#;
- stemthick = 1.5 stafflinethickness;
- ibeamheight = 3 stafflinethickness;
- obeamheight = 5 stafflinethickness;
- dot_radius# = 8/3*stafflinethickness#;
+
+ stemthick = 1.5 linethickness;
+ ibeamheight = 0.3 staff_space;
+ obeamheight = 0.5 staff_space;
+ dot_radius = ((iht - ibeamheight) * 4/10) ;
+
set_char_box(ohwd#, ohwd#, 0, oht#);
draw_rounded_block((-ohwd, oht-obeamheight), (ohwd, oht), blot_diameter);
save thin, height, width, thick;
height# = 5/4 width#;
height# = staff_space#;
- thin = 1.2 stafflinethickness;
- thick = 2 thin;
set_char_box(width#/2, width#/2, height#/2, height#/2);
-
+ define_pixels (height,width)
+
+ thin = .6 linethickness + 0.06 staff_space;
+ 2 thick + 0.5 (height - 2 thin) = width;
+
penpos1(thick, 0);
penpos2(thin, 90);
z1r = (w, 0);
set_char_box(.9 staff_space#, .9 staff_space#, .5 staff_space#, .5 staff_space#);
save thickness, diminish;
- thickness = 3/2 stafflinethickness;
+ thickness = 0.05 staff_space + linethickness;
pickup pencircle scaled thickness;
% prevent blobs at crossing lines
y2 = .25 thickness* diminish;
rt z4 = (w,0);
- x3 =0;
+ x3 = - linethickness + 0.1 staff_space;
z3 = whatever [z1, z4];
penpos2(thickness*(2 - diminish)/2 , 90);
def draw_staccatissimo =
save radius, height;
height# = .8 staff_space#;
- radius# = 2 stafflinethickness#;
+ radius# = linethickness# + .1 staff_space#;
define_whole_pixels(radius);
define_pixels(height);
- draw_brush((0,0), stafflinethickness, (0, height),2 radius);
+ draw_brush((0,0), linethickness, (0, height),2 radius);
set_char_box(radius#,radius#, blot_diameter#/2, height# + radius#);
enddef;
fet_beginchar("portato/single tenuto", "tenuto", "tenuto")
save thick;
- thick# = 1.6 stafflinethickness#;
+ thick# = 1.6 linethickness#;
define_whole_pixels(thick);
set_char_box(.6 staff_space#, .6 staff_space#, thick#/2,thick#/2);
def draw_portato =
save thick, radius;
- thick# = 1.4 stafflinethickness#;
- radius# = 1.4 stafflinethickness#;
+ thick# = 1.4 linethickness#;
+ radius# = 1.4 linethickness#;
define_whole_pixels(thick,radius);
set_char_box(.6 staff_space#, .6 staff_space#, thick#/2,.5 staff_space#+ radius#);
set_char_box(staff_space#/2, staff_space#/2, 0, 1.1 staff_space#);
fat_factor = .3;
- thinness = stafflinethickness;
+ thinness = linethickness;
pickup pencircle scaled thinness;
rt x2 = w;
save thin, height, width, thick;
height# = 5/4 width#;
height# = staff_space#;
- thin = 1.2 stafflinethickness;
- thick = 1.4 thin;
+ thin = .6 linethickness + 0.06 staff_space;
set_char_box(width#/2, width#/2, height#/2, height#/2);
+ define_pixels (width,height);
+ 2 thick + 0.6 (height - 2 thin) = width;
penpos1(thick, 0);
penpos2(thin, 90);
fet_beginchar("plus (stopped)", "stopped", "plusstop")
save thick, size;
- thick = 2 stafflinethickness;
+ thick = 2 linethickness;
size# = 1.1 staff_space#;
set_char_box(size#/2, size#/2, size#/2, size#/2);
rt x2 = w;
top y2 = h;
- z3 = 0.6 [z2, z1];
+ z3 = whatever [z2, z1];
+ y3 = 0.6 [y2, y1] + thickness;
+
penpos3(thickness, 0);
penpos4(thickness * diminish, 0);
x4r = thickness/2;
fet_beginchar("Upbow", "upbow", "upbow")
save ht, wd, thick, diminish;
- thick = 1.4 stafflinethickness;
+ thick = 1.4 linethickness;
wd# = 1.3 staff_space#;
ht# = 1.6 wd#;
set_char_box(wd#/2, wd#/2, 0, ht#);
define_pixels(wd)
wd# = 1.5 staff_space#;
- stemthick = 1.2 stafflinethickness;
+ stemthick = 1.2 linethickness;
set_char_box(wd#/2, wd#/2, 0, 4/3 staff_space#);
beamheight = 4/10 h;
wd# = 35/16 staff_space#;
ht# = 18/17 staff_space#;
- darkness = 1.20 stafflinethickness;
+ darkness = 0.3 linethickness + 0.09 staff_space;
set_char_box(wd#/2, wd#/2, ht#/2, ht#/2);
fet_beginchar("Reverse turn","reverseturn","reverseturn")
draw_turn;
currentpicture := currentpicture yscaled -1;
- penlabels(5,6,7);
- penlabels(2,3,4);
fet_endchar;
fet_beginchar("Turn","turn","turn")
draw_turn;
-
- penlabels(5,6,7);
- penlabels(1,2,3,4);
+ penlabels(1,2,3,4,5,6,7);
fet_endchar;
ex# = 1.4 staff_space#;
kerning# = .60 ex#;
start_nib_angle = 20;
- bulb_size = 0.70;
+ bulb_size = 0.80;
define_pixels(ex, ascender_extra, ascender, kerning);
t_overshoot = 0.03 ex;
t_width = 1.9 t_fatness;
r_fatness = 0.78 fatness;
uitschieter = 0.48 ex;
- hair_thick = blot_diameter;
- r_flare = 0.45 r_fatness;
+ hair_thick = linethickness;
+ r_flare = .5 hair_thick + 0.25 r_fatness;
r_width = 2 r_fatness + 0.25 kerning;
slant = .2;
penpos9(r_fatness, 0);
x10 = x9;
- y10 = -0.3 stafflinethickness;
+ y10 = -0.3 linethickness;
penpos10(r_fatness, 0);
krul_p := z4{up}
set_char_box(.85 staff_space# , .85 staff_space#, 0,ascender#);
- penpos11(1/4 r_fatness, -4);
+ penpos11(hair_thick, -4);
z11r = z9r;
- z13l = (x9l + r_width, y11 - stafflinethickness );
+ z13l = (x9l + r_width, y11 - linethickness );
penpos13(r_flare, 180);
- z15 = z13r - (bulb_size * r_fatness,0);
+ z15 = z13r - ( bulb_size * r_fatness,0);
z14 = 0.5 [z13l, z15] - (0,bulb_size* r_fatness);
z16 = 0.5 [z13l, z15] + (0,bulb_size* r_fatness);
define_pixels(radius);
set_char_box(radius#, radius#, radius#, 2/3 staff_space#);
- thickness := 1.5 stafflinethickness;
+ thickness := 1.5 linethickness;
pickup pencircle scaled thickness;
rt x1 = b;
top y1 = h;
def draw_toe =
save ht,wd;
- thickness := 1.5 stafflinethickness;
+ thickness := 1.5 linethickness;
ht# := 1.5 staff_space#;
wd# := 1/3 ht#;
define_pixels(ht,wd);
draw z1..z2..z3..z4..cycle;
fet_endchar;
+%%
+%
+%TODO: ARGRGHGH code dup.
+%
+%
+
fet_beginchar("Segno", "segno", "segno")
save thin, thick, ball_diam, darkness, pointheight;
save wd, ht, thick_nibangle, ball_nib_thick;
ht# = 3 staff_space#;
wd# = 2 staff_space#;
- darkness = 1.20 stafflinethickness;
+ darkness = .08 staff_space + 0.4 linethickness;
set_char_box(wd#/2, wd#/2, ht#/2, ht#/2);
thin = darkness;
ball_nib_thick = 2.7 darkness;
ball_diam = ball_nib_thick + (w - ball_nib_thick) / 10;
- pointheight = 2 stafflinethickness;
+ pointheight = 2 linethickness;
y3l = h;
2 x3 = x2 + x4;
fet_endchar;
fet_beginchar("Coda", "coda", "coda")
- save thin, thick, codawidth, codaheight;
- thin# = 1.2 stafflinethickness#;
- thick# = 3.5 stafflinethickness#;
+ save stickout, thin, thick, codawidth, codaheight;
+
+ stickout# = 0.35 staff_space#;
codawidth# = 2/3 staff_space#;
codaheight# = 1 staff_space#;
- define_pixels(thin, thick, codawidth, codaheight);
- set_char_box(codawidth#+thick#, codawidth#+thick#,
- codaheight#+thick#, codaheight#+thick#);
+ set_char_box(codawidth#+stickout#, codawidth#+stickout#,
+ codaheight#+stickout#, codaheight#+stickout#);
+
+ define_pixels(codawidth, codaheight);
+ thin = 1.2 linethickness;
+ 0.1 (codaheight - 2 thin) = (codawidth - 2 thick);
penpos1(thick,0);
penpos2(thin,-90);
fet_beginchar("Varied Coda", "varcoda", "varcoda")
save thin, thick, codawidth, codaheight;
- thin# = 1.2 stafflinethickness#;
- thick# = 3.5 stafflinethickness#;
+ thin# = 1.2 linethickness#;
+ thick# = 1.0 linethickness# + 0.25 staff_space#;
codawidth# = 2/3 staff_space#;
codaheight# = 1 staff_space#;
define_pixels(thin, thick, codawidth, codaheight);
y1 = y2 - thin;
x2 = 0;
y2 = codaheight;
- draw_rounded_block(z1, z2, thick);
+ draw_rounded_block(z1, z2, blot_diameter);
x3 = x1;
y3 = -blot_diameter;
x4 = x1 + thick;
y4 = y2;
- draw_rounded_block(z3, z4, thick);
+ draw_rounded_block(z3, z4, blot_diameter);
+ labels(1,2,3,4);
addto currentpicture also currentpicture xscaled -1;
addto currentpicture also currentpicture yscaled -1;
def draw_comma =
save alpha, thick, thin, ht;
alpha:=35;
- thin# = 1.2 stafflinethickness#;
- thick# = 3 stafflinethickness#;
+ thin# = 1.2 linethickness#;
+ thick# = 3 linethickness#;
ht# = .6staff_space#;
define_pixels(thin, thick,ht);
set_char_box(0, .5staff_space#, ht#, ht#);
def draw_varcomma =
save thick, thin, ht, wd, alpha;
alpha:=35;
- thin# = 1.2 stafflinethickness#;
- thick# = 3 stafflinethickness#;
+ thin# = 1.2 linethickness#;
+ thick# = 3 linethickness#;
ht# = .6 staff_space#;
wd# = .25 staff_space#;
define_pixels(thin, thick, ht, alpha);
thick#:=1/24designsize;
define_blacker_pixels(thick);
-rthin:=1/8*staff_space;
+rthin:= 0.075 *staff_space + 0.5 linethickness;
rthick:=2thick+rthin;
def draw_arpeggio =
path p;
- botthick = 1.5 stafflinethickness;
- topthick = 2.5 stafflinethickness;
+ botthick = 1.5 linethickness;
+ topthick = 2.5 linethickness;
pickup pencircle scaled botthick;