From 6effedbe48c3c7477a6819b731c778c563f2e6fb Mon Sep 17 00:00:00 2001 From: hanwen Date: Thu, 4 Apr 2002 22:05:50 +0000 Subject: [PATCH] '' --- ChangeLog | 5 + mf/cmbase.mf | 697 -------------------------------------------- mf/feta-din-code.mf | 519 ++++++++++++++++++++++++--------- mf/feta-din.mf | 5 +- mf/feta-new-code.mf | 385 ------------------------ 5 files changed, 391 insertions(+), 1220 deletions(-) delete mode 100644 mf/cmbase.mf delete mode 100644 mf/feta-new-code.mf diff --git a/ChangeLog b/ChangeLog index efbdd42e6b..905faab3aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ +2002-04-05 Han-Wen + + * mf/cmbase.mf: remove file. -- do without s and z signs for now. + 2002-04-04 Han-Wen * mf/feta-new-code.mf: new dynamic f sign. + new dynamic m sign. 2002-04-03 Han-Wen diff --git a/mf/cmbase.mf b/mf/cmbase.mf deleted file mode 100644 index 22c4a27c04..0000000000 --- a/mf/cmbase.mf +++ /dev/null @@ -1,697 +0,0 @@ -% The base file for Computer Modern (a supplement to {\tt plain.mf}) - -cmbase:=1; % when |cmbase| is known, this file has been input - -let cmchar=\; % `|cmchar|' should precede each character -let generate=input; % `|generate|' should follow the parameters - -autorounding:=0; smoothing:=0; % we do our own rounding -def autorounded = interim autorounding:=2 enddef; - -newinternal slant,fudge,math_spread,superness,superpull,beak_darkness,ligs; -boolean square_dots,hefty,serifs, - monospace,variant_g,low_asterisk,math_fitting; - -boolean dark,dark.dark,skewed,skewed.skewed; % for fast option testing -dark=skewed=false; dark.dark=skewed.skewed=true; - -vardef Vround primary y = y_:=vround y; - if y_y@2: y@2:=y@1; fi - else: y@2=max(y$-bracket_height,y$$); - bot y@1+slab=top y@0-eps=tiny.top y$; downward=z$$-z$; - if y@1x@2-eps: x@3:=x@2-eps; fi fi - pair corner; ypart corner=y@1; corner=z@2+whatever*downward; - filldraw z@2{z$-z$$} - ...darkness[corner,.5[z@1,z@2] ]{z@1-z@2} - ...{jut,0}z@1--z@0--(x$,y@0)--z@3--cycle; % the serif - labels (@1,@2); enddef; - -def dish_serif(suffix $,$$,@)(expr left_darkness,left_jut) - (suffix @@)(expr right_darkness,right_jut) suffix modifier = - serif($,$$,@,left_darkness,-left_jut) modifier; - serif($,$$,@@,right_darkness,right_jut) modifier; - if dish>0: pickup tiny.nib; numeric dish_out,dish_in; - if y$0: erase fill z@1--top z@1 - --(x@2r,top y@1)--z@2r--cycle; fi % erase excess at top - filldraw z@1--z@2r--z@2l{right} - ...darkness[(x@0,y@2l),.5[z@2l,z@0] ]{z@0-z@2l} - ...{down}z@0--(x@1,y@0)--cycle; % sloped serif - labels(@0,@1,@2); enddef; - -vardef sloped_serif.r(suffix $,$$,@)(expr darkness,jut,drop) = - pickup crisp.nib; pos@2(slab,-90); - rt x@0=tiny.rt x$r; lft x@1=tiny.lft x$l; bot y@1=tiny.bot y$l; - rt x@2=rt x@0+jut; y@2r=y@1+drop; - y@0=min(y@2l+bracket,y$$)+eps; -if drop>0: erase fill z@1--bot z@1 - --(x@2r,bot y@1)--z@2r--cycle; fi % erase excess at bottom - filldraw z@1--z@2r--z@2l{left} - ...darkness[(x@0,y@2l),.5[z@2l,z@0] ]{z@0-z@2l} - ...{up}z@0--(x@1,y@0)--cycle; % sloped serif - labels(@0,@1,@2); enddef; - -vardef term.l(suffix $,$$)(expr d,t,s)= % ``robust'' sans-serif terminal - path p_; p_=z$l{d}..tension t..z$$l; - pair d_; d_=(x$$l-x$l,s*(y$$l-y$l)); - if (abs angle direction 1 of p_ < abs angle d_)<>(x$l(x$ry$: bot else: top fi\\ y_=y$; - (from_x,y_)=whatever[z.from,z$]; - sharpness[z$,(from_x,y_)]{z$-z.from} - ...{z$$-z$}z$+sharpness*length(z$-(from_x,y_))*unitvector(z$$-z$) enddef; - -vardef diag_out(suffix $)(expr sharpness)(suffix $$,to) = - pickup tiny.nib; save to_x,y_; - if y.to>y$: bot else: top fi\\ y_=y$; - (to_x,y_)=whatever[z$$,z.to]; - z$$-sharpness*length(z$$-(to_x,y_))*unitvector(z$$-z$){z$$-z$} - ...{z.to-z$$}sharpness[z$$,(to_x,y_)] enddef; - -vardef diag_end(suffix from,$)(expr sharpness_in,sharpness_out)(suffix $$,to)= - save from_x,to_x,y_,x_,xx_; - if y.from>y$: tiny.bot else: tiny.top fi\\ y_=y$; % we assume that |y$=y$$| - (from_x,y_)=whatever[z.from,z$]; (to_x,y_)=whatever[z$$,z.to]; - if x$$>x$: x_=x$+sharpness_in*length(z$-(from_x,y_)); - xx_=x$$-sharpness_out*length(z$$-(to_x,y_)); - if xx_x_: xx_:=x_:=.5[xx_,x_]; fi fi - sharpness_in[z$,(from_x,y_)]{z$-z.from} - ...{z$$-z$}(x_,y$)..(xx_,y$){z$$-z$} - ...{z.to-z$$}sharpness_out[z$$,(to_x,y_)] enddef; -%%% at from to %%%% restore normal formatting - -vardef special_diag_end(suffix $$,$,@,@@) = % for top middle of w's - if x@r<=x$r: diag_end($$r,$r,1,1,@l,@@l) - else: z0=whatever[z$$l,z$l]=whatever[z@l,z@@l]; - diag_end($$r,$r,1,1,$l,0)--z0 fi enddef; - -def prime_points_inside(suffix $,$$) = - theta_:=angle(z$r-z$l); - penpos$'(whatever,theta_); - if y$$>y$: z$'=(0,pen_top) rotated theta_ + whatever[z$l,z$r]; - theta_:=angle(z$$-z$)-90; - else: z$'=(0,pen_bot) rotated theta_ + whatever[z$l,z$r]; - theta_:=angle(z$$-z$)+90; fi - z$'l+(pen_lft,0) rotated theta_=z$l+whatever*(z$-z$$); - z$'r+(pen_rt,0) rotated theta_=z$r+whatever*(z$-z$$); - enddef; - -def ellipse_set(suffix $,@,@@,$$) = % given |z$,x@,z$$|, find |y@| and |z@@| -% such that the path |z${x@-x$,0}..z@{0,y@-y$}..{z$$-z@@}z@@| -% is consistent with an ellipse -% and such that the line |z@@--z$$| has a given |slope| - alpha_:=slope*(x@-x$); beta_:=y$$-y$-slope*(x$$-x$); - gamma_:=alpha_/beta_; - y@-y$=.5(beta_-alpha_*gamma_); - x@@-x$=-2gamma_*(x@-x$)/(1+gamma_*gamma_); - y@@-y$$=slope*(x@@-x$$) enddef; - -vardef diag_ratio(expr a,b,y,c) = % assuming that $a>\vert b/y\vert$, -% compute the value $\alpha=(x\6{++}y)/y$ such that $ax+b\alpha=c$ - numeric a_,b_,c_; b_=b/y; c_=c/y; a_=a*a-b_*b_; - (a*(c_++sqrt a_)-b_*c_)/a_ enddef; - -def f_stroke(suffix $,$$,@,left_serif,right_serif)(expr left_jut,right_jut)= - pickup tiny.nib; bot y$=0; - penpos@0(x$r-x$l,0); x@0l=x$l; top y@0=x_height; - filldraw stroke z$e--z@0e; % stem - pickup fine.nib; pos@0'(x$r-x$l-(hround stem_corr)+tiny,180); - y@0'=y@0; lft x@0'r=tiny.lft x$l; - penpos@1(x@0'l-x@0'r,180); x@1=x@0'; y@1+.5vair=.5[x_height,h]; - pos@2(vair,90); top y@2r=h+oo; - if serifs: x@2=.6[x@1,x$$r]; (x@,y@2r)=whatever[z@2l,z@1l]; - x@2r:=min(x@,.5[x@2,x$$r]); pos@3(hair,0); bulb(@2,@3,$$); % bulb - filldraw stroke z@0'e--z@1e & super_arc.e(@1,@2); % arc - dish_serif($,@0,left_serif,1/3,left_jut,right_serif,1/3,right_jut); % serif - else: x@2=.6[x@1,x$$]; y@1l:=1/3[y@1l,y@2l]; - filldraw stroke z@0'e--z@1e & super_arc.e(@1,@2) - & term.e(@2,$$,right,.9,4); fi % arc and terminal - penlabels(@0,@1,@2); enddef; - -def h_stroke(suffix $,@,@@,$$) = - penpos$$(x@@r-x@@l,0); x$$=x@@; bot y$$=0; - y@@=1/3[bar_height,x_height]; - penpos$''(x$r-x$l,0); x$''=x$; y$''=1/8[bar_height,x_height]; - filldraw stroke z$''e--z$e; % thicken the lower left stem - penpos@0(min(rt x$r-lft x$l,thin_join)-fine,180); pickup fine.nib; - rt x@0l=tiny.rt x$r; y@0=y$''; - pos@1(vair,90); pos@@'(x@@r-x@@l+tiny,0); z@@'=z@@; - x@1=.5[rt x@0l,rt x@@'r]; top y@1r=x_height+oo; - (x@,y@1l)=whatever[z@1r,z@0l]; x@1l:=x@; - filldraw stroke z@0e{up}...{right}z@1e - &{{interim superness:=hein_super; super_arc.e(@1,@@')}}; % arch - pickup tiny.nib; filldraw stroke z@@e--z$$e; % right stem - labels(@0); penlabels(@1); enddef; - -def hook_out(suffix $,$$,$$$)suffix modifier= % |x$| and |x$$$| (only) are known - pos$(stem,0); pos$$(vair,90); - x$$$:=hround(x$$$+.5hair-eps)-.5hair; pos$$$(hair,180); - y$=1/4x_height; bot y$$l=-oo; y$$$=1/3x_height; - if skewed.modifier: x$$=x$+1.25u; - filldraw stroke z$e{-u,-x_height}...z$$e{right}...{up}z$$$e; % hook - else: x$$=x$+1.5u; - filldraw stroke z$e{down}...z$$e{right} - ...{x$$$-(x$+2.5u),x_height}z$$$e; fi enddef; % hook - -def hook_in(suffix $,$$,$$$)suffix modifier= % |x$| and |x$$$| (only) are known - x$:=hround(x$-.5hair)+.5hair; pos$(hair,180); - pos$$(vair,90); pos$$$(stem,0); - y$=2/3x_height; top y$$r=x_height+oo; y$$$=3/4x_height; - if skewed.modifier: x$$=x$$$-1.25u; - filldraw stroke z$e{up}...z$$e{right}...{-u,-x_height}z$$$e; % hook - else: x$$=x$$$-1.5u; - filldraw stroke z$e{x$$$-2.5u-x$,x_height} - ...z$$e{right}...{down}z$$$e; fi enddef; % hook - -def ital_arch(suffix $,$$,$$$) = % |z$| and |z$$$| (only) are known - pos$'(hair,180); z$'=z$; - pos$$(vair,90); pos$$$(stem,0); - {{interim superness := more_super; x$$=.6[x$,x$$$]; - top y$$r=x_height+oo; y$$$=.65x_height; - filldraw stroke z$'e{up}...super_arc.e($$,$$$);}} enddef; % stroke - -def compute_spread(expr normal_spread,big_spread)= - spread#:=math_spread[normal_spread,big_spread]; - spread:=2ceiling(spread#*hppp/2)+eps; enddef; - -def v_center(expr h_sharp) = - .5h_sharp+math_axis#, .5h_sharp-math_axis# enddef; - -def circle_points = - x4=x8=.5[x2,x6]; x1=x3=superness[x4,x2]; x5=x7=superness[x4,x6]; - y2=y6=.5[y4,y8]; y1=y7=superness[y2,y8]; y3=y5=superness[y2,y4]; - enddef; -def draw_circle = - draw z8{right}...z1{z2-z8}...z2{down}...z3{z4-z2}...z4{left} - ...z5{z6-z4}...z6{up}...z7{z8-z6}...cycle enddef; - -def left_paren(expr min_breadth, max_breadth) = - pickup fine.nib; pos1(hround min_breadth,0); - pos2(hround max_breadth,0); pos3(hround min_breadth,0); - rt x1r=rt x3r=hround(w-1.25u+.5min_breadth); lft x2l=hround 1.25u; - top y1=h; y2=.5[y1,y3]; bot y3=1-d; - filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e - ...{3(x3e-x2e),y3-y2}z3e; % arc - penlabels(1,2,3); enddef; - -def right_paren(expr min_breadth, max_breadth) = - pickup fine.nib; pos1(hround min_breadth,0); - pos2(hround max_breadth,0); pos3(hround min_breadth,0); - lft x1l=lft x3l=hround(1.25u-.5min_breadth); rt x2r=hround(w-1.25u); - top y1=h; y2=.5[y1,y3]; bot y3=1-d; - filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e - ...{3(x3e-x2e),y3-y2}z3e; % arc - penlabels(1,2,3); enddef; - -def left_bracket(expr breadth,do_top,do_bot) = - pickup crisp.nib; - numeric thickness; thickness=hround breadth; - pos1(thickness,0); pos2(thickness,0); - top y1=h; bot y2=1-d; lft x1l=lft x2l=hround(2.5u-.5thickness); - filldraw stroke z1e--z2e; % stem - pos3(thickness,90); pos4(thickness,90); - pos5(thickness,90); pos6(thickness,90); - x3=x5=x1l; rt x4=rt x6=hround(w-.75u+.5thickness); - y3r=y4r=y1; y5l=y6l=y2; - if do_top: filldraw stroke z3e--z4e; fi % upper bar - if do_bot: filldraw stroke z5e--z6e; fi % lower bar - penlabels(1,2,3,4,5,6); enddef; - -def right_bracket(expr breadth,do_top,do_bot) = - pickup crisp.nib; - numeric thickness; thickness=hround breadth; - pos1(thickness,0); pos2(thickness,0); - top y1=h; bot y2=1-d; rt x1r=rt x2r=hround(w-2.5u+.5thickness); - filldraw stroke z1e--z2e; % stem - pos3(thickness,90); pos4(thickness,90); - pos5(thickness,90); pos6(thickness,90); - x3=x5=x1r; lft x4=lft x6=hround(.75u-.5thickness); - y3r=y4r=y1; y5l=y6l=y2; - if do_top: filldraw stroke z3e--z4e; fi % upper bar - if do_bot: filldraw stroke z5e--z6e; fi % lower bar - penlabels(1,2,3,4,5,6); enddef; - -def left_curly(expr min_breadth, max_breadth) = - pickup fine.nib; - forsuffixes $=1,1',4,4',7,7': pos$(hround min_breadth,0); endfor - forsuffixes $=2,3,5,6: pos$(hround max_breadth,0); endfor - x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4'; - lft x4l=hround(1.5u-.5min_breadth); lft x2l=hround(.5w-.5max_breadth); - top y1=h; bot y7=1-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5]; - y1-y2=y3-y4=(y1-y4)/4; - y1-y1'=y4-y4'=y7'-y7=vround(min_breadth-fine); - filldraw z1l{3(x2l-x1l),y2-y1}...z2l---z3l...{3(x4l-x3l),y4-y3}z4l - --z4'l{3(x5l-x4l),y5-y4'}...z5l---z6l...{3(x7l-x6l),y7-y6}z7l - --z7r--z7'r{3(x6r-x7r),y6-y7'}...z6r---z5r - ...{3(x4r-x5r),.5[y4,y4']-y5}.5[z4r,z4'r]{3(x3r-x4r),y3-.5[y4,y4']} - ...z3r---z2r...{3(x1r-x2r),y1'-y2}z1'r--z1r--cycle; % stroke - penlabels(1,2,3,4,5,6,7); enddef; - -def right_curly(expr min_breadth, max_breadth) = - pickup fine.nib; - forsuffixes $=1,1',4,4',7,7': pos$(hround min_breadth,0); endfor - forsuffixes $=2,3,5,6: pos$(hround max_breadth,0); endfor - x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4'; - lft x1l=hround(1.5u-.5min_breadth); lft x2l=hround(.5w-.5max_breadth); - top y1=h; bot y7=1-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5]; - y1-y2=y3-y4=(y1-y4)/4; - y1-y1'=y4-y4'=y7'-y7=vround(min_breadth-fine); - filldraw z1r{3(x2r-x1r),y2-y1}...z2r---z3r...{3(x4r-x3r),y4-y3}z4r - --z4'r{3(x5r-x4r),y5-y4'}...z5r---z6r...{3(x7r-x6r),y7-y6}z7r - --z7l--z7'l{3(x6l-x7l),y6-y7'}...z6l---z5l - ...{3(x4l-x5l),.5[y4,y4']-y5}.5[z4l,z4'l]{3(x3l-x4l),y3-.5[y4,y4']} - ...z3l---z2l...{3(x1l-x2l),y1'-y2}z1'l--z1l--cycle; % stroke - penlabels(1,2,3,4,5,6,7); enddef; - -def left_angle(expr breadth) = - pickup pencircle scaled breadth; - x1=x3=good.x(w-u)+eps; lft x2=hround u-eps; - top y1=h+eps; .5[y1,y3]=y2=good.y .5[-d+eps,h]; - draw z1--z2--z3; % diagonals - labels(1,2,3); enddef; - -def right_angle(expr breadth) = - pickup pencircle scaled breadth; - x1=x3=good.x u-eps; rt x2=hround(w-u)+eps; - top y1=h+eps; .5[y1,y3]=y2=good.y .5[-d+eps,h]; - draw z1--z2--z3; % diagonals - labels(1,2,3); enddef; - -def big_slash(expr breadth) = - adjust_fit(-letter_fit#,-letter_fit#); pickup pencircle scaled breadth; - rt x1=hround(w-u); lft x2=hround u; top y1=h+eps; bot y2=1-d-eps; - draw z1--z2; % diagonal - labels(1,2); enddef; - -def big_blash(expr breadth) = - adjust_fit(-letter_fit#,-letter_fit#); pickup pencircle scaled breadth; - lft x1=hround u; rt x2=hround(w-u); top y1=h+eps; bot y2=1-d-eps; - draw z1--z2; % diagonal - labels(1,2); enddef; - -def big_sqrt = - adjust_fit(0,-letter_fit#); pickup rule.nib; - x1=good.x 4/9w; x2=good.x(w+.5); bot y1=-d; bot y2=0; - draw z1--z2; % diagonal - pickup crisp.nib; pos3(max(curve,rule_thickness),0); - x3l=1.5[x2,x1]; y3=.5[y1,y2]; - pos4(rule_thickness,0); x4=x1; bot y4=-d; - pos5(vair,-45); x5l=good.x(x3l-u); z5l=whatever[z3r,z2]; - z6=z5r+whatever*(z2-z3r)=whatever[z3l,z4l]; - z7=whatever[z1,z2]=z3r+whatever*(z4l-z3l); - filldraw z5r--z6--z4l--z4--z7--z3r--z5l--cycle; % left diagonal and serif - penlabels(1,2,3,4,5,6,7); enddef; - -def big_hat = - adjust_fit(0,0); - pickup crisp.nib; pos2(.6[vair,curve],90); top y2r=h+o; x2=.5w; - x1=w-x3=good.x -eps; y1=y3=.5[x_height,y2]; - pos1(hair,angle(z2-z1)+90); pos3(hair,angle(z3-z2)+90); - filldraw stroke z1e--z2e--z3e; % diagonals - penlabels(1,2,3); enddef; - -def big_tilde = - adjust_fit(0,0); pickup crisp.nib; - numeric theta; theta=angle(1/6(w-vair),1/4(h-x_height)); - numeric mid_width; mid_width=.4[vair,stem]; - pos1(vair,theta+90); pos2(vair,theta+90); - pos3(vair,theta+90); pos4(vair,theta+90); - z2-z1=z4-z3=(mid_width-crisp)*dir theta; - lft x1r=w-rt x4l=0; top y4r=h; - bot y1l=vround(bot y1l+min(2/3[x_height,h],y3l-.25vair)-top y1r); - pair delta; ypart delta=3(y3l-y1l); delta=whatever*dir theta; - filldraw z1l..controls(z1l+delta)and(z3l-delta)..z3l..z4l - --z4r..controls(z4r-delta)and(z2r+delta)..z2r..z1r--cycle; % stroke - penlabels(1,2,3,4); enddef; - -def beginarithchar(expr c) = % ensure consistent dimensions for $+$, $-$, etc. - if monospace: beginchar(c,14u#,27/7u#+math_axis#,27/7u#-math_axis#); - else: beginchar(c,14u#,6u#+math_axis#,6u#-math_axis#); fi - italcorr math_axis#*slant-.5u#; - adjust_fit(0,0); enddef; - -newinternal l,r,shrink_fit; % adjustments to spacing - -def do_expansion(expr expansion_factor) = - forsuffixes $=u,jut,cap_jut,beak_jut,apex_corr: - $:=$.#*expansion_factor*hppp; endfor -enddef; - -def normal_adjust_fit(expr left_adjustment,right_adjustment) = - numeric charwd_in; charwd_in=charwd; - l:=-hround(left_adjustment*hppp)-letter_fit; - interim xoffset:=-l; - charwd:=charwd+2letter_fit#+left_adjustment+right_adjustment; - r:=l+hround(charwd*hppp)-shrink_fit; - w:=r-hround(right_adjustment*hppp)-letter_fit; - do_expansion(w/(charwd_in*hppp)); - enddef; - -def mono_adjust_fit(expr left_adjustment,right_adjustment) = - numeric charwd_in; charwd_in=charwd; - numeric expansion_factor; - mono_charwd#=2letter_fit# - +expansion_factor*(charwd+left_adjustment+right_adjustment); - l:=-hround(left_adjustment*expansion_factor*hppp)-letter_fit; - interim xoffset:=-l; - r:=l+mono_charwd-shrink_fit; - w:=r-hround(right_adjustment*expansion_factor*hppp)-letter_fit; - charwd:=mono_charwd#; charic:=mono_charic#; - do_expansion(w/(charwd_in*hppp)); - enddef; - -extra_endchar:=extra_endchar&"r:=r+shrink_fit;w:=r-l;"; - -def ignore_math_fit(expr left_adjustment,right_adjustment) = enddef; -def do_math_fit(expr left_adjustment,right_adjustment) = - l:=l-hround(left_adjustment*hppp); interim xoffset:=-l; - charwd:=charwd+left_adjustment+right_adjustment; - r:=l+hround(charwd*hppp)-shrink_fit; - charic:=charic-right_adjustment; - if charic<0: charic:=0; fi enddef; -def zero_width = charwd:=0; r:=l-shrink_fit enddef; -def change_width = if not monospace: % change width by $\pm1$ - if r+shrink_fit-l=floor(charwd*hppp): w:=w+1; r:=r+1; - else: w:=w-1; r:=r-1; fi fi enddef; -def center_on(expr x) = if not monospace: % change width for symmetric fit - r:=r+2x-w; w:=2x; fi enddef; -def padded expr del_sharp = - charht:=charht+del_sharp; chardp:=chardp+del_sharp enddef; - -def font_setup = - if monospace: let adjust_fit=mono_adjust_fit; - def mfudged=fudged enddef; - mono_charic#:=body_height#*slant; - if mono_charic#<0: mono_charic#:=0; fi - mono_charwd#:=9u#; define_whole_pixels(mono_charwd); - else: let adjust_fit=normal_adjust_fit; - def mfudged= enddef; fi - if math_fitting: let math_fit=do_math_fit - else: let math_fit=ignore_math_fit fi; - define_pixels(u,width_adj,serif_fit,cap_serif_fit,jut,cap_jut,beak, - bar_height,dish,bracket,beak_jut,stem_corr,vair_corr,apex_corr); - define_blacker_pixels(notch_cut,cap_notch_cut); - forsuffixes $=notch_cut,cap_notch_cut: if $<3: $:=3; fi endfor - define_whole_pixels(letter_fit,fine,crisp,tiny); - define_whole_vertical_pixels(body_height,asc_height, - cap_height,fig_height,x_height,comma_depth,desc_depth,serif_drop); - define_whole_blacker_pixels(thin_join,hair,stem,curve,flare, - dot_size,cap_hair,cap_stem,cap_curve); - define_whole_vertical_blacker_pixels(vair,bar,slab,cap_bar,cap_band); - define_corrected_pixels(o,apex_o); - forsuffixes $=hair,stem,cap_stem: - fudged$.#:=fudge*$.#; fudged$:=hround(fudged$.#*hppp+blacker); - forever: exitif fudged$>.9fudge*$; fudged$:=fudged$+1; endfor endfor - rule_thickness:=ceiling(rule_thickness#*hppp); - heavy_rule_thickness:=ceiling(3rule_thickness#*hppp); - oo:=vround(.5o#*hppp*o_correction)+eps; - apex_oo:=vround(.5apex_o#*hppp*o_correction)+eps; - lowres_fix(stem,curve,flare) 1.3; - lowres_fix(stem,curve) 1.2; - lowres_fix(cap_stem,cap_curve) 1.2; - lowres_fix(hair,cap_hair) 1.2; - lowres_fix(cap_band,cap_bar,bar,slab) 1.2; - stem':=hround(stem-stem_corr); cap_stem':=hround(cap_stem-stem_corr); - vair':=vround(vair+vair_corr); - vstem:=vround .8[vair,stem]; cap_vstem:=vround .8[vair,cap_stem]; - ess:=(ess#/stem#)*stem; cap_ess:=(cap_ess#/cap_stem#)*cap_stem; - dw:=(curve#-stem#)*hppp; bold:=curve#*hppp+blacker; - dh#:=.6designsize; - stem_shift#:=if serifs: 2stem_corr# else: 0 fi; - more_super:=max(superness,sqrt .77superness); - hein_super:=max(superness,sqrt .81225258superness); % that's $2^{-.3}$ - clear_pen_memory; - if fine=0: fine:=1; fi - forsuffixes $=fine,crisp,tiny: -%%% fine $ %%%% temporary formatting convention for MFT - if $>fudged.hair: $:=fudged.hair; fi - $.breadth:=$; - pickup if $=0: nullpen else: pencircle scaled $; $:=$-eps fi; - $.nib:=savepen; breadth_[$.nib]:=$; - forsuffixes $$=lft,rt,top,bot: shiftdef($.$$,$$ 0); endfor endfor -%%% @ $ %%%% restore ordinary formatting for $ - min_Vround:=max(fine.breadth,crisp.breadth,tiny.breadth); - if min_Vround0: - rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction - enddef; -def maketicks(text rule) = - for y=0,h.o_,-d.o_: - rule((l,y),(l+10,y)); rule((r-10,y),(r,y)); endfor % horizontals - for x=l,r: - rule((x,10-d.o_),(x,-d.o_)); rule((x,h.o_-10),(x,h.o_)); endfor % verticals - if charic<>0: - rule((r+charic*pt,h.o_-10),(r+charic*pt,h.o_)); fi % italic correction - enddef; -rulepen:=pensquare; - -vardef stroke text t = - forsuffixes e = l,r: path_.e:=t; endfor - if cycle path_.l: - errmessage "Beware: `stroke' isn't intended for cycles"; fi - path_.l -- reverse path_.r -- cycle enddef; - -vardef circ_stroke text t = - forsuffixes e = l,r: path_.e:=t; endfor - if cycle path_.l: - errmessage "Beware: `stroke' isn't intended for cycles"; fi - path_.l -- reverse path_.r .. cycle enddef; - -vardef super_arc.r(suffix $,$$) = % outside of super-ellipse - pair center,corner; - if y$=y$r: center=(x$$r,y$r); corner=(x$r,y$$r); - else: center=(x$r,y$$r); corner=(x$$r,y$r); fi - z$.r{corner-z$.r}...superness[center,corner]{z$$.r-z$.r} - ...{z$$.r-corner}z$$.r enddef; - -vardef super_arc.l(suffix $,$$) = % inside of super-ellipse - pair center,corner; - if y$=y$r: center=(x$$l,y$l); corner=(x$l,y$$l); - else: center=(x$l,y$$l); corner=(x$$l,y$l); fi - z$l{corner-z$l}...superness[center,corner]{z$$l-z$l} - ...{z$$l-corner}z$$l enddef; - -vardef pulled_super_arc.r(suffix $,$$)(expr superpull) = - pair center,corner; - if y$=y$r: center=(x$$r,y$r); corner=(x$r,y$$r); - else: center=(x$r,y$$r); corner=(x$$r,y$r); fi - z$r{corner-z$r}...superness[center,corner]{z$$r-z$r} - ...{z$$r-corner}z$$r enddef; - -vardef pulled_super_arc.l(suffix $,$$)(expr superpull) = - pair center,corner,outer_point; - if y$=y$r: center=(x$$l,y$l); corner=(x$l,y$$l); - outer_point=superness[(x$$r,y$r),(x$r,y$$r)]; - else: center=(x$l,y$$l); corner=(x$$l,y$l); - outer_point=superness[(x$r,y$$r),(x$$r,y$r)]; fi - z$l{corner-z$l} - ...superpull[superness[center,corner],outer_point]{z$$l-z$l} - ...{z$$l-corner}z$$l enddef; - -vardef pulled_arc@#(suffix $,$$) = - pulled_super_arc@#($,$$)(superpull) enddef; - -vardef serif_arc(suffix $,$$) = - z${x$$-x$,0}...(.75[x$,x$$],.25[y$,y$$]){z$$-z$}...{0,y$$-y$}z$$ enddef; - -vardef penpos@#(expr b,d) = - if known b: if b<=0: errmessage "bad penpos"; fi fi - (x@#r-x@#l,y@#r-y@#l)=(b,0) rotated d; - x@#=.5(x@#l+x@#r); y@#=.5(y@#l+y@#r) enddef; - -newinternal currentbreadth; -vardef pos@#(expr b,d) = - if known b: if b<=currentbreadth: errmessage "bad pos"; fi fi - (x@#r-x@#l,y@#r-y@#l)=(b-currentbreadth,0) rotated d; - x@#=.5(x@#l+x@#r); y@#=.5(y@#l+y@#r) enddef; -def numeric_pickup_ primary q = - currentpen:=pen_[q]; - pen_lft:=pen_lft_[q]; pen_rt:=pen_rt_[q]; - pen_top:=pen_top_[q]; pen_bot:=pen_bot_[q]; - currentpen_path:=pen_path_[q]; - if known breadth_[q]: currentbreadth:=breadth_[q]; fi enddef; - -vardef ic# = charic enddef; -vardef h# = charht enddef; -vardef w# = charwd enddef; -vardef d# = chardp enddef; - -let {{=begingroup; let }}=endgroup; -def .... = .. tension atleast .9 .. enddef; -def less_tense = save ...; let ...=.... enddef; -def ?? = hide(showvariable x,y) enddef; - -let semi_ =;; let colon_ = :; let endchar_ = endchar; -def iff expr b = if b:let next_=use_it else:let next_=lose_it fi; next_ enddef; -def use_it = let : = restore_colon; enddef; -def restore_colon = let : = colon_; enddef; -def lose_it = let endchar=fi; inner cmchar; let ;=fix_ semi_ if false enddef; -def fix_=let ;=semi_; let endchar=endchar_; outer cmchar; enddef; -def always_iff = let : = endgroup; killboolean enddef; -def killboolean text t = use_it enddef; -outer cmchar; diff --git a/mf/feta-din-code.mf b/mf/feta-din-code.mf index 881588765f..db4d7f17c9 100644 --- a/mf/feta-din-code.mf +++ b/mf/feta-din-code.mf @@ -1,155 +1,402 @@ -% feta-din.mf -% -% from cmbxti10.mf -% -% feta dynamics -% too easy now to use this copy from cm, but we might want to do ourselves -% -% 16pt staff: \font\dynfont=feta-din10 scaled \magstep1 -% 20pt staff: \font\dynfont=feta-din10 scaled \magstep2 - -% -% Computer Modern Bold Extended Text Italic 10 point -% -% font_identifier:="CMBXTI"; font_size 10pt#; -% - -input cmbase; - - -% -% We bluntly multiply by font-size / 10pt#, -% before we did plain scaling anyway. -% - -M:=design_size/10; - -u#:=M*21.2/36pt#; % unit width -width_adj#:=M*11/36pt#; % width adjustment for certain characters -serif_fit#:=M*0pt#; % extra sidebar near lowercase serifs -cap_serif_fit#:=M*7/36pt#; % extra sidebar near uppercase serifs -letter_fit#:=M*11/36pt#; % extra space added to all sidebars - -body_height#:=M*270/36pt#; % height of tallest characters -asc_height#:=M*250/36pt#; % height of lowercase ascenders -cap_height#:=M*247/36pt#; % height of caps -fig_height#:=M*232/36pt#; % height of numerals -x_height#:=M*160/36pt#; % height of lowercase without ascenders -math_axis#:=M*90/36pt#; % axis of symmetry for math symbols -bar_height#:=M*85/36pt#; % height of crossbar in lowercase e -comma_depth#:=M*70/36pt#; % depth of comma below baseline -desc_depth#:=M*70/36pt#; % depth of lowercase descenders - -crisp#:=M*13/36pt#; % diameter of serif corners -tiny#:=M*13/36pt#; % diameter of rounded corners -fine#:=M*10/36pt#; % diameter of sharply rounded corners -thin_join#:=M*10/36pt#; % width of extrafine details -hair#:=M*20/36pt#; % lowercase hairline breadth -stem#:=M*38/36pt#; % lowercase stem breadth -curve#:=M*43/36pt#; % lowercase curve breadth -ess#:=M*35/36pt#; % breadth in middle of lowercase s -flare#:=M*42/36pt#; % diameter of bulbs or breadth of terminals -dot_size#:=M*53/36pt#; % diameter of dots -cap_hair#:=M*22/36pt#; % uppercase hairline breadth -cap_stem#:=M*49/36pt#; % uppercase stem breadth -cap_curve#:=M*52/36pt#; % uppercase curve breadth -cap_ess#:=M*50/36pt#; % breadth in middle of uppercase s -rule_thickness#:=M*.6pt#; % thickness of lines in math symbols - -dish#:=M*1/36pt#; % amount erased at top or bottom of serifs -bracket#:=M*10/36pt#; % vertical distance from serif base to tangent -jut#:=M*27/36pt#; % protrusion of lowercase serifs -cap_jut#:=M*39/36pt#; % protrusion of uppercase serifs -beak_jut#:=M*10/36pt#; % horizontal protrusion of beak serifs -beak#:=M*70/36pt#; % vertical protrusion of beak serifs -vair#:=M*13/36pt#; % vertical diameter of hairlines -notch_cut#:=M*10pt#; % maximum breadth above or below notches -bar#:=M*17/36pt#; % lowercase bar thickness -slab#:=M*17/36pt#; % serif and arm thickness -cap_bar#:=M*17/36pt#; % uppercase bar thickness -cap_band#:=M*17/36pt#; % uppercase thickness above/below lobes -cap_notch_cut#:=M*10pt#; % max breadth above/below uppercase notches -serif_drop#:=M*3/36pt#; % vertical drop of sloped serifs -stem_corr#:=M*2/36pt#; % for small refinements of stem breadth -vair_corr#:=M*1.5/36pt#; % for small refinements of hairline height -apex_corr#:=M*0pt#; % extra width at diagonal junctions - -o#:=M*6/36pt#; % amount of overshoot for curves -apex_o#:=M*6/36pt#; % amount of overshoot for diagonal junctions - -slant:=.25; % tilt ratio $(\Delta x/\Delta y)$ -fudge:=1; % factor applied to weights of heavy characters -math_spread:=.5; % extra openness of math symbols -superness:=8/11; % parameter for superellipses -superpull:=1/8; % extra openness inside bowls -beak_darkness:=.4; % fraction of triangle inside beak serifs -ligs:=2; % level of ligatures to be included - -square_dots:=false; % should dots be square? -hefty:=false; % should we try hard not to be overweight? -serifs:=true; % should serifs and bulbs be attached? -monospace:=false; % should all characters have the same width? -variant_g:=true; % should an italic-style g be used? -low_asterisk:=false; % should the asterisk be centered at the axis? -math_fitting:=false; % should math-mode spacing be used? +% +% piano p, grabbed from Ed Breitkopf Mozart horn concerto 3. +% +% Notes: +% +% * there is no dishing in the serif (but we do it anyway) +% +% * The cheek is a little fatter than the stem +% +% * The slant is extreme: 20 degrees +% +% * the twiddle (what'sitcalled) is a slightly darker than the serif +% +% * The hole in the cheek has a straight right side. +% +% * Corners are filled up. +% +% +code := 111; +save slant; +slant := 20; +currenttransform := identity; -% "f" obviously has a _lot_ bigger slant than "p" (see Wanske p.239) -% however; perhaps we need two f symbols: -% - a super-slanted one used in "f" "mf" "sfz" "sf", and -% - a more normal-slanted in "ff" "fff" "fp" "fp" (see Wanske p.241) + +save serif_thick; +serif_thick# = 1.1 stafflinethickness#; +define_blacker_pixels (serif_thick); +med_thick = round (1.5 stafflinethickness); + +fet_beginchar("dynamic p", "p", "dynp") + set_char_box (0, 13/12 ex#, descender#, 1.0 ex#); + + save twiddle_thick, stem_thick, cheek_thick; + save updir, fill_up; + save serif, dishing_angle, p, q; + save cheek_medium, left_serif_protude, right_serif_protude; + + pair updir; + path serif,q,p; + + updir := dir (90 - slant ); + twiddle_thick = med_thick; + cheek_medium = 1/6 ex; + + dishing_angle = 5; + fill_up := 1.5 serif_thick; + straigh_len = 0.5 ex; + + stem_thick = 2/6 ex; + cheek_thick = 11/32 ex; + cheek_width = 0.72 ex; + left_serif_protude = 18/60 ex; + right_serif_protude= 15/60 ex; + + penpos1 (twiddle_thick, -slant - 5); + penpos2 (cheek_medium, 90 - slant ); + penpos3 (cheek_medium, 90 - slant); + +% x4r - x4l = cheek_thick; + penpos4 (cheek_thick, -slant); + penpos5 (cheek_medium, -55); + penpos6 (stem_thick, 0); + penpos17 (straigh_len, 90 -slant); + z17 = z4l; + + x6l = 0; + y6l = - descender + serif_thick/2; + x1l = x6l; + y1r = 0.5 ex; + y2r = ex; + z7 = whatever * updir + z6l; + y7 = 43/60 ex; + + z2l = whatever *updir + 0.3 [z7, z1r]; + y8 = ypart (0.9 [z7, z2l]); + z8 = 2/3 [z6l, z6r] + whatever * updir; + + + y3r = ex; + z3l = 0.58 [(stem_thick, -descender), (stem_thick + cheek_width - cheek_thick, -descender)] + whatever * updir; + y4r = 1/3 ex; + z4r = whatever*updir + (stem_thick+ cheek_width, -descender); + + z5l = whatever*updir + z3l; + y5l = 1/12 ex; + + z9 = z6r + whatever*updir; + y9 = y5l; + + p := + z2r{right} .. {dir( -60)}z8 & z8{dir 35} .. z3r{right} + .. tension 0.9 .. z4r{-updir} .. z5r{left} .. z9 + & z9 -- z6r -- z6l -- z7{updir} + .. z2l{left} .. tension 1.2 .. + % z1r & z1r -- z1l & z1l + simple_serif (z1r, z1l, -90) + .. cycle; + pickup pencircle scaled 1; + fill p; + + y12 = 0.5 ex; + z12 = z6r + whatever*updir; + + save inner_tension; + inner_tension = 1.4; + q := + z17l --- z17r .. z3l{left}.. tension 1.05 .. z12{-updir} .. tension 1.05 .. z5l{right} .. cycle; + unfill q; + penlabels (1, 2, 3, 4, 5, 6, 17); + + + + + pickup pencircle scaled serif_thick; + lft x11 = -left_serif_protude; + rt x10 = stem_thick+ right_serif_protude; + bot y10 = bot y11 = -descender; + + + serif := simple_serif (z10, z11, dishing_angle); + draw serif; + + labels(7,8, 9, 10, 11,12); + + + z13 = point 0.05 of serif; + z14 = point 0.85 of serif; + z15 = z6l + updir * fill_up +( serif_thick/2, 0); + z16 = z6r + updir * 1.2fill_up- +( serif_thick/2, 0); + labels(13,14, 15, 16); + +% pickup pencircle scaled 1; + draw z13{direction 0.05 of serif} .. z16{updir}; + draw z14{-(direction 0.85 of serif)} .. z15{updir}; +fet_endchar; + +% forte f, grabbed from Ed Breitkopf Mozart horn concerto 3. +% +% NOTES: +% +% * the bulbs are open. +% +% * blotting around the serif +% +% +% +% TODO: insert blots around the serif +% +% % -% looking at professionally typeset music reveals that typesetters -% are somewhat unsure about slanting in "mf", "fp", "sfz" -% "f" and "p" (in any combination) are a lot (factor two) fatter than -% "s", "m", and "z". sometimes the "m" and "z" are a bit fatter than -% "s". +code := 101; +fet_beginchar("dynamic f", "f", "dynf"); + set_char_box (0, 1.25 ex#, descender#, ex# + ascender#); -slant:=.68; % tilt ratio $(\Delta x/\Delta y)$ -crisp#:=M*19/36pt#; % diameter of serif corners -tiny#:=M*19/36pt#; % diameter of rounded corners -fine#:=M*20/36pt#; % diameter of sharply rounded corners -thin_join#:=M*20/36pt#; % width of extrafine details -stem#:=M*72/36pt#; % lowercase stem breadth -flare#:=M*52/36pt#; % diameter of bulbs or breadth of terminals + save left_angle, right_angle; + save serif_length, serif_excentricity; + save f_thick; + save bulb_thick, bulb_diam, fill_up; + save p; + path p; + bulb_diam = 7.5 / 40 ex; + fill_up = 1.5 serif_thick; + left_angle = slant - 6; + right_angle = slant - 3; + f_thick = 3/8 ex; + bulb_thick = 8/40 ex; + serif_length = 0.96 ex; + serif_excentricity = 0.01 ex; -mode_setup; -font_setup; + z1 = (0.375 ex,0); + y2 = y1 + ex; + z2l = z1 + whatever*dir (90 - left_angle); + penpos2 (f_thick, 0); + y3l = ex + ascender; + x3l = x1 + 1 ex; + penpos3 (med_thick, -90); + penpos4 (bulb_thick, -20); + z3r = whatever [z4r,z4l]; + x4l - x3l = 1/10 ex; + penpos5(bulb_thick, -45); + x5r = 0.1 [x4l, x4r]; + y5l = y4l - bulb_diam; -slant:=.28; % tilt ratio $(\Delta x/\Delta y)$ -stem#:=M*32/36pt#; % lowercase stem breadth -ess#:=M*28/36pt#; % breadth in middle of lowercase s -hair#:=M*14/36pt#; % lowercase hairline breadth -vair#:=M*9/36pt#; % vertical diameter of hairlines -flare#:=M*36/36pt#; % diameter of bulbs or breadth of terminals + z6 = z2r + whatever* dir (90 - right_angle); + y6 = 3/8 ex; -crisp#:=M*13/36pt#; % diameter of serif corners -tiny#:=M*13/36pt#; % diameter of rounded corners -fine#:=M*10/36pt#; % diameter of sharply rounded corners -thin_join#:=M*10/36pt#; % width of extrafine details -curve#:=M*43/36pt#; % lowercase curve breadth + x7 = x1 - 1/4 ex; + y7r = -descender; + penpos7(med_thick, -90); -% Chester, Breitkopf suggest smaller sizes of these other chars, -% using the x-height as reference point. -x_height#:=M*135/36pt#; % height of lowercase without ascenders + penpos8 (bulb_thick, 160); + x8l = x7l - 1/10 ex; + z7l = whatever [z8r,z8l]; -font_setup; + penpos9 (bulb_thick, 135); + x9r = 0.1 [x8l, x8r]; + y9l = y8l + bulb_diam; + labels(1,6,9); + penlabels(2, 3,4,5, 7, 8,9); -input feta-ital-m; -input feta-ital-r; -input feta-ital-s; -input feta-ital-z; -input feta-new-code; + p := z1 --- z2l + .. tension 1.1 + .. z3l{right} .. z4r{down} + .. z5r{left} .. z5l{up} + .. tension 0.8 + .. z4l{up} .. z3r{left} + .. tension 1.1 + .. z2r --- z6 .. tension 1.25 .. z7r{left} + .. z8r{up} .. z9r{right} .. z9l{down} .. tension 0.8 + .. z8l{down} .. z7l{right} .. cycle; + pickup pencircle scaled 1; + fill p; +% draw p; -font_slant slant; -font_x_height x_height#; -font_quad 18u#; % to have a working em unit + pickup pencircle scaled 1.1 serif_thick; + (rt x13) - (lft x14) = serif_length; + y13 = y14; + y14 = y2; + 0.5 [x13, x14] = x2 + serif_excentricity; + draw z13 .. z14; + penlabels(16); + labels(13,14,15); +fet_endchar; -%%fet_endfont("feta-din"); +% +% NOTES: +% +% * right stem is fatter and more straight than the left 2 two stems. +% +% * The twiddle at the left is similar to the p twiddle +% +% * The bottoms of the stems are blotted. +% + + +% +% +% This is cut & paste programming. Somehow 3 i shapes in two chars (p and m) +% Doesn't seem worth the trouble of writing a macro. +% +code := 108; +fet_beginchar("dynamic m", "m", "dynm"); + set_char_box (0, 1.3 ex#, 0, 1.0 ex#); + + % should share code with p for twiddle. + + save i_thick, i_angle, i_twiddle_thick, + i_twiddle_start_angle, i_twiddle_start_y, + i_left_space; + save p; + save idir, center, right_ending; + pair center, idir, right_ending; + path p; + + i_thick := 21 / 80 ex; + i_angle := 20; + idir := dir(90- i_angle); + + i_left_space = 16/80 ex; + i_twiddle_thick = serif_thick; + i_twiddle_start_y = 1/2 ex; + i_twiddle_start_angle = 20; + bottom_blot = serif_thick; + + penpos1 (i_twiddle_thick, -i_twiddle_start_angle); + center =(0,0); + + y1 = i_twiddle_start_y; + z1r = center - (i_left_space,0) + whatever * idir; + + y3 = bottom_blot + ypart center; + penpos3(i_thick, 0); + z3l = center + whatever * idir; + y4 = ypart center; + penpos4(i_thick - bottom_blot, 0); + z4 - z3 = whatever * idir; + + y2l = 1 ex; + z2l = .25 [z3l, z3r] + whatever * idir; + z2r = 3/4 [z1r, z3l] + whatever * idir; + y2r = y5l + 1/9 ex; + z2 = 1/2 [z2l, z2r] ; + penpos5(i_thick, 0); + z5 = z4 + whatever * idir; + y5 = 55 / 80 ex; + + p := simple_serif (z1l, z1r, 90) .. tension 1.05 .. z2r{right} .. z5l --- z3l + .. z4l --- z4r .. z3r --- z5r .. z2l{left} .. cycle; + + fill p; + right_ending := z5r; +% penlabels (1, 2, 3 , 4,5); + clearxy; + + + z1r = right_ending; + z5l = right_ending + (i_left_space,0); + penpos1(serif_thick, - i_twiddle_start_angle); + + y3 = bottom_blot + ypart center; + penpos3(i_thick, 0); + z3l = z5l + whatever * idir; + y4 = ypart center; + penpos4(i_thick - bottom_blot, 0); + z4 - z3 = whatever * idir; + + y2l = 1 ex; + z2l = .25 [z3l, z3r] + whatever * idir; + z2r = 3/4 [z1r, z3l] + whatever * idir; + y2r = y5l + 1/9 ex; + z2 = 1/2 [z2l, z2r] ; + penpos5(i_thick, 0); + + p := simple_serif (z1l, z1r, 90) .. tension 1.05 .. z2r{right} .. z5l --- z3l + .. z4l --- z4r .. z3r --- z5r .. z2l{left} .. cycle; + + fill p; + right_ending := z5r; +% penlabels (1, 2, 3 , 4,5); + clearxy; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + i_thick := 25 / 80 ex; + i_angle := 15; + i_left_space := 14/80 ex; + end_overshoot = 1/2 serif_thick; + + + idir := dir(90- i_angle); + z1r = right_ending; + z5l = right_ending + (i_left_space,0); + penpos5 (whatever, 10); + penpos3 (whatever, 20); + + y7 = 0; + penpos7(i_thick ,0); + + penpos1(serif_thick, - i_twiddle_start_angle); + + z3l = z7l + whatever * idir; + z3r = z7r + whatever * idir; + z5l = z7l + whatever * idir; + z5r = z7r + whatever * idir; + + save end_twiddle_angle; + end_twiddle_angle := 35; + penpos6(serif_thick, - end_twiddle_angle); + y6l = 23/80 ex + ypart center; + z6l = 1.6 [z3l, z3r] + whatever * idir; + + + + y3l = 1/8 ex + ypart center; + y2l = 1 ex+ end_overshoot; + z2l = .08 [z3l, z3r] + whatever * idir; + z2r = 3/4 [z1r, z3l] + whatever * idir; + y2r = y5l + 1/9 ex; + z2 = 1/2 [z2l, z2r] ; + z8 = z7 - (0, 2 end_overshoot); + + p := simple_serif (z1l, z1r, 90) .. tension 1.05 + .. z2r{right} .. z5l --- z3l + .. z8{right} + .. simple_serif(z6r, z6l, 90) + .. tension 0.85 + .. z3r --- z5r + .. tension 1.09 + .. z2l{left} .. cycle; + +% pickup pencircle scaled 1; +% draw p; + fill p; + right_ending := z5r; +% penlabels (1, 2, 3 , 4,5,6,7, 8); + clearxy; + +fet_endchar; + +%% notes from old dyn code. + +% "f" obviously has a _lot_ bigger slant than "p" (see Wanske p.239) +% however; perhaps we need two f symbols: +% - a super-slanted one used in "f" "mf" "sfz" "sf", and +% - a more normal-slanted in "ff" "fff" "fp" "fp" (see Wanske p.241) +% +% looking at professionally typeset music reveals that typesetters +% are somewhat unsure about slanting in "mf", "fp", "sfz" + +% "f" and "p" (in any combination) are a lot (factor two) fatter than +% "s", "m", and "z". sometimes the "m" and "z" are a bit fatter than +% "s". + + +% Chester, Breitkopf suggest smaller sizes of these other chars, +% using the x-height as reference point. diff --git a/mf/feta-din.mf b/mf/feta-din.mf index 36627777cb..037e0712a6 100644 --- a/mf/feta-din.mf +++ b/mf/feta-din.mf @@ -7,7 +7,8 @@ input feta-autometric; input feta-macros; % input feta-params; mode_setup; -ex# := (design_size / 3)* pt#; + +ex# := (design_size / 2.6)* pt#; descender# := 0.5 ex#; ascender# := 0.75 ex#; staffspace# := 1.75 / 2.0 * ex#; @@ -17,7 +18,7 @@ define_pixels (staffspace, stafflinethickness, ex, descender, ascender); fet_beginfont("feta-din", design_size); -input feta-new-code; +input feta-din-code; fet_endfont("feta-din"); diff --git a/mf/feta-new-code.mf b/mf/feta-new-code.mf deleted file mode 100644 index a4807c68a3..0000000000 --- a/mf/feta-new-code.mf +++ /dev/null @@ -1,385 +0,0 @@ - -% -% piano p, grabbed from Ed Breitkopf Mozart horn concerto 3. -% -% Notes: -% -% * there is no dishing in the serif (but we do it anyway) -% -% * The cheek is a little fatter than the stem -% -% * The slant is extreme: 20 degrees -% -% * the twiddle (what'sitcalled) is a slightly darker than the serif -% -% * The hole in the cheek has a straight right side. -% -% * Corners are filled up. -% -% - -code := 111; -save slant; -slant := 20; -currenttransform := identity; - - -save serif_thick; - -serif_thick = round (1.0 stafflinethickness); -med_thick = round (1.5 stafflinethickness); - -fet_beginchar("dynamic p", "p", "dynp") - set_char_box (0, 13/12 ex#, descender#, 1.0 ex#); - - save twiddle_thick, stem_thick, cheek_thick; - save updir, fill_up; - save serif, dishing_angle, p, q; - save cheek_medium, left_serif_protude, right_serif_protude; - - pair updir; - path serif,q,p; - - updir := dir (90 - slant ); - twiddle_thick = med_thick; - cheek_medium = 1/6 ex; - - dishing_angle = 5; - fill_up := 1.5 serif_thick; - straigh_len = 0.5 ex; - - stem_thick = 2/6 ex; - cheek_thick = 11/32 ex; - cheek_width = 0.72 ex; - left_serif_protude = 18/60 ex; - right_serif_protude= 15/60 ex; - - penpos1 (twiddle_thick, -slant - 5); - penpos2 (cheek_medium, 90 - slant ); - penpos3 (cheek_medium, 90 - slant); - -% x4r - x4l = cheek_thick; - penpos4 (cheek_thick, -slant); - penpos5 (cheek_medium, -55); - penpos6 (stem_thick, 0); - penpos17 (straigh_len, 90 -slant); - z17 = z4l; - - x6l = 0; - y6l = - descender + serif_thick/2; - x1l = x6l; - y1r = 0.5 ex; - y2r = ex; - z7 = whatever * updir + z6l; - y7 = 43/60 ex; - - z2l = whatever *updir + 0.3 [z7, z1r]; - y8 = ypart (0.9 [z7, z2l]); - z8 = 2/3 [z6l, z6r] + whatever * updir; - - - y3r = ex; - z3l = 0.58 [(stem_thick, -descender), (stem_thick + cheek_width - cheek_thick, -descender)] + whatever * updir; - y4r = 1/3 ex; - z4r = whatever*updir + (stem_thick+ cheek_width, -descender); - - z5l = whatever*updir + z3l; - y5l = 1/12 ex; - - z9 = z6r + whatever*updir; - y9 = y5l; - - p := - z2r{right} .. {dir( -60)}z8 & z8{dir 35} .. z3r{right} - .. tension 0.9 .. z4r{-updir} .. z5r{left} .. z9 - & z9 -- z6r -- z6l -- z7{updir} - .. z2l{left} .. tension 1.2 .. - % z1r & z1r -- z1l & z1l - simple_serif (z1r, z1l, -90) - .. cycle; - pickup pencircle scaled 1; - fill p; - - y12 = 0.5 ex; - z12 = z6r + whatever*updir; - - save inner_tension; - inner_tension = 1.4; - q := - z17l --- z17r .. z3l{left}.. tension 1.05 .. z12{-updir} .. tension 1.05 .. z5l{right} .. cycle; - unfill q; - penlabels (1, 2, 3, 4, 5, 6, 17); - - - - - pickup pencircle scaled serif_thick; - lft x11 = -left_serif_protude; - rt x10 = stem_thick+ right_serif_protude; - bot y10 = bot y11 = -descender; - - - serif := simple_serif (z10, z11, dishing_angle); - draw serif; - - labels(7,8, 9, 10, 11,12); - - - z13 = point 0.05 of serif; - z14 = point 0.85 of serif; - z15 = z6l + updir * fill_up +( serif_thick/2, 0); - z16 = z6r + updir * 1.2fill_up- +( serif_thick/2, 0); - labels(13,14, 15, 16); - -% pickup pencircle scaled 1; - draw z13{direction 0.05 of serif} .. z16{updir}; - draw z14{-(direction 0.85 of serif)} .. z15{updir}; -fet_endchar; - -% forte f, grabbed from Ed Breitkopf Mozart horn concerto 3. -% -% NOTES: -% -% * the bulbs are open. -% -% * blotting around the serif -% -% -% -% TODO: insert blots around the serif -% -% -% - -code := 101; -fet_beginchar("dynamic f", "f", "dynf"); - set_char_box (0, 1.25 ex#, descender#, ex# + ascender#); - - save left_angle, right_angle; - save serif_length, serif_excentricity; - save f_thick; - save bulb_thick, bulb_diam, fill_up; - save p; - path p; - bulb_diam = 7.5 / 40 ex; - fill_up = 1.5 serif_thick; - left_angle = slant - 6; - right_angle = slant - 3; - f_thick = 3/8 ex; - bulb_thick = 8/40 ex; - serif_length = 0.96 ex; - serif_excentricity = 0.01 ex; - - z1 = (0.375 ex,0); - y2 = y1 + ex; - z2l = z1 + whatever*dir (90 - left_angle); - penpos2 (f_thick, 0); - - y3l = ex + ascender; - x3l = x1 + 1 ex; - penpos3 (med_thick, -90); - penpos4 (bulb_thick, -20); - z3r = whatever [z4r,z4l]; - - x4l - x3l = 1/10 ex; - - penpos5(bulb_thick, -45); - x5r = 0.1 [x4l, x4r]; - y5l = y4l - bulb_diam; - - z6 = z2r + whatever* dir (90 - right_angle); - y6 = 3/8 ex; - - x7 = x1 - 1/4 ex; - y7r = -descender; - penpos7(med_thick, -90); - - penpos8 (bulb_thick, 160); - x8l = x7l - 1/10 ex; - z7l = whatever [z8r,z8l]; - - penpos9 (bulb_thick, 135); - x9r = 0.1 [x8l, x8r]; - y9l = y8l + bulb_diam; - labels(1,6,9); - penlabels(2, 3,4,5, 7, 8,9); - - p := z1 --- z2l - .. tension 1.1 - .. z3l{right} .. z4r{down} - .. z5r{left} .. z5l{up} - .. tension 0.8 - .. z4l{up} .. z3r{left} - .. tension 1.1 - .. z2r --- z6 .. tension 1.25 .. z7r{left} - .. z8r{up} .. z9r{right} .. z9l{down} .. tension 0.8 - .. z8l{down} .. z7l{right} .. cycle; - pickup pencircle scaled 1; - fill p; -% draw p; - - pickup pencircle scaled serif_thick; - (rt x13) - (lft x14) = serif_length; - y13 = y14; - y14 = y2; - 0.5 [x13, x14] = x2 + serif_excentricity; - - draw z13 .. z14; - - penlabels(16); - labels(13,14,15); -fet_endchar; - -% -% NOTES: -% -% * right stem is fatter and more straight than the left 2 two stems. -% -% * The twiddle at the left is similar to the p twiddle -% -% * The bottoms of the stems are blotted. -% - - -% -% -% This is cut & paste programming. Somehow 3 i's in two chars (p and m) -% Doesn't seem the trouble of writing a macro worth. -% -code := 108; -fet_beginchar("dynamic m", "m", "dynm"); - set_char_box (0, 1.3 ex#, 0, 1.0 ex#); - - % should share code with p for twiddle. - - save i_thick, i_angle, i_twiddle_thick, - i_twiddle_start_angle, i_twiddle_start_y, - i_left_space; - save p; - save idir, center, right_ending; - pair center, idir, right_ending; - path p; - - i_thick := 21 / 80 ex; - i_angle := 20; - idir := dir(90- i_angle); - - i_left_space = 16/80 ex; - i_twiddle_thick = serif_thick; - i_twiddle_start_y = 1/2 ex; - i_twiddle_start_angle = 20; - bottom_blot = serif_thick; - - penpos1 (i_twiddle_thick, -i_twiddle_start_angle); - center =(0,0); - - y1 = i_twiddle_start_y; - z1r = center - (i_left_space,0) + whatever * idir; - - y3 = bottom_blot + ypart center; - penpos3(i_thick, 0); - z3l = center + whatever * idir; - y4 = ypart center; - penpos4(i_thick - bottom_blot, 0); - z4 - z3 = whatever * idir; - - y2l = 1 ex; - z2l = .25 [z3l, z3r] + whatever * idir; - z2r = 3/4 [z1r, z3l] + whatever * idir; - y2r = y5l + 1/9 ex; - z2 = 1/2 [z2l, z2r] ; - penpos5(i_thick, 0); - z5 = z4 + whatever * idir; - y5 = 55 / 80 ex; - - p := simple_serif (z1l, z1r, 90) .. tension 1.05 .. z2r{right} .. z5l --- z3l - .. z4l --- z4r .. z3r --- z5r .. z2l{left} .. cycle; - - fill p; - right_ending := z5r; -% penlabels (1, 2, 3 , 4,5); - clearxy; - - - z1r = right_ending; - z5l = right_ending + (i_left_space,0); - penpos1(serif_thick, - i_twiddle_start_angle); - - y3 = bottom_blot + ypart center; - penpos3(i_thick, 0); - z3l = z5l + whatever * idir; - y4 = ypart center; - penpos4(i_thick - bottom_blot, 0); - z4 - z3 = whatever * idir; - - y2l = 1 ex; - z2l = .25 [z3l, z3r] + whatever * idir; - z2r = 3/4 [z1r, z3l] + whatever * idir; - y2r = y5l + 1/9 ex; - z2 = 1/2 [z2l, z2r] ; - penpos5(i_thick, 0); - - p := simple_serif (z1l, z1r, 90) .. tension 1.05 .. z2r{right} .. z5l --- z3l - .. z4l --- z4r .. z3r --- z5r .. z2l{left} .. cycle; - - fill p; - right_ending := z5r; -% penlabels (1, 2, 3 , 4,5); - clearxy; -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - i_thick := 25 / 80 ex; - i_angle := 15; - i_left_space := 14/80 ex; - end_overshoot = 1/2 serif_thick; - - - idir := dir(90- i_angle); - z1r = right_ending; - z5l = right_ending + (i_left_space,0); - penpos5 (whatever, 10); - penpos3 (whatever, 20); - - y7 = 0; - penpos7(i_thick ,0); - - penpos1(serif_thick, - i_twiddle_start_angle); - - z3l = z7l + whatever * idir; - z3r = z7r + whatever * idir; - z5l = z7l + whatever * idir; - z5r = z7r + whatever * idir; - - save end_twiddle_angle; - end_twiddle_angle := 35; - penpos6(serif_thick, - end_twiddle_angle); - y6l = 23/80 ex + ypart center; - z6l = 1.6 [z3l, z3r] + whatever * idir; - - - - y3l = 1/8 ex + ypart center; - y2l = 1 ex+ end_overshoot; - z2l = .08 [z3l, z3r] + whatever * idir; - z2r = 3/4 [z1r, z3l] + whatever * idir; - y2r = y5l + 1/9 ex; - z2 = 1/2 [z2l, z2r] ; - z8 = z7 - (0, 2 end_overshoot); - - p := simple_serif (z1l, z1r, 90) .. tension 1.05 - .. z2r{right} .. z5l --- z3l - .. z8{right} - .. simple_serif(z6r, z6l, 90) - .. tension 0.85 - .. z3r --- z5r - .. tension 1.09 - .. z2l{left} .. cycle; - -% pickup pencircle scaled 1; -% draw p; - fill p; - right_ending := z5r; -% penlabels (1, 2, 3 , 4,5,6,7, 8); - clearxy; - -fet_endchar; -- 2.39.5