Debian Codegraph @

texmf-dist/fonts/source/jknappen/ec/txrsuper.mf

raw
1 % txrsuper.mf
2 %
3 % (c) Copyright 1995, 1996, 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 % Superscript digits 1,2,3 in roman style
13 % Male and female ordinal indicator in roman style
14
15 version_check(1,0); % |version_check| was introduced in dc1.3
16
17 ecchar "Superscript numeral 1";
18 beginchar(oct"271",8u#,body_height#,0);
19 italcorr body_height#*slant-.5u#;
20 adjust_fit(0,0);
21 numeric light_stem; light_stem=hround .4[stem',cap_stem'];
22 pickup tiny.nib;
23 pos1(light_stem,0); pos2(light_stem,0);
24 lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem'); top y1=h+o;
25 bot y2=.5asc_height;
26 filldraw stroke z1e--z2e; % stem
27 if not serifs: save slab; slab=bar; fi
28 dish_serif(2,1,a,1/3,min(2.25u,lft x2l-1.5u),
29 b,1/3,min(2.25u,w-1.25u-rt x2r)); % serif
30 pickup crisp.nib; pos3(slab,-90); pos4(bar,-90);
31 top y3l=h+o; top y4l=if monospace: .85 else: .9 fi\\ h+o;
32 lft x4=max(1.25u,tiny.lft x1l-2.35u);
33 tiny.rt x1r=lft x3+.25[tiny,hair];
34 erase fill z3l{x4l-x3l,3(y4l-y3l)}...z4l{left}
35 --(x4l,h+o+1)--(x3l,h+o+1)--cycle; % erase excess at top
36 filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..z4e{left}; % point
37 penlabels(1,2,3,4); endchar;
38
39 ecchar "Superscript numeral 2";
40 beginchar(oct"262",8u#,body_height#,0);
41 italcorr body_height#*slant-.5u#;
42 adjust_fit(0,0);
43 numeric arm_thickness, hair_vair; hair_vair=.25[vair,hair];
44 arm_thickness=Vround(if hefty:slab+2stem_corr else:.4[stem,cap_stem] fi);
45 pickup crisp.nib; pos7(arm_thickness,-90); pos8(hair,0);
46 bot y7r=.5asc_height;
47 lft x7=hround .9u; rt x8r=hround(w-.9u); y8=good.y(y7l+beak/2)+eps;
48 arm(7,8,a,.3beak_darkness,beak_jut); % arm and beak
49 pickup fine.nib; pos2(slab,90); pos3(.4[curve,cap_curve],0);
50 top y2r=h+o; x2=.5(w-.5u); rt x3r=hround(w-.9u);
51 y3+.5vair=.75[bot y7r,h];
52 if serifs: numeric bulb_diam; bulb_diam=hround(flare+2/3(cap_stem-stem));
53 pos0(bulb_diam,180); pos1(cap_hair,180);
54 lft x1r=hround .9u; y1-.5bulb_diam=2/3[bot y7r,h];
55 (x,y2l)=whatever[z1l,z2r]; x2l:=x; bulb(2,1,0); % bulb and arc
56 else: x2l:=x2l-.25u; pos1(flare,angle(-9u,h));
57 lft x1r=hround .75u; bot y1l=vround .7[bot y7r,h];
58 y1r:=good.y y1r+eps; x1l:=good.x x1l;
59 filldraw stroke term.e(2,1,left,.9,4); fi % terminal and arc
60 pos4(.25[hair_vair,cap_stem],0);
61 pos5(hair_vair,0); pos6(hair_vair,0);
62 y5=arm_thickness+bot y7r;
63 y4=.3[y5,y3]; top y6=min(y5,slab+bot y5r,top y7l);
64 lft x6l=crisp.lft x7; z4l=whatever[z6l,(x3l,bot .58[bot y7r,h])];
65 z5l=whatever[z6l,z4l];
66 erase fill z4l--z6l--lft z6l--(lft x6l,y4l)--cycle; % erase excess at left
67 filldraw stroke z2e{right}..tension atleast .9 and atleast 1
68 ..z3e{down}.. z4e---z5e--z6e; % stroke
69 penlabels(0,1,2,3,4,5,6,7,8); endchar;
70
71 ecchar "Superscript numeral 3";
72 beginchar(oct"263",8u#,body_height#,0);
73 italcorr body_height#*slant-.5u#;
74 adjust_fit(0,0);
75 numeric top_thickness,mid_thickness,bot_thickness;
76 top_thickness=max(fine.breadth,vround(slab-2vair_corr));
77 mid_thickness=max(fine.breadth,vround 2/3vair);
78 bot_thickness=max(fine.breadth,vround(slab-vair_corr));
79 pickup fine.nib; pos2(top_thickness,90); top y2r=h+o;
80 pos3(max(fine.breadth,.6[curve,cap_curve]-stem_corr),0);
81 rt x3r=hround(w-1.25u);
82 pos4(vair,-90); pos5(vair,-90);
83 pos6(mid_thickness,90); x2=x6=x8=.5[1.5u,x7];
84 pos7(cap_curve,0); rt x7r=hround(w-.75u); lft x5=min(hround 3u,lft x6)-eps;
85 pos8(bot_thickness,-90);
86 bot y8r=.5asc_height-oo;
87 y3=.6[top y4l,bot y2l]; y7=.5[bot y6l,top y8l];
88 top y5l=vround(.54[bot y8r,h]+.5vair); y5r=y6l;
89 x4=1/3[x5,x3l]; z4=z5+whatever*(150u,h);
90 filldraw stroke pulled_super_arc.e(2,3)(.5superpull)
91 & z3e{down}...z4e---z5e; % upper bowl
92 filldraw z5r--z6l--z6r--z5l---cycle; % middle tip
93 filldraw stroke pulled_super_arc.e(6,7)(.5superpull)
94 & pulled_super_arc.e(7,8)(.5superpull); % lower bowl
95 if serifs: numeric bulb_diam[];
96 bulb_diam1=flare+.5(cap_stem-stem); bulb_diam2=flare+cap_stem-stem;
97 pos0(bulb_diam1,180); pos1(hair,180);
98 lft x0r=hround 1.25u;
99 y0=min(.9h-.5bulb_diam1,.75[bot y8r,h]+.5bulb_diam1);
100 bulb(2,1,0); % upper bulb
101 pos10(bulb_diam2,-180); pos9(cap_hair,-180);
102 lft x10r=hround .75u;
103 y10=max(.1[bot y8r,h]+.5bulb_diam2,.3[bot y8r,h]-.5bulb_diam2);
104 bulb(8,9,10); % lower bulb
105 else: pos1(.5[vair,flare],angle(-8u,h));
106 lft x1r=hround u; bot y1l=vround .75[bot y8r,h]+oo;
107 y1r:=good.y y1r+eps; x1l:=good.x x1l;
108 pos9(bot_thickness,angle(-2u,-h));
109 lft x9r=hround .75u; top y9l=vround .25[bot y8r,h]-oo;
110 y9r:=good.y y9r-eps; x9l:=good.x x9l;
111 filldraw stroke term.e(2,1,left,1,4); % upper terminal
112 filldraw stroke term.e(8,9,left,1,4); fi % lower terminal
113 penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;
114
115 ecchar"Female ordinal indicator";
116 beginchar(oct"252",8u#,body_height#,0);
117 numeric hh; hh=vround .5body_height;
118 bh#:=min(.7bar_height#,.5body_height#-bar_height#); define_pixels(bh);
119 italcorr .7body_height#*slant;
120 adjust_fit(0,0);
121 pickup fine.nib; top y3r=hh+vround 1.5oo;
122 if serifs: pos1(flare,180); pos2(hair,180);
123 pos3(vair,90); lft x1r=hround max(u,2.1u-.5flare); x3=.5w-.5u;
124 y1=min(bh+.5flare+2vair+2,.9[bh,hh]-.5flare);
125 bulb(3,2,1); % bulb
126 else: pos1(5/7[vair,flare],95); x1l=good.x 1.5u; x1r:=good.x x1r;
127 pos3(1/8[vair,thin_join],90);
128 x3=.5w-.2u; top y1r=vround .82[bh,top y3r];
129 filldraw stroke term.e(3,1,left,.9,4); fi % terminal
130 pos4(stem,0); rt x4r=hround(w-2.5u+.5stem); y4=1/3[bh,hh];
131 pos5(stem,0); x5=x4; y5=max(.55bh,2vair);
132 filldraw stroke super_arc.e(3,4)&z4e..z5e; % arc and stem
133 pos6(.3[thin_join,vair],90); x6=x4; bot y6=bh;
134 pos7(hround(curve-2stem_corr),180);
135 lft x7r=hround max(.5u,1.5u-.5curve); y7=1/3[top y8l,top y6r];
136 pos8(vair,270); x8l=.5w-.75u; bot y8r=-oo;
137 pos9(thin_join,360); z9l=z5l;
138 (x,y8r)=whatever[z8l,z9l]; x8r:=max(x,x8-u);
139 {{interim superness:=more_super;
140 filldraw stroke z9e{down}...z8e{left}...{up}z7e&super_arc.e(7,6)}}; % bowl
141 if serifs: numeric shaved_stem; shaved_stem=hround(stem-3stem_corr);
142 if hair#+.5stem#>1.5u#: pickup tiny.nib;
143 pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5;
144 pos10(shaved_stem,0); x10=x5'; y10=.2[.5tiny,bh];
145 pos11(shaved_stem,0); rt x11r=hround(w-.25u); bot y11=0;
146 pos12(shaved_stem,0); x11=x12; top y12=slab+eps;
147 filldraw z5'l---z10l...z11l{right}--z11r
148 --z12r{left}...z10r+.75(z12-z11)---z5'r--cycle; % foot
149 else: pickup crisp.nib; pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5;
150 pos10(shaved_stem,0); x10=x5'; y10=1/3bh;
151 pos11(.2[vair,stem],90); x11r=.5[x10r,x12r]; bot y11l=-vround .5oo;
152 pos12(hair,180); rt x12l=hround(w-.1u); y12=max(y10,y11+vair);
153 pos13(hair,180); x13=x12; top y13=max(vround .6bh,top y12);
154 (x',y11l)=whatever[z11r,z12r]; x11l:=max(x',x10);
155 filldraw stroke z5'e---z10e...z11e{right}...z12e---z13e; fi % hook
156 else: numeric shaved_stem; shaved_stem=hround(stem-stem_corr);
157 pickup tiny.nib; pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5;
158 pos10(shaved_stem,0); x10=x5'; bot y10=0;
159 filldraw stroke z5'e--z10e; fi % base of stem
160 pickup extra_rule.nib;
161 x14=w-x15=hround u;
162 top y14=-rule_thickness; y15=y14;
163 draw z14--z15; % underline
164 currentpicture:=currentpicture shifted (0,hh);
165 penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); endchar;
166
167 ecchar"Male ordinal indicator";
168 beginchar(oct"272",8u#,body_height#,0);
169 numeric hh; hh=vround .5body_height;
170 italcorr .7body_height#*slant;
171 adjust_fit(0,0);
172 penpos1(vair,90); penpos3(vair',-90);
173 penpos2(curve,180); penpos4(curve,0);
174 x2r=hround max(.5u,1.25u-.5curve);
175 x4r=w-x2r; x1=x3=.5w; y1r=hh+vround 1.5oo; y3r=-oo;
176 y2=y4=.5hh-vair_corr; y2l:=y4l:=.52hh;
177 penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
178 & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl
179 pickup extra_rule.nib;
180 x5=w-x6=hround u;
181 top y5=-rule_thickness; y6=y5;
182 draw z5--z6; % underline
183 currentpicture:=currentpicture shifted (0,hh);
184 penlabels(1,2,3,4,5,6); endchar;
185
186 endinput;