Debian Codegraph @

texmf-dist/fonts/source/public/dingbat/ark10.mf

raw
1 % ark10.mf file
2 % Copyright (c) 1988 by Arthur M. Keller
3 % The ARK font was initially done in MF79
4 % by Scott Kim. It was converted to (new) MF by N.N. Billawala
5 % of Metamarks.
6 % It contains 10 characters.
7
8
9 rulepen:=pensquare scaled 1; % makes one pixel proofing lines
10 mode_setup;
11 designsize:=10pt#;
12 width#:=10pt#;
13 height#:=7.5pt#;
14 depth#:=2.5pt#;
15 define_pixels(width,height,depth);
16 extra_beginchar:=extra_beginchar&"save p;path p[];";
17
18 % ***** general macros *****
19 extra_beginchar:=extra_beginchar&"w#:=charwd;"; % for adjust def
20 extra_endchar:=extra_endchar&"wsaved:=w; w:=r-l;"; % for adjust def
21
22 letter_fit#:=letter_fit:=0;
23 def adjust(expr left_adjustment,right_adjustment) =
24 l:=-round(left_adjustment*hppp)-letter_fit;
25 interim xoffset:=-l;
26 charwd:=charwd+2letter_fit#+left_adjustment+right_adjustment;
27 r:=l+round(charwd*hppp);
28 w:=r-round(right_adjustment*hppp)-letter_fit;
29 enddef;
30
31 def makebox(text rule)= % makes a reference box for screen and proof characters
32 for y=0,h.o_,-d.o_: rule((l,y),(r,y)); endfor % horizontals
33 for x=l,r: rule((x,-d.o_),(x,h.o_)); endfor % outer verticals
34 if charic<>0: rule((wsaved+charic*hppp,h.o_),(wsaved+charic*hppp,.5h.o_));fi
35 enddef;
36
37 % ***** pencils *****
38
39 line_thickness:=max(1,.3pt); % thickness of character lines
40 pencil_thickness#:=.6width#; % pencil thickness
41 tip_length#:=.5width#; % length of pencil tips
42 lead_length#:=.3tip_length#; % amount of pencil tip lead showing
43 tip_curve:=.2; % curvature of the pencil tip
44 lead_curve:=.1; % curvature of the pencil tip lead part
45 bottom_showing:=.7; % proportion of bottom height/width in pencil
46
47 def pencil_pen=pencircle scaled line_thickness; enddef;
48 define_pixels(pencil_thickness,tip_length,lead_length);
49
50
51 % The pencil keeps a general vertical size no matter what the rotation angle is.
52 % The width is determined after the character is drawn.
53 % Adjustments can be made to the height of the pencil(size)
54 % angle of pencil from upright or 90 degrees(rotation)
55 % thickness or width of the pencil(pencil_thickness)
56 % length of the tip of the pencil(pencil_tip)
57 % size of the lead showing in the tip(lead_length)
58 % the curvature of the pencil tip(tip_curve) as a percentage of the tip_length
59 % the curvature of the lead tip(lead_curve) as a percentage of the lead_length
60 % the size of the bottom part of the pencil(bottom_showing)
61
62 vardef pencil(expr tip,size,rotation)=
63 save x,y,p,t; path p[]; transform t; pickup pencil_pen;
64 z1=tip+(0,size/(sind abs(90+rotation))); % bottom
65 z2=z1-(0,.5pencil_thickness);
66 for n:=0 upto 5:z[10+n]=z2+(.5pencil_thickness,0) rotated (n*60); endfor
67 for n:=0 upto 5:z[10+n]a=.45[z2,z[10+n]]; endfor % bottom lead
68 z2 transformed t=z1-(0,.5*bottom_showing*pencil_thickness);
69 z11 transformed t=z11; z12 transformed t=z12;
70 z113=z13 transformed t; z114=z14 transformed t;
71 z115=z15 transformed t; z110=z10 transformed t;
72 z3=tip+(0,tip_length); penpos3(pencil_thickness,0); % tip
73 z4=tip_curve[z3,tip];
74 p1=z3r...z4{left}...z3l;
75 z20=(x114,ypart tip); z21=(x115,ypart tip);
76 z22=p1 intersectionpoint (z114--z20);
77 z23=p1 intersectionpoint (z115--z21);
78 z5=tip+(0,lead_length); % lead
79 y30=y31=y5; z30=whatever[tip,z3l]; z31=whatever[tip,z3r];
80 z6=lead_curve[z5,tip];
81 p2=(z10--z11--z12--z13--z14--z15--cycle) transformed t; % pencil bottom
82 p3=z113--z3l--tip--z3r--z110; % pencil
83 p4=z114--z22;
84 p5=z115--z23;
85 p6=(z10a..z11a..z12a..z13a..z14a..z15a..cycle) transformed t; % bottom lead
86 p7=tip--z31...z6{left}...z30--cycle; % lead tip
87 for n:=1 upto 5: draw p[n] rotatedaround (tip,rotation); endfor
88 for n:=6,7: fill p[n]rotatedaround (tip,rotation); endfor
89 enddef;
90
91 % An amount for placing the tip of the pencil
92 def tip_adjust=
93 if abs(tip_length*cosd (90+rotation))>abs(.5*pencil_thickness):0
94 else:abs(.5*pencil_thickness-abs(tip_length*cosd (90+rotation)))fi enddef;
95
96 "small pencil";
97 rotation:=55; % angle of pencil
98 pencil_width#:=
99 pencil_thickness#+ % base or minimum width
100 (height#+depth#) % vertical pencil dimension
101 *abs(cosd(90+rotation)/sind(90+rotation)) % * rotation
102 -pencil_thickness#*abs(cosd(90+rotation)); % - adjustment to thickness
103
104 beginchar(oct"120",pencil_width#,height#,depth#);
105 z0=(if rotation>0:w- else:0+ fi tip_adjust,0);
106 pencil(z0,h+d,rotation);
107 adjust(.2width#,.2width#);
108 endchar;
109
110 "large pencil";
111 rotation:=20; % angle of pencil
112 pencil_width#:=
113 pencil_thickness#+ % base or minimum width
114 (height#+depth#) % vertical pencil dimension
115 *abs(cosd(90+rotation)/sind(90+rotation)) % * rotation
116 -pencil_thickness#*abs(cosd(90+rotation)); % - adjustment to thickness
117
118 beginchar(oct"127",pencil_width#,2.8height#,2.8depth#);
119 z0=(if rotation>0:w- else:0+ fi tip_adjust,0);
120 pencil(z0,h+d,rotation);
121 adjust(.2width#,.2width#);
122 endchar;
123
124
125 % ***** return *****
126 def return_pen=pencircle scaled line_thickness; enddef;
127
128
129 "return";
130 beginchar(oct"103",.4width#,.6height#,.6depth#);
131 save curvature,arrowhead,base_length;
132 curvature1=angle((h+d),-.25(h+d));
133 curvature2=angle(-(h+d),-.25(h+d));
134 arrowhead=.2h; % length of arrowhead
135 pickup return_pen; % the pen used in this char
136 top lft z1=(0,h); bot lft z3=(0,-d); rt z2=(w,.5[y1,y3]);
137 p1=z1{dir curvature1}...z2{down}...z3{dir curvature2};
138 z4=z3+(arrowhead,0) rotated curvature2;
139 z5=z3+(arrowhead,0) rotated (curvature2+120);
140 z6=z3+(arrowhead,0) rotated (curvature2-120);
141 draw p1; filldraw z4--z5--z6--cycle;
142 adjust(.3width#,.2width#);
143 endchar;
144
145
146
147 % ***** eye *****
148 "eye";
149 beginchar(oct"105",1.2width#,.75height#,depth#);
150 save limit; pair limit; % keeps curve bounded
151 randomseed:=.71; % iris shape
152 pickup pencil_pen; % the pen used in this char
153 lft x1=0; x0=x2=x4=.5w; rt x3=w;
154 bot y2=0; y0=y1=y3=.5h; top y4=h;
155 limit=if abs(y2-y1)>abs(x2-x1):down else:(0,0) fi;
156 draw z1{limit}...z2{right}...z3{-limit}--
157 z3+(0,eps){-limit}...z4{left}...z1+(0,eps){limit}--cycle; % outer shape
158 draw z2..(.5[z0,z3])..z4..(.5[z0,z1])..cycle; % "retina"
159 pickup pencircle; % number and shape of pupil lines can be altered here
160 for n:=0 step 25 until 360:
161 draw z0--(z0+(.9abs(y4-y0),0)rotated n);
162 endfor
163 for n:=60 step 60 until 360:
164 draw z0--(z0+(.9abs(y4-y0),0)rotated (n*(uniformdeviate 5)));
165 endfor
166 pickup pencircle scaled .10h;
167 for n:=12 step 30 until 375:
168 draw z0--(z0+((((uniformdeviate 2)+2)*.15abs(y4-y0)),0)rotated n);
169 endfor
170 adjust(.2width#,.2width#);
171 endchar;
172
173
174 % ***** hands *****
175 handheight#:=6.5pt#;
176 handdepth#:=3pt#;
177 define_pixels(handheight,handdepth);
178 cuff_width:=.15width; % thickness of the cuff
179 shirt_width:=.75cuff_width; % thickness of the sleeve
180 digit:=round(.2handheight); % thickness of the fingers
181 indent:=.05width; % finger indent increment
182 knuckles:=2indent; % length of knuckles
183 finger_tips:=3indent; % length of finger tips
184
185 def handpen=pickup pencircle scaled .2pt; enddef;
186
187 % Makes an open horizontal oval shape; path moves clockwise
188 vardef finger(expr tip,alength)suffix $=
189 save x,y,tips; boolean tips; tips=if str$="tips":true else:false fi;
190 z2=tip; x1=x3=x2 if tips:+finger_tips else:-knuckles fi; x4=x3-alength;
191 y1=y2+.5digit; y1-y3=digit; y4=y3;
192 if tips:z4..z3{left}...z2...z1{right} else:z1{right}...z2...z3{left}...z4 fi
193 enddef;
194
195 % Points used in the hand characters
196 def hand_points=
197 y1=y2=h; top y3=top y4=y2-(.05h+1); x1=x5=0; x2=x3=x6=x7=x1+cuff_width;% cuff
198 y5=y6=0; bot y7=bot y8=y5+(.05h+1); x4=x8=x1a=x3a=x2+shirt_width;
199 y1a=y3-(.1h); y2a=y3; x2a=.3[x1a,w-3indent]; % wrist
200 y3a=y1a-.5h; y4a=y7+(.05h+1); y5a=.2[y4a,y2a]; x4a=x5a=.45[x3a,x5d];
201 y1b=y3-.5digit; y2b+digit=y3b+2digit=y4b+3digit=y1b; y5b=y4b; % knuckles
202 x1b+2indent=x2b+indent=x3b=x4b+indent=w; x5b=x3b+2knuckles;
203 for n:=1 upto 4:y[n]c=y[n]b; endfor % tips
204 x1c=x2c=x3c=x4c-indent=0[x3d,x3b];
205 z3d=(.5[x3a,x3b],-d); z2d=z3d+(.5digit,.3d); z4d=z2d-(digit,0); % up thumb
206 z1d=(x2d-indent,.5[y2d,y4b-.5digit]); z5d=z1d-(1.5digit,0);
207 z1e=z5d+(0,.5digit); z2e=(.2[x1e,x3b],y1e); % down thumb
208 z5e=(.55[x3c,x3b],y3b-.5digit);
209 z3e=.4[z2e,z5e]+(.55digit,0)rotated(angle(z5e-z2e)-90);
210 z4e-z3e=whatever*(z5e-z2e); y4e=y4b;
211 z6e=z3e+(1.1digit,0)rotated(angle(z5e-z2e)+90); z7e=z6e-(.5knuckles,0);
212 z8e=(1[x3a,x5d],y3b);
213 enddef;
214
215 def cuff(expr trans)=
216 p10=z1--z2--z6--z5--cycle; fill p10 transformed trans; % cuff
217 p11=z3--z4--z8--z7; draw p11 transformed trans; % sleeve
218 enddef;
219
220 "left thumbs down";
221 beginchar(oct"104",1.2*width#,handheight#,handdepth#);
222 transform t[]; t1=identity shifted (0,-.1h);
223 handpen hand_points;
224 cuff(t1); % cuff
225 p1=z1a{right}...z2a{right}...finger(z1b,2.5indent); % finger
226 p2=finger(z2b,2.5indent); % finger
227 p3=finger(z3b,4.5indent); % finger
228 p4=finger(z4b,2.5indent)... % finger
229 z1d{down}...z2d{down}...z3d...z4d{up}...z5d{z4a-z3d}...z3a{left};% thumb
230 for n:=1 upto 4: draw p[n] transformed t1; endfor
231 adjust(.2width#,.2width#);
232 endchar;
233
234 "right thumbs down";
235 beginchar(oct"144",1.2*width#,handheight#,handdepth#);
236 transform t[];
237 t1=identity reflectedabout ((.5w,0),(.5w,h)) shifted (0,-.1h);
238 handpen hand_points;
239 cuff(t1); % cuff
240 p1=z1a{right}...z2a{right}...finger(z1b,2.5indent); % finger
241 p2=finger(z2b,2.5indent); % finger
242 p3=finger(z3b,4.5indent); % finger
243 p4=finger(z4b,2.5indent)... % finger
244 z1d{down}...z2d{down}...z3d...z4d{up}...z5d{z4a-z3d}...z3a{left};% thumb
245 for n:=1 upto 4: draw p[n] transformed t1; endfor
246 adjust(.2width#,.2width#);
247 endchar;
248
249 "left thumbs up";
250 beginchar(oct"125",1.2*width#,handheight#,handdepth#);
251 transform t[];
252 t1=identity reflectedabout ((0,.5h),(w,.5h)) shifted (0,-.1h);
253 handpen hand_points;
254 cuff(t1); % cuff
255 p1=z1a{right}...z2a{right}...finger(z1b,0)--finger(z1c,0)tips; % finger
256 p2=finger(z2b,0)--finger(z2c,0)tips; % finger
257 p3=finger(z3b,0)--finger(z3c,0)tips; % finger
258 p4=finger(z4c,0)tips--finger(z4b,0){left}... % finger
259 z1d{down}...z2d{down}...z3d...z4d{up}...z5d{z4a-z3d}...z4a...z5a{up};
260 p5=z3a--z4a; % wrist
261 for n:=1 upto 5: draw p[n] shifted (0,-.07h) transformed t1; endfor
262 adjust(.2width#,.2width#);
263 endchar;
264
265 "right thumbs up";
266 beginchar(oct"165",1.2*width#,handheight#,handdepth#);
267 transform t[];
268 t1=identity rotatedaround ((.5w,.5h),180) shifted (0,-.1h);
269 handpen hand_points;
270 cuff(t1); % cuff
271 p1=z1a{right}...z2a{right}...finger(z1b,0)--finger(z1c,0)tips; % finger
272 p2=finger(z2b,0)--finger(z2c,0)tips; % finger
273 p3=finger(z3b,0)--finger(z3c,0)tips; % finger
274 p4=finger(z4c,0)tips--finger(z4b,0){left}... % finger
275 z1d{down}...z2d{down}...z3d...z4d{up}...z5d{z4a-z3d}...z4a...z5a{up};
276 p5=z3a--z4a; % wrist
277 for n:=1 upto 5: draw p[n] shifted (0,-.07h) transformed t1; endfor
278 adjust(.2width#,.2width#);
279 endchar;
280
281 "left hand pointing right";
282 beginchar(oct"122",1.2*width#,handheight#,handdepth#);
283 transform t[];
284 t1=identity reflectedabout ((0,.5h),(w,.5h)) shifted (0,-.1h);
285 handpen hand_points;
286 cuff(t1); % cuff
287 z1f=(z2e{right}...z3e{z5e-z2e}...z5e{left}...z6e{z2e-z5e})
288 intersectionpoint ((0,y4b-.5digit)--(w,y4b-.5digit));
289 p1=z1a{right}...z2a{right}...finger(z1b,0)--finger(z1c,0)tips; % finger
290 p2=finger(z2b,0)--finger(z2c,0)tips; % finger
291 p3=finger(z3b,0)--finger(z3c,0)tips; % finger
292 p4=z5e--finger(z5b,0)--z1f; % finger
293 p5=z3a{right}...z1e{right}...z2e{right}...z3e{z5e-z2e}...
294 z4e{z5e-z2e}...z5e{left}...z6e{z2e-z5e} & z6e--z7e{dir 120}..z8e;
295 w:=w+2knuckles;
296 for n:=1 upto 5: draw p[n] shifted (0,-.07h) transformed t1; endfor
297 adjust(.2width#,.35width#);
298 endchar;
299
300 "right hand pointing left";
301 beginchar(oct"114",1.2*width#,handheight#,handdepth#);
302 transform t[];
303 t1=identity rotatedaround ((.5w,.5h),180) shifted (0,-.1h);
304 handpen hand_points;
305 cuff(t1); % cuff
306 z1f=(z2e{right}...z3e{z5e-z2e}...z5e{left}...z6e{z2e-z5e})
307 intersectionpoint ((0,y4b-.5digit)--(w,y4b-.5digit));
308 p1=z1a{right}...z2a{right}...finger(z1b,0)--finger(z1c,0)tips; % finger
309 p2=finger(z2b,0)--finger(z2c,0)tips; % finger
310 p3=finger(z3b,0)--finger(z3c,0)tips; % finger
311 p4=z5e--finger(z5b,0)--z1f; % finger
312 p5=z3a{right}...z1e{right}...z2e{right}...z3e{z5e-z2e}...
313 z4e{z5e-z2e}...z5e{left}...z6e{z2e-z5e} & z6e--z7e{dir 120}..z8e;
314 w:=w+2knuckles;
315 for n:=1 upto 5: draw p[n] shifted (0,-.07h) transformed t1; endfor
316 adjust(.35width#,.2width#);
317 endchar;
318
319 end
320