| 1 |
% txifract.mf |
| 2 |
% |
| 3 |
% (c) Copyright 1995, 1997 J"org Knappen |
| 4 |
% |
| 5 |
% This file is part of ecfonts version 1.0 |
| 6 |
% |
| 7 |
% Please read the files 00readme.txt, 00inst.txt, 00error.txt, and |
| 8 |
% copyrite.txt for further information |
| 9 |
% |
| 10 |
% You find some documentation in ecdoc.tex (needs LaTeX2e) |
| 11 |
% |
| 12 |
% Ready made fractions 1/2, 1/4, 3/4 in italic style |
| 13 |
|
| 14 |
version_check(1,0); % |version_check| was introduced in dc1.3 |
| 15 |
|
| 16 |
ecchar"Italic fraction one quarter"; |
| 17 |
beginchar(oct"274",8u#,body_height#,desc_depth#); |
| 18 |
italcorr body_height#*slant-.5u#; |
| 19 |
adjust_fit(0,0); pickup tiny.nib; |
| 20 |
numeric c_height; c_height=good.y .5[h,-d]+.5rule_thickness; |
| 21 |
numeric light_stem; light_stem=hround .4[stem',cap_stem']; |
| 22 |
pos1(light_stem,0); pos2(light_stem,0); |
| 23 |
lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem'); |
| 24 |
top y1=h+apex_o; bot y2=c_height+rule_thickness; |
| 25 |
filldraw stroke z1e--z2e; % stem |
| 26 |
dish_serif(2,1,a,1/3,min(2.25u,lft x2l-1.5u), |
| 27 |
b,1/3,min(2.25u,w-1.25u-rt x2r)); % serif |
| 28 |
pickup crisp.nib; pos3(slab,-90); pos4(bar,-90); |
| 29 |
top y3l=h+apex_o; top y4l=.8[y2,h]+apex_o; |
| 30 |
lft x4=max(1.25u,tiny.lft x1l-2.35u); tiny.rt x1r=lft x3+.25[tiny,hair]; |
| 31 |
erase fill z3l{x4l-x3l,3(y4l-y3l)}...z4l{left} |
| 32 |
--(x4l,h+apex_o+1)--(x3l,h+apex_o+1)--cycle; % erase excess at top |
| 33 |
filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..{left}z4e; % point |
| 34 |
penlabels(1,2,3,4); |
| 35 |
clearxy; |
| 36 |
numeric hh; hh=c_height-2rule_thickness; |
| 37 |
pos1(stem,0); pos6(stem,0); pos7(stem,0); |
| 38 |
pos2(bar,-45); pos3(bar,-90); pos4(bar,-90); pos5(bar,-45); |
| 39 |
rt x1r=hround(.5w+.5u+.5stem); lft x2l=hround .25u; |
| 40 |
x3=2.75u; x4=w-2u; rt x5r=hround(w-.25u); |
| 41 |
rt x6r=rt x7r=hround(2/3w+.5stem); |
| 42 |
y1+.5stem=hh+o; bot y2r=0; bot y3r=vround(.08hh-.5bar); |
| 43 |
bot y4r=vround-.5bar; bot y5r=vround(.03hh-.5bar); |
| 44 |
y6+.5stem=bar_height; y7-.5stem=-d; |
| 45 |
filldraw circ_stroke z1e{down}...{3(x2-x1),y2-y1}z2e; % diagonal |
| 46 |
filldraw stroke z2e{z1-z2}...z3e{right}..{right}z4e |
| 47 |
...{x5-x4,2(y5-y4)}z5e; % bar |
| 48 |
filldraw z6l---z7l..z7r---z6r..cycle; % stem |
| 49 |
penlabels(1,2,3,4,5,6,7); |
| 50 |
pickup rule.nib; |
| 51 |
top y98=top y99=c_height; x98=w-x99=hround .5u; |
| 52 |
draw z98--z99; % fraction bar |
| 53 |
labels(98,99); endchar; |
| 54 |
|
| 55 |
ecchar"Italic fraction one half"; |
| 56 |
beginchar(oct"275",8u#,body_height#,desc_depth#); |
| 57 |
italcorr body_height#*slant-.5u#; |
| 58 |
adjust_fit(0,0); pickup tiny.nib; |
| 59 |
numeric c_height; c_height=good.y .5[h,-d]+.5rule_thickness; |
| 60 |
numeric light_stem; light_stem=hround .4[stem',cap_stem']; |
| 61 |
pos1(light_stem,0); pos2(light_stem,0); |
| 62 |
lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem'); |
| 63 |
top y1=h+apex_o; bot y2=c_height+rule_thickness; |
| 64 |
filldraw stroke z1e--z2e; % stem |
| 65 |
dish_serif(2,1,a,1/3,min(2.25u,lft x2l-1.5u), |
| 66 |
b,1/3,min(2.25u,w-1.25u-rt x2r)); % serif |
| 67 |
pickup crisp.nib; pos3(slab,-90); pos4(bar,-90); |
| 68 |
top y3l=h+apex_o; top y4l=.8[y2,h]+apex_o; |
| 69 |
lft x4=max(1.25u,tiny.lft x1l-2.35u); tiny.rt x1r=lft x3+.25[tiny,hair]; |
| 70 |
erase fill z3l{x4l-x3l,3(y4l-y3l)}...z4l{left} |
| 71 |
--(x4l,h+apex_o+1)--(x3l,h+apex_o+1)--cycle; % erase excess at top |
| 72 |
filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..{left}z4e; % point |
| 73 |
penlabels(1,2,3,4); |
| 74 |
clearxy; |
| 75 |
pickup fine.nib; |
| 76 |
numeric hh; hh=c_height-2rule_thickness; |
| 77 |
pos1(vair,45); pos2(vair,0); pos3(vair,-90); pos4(hair,-180); |
| 78 |
pos5(vair,-270); pos6(curve,-360); pos7(hair,-405); pos8(hair,-360); |
| 79 |
x1=x2-.5u; rt x2r=hround(3.5u+.5vair); |
| 80 |
x3=.6[x2,x4]; lft x4r=hround(u-.5hair); |
| 81 |
x5=x7=.5w-.5u; rt x6r=hround(w-u); lft x8l=hround(1.5u-.5hair); |
| 82 |
y1=.5[.5x_height-d,hh]; y2=1/3[y1,y3]; y4=.5x_height-d; |
| 83 |
bot y3r=vround .78[-d,y4]; |
| 84 |
top y5r=hh+o; y6=.5[y5,y7]; y7=.52[-d,y4]; bot y8=-d-o; |
| 85 |
filldraw stroke |
| 86 |
if not hefty: z1e{2(x2-x1),y2-y1}...{down}z2e...{left}z3e...fi |
| 87 |
z4e{up}...pulled_arc.e(5,6) |
| 88 |
...z7e{2(x7-x6),y7-y6}...{down}z8e; % main stroke |
| 89 |
pos9(vair,-90); pos10(vstem+curve-stem,-90); pos11(hair,0); |
| 90 |
x9=w-x10=2.5u; rt x11r=hround(w-.5u+.5hair); |
| 91 |
y9=.25[y10,y7]; bot y10r=-d-o; y11=.38[-d,.5x_height]; |
| 92 |
filldraw stroke z8e{up}...z9e{right}..{right}z10e...{up}z11e; % bar |
| 93 |
penlabels(1,2,3,4,5,6,7,8,9,10,11); |
| 94 |
pickup rule.nib; |
| 95 |
top y98=top y99=c_height; x98=w-x99=hround .5u; |
| 96 |
draw z98--z99; % fraction bar |
| 97 |
labels(98,99); endchar; |
| 98 |
|
| 99 |
ecchar"Italic fraction three quarters"; |
| 100 |
beginchar(oct"276",8u#,body_height#,desc_depth#); |
| 101 |
italcorr body_height#*slant-.5u#; |
| 102 |
adjust_fit(0,0); |
| 103 |
numeric c_height; c_height=good.y .5[h,-d]+.5rule_thickness; |
| 104 |
numeric dd; dd=c_height+rule_thickness; |
| 105 |
pickup fine.nib; |
| 106 |
pos1(vair,45); pos2(vair,0); pos3(vair,-90); pos4(hair,-180); |
| 107 |
pos5(vair,-270); pos6(stem,-360); pos7(bar,-450); pos8(bar,-450); |
| 108 |
x1=x2-.5u; rt x2r=hround(3.5u+.5vair); x3=.5[x2,x4]; lft x4r=hround u; |
| 109 |
x5=x7=.5w; rt x6r=hround(w-u); x8=x7-u; |
| 110 |
y1=.5[x_height,h]; y2=.5[y1,y3]; y7=y8=.52[dd,h]; bot y3r=vround 1/4[y7,h]; |
| 111 |
y4=1/3[y3,y5]; top y5r=h+o; y6=.5[y5,y7]; |
| 112 |
filldraw stroke if not hefty: |
| 113 |
z1e{2(x2-x1),y2-y1}...{down}z2e...{left}z3e...fi |
| 114 |
z4e{up}...pulled_arc.e(5,6) & pulled_arc.e(6,7)..z8e; % upper arc |
| 115 |
pos7'(vair,90); z7'l=z7r; |
| 116 |
pos9(curve,0); pos10(vair,-90); pos11(hair,-180); pos12(flare,-180); |
| 117 |
rt x9r=hround(w-u); x10=.5w-.5u; lft x11r=hround .75u; |
| 118 |
y9=.25[dd,h]; bot y10r=dd-o; y11=dd+1/3x_height; bulb(10,11,12); % bulb |
| 119 |
filldraw stroke pulled_arc.e(7',9) & pulled_arc.e(9,10); % lower arc |
| 120 |
penlabels(1,2,3,4,5,6,7,8,9,10,11,12); |
| 121 |
clearxy; |
| 122 |
numeric hh; hh=c_height-2rule_thickness; |
| 123 |
pos1(stem,0); pos6(stem,0); pos7(stem,0); |
| 124 |
pos2(bar,-45); pos3(bar,-90); pos4(bar,-90); pos5(bar,-45); |
| 125 |
rt x1r=hround(.5w+.5u+.5stem); lft x2l=hround .25u; |
| 126 |
x3=2.75u; x4=w-2u; rt x5r=hround(w-.25u); |
| 127 |
rt x6r=rt x7r=hround(2/3w+.5stem); |
| 128 |
y1+.5stem=hh+o; bot y2r=0; bot y3r=vround(.08hh-.5bar); |
| 129 |
bot y4r=vround-.5bar; bot y5r=vround(.03hh-.5bar); |
| 130 |
y6+.5stem=bar_height; y7-.5stem=-d; |
| 131 |
filldraw circ_stroke z1e{down}...{3(x2-x1),y2-y1}z2e; % diagonal |
| 132 |
filldraw stroke z2e{z1-z2}...z3e{right}..{right}z4e |
| 133 |
...{x5-x4,2(y5-y4)}z5e; % bar |
| 134 |
filldraw z6l---z7l..z7r---z6r..cycle; % stem |
| 135 |
penlabels(1,2,3,4,5,6,7); |
| 136 |
pickup rule.nib; |
| 137 |
top y98=top y99=c_height; x98=w-x99=hround .5u; |
| 138 |
draw z98--z99; % fraction bar |
| 139 |
labels(98,99); endchar; |
| 140 |
|
| 141 |
endinput; |