summaryrefslogtreecommitdiff
path: root/fonts/ec/src/txifract.mf
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /fonts/ec/src/txifract.mf
Initial commit
Diffstat (limited to 'fonts/ec/src/txifract.mf')
-rw-r--r--fonts/ec/src/txifract.mf141
1 files changed, 141 insertions, 0 deletions
diff --git a/fonts/ec/src/txifract.mf b/fonts/ec/src/txifract.mf
new file mode 100644
index 0000000000..b81aa02ea6
--- /dev/null
+++ b/fonts/ec/src/txifract.mf
@@ -0,0 +1,141 @@
+% txifract.mf
+%
+% (c) Copyright 1995, 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 italic style
+
+version_check(1,0); % |version_check| was introduced in dc1.3
+
+ecchar"Italic fraction one quarter";
+beginchar(oct"274",8u#,body_height#,desc_depth#);
+italcorr body_height#*slant-.5u#;
+adjust_fit(0,0); pickup tiny.nib;
+numeric c_height; c_height=good.y .5[h,-d]+.5rule_thickness;
+numeric light_stem; light_stem=hround .4[stem',cap_stem'];
+pos1(light_stem,0); pos2(light_stem,0);
+lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem');
+top y1=h+apex_o; bot y2=c_height+rule_thickness;
+filldraw stroke z1e--z2e; % stem
+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+apex_o; top y4l=.8[y2,h]+apex_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+apex_o+1)--(x3l,h+apex_o+1)--cycle; % erase excess at top
+filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..{left}z4e; % point
+penlabels(1,2,3,4);
+clearxy;
+numeric hh; hh=c_height-2rule_thickness;
+pos1(stem,0); pos6(stem,0); pos7(stem,0);
+pos2(bar,-45); pos3(bar,-90); pos4(bar,-90); pos5(bar,-45);
+rt x1r=hround(.5w+.5u+.5stem); lft x2l=hround .25u;
+x3=2.75u; x4=w-2u; rt x5r=hround(w-.25u);
+rt x6r=rt x7r=hround(2/3w+.5stem);
+y1+.5stem=hh+o; bot y2r=0; bot y3r=vround(.08hh-.5bar);
+bot y4r=vround-.5bar; bot y5r=vround(.03hh-.5bar);
+y6+.5stem=bar_height; y7-.5stem=-d;
+filldraw circ_stroke z1e{down}...{3(x2-x1),y2-y1}z2e; % diagonal
+filldraw stroke z2e{z1-z2}...z3e{right}..{right}z4e
+ ...{x5-x4,2(y5-y4)}z5e; % bar
+filldraw z6l---z7l..z7r---z6r..cycle; % stem
+penlabels(1,2,3,4,5,6,7);
+pickup rule.nib;
+top y98=top y99=c_height; x98=w-x99=hround .5u;
+draw z98--z99; % fraction bar
+labels(98,99); endchar;
+
+ecchar"Italic fraction one half";
+beginchar(oct"275",8u#,body_height#,desc_depth#);
+italcorr body_height#*slant-.5u#;
+adjust_fit(0,0); pickup tiny.nib;
+numeric c_height; c_height=good.y .5[h,-d]+.5rule_thickness;
+numeric light_stem; light_stem=hround .4[stem',cap_stem'];
+pos1(light_stem,0); pos2(light_stem,0);
+lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem');
+top y1=h+apex_o; bot y2=c_height+rule_thickness;
+filldraw stroke z1e--z2e; % stem
+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+apex_o; top y4l=.8[y2,h]+apex_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+apex_o+1)--(x3l,h+apex_o+1)--cycle; % erase excess at top
+filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..{left}z4e; % point
+penlabels(1,2,3,4);
+clearxy;
+pickup fine.nib;
+numeric hh; hh=c_height-2rule_thickness;
+pos1(vair,45); pos2(vair,0); pos3(vair,-90); pos4(hair,-180);
+pos5(vair,-270); pos6(curve,-360); pos7(hair,-405); pos8(hair,-360);
+x1=x2-.5u; rt x2r=hround(3.5u+.5vair);
+x3=.6[x2,x4]; lft x4r=hround(u-.5hair);
+x5=x7=.5w-.5u; rt x6r=hround(w-u); lft x8l=hround(1.5u-.5hair);
+y1=.5[.5x_height-d,hh]; y2=1/3[y1,y3]; y4=.5x_height-d;
+bot y3r=vround .78[-d,y4];
+top y5r=hh+o; y6=.5[y5,y7]; y7=.52[-d,y4]; bot y8=-d-o;
+filldraw stroke
+ if not hefty: z1e{2(x2-x1),y2-y1}...{down}z2e...{left}z3e...fi
+ z4e{up}...pulled_arc.e(5,6)
+ ...z7e{2(x7-x6),y7-y6}...{down}z8e; % main stroke
+pos9(vair,-90); pos10(vstem+curve-stem,-90); pos11(hair,0);
+x9=w-x10=2.5u; rt x11r=hround(w-.5u+.5hair);
+y9=.25[y10,y7]; bot y10r=-d-o; y11=.38[-d,.5x_height];
+filldraw stroke z8e{up}...z9e{right}..{right}z10e...{up}z11e; % bar
+penlabels(1,2,3,4,5,6,7,8,9,10,11);
+pickup rule.nib;
+top y98=top y99=c_height; x98=w-x99=hround .5u;
+draw z98--z99; % fraction bar
+labels(98,99); endchar;
+
+ecchar"Italic fraction three quarters";
+beginchar(oct"276",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 dd; dd=c_height+rule_thickness;
+pickup fine.nib;
+pos1(vair,45); pos2(vair,0); pos3(vair,-90); pos4(hair,-180);
+pos5(vair,-270); pos6(stem,-360); pos7(bar,-450); pos8(bar,-450);
+x1=x2-.5u; rt x2r=hround(3.5u+.5vair); x3=.5[x2,x4]; lft x4r=hround u;
+x5=x7=.5w; rt x6r=hround(w-u); x8=x7-u;
+y1=.5[x_height,h]; y2=.5[y1,y3]; y7=y8=.52[dd,h]; bot y3r=vround 1/4[y7,h];
+y4=1/3[y3,y5]; top y5r=h+o; y6=.5[y5,y7];
+filldraw stroke if not hefty:
+z1e{2(x2-x1),y2-y1}...{down}z2e...{left}z3e...fi
+ z4e{up}...pulled_arc.e(5,6) & pulled_arc.e(6,7)..z8e; % upper arc
+pos7'(vair,90); z7'l=z7r;
+pos9(curve,0); pos10(vair,-90); pos11(hair,-180); pos12(flare,-180);
+rt x9r=hround(w-u); x10=.5w-.5u; lft x11r=hround .75u;
+y9=.25[dd,h]; bot y10r=dd-o; y11=dd+1/3x_height; bulb(10,11,12); % bulb
+filldraw stroke pulled_arc.e(7',9) & pulled_arc.e(9,10); % lower arc
+penlabels(1,2,3,4,5,6,7,8,9,10,11,12);
+clearxy;
+numeric hh; hh=c_height-2rule_thickness;
+pos1(stem,0); pos6(stem,0); pos7(stem,0);
+pos2(bar,-45); pos3(bar,-90); pos4(bar,-90); pos5(bar,-45);
+rt x1r=hround(.5w+.5u+.5stem); lft x2l=hround .25u;
+x3=2.75u; x4=w-2u; rt x5r=hround(w-.25u);
+rt x6r=rt x7r=hround(2/3w+.5stem);
+y1+.5stem=hh+o; bot y2r=0; bot y3r=vround(.08hh-.5bar);
+bot y4r=vround-.5bar; bot y5r=vround(.03hh-.5bar);
+y6+.5stem=bar_height; y7-.5stem=-d;
+filldraw circ_stroke z1e{down}...{3(x2-x1),y2-y1}z2e; % diagonal
+filldraw stroke z2e{z1-z2}...z3e{right}..{right}z4e
+ ...{x5-x4,2(y5-y4)}z5e; % bar
+filldraw z6l---z7l..z7r---z6r..cycle; % stem
+penlabels(1,2,3,4,5,6,7);
+pickup rule.nib;
+top y98=top y99=c_height; x98=w-x99=hround .5u;
+draw z98--z99; % fraction bar
+labels(98,99); endchar;
+
+endinput;