% txrfract.mf % % (c) Copyright 1995, 1996, 1997 J"org Knappen % % This file is part of ecfonts version 1.0 % % Please read the files 00readme.txt, 00inst.txt, 00error.txt, and % copyrite.txt for further information % % You find some documentation in ecdoc.tex (needs LaTeX2e) % % Ready made fractions 1/2, 1/4, 3/4 in roman style version_check(1,0); % |version_check| was introduced in dc1.3 ecchar"Fraction one quarter"; beginchar(oct"274",8u#,body_height#,desc_depth#); italcorr body_height#*slant-.5u#; adjust_fit(0,0); numeric c_height; c_height=good.y .5[h,-d]+.5rule_thickness; numeric light_stem; light_stem=hround .4[stem',cap_stem']; pickup tiny.nib; pos1(light_stem,0); pos2(light_stem,0); lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem'); top y1=h+o; bot y2=c_height+rule_thickness; filldraw stroke z1e--z2e; % stem if not serifs: save slab; slab=bar; fi dish_serif(2,1,a,1/3,min(2.25u,lft x2l-1.5u), b,1/3,min(2.25u,w-1.25u-rt x2r)); % serif pickup crisp.nib; pos3(slab,-90); pos4(bar,-90); top y3l=h+o; top y4l=if monospace: .8 else: .9 fi\\ [bot y2,h]+o; lft x4=max(1.25u,tiny.lft x1l-2.35u); tiny.rt x1r=lft x3+.25[tiny,hair]; erase fill z3l{x4l-x3l,3(y4l-y3l)}...z4l{left} --(x4l,h+o+1)--(x3l,h+o+1)--cycle; % erase excess at top filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..z4e{left}; % point penlabels(1,2,3,4); clearxy; numeric hh; hh=c_height-2rule_thickness; numeric light_stem, light_stem', diag_stem, alpha, cut; cut=.75notch_cut; light_stem=hround .4[fudged.stem,fudged.cap_stem]; light_stem'=hround max(tiny.breadth,light_stem-2stem_corr); diag_stem=max(tiny.breadth,.4[vair,fudged.hair]); pickup crisp.nib; pos5(cap_bar,90); pos6(cap_bar,90); lft x5=hround .5u; rt x6=hround(w-.5u); top y5r=vround(if serifs: 5/18[slab-d,hh-light_stem]+1 else:.35[-d,hh-light_stem] fi+.5cap_bar); z4l=top lft z5r; y2=y2'=y5=y6; x1r=x2r=hround(w-3u+.5light_stem); penpos1(light_stem',0); penpos2(light_stem',0); y1=y3=hh+apex_o+apex_oo; x3r+apex_corr=x1r; alpha=diag_ratio(1,diag_stem,y3-y4l,x3r-x4l); penpos3(alpha*diag_stem,0); penpos4(alpha*diag_stem,0); x0=x1l; z0=whatever[z3r,z4r]; x5'=x5; z5''=z5'+penoffset z4-z3 of currentpen=whatever[z4l,z3l]; fill diag_end(2r,1r,1,.5,3l,4l)---z5''...lft z5' ---lft z5l -- (x4r,y5l) -- z4r if y0