summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/ethiop/ethiomac.mf
blob: a488b4b88111097c5eb3e87f5dbc7f42d66c3ae9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
%-------------------------------------------------------------
% This is ETHIOPMAC.MF  as of Dec, 1995 by Jochen Metzinger
% originally distributed by Abass B. Alamnehe [February, 1993]
%-------------------------------------------------------------

%%% THUMB %%%

def t_thumb(suffix @)=
  pickup fine.nib; 
  x@a=x@s=x@-3.25u; x@b=x@a+.75u; x@c=x@a; x@d=x@a+2u; x@e=x@a+3.25u; 
  x@f=x@a+3.25u; x@g=x@a+1.75u; 
  y@a=y@-.1h+oo; y@b=y@; y@c=y@+.1h-oo; 
  y@d=y@c+oo; y@e=y@c-.025h; y@f=y@a+.05h; y@g=y@a-oo; 
  fill flex(z@a,z@b,z@c) & flex(z@c,z@d,z@e)...flex(z@f,z@g,z@a) 
     & cycle; 
  penlabels(@,@a,@b,@c,@d,@e,@f,@g); 
enddef; 

def left_up_thumb(suffix @)=
  pickup tiny.nib; 
  x@a=x@; y@a=y@; 
  x@b=x@-1.9u; x@c=x@-1.7u; x@d=x@-2.2u; x@e=x@-.5u; x@f=x@-.5u; 
  y@b=y@; y@c=y@+.07h; y@d=y@+.15h; y@e=y@+.14h; y@f=y@; 
  pickup fine.nib; 
  filldraw  flex(z@b,z@c,z@d) & flex(z@d,z@e,z@a) 
          & flex(z@a,z@f,z@b) & cycle; 
  pickup fine.nib; 
  labels(x@,@a,@b,@c,@d,@e,@f,@g,@i); 
enddef; 

%%% WING %%%

def upper_left_wing(suffix @)=
  pickup fine.nib; pos@g(vair,90); pos@i(vair,90); 
  x@g=x@; x@i=x@-1.5u; y@g=y@i=y@; 
  filldraw stroke z@g.e--z@i.e; 
  x@a=x@-1.52u; y@a=y@; 
  x@b=x@-3.9u; x@c=x@-3.7u; x@d=x@-4.2u; x@e=x@-2.5u; x@f=x@-2.5u; 
  y@b=y@-oo; y@c=y@+.07h; y@d=y@+.15h; y@e=y@+.14h; y@f=y@-oo; 
  filldraw  flex(z@b,z@c,z@d) & flex(z@d,z@e,z@a) 
          & flex(z@a,z@f,z@b) & cycle; 
  labels(x@,@a,@b,@c,@d,@e,@f,@g,@i); 
enddef; 

def upper_right_wing(suffix $)=
  pickup fine.nib; pos$a(vair,90); pos$b(vair,90); 
  x$a=x$; x$b=x$+1.5u; y$a=y$b=y$; 
  filldraw stroke z$a.e--z$b.e; 
  x$g=x$+1.52u; y$g=y$; 
  x$i=x$+3.9u; x$j=x$+3.7u; x$k=x$+4.2u; x$l=x$+2.5u; x$m=x$+2.5u; 
  y$i=y$-oo; y$j=y$+.07h; y$k=y$+.15h; y$l=y$+.14h; y$m=y$-oo; 
  filldraw flex(z$i,z$j,z$k) & flex(z$k,z$l,z$g) 
         & flex(z$g,z$m,z$i) & cycle; 
  labels(x$,$g,$i,$j,$k,$l,$m,$a,$b); 
enddef; 

def upside_down_left_wing(suffix @)=
  pickup tiny.nib; 
  pos@g(bar,90); pos@i(bar,90); 
  x@g=x@; x@i=x@-2u-eps; y@g=y@i=y@; 
  draw z@g--z@i; 
  x@a=x@-2u; y@a=y@; x@b=x@-3.9u; x@c=x@-3.7u; 
  x@d=x@-4.2u; x@e=x@-2.5u; x@f=x@-2.5u; 
  y@b=y@; y@c=y@+.07h; y@d=y@+.15h; y@e=y@+.14h; y@f=y@; 
  pickup fine.nib; 
  filldraw flex(z@b,z@c,z@d) & flex(z@d,z@e,z@a) 
         & flex(z@a,z@f,z@b) & cycle; 
  pickup fine.nib; 
  labels(x@,@a,@b,@c,@d,@e,@f,@g,@i); 
enddef; 

def rt_wing(suffix $)(expr x_bar, slope)=
  pickup fine.nib; 
  x$g=x$; x$:=x$+x_bar; 
  x$a=x$; x$b=x$+2u; x$c=x$+2u; x$d=x$+2u; x$e=x$+2.5u; 
  x$f=x$+.75u; x$h=x$a; 
  y$a=y$+slope; y$b=y$+o+slope; y$c=y$b-.025h; y$d=y$b-.075h; 
  y$e=y$b-.135h-o; y$f=y$b-.15h-o; y$g=y$; y$h=y$a; 
  if x_bar > 0:
    pos$g(vair,90); pos$h(vair,90); 
    filldraw stroke z$g--z$h; 
  fi
  filldraw flex(z$a,z$b,z$c) & flex(z$c,z$d,z$e)
         & flex(z$e,z$f,z$a) & cycle; 
  labels(x$,$a,$b,$c,$d,$e,$f,$g); 
enddef; 

def lft_wing(suffix $)(expr x_bar, slope)=
  pickup fine.nib; 
  x$g=x$; x$:=x$-x_bar; 
  x$a=x$; x$b=x$-2u; x$c=x$-2u; x$d=x$-2u; x$e=x$-2.5u; 
  x$f=x$-.75u; x$h=x$a; 
  y$a=y$-slope; y$b=y$-2slope; y$c=y$b-.025h; y$d=y$b-.075h; 
  y$e=y$b-.135h-o; y$f=y$b-.15h-o; y$g=y$; y$h=y$a; 
  if x_bar > 0:
    pos$g(vair,90); pos$h(vair,90); 
    filldraw stroke z$g--z$h;
  fi
  filldraw flex(z$a,z$b,z$c) & flex(z$c,z$d,z$e)
         & flex(z$e,z$f,z$a) & cycle; 
  labels(x$,$a,$b,$c,$d,$e,$f,$g); 
enddef; 

def right_wing_no_bar(suffix @)=
  x@a=x@; y@a=y@; 
  x@b=x@-1.9u; x@c=x@-1.7u; x@d=x@-2.2u; x@e=x@-.5u; x@f=x@-.5u; 
  y@b=y@; y@c=y@-.07h; y@d=y@-.15h; y@e=y@-.14h; y@f=y@; 
  pickup fine.nib; 
  filldraw  flex(z@b,z@c,z@d) & flex(z@d,z@e,z@a) & flex(z@a,z@f,z@b) 
  & cycle; 
  pickup fine.nib; 
  labels(x@,@a,@b,@c,@d,@e,@f,@g,@i); 
enddef; 

def r_wing(suffix $)=
  pickup fine.nib; x$g=x$; y$g=y$; 
  x$i=x$+2u; x$j=x$+1.75u; x$k=x$+2.5u; x$l=x$+.5u; x$m=x$+.5u; 
  y$i=y$; y$j=y$-.07h; y$k=y$-.15h; y$l=y$-.14h; y$m=y$; 
  filldraw flex(z$i,z$j,z$k) & flex(z$k,z$l,z$g)
         & flex(z$g,z$m,z$i) & cycle; 
  labels(x$,$g,$i,$j,$k,$l,$m,$a,$b); 
enddef; 

def p_wing(suffix $)=
  pickup fine.nib; x$g=x$; y$g=y$;
  x$i=x$-1.9u; x$j=x$-1.7u; x$k=x$-2.2u; x$l=x$-.5u; x$m=x$-.5u;
  y$i=y$; y$j=y$-.07h; y$k=y$-.15h; y$l=y$-.14h;  y$m=y$;
  filldraw flex(z$i,z$j,z$k) & flex(z$k,z$l,z$g) 
         & flex(z$g,z$m,z$i) & cycle;
  pickup fine.nib;
  labels(x$,$g,$i,$j,$k,$l,$m,$a,$b);
enddef;

def t_wing(suffix $)=
  pickup fine.nib; 
  x$a=x$; x$b=x$c=x$d=x$-2u; x$e=x$-2.5u; x$f=x$-.75u; 
  y$a=y$c=y$; y$b=y$+.025h; y$d=y$-.05h; y$e=y$-.11h-o;
  y$f=y$-.125h-o;
  filldraw flex(z$a,z$b,z$c) & flex(z$c,z$d,z$e)
         & flex(z$e,z$f,z$a) & cycle; 
  labels($,$a,$b,$c,$d,$e,$f); 
enddef; 

%%% RING %%%

def half_ring(suffix @) =
  pickup fine.nib; 
  pos@1(vair,270); penpos@2(stem,360); pos@3(vair,90); 
  pos@4(vair,90); pos@5(vair,270); 
  x@5=x@4=x@+fine; x@1=x@3=x@5+1u; x@2=x@1+2u; 
  y@5=y@1=y@+.5o; y@3=y@4=y@5+.225h; y@2=.5[y@5,y@3]; 
  filldraw stroke z@5e..pulled_super_arc.e(@1,@2)(superpull)
        .. pulled_super_arc.e(@2,@3)(superpull)..z@4e; 
  penlabels(@,@1,@2,@3); 
enddef; 

def jj_ring(suffix @) =
  pickup fine.nib; 
  pos@1(vair,270); pos@2(stem,0); pos@3(vair,90); 
  pos@4(vair,90); pos@5(vair,270);  
  x@5=x@4=x@+fine; x@1=x@3=x@5+.75u; x@2=x@1+1.72u; 
  y@5=y@1=y@+o; y@3=y@4=y@5+.225h; y@2=.5[y@5,y@3]; 
  filldraw stroke z@5e...pulled_arc.e(@1,@2)
        .. pulled_arc.e(@2,@3)...z@4e; 
  penlabels(@,@1,@2,@3); 
enddef; 

def large_ring(suffix $)(expr theta) =
  pickup tiny.nib; 
  transform t; t=identity rotatedaround((.5w,.5h),theta); 
  x$a=x$c=x$+1.75u; x$b=x$b'=x$; x$d=x$d'=x$a+2u; x$e=x$f=x$+1.75u; 
  y$a=y$b=y$d'=y$+.25h; y$b'=y$d=y$c=y$-.05h; y$e=y$+.2h; y$f=y$; 
  path p, q; 
  p=z$a..z$b..z$b'..z$c..z$d..z$d'..cycle; 
  q=z$e..z$f..cycle; 
  fill p transformed t; 
  unfill q transformed t; 
  penlabels($,$a,$b,$b',$c,$d,$d',$e,$f); 
enddef; 

def rfive_ring(suffix $)(expr theta)=
  pickup tiny.nib; 
  transform t; t=identity rotatedaround((.5w,.5h),theta); 
  x$a=x$c=x$+1.75u; x$b=x$b'=x$; x$d=x$d'=x$a+2u; x$e=x$f=x$+1.75u; 
  y$a=y$b=y$d'=y$+.25h; y$b'=y$d=y$c=y$-.05h; y$e=y$+.2h; y$f=y$; 
  path p, q; 
  p=z$a..z$b..z$b'..z$c..z$d..z$d'..cycle; 
  q=z$e..z$f..cycle; 
  fill p transformed t; 
  unfill q transformed t; 
  penlabels(z$a,z$b,z$b',z$c,z$d,z$d',z$e,z$f); 
enddef; 

def rseven_ring(suffix $)=
  pickup  fine.nib; 
  pos$a(vair,90); penpos$b(stem,180); pos$b'(stem,205); 
  pos$c(vair,270); penpos$d(stem,0); pos$d'(stem,0); 
  x$a=x$+3u; x$b.l=x$+2.25u; x$b'.l=x$+2.5u; x$c=x$+3u; x$d.l=x$+4u; 
  x$d'.l=x$+4u; 
  y$a=y$+.05h; y$b=y$-.05h; y$b'=y$-.25h; y$c=y$-.225h; y$d=y$-.1h; 
  y$d'=y$; 
  filldraw stroke z$a.e{left}...z$b.e..z$b'.e{right}...z$c.e{right}
        .. z$d.e..z$d'.e..{left}z$a.e; 
  labels(z$a,z$b,z$b',z$c,z$d,z$d'); 
enddef; 

def dfive_ring(suffix $)(expr theta)=
  pickup fine.nib; 
  transform t; t=identity rotatedaround((.5w,.5h),theta); 
  x$:=x$+.4u; y$:=y$-.125h; 
  x$a=x$c=x$+1.5u; x$b=x$b'=x$; x$d=x$d'=x$a+1.75u; x$e=x$f=x$+1.5u; 
  y$b=y$d'=y$+.175h; y$a=y$b+o; y$b'=y$d=y$c=y$-.075h; y$e=y$+.15h; 
  y$f=y$-.025h; 
  path p, q; 
  p=z$a..z$b..z$b'..z$c..z$d..z$d'..cycle; 
  q=z$e...z$f...cycle; 
  fill p transformed t; 
  unfill q transformed t; 
  penlabels(z$a,z$b,z$b',z$c,z$d,z$d',z$e,z$f); 
enddef; 

def gfive_ring(suffix $)(expr theta,s)=
  pickup fine.nib; 
  transform t; t=identity slanted (s) rotatedaround((.5w,.5h),theta); 
  x$:=x$+.4u; y$:=y$-.125h; 
  x$a=x$c=x$+1.5u; x$b=x$b'=x$; x$d=x$d'=x$a+1.75u; x$e=x$f=x$+1.5u; 
  y$b=y$d'=y$+.195h; y$a=y$b+o; y$b'=y$d=y$c=y$-.095h; y$e=y$+.15h; 
  y$f=y$-.025h; 
  path p, q; 
  p=z$a..z$b..z$b'..z$c..z$d..z$d'..cycle; 
  q=z$e...z$f...cycle; 
  fill p transformed t; 
  unfill q transformed t; 
  penlabels(z$a,z$b,z$b',z$c,z$d,z$d',z$e,z$f); 
enddef; 
  
def nfour_ring(suffix $)(expr theta,s)=
  pickup fine.nib; 
  transform t; t=identity slanted (s) rotatedaround((.5w,.5h),theta); 
  x$:=x$+.4u; y$:=y$-.125h; 
  x$a=x$c=x$+1.75u; x$b=x$b'=x$; x$d=x$d'=x$a+2u; x$e=x$f=x$+1.75u; 
  y$b=y$+.175h; y$a=y$b+.025h; y$b'=y$c=y$-.075h; y$e=y$+.15h; y$f=y$-.035h; 
  y$d'=y$+.175h; y$d=y$-.075h; 
  path p, q; 
  p=z$a...z$b..z$b'..z$c..z$d..z$d'...cycle; 
  q=z$e...z$f...cycle; 
  fill p transformed t; 
  unfill q transformed t; 
  penlabels(z$a,z$b,z$b',z$c,z$d,z$d',z$e,z$f); 
enddef; 

def lsix_ring(suffix $)(expr theta) =
  pickup tiny.nib; 
  transform t; t=identity rotatedaround((.5w,.5h),theta); 
  x$a=x$c=x$+1.75u; x$b=x$b'=x$; x$d=x$d'=x$a+2u; x$e=x$f=x$+1.75u; 
  y$a=y$b=y$d'=y$+.25h; y$b'=y$d=y$c=y$-.05h; y$e=y$+.2h; y$f=y$; 
  path p, q; 
  p=z$a..z$b..z$b'..z$c..z$d..z$d'..cycle; 
  q=z$e..z$f..cycle; 
  fill p transformed t; 
  unfill q transformed t; 
  penlabels(z$a,z$b,z$b',z$c,z$d,z$d',z$e,z$f); 
enddef; 

def ynseven_ring(suffix $)(expr theta,s)=
  pickup fine.nib; 
  transform t; t=identity slanted (s) rotatedaround((.5w,.5h),theta); 
  x$:=x$+.4u; y$:=y$-.125h; 
  x$a=x$c=x$+1.75u; x$b=x$b'=x$; x$d=x$d'=x$a+2u; x$e=x$f=x$+1.75u; 
  y$b=y$d'=y$a=y$+.195h; y$b'=y$d=y$c=y$-.05h; y$e=y$+.15h; y$f=y$-.025h; 
  path p, q; 
  p=z$a...z$b..z$b'..z$c..z$d..z$d'...cycle; 
  q=z$e...z$f...cycle; 
  fill p transformed t; 
  unfill q transformed t; 
  penlabels(z$a,z$b,z$b',z$c,z$d,z$d',z$e,z$f); 
enddef; 
  
def yfive_ring(suffix $)(expr theta)=
  pickup tiny.nib; 
  transform t; t=identity rotatedaround((.5w,.5h),theta); 
  x$:=x$+.4u; y$:=y$-.125h; 
  x$a=x$c=x$+1.75u; x$b=x$b'=x$; x$d=x$d'=x$a+2u; x$e=x$f=x$+1.75u; 
  y$a=y$b=y$d'=y$+.15h; y$b'=y$d=y$c=y$-.05h; y$e=y$+.125h; y$f=y$-.025h; 
  path p, q; 
  p=z$a..z$b..z$b'..z$c..z$d..z$d'..cycle; 
  q=z$e..z$f..cycle; 
  fill p transformed t; 
  unfill q transformed t; 
  penlabels(z$a,z$b,z$b',z$c,z$d,z$d',z$e,z$f); 
enddef; 

%%% ELLIPSE %%%

def rt_half_ellipse(suffix @)(expr x_bar)=
  pickup fine.nib; 
  x@g=x@; y@:=y@+.015h; 
  x@:=x@+x_bar; x@h=x@; x@a=x@+3.25u; x@b=x@a-u; 
  x@c=x@a-.5u; x@d=x@a-2.5u; x@e=x@; x@f=x@a-2.25u; 
  y@a=y@-.065h; y@b=y@+.05h; y@c=y@+.125h; y@d=y@+.1h; y@e=y@; 
  y@f=y@-.1h; y@g=y@-.015h; y@h=y@; 
  pos@g(vair,90); pos@h(vair,90); 
  if x_bar>0 :
    filldraw stroke z@g.e--z@h.e;
  fi
  fill flex(z@a,z@b,z@c) & flex(z@c,z@d,z@e)...flex(z@e,z@f,z@a) & cycle; 
  penlabels(@,@a,@b,@c,@d,@e,@f,z@g,z@h); 
enddef; 

def lft_half_ellipse(suffix @)(expr x_bar)=
  pickup fine.nib; 
  x@g=x@; y@:=y@-.03h; 
  x@:=x@-x_bar; x@h=x@; x@a=x@-3.25u; x@b=x@a+u; x@c=x@a+.5u; x@d=x@a+2.5u;
  x@e=x@; x@f=x@a+2.25u; 
  y@a=y@-.125h; y@b=y@-.05h; y@c=y@+.065h; y@d=y@+.1h; y@e=y@; y@f=y@-.1h;
  y@g=y@+.015h; y@h=y@; 
  pos@g(vair,90); pos@h(vair,90); 
  if x_bar>0 :
    filldraw stroke z@g.e--z@h.e; 
  fi
  fill flex(z@a,z@b,z@c) & flex(z@c,z@d,z@e)...flex(z@e,z@f,z@a) & cycle; 
  penlabels(@,@a,@b,@c,@d,@e,@f,z@g,z@h); 
enddef; 

%%% DIAGONALS %%%

def top_diagonals(suffix @)=
  penpos@a(vair,45); penpos@b(vair,-45);
  penpos@c(vair,45); penpos@d(vair,-45);
  penpos@e(2stem,45); penpos@f(2stem,-45);
  z@a.l=z@.l; z@b.r=z@.r;
  x@c=x@a-1u; y@c=y@a+1u; x@d=x@b+1u; y@d=y@b+1u;
  x@e=x@c-1.2stem; y@e=y@c+1.2stem; x@f=x@d+1.2stem; y@f=y@d+1.2stem;
  z@g=.5[z@c,z@e]; z@h=.5[z@d,z@f];
  z@i=whatever[z@a.r,z@c.r]=whatever[z@b.r,z@d.r];
  filldraw z@a.l--z@c.l--z@c.r--z@i--z@b.l--
    z@d.l--z@d.r--z@b.r--z@a.l & cycle;
  fill z@e.l..controls z@g..z@e.r &
    z@e.r..{down}z@c.r--z@c.l{left}..z@e.l & cycle;
  fill z@f.l..controls z@h..z@f.r &
    z@f.r..{left}z@d.r--z@d.l{up}..z@f.l & cycle;
enddef;

%%% NO_CHAR %%%

def no_char(expr code) =
  "undefined character"; 
  beginchar(code,9u#,body_height#,paren_depth#); 
  italcorr fig_height#*slant-.5u#; % same as for digits
  adjust_fit(0,0); 
  fill (0,h)--(w,h)--(w,-d)--(0,-d)--cycle; 
  endchar; 
enddef;