summaryrefslogtreecommitdiff
path: root/language/telugu/telchars3.mf
blob: 9cff20d6994cd894ab05faa10423f9a5224d82bc (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
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
% This file is part of the TeluguTeX Software Package.
%Copyright (c) 1991 Lakshmankumar Mukkavilli
%
%The TeluguTeX Software Package is distributed in the hope that
%it will be useful,but WITHOUT ANY WARRANTY.  No author or distributor
%accepts responsibility to anyone for the consequences of using it
%or for whether it serves any particular purpose or works at all,
%unless he says so in writing.  Refer to the TeluguTeX Software Package
%General Public License for full details.
%
%Everyone is granted permission to copy, modify and redistribute
%the TeluguTeX Software Package, but only under the conditions described in the
%TeluguTeX Software Package General Public License.   A copy of this license is
%supposed to have been given to you along with TeluguTeX Software Package so you
%can know your rights and responsibilities.  It should be in a
%file named CopyrightLong.  Among other things, the copyright notice
%and this notice must be preserved on all copies.  
%%%%%
%  This file contains code to generate roman digits,
%   telugu digits and punctuation symbols
% --------- start of roman digits ------------
stest(drzero); telchar "Roman digit zero";
begintchar(dr_zero_code,7u#,fig_height#,0,0,0,ur#);
top z1=(w/2,h); lft z2=(0,1/2h);
bot z3=(w/2,0); rt z4=(w,1/2h);
sketch superellipse(z4,z1,z2,z3,0.707);
endtchar; etest;

stest(drone); telchar "Roman digit one";
begintchar(dr_one_code,4u#,fig_height#,0,0,0,ur#);
bot lft z1=(0,0); bot rt z2=(w,0); top z3=(x5,h);
lft z4=(x1,x_height+uh); bot z5=1/2[z1,z2];
sketch z1--z2; sketch z3--z5;
sketch z4..{up}z3;
endtchar; etest;

stest(drtwo); telchar "Roman digit two";
begintchar(dr_two_code,7u#,fig_height#,0,0,0,ur#);
bot lft z1=(0,0); bot rt z2=(w,0); lft z3=(0,x_height);
top z4=(w/2,h); rt z5=(w,y3);
sketch z1--z2; sketch z3..z4..z5..{-1,-1}z1;
endtchar; etest;

stest(drthree); telchar "Roman digit three";
begintchar(dr_three_code,7u#,fig_height#,0,0,0,ur#);
path pa; 
top lft z1=(0,3/4h); top z2=(w/2,h);
rt z3=(w,y1); z4=(w/2-u,1/2h);
pa= z1..z2..z3..{(-1,0)}z4; 
sketch pa; sketch pa  reflectedabout (z4,(w,y4));
endtchar; etest;

stest(drfour); telchar "Roman digit four";
begintchar(dr_four_code,7u#,fig_height#,0,0,0,ur#);
bot z1=(w-1.5u,0); top z2=(x1,h);
lft z3=(0,w_height); rt z4=(w,y3);
bot z1a=(x1-(x4-x1),0); bot z1b=(x4,0);
sketch z1a--z1b; sketch z1--z2;
sketch z3--z2; sketch z3--z4;
penlabels(1a,1b);
endtchar; etest;

stest(drfive); telchar "Roman digit five";
begintchar(dr_five_code,7u#,fig_height#,0,0,0,ur#);
top rt z1=(w,h); top lft z2=(0,h); lft z3=(0,6/10h);
z4=(1/2w,y3+uh); rt z5=(w,(y4+y6)/2); bot z6=(x4,0); lft z7=(0,1/4h);
sketch z1--z2; sketch z2--z3; 
sketch z3..z4..z5..z6..z7;
endtchar; etest;

stest(drsix); telchar "Roman digit six";
begintchar(dr_six_code,6u#,fig_height#,0,0,0,ur#);
dr_sixnine_form;
sketch dr_sixnine_p;
endtchar; etest;

stest(drseven); telchar "Roman digit seven";
begintchar(dr_seven_code,7u#,fig_height#,0,0,0,ur#);
top lft z1=(0,h); top rt z3=(w,h);
bot z4=(1/4w,0);
sketch z1--z3{(-1,-1)}..{down}z4;
endtchar; etest;

stest(dreight); telchar "Roman digit eight";
begintchar(dr_eight_code,7u#,fig_height#,0,0,0,ur#);
top z1=(w/2,h); z2=(x1,0.6h);
bot z3=(x1,0); lft z4=(0,y2/2); rt z5=(w,y4);
z6=(x4+u,1/2(y1+y2)); z7=(w-u,y6);
sketch superellipse(z7,z1,z6,z2,0.707);
sketch superellipse(z5,z2,z4,z3,0.707);
endtchar; etest;

stest(drnine); telchar "Roman digit nine";
begintchar(dr_nine_code,6u#,fig_height#,0,0,0,ur#);
dr_sixnine_form;
bot lft z10 = z1;
sketch dr_sixnine_p rotatedaround(z10,-180) shifted(-w,-h);
endtchar; etest;

%---------------------end of roman digits------------------------

% ------------- start of telugu digits ------------

stest(dtzero); telchar "telugu digit zero";
begintchar(dt_zero_code,tfig_width#,tfig_height#,0,0,0,ur#);
top z1=(w/2,h); lft z2=(0,h/2); bot z3=(x1,0); rt z4=(w,y2);
sketch superellipse(z4,z1,z2,z3,0.707);
endtchar; etest;

stest(dtone); telchar "telugu digit one";
begintchar(dt_one_code,tfig_width#+u#,tfig_height#,0,0,0,ur#);
bot z1=(w/5,0);  lft z2=(0,h/2);  top z3=(w/2,h);
rt z4=(w,h/2);  bot z5=(w-(w/5),0);
sketch z1..z2..z3..z4..z5;
endtchar; etest;

stest(dttwo); telchar "telugu digit two";
begintchar(dt_two_code,tfig_width#,tfig_height#,0,0,0,ur#);
z1=(3w/5,5h/6);  z2=(x1,4h/6);  z3=(w/2,y1);
top z4=(x1,h);  z5=((x8+x1)/2,y3);  bot z6=(x1,0);
bot lft z7=(0,0);rt z8=(w,h/2);
sketch z1..z2..z3..z4..z8..{(-1,0)}z6--z7;
endtchar; etest;


stest(dtthree); telchar "telugu digit three";
begintchar(dt_three_code,tfig_width#-2u#,tfig_height#,0,0,0,ur#);
path pa;
lft z1=(0,4h/5);  top z2=(w/2,h);  top z3=(4w/5,h);
rt z4=(w,3h/4);  z5=(3w/4,h/2);  z6=(w/3,h/2);
pa= z1..z2..z3..z4..z5;
sketch pa; sketch pa  reflectedabout(z5,z6);
sketch z5--z6;
endtchar; etest;

stest(dtfour); telchar "telugu digit four";
begintchar(dt_four_code,tfig_width#-u#,tfig_height#,0,0,0,ur#);
top z1=(w/5,h);  lft z2=(0,2h/3);  z4=(w/2,h/3);
bot z5=(x4,0);  z3=(w/3,1/2(y4+y5));
forsuffixes s=6,7,8:
    z.s=z.[s-5] reflectedabout(z4,z5); endfor;
sketch z1..z2..z4..z7..z6;
sketch z4..z3..z5..z8..z4;
endtchar; etest;

stest(dtfive); telchar "telugu digit five";
begintchar(dt_five_code,tfig_width#+u#,tfig_height#,0,0,0,ur#);
lft z1=(0,8h/10);  lft z2=(0,3h/10);  z3=(2w/3,(y1+y2)/2);
top z11=(w/3,h); z12 = z11 reflectedabout ((0,y3),(w,y3));
sketch z1..z11..z3..z12..z2;
top z4=(x3+(w-x3)/2,h); 
rt z5=(w,(y3+y4)/2); 
bot z7=(x4,0);  rt z8=(x9,y9-uh); rt z9=(w,y2);
sketch z3..z5..z4..z3..z7..z8..z9;
endtchar; etest;
  
stest(dtsix); telchar "telugu digit six";
begintchar(dt_six_code,tfig_width#,tfig_height#,0,0,0,ur#);
dt_six_form;
sketch dt_six_pa; sketch dt_six_pb;
endtchar; etest;
  
stest(dtseven); telchar "telugu digit seven";
begintchar(dt_seven_code,tfig_width#-2u#,tfig_height#,0,0,0,ur#);
lft z1=(0,3h/4);  top z2=(w/2,h);  rt z3=(w,y1);  z4=(w/2,h/2);
forsuffixes i=6,7,8:
   z.i=z.[i-5] rotatedaround (z4,180);
endfor;
sketch z1..z2..z3..z4..z8..z7..z6;
endtchar; etest;


stest(dteight); telchar "telugu digit eight";
begintchar(dt_eight_code,tfig_width#+u#,tfig_height#,0,0,0,ur#);
z2=(1.5u,w/2); lft z7=(0,(y2+y3)/2);
bot z3=(w/4,0);  z4=z2+(3(x3-x2),0);
top z5=(x3,h); top rt z6=(w,h);
sketch z2..z7..z3..z4..z5 & z5--z6;
endtchar; etest;

stest(dtnine); telchar "telugu digit nine";
begintchar(dt_nine_code,tfig_width#,tfig_height#,0,0,0,ur#);
dt_six_form;
sketch dt_six_pa reflectedabout((0,0),(w,0)) shifted (0,h);
sketch dt_six_pb reflectedabout((0,0),(w,0)) shifted (0,h);
endtchar; etest;

% end of telugu digits

% --------- start of punctuation ----------

stest(pperiod); telchar "punctuation period";
begintchar(p_period_code,2*dot_radius#,2*dot_radius#,0,0,0,ur#);
z1=(dot_radius,dot_radius);
fill_dot(1);
endtchar; etest;
  
stest(pcomma); telchar "punctuation comma";
begintchar(p_comma_code, p_comma_width#,2*dot_radius#,des_depth#,0,0,ur#);
p_comma_form;
endtchar; etest;

stest(pequal); telchar "punctuation equal";
begintchar(p_equal_code,10u#,3/4x_height#,0,0,0,ur#);
top lft z1=(0,h); top rt z2=(w,h);
bot lft z3=(0,1/4x_height); bot rt z4=(w,1/4x_height);
sketch z1--z2;  sketch z3--z4;
endtchar; etest;

stest(pbar); telchar "punctuation vertical bar";
begintchar(p_bar_code,u#,x_height#,0,0,0,ur#);
p_bar_form;
sketch p_bar_p;
endtchar; etest;

stest(pdbar); telchar "punctuation double bar";
begintchar(p_dbar_code,2.5u#,x_height#,0,0,0,ur#);
p_bar_form;
sketch p_bar_p;sketch p_bar_p reflectedabout ((w/2,0),(w/2,h));
endtchar; etest;

stest(pcolon); telchar "punctuation colon";
begintchar(p_colon_code,2*dot_radius#,x_height#,0,0,0,ur#);
z1=(dot_radius,dot_radius);
fill_dot(1);
z2=(x1,x_height-dot_radius);
fill_dot(2);
endtchar; etest;

stest(pscolon); telchar "punctuation semicolon";
begintchar(p_scolon_code,p_comma_width#,x_height#,des_depth#,0,0,ur#);
p_comma_form;
z5=(x1,x_height-dot_radius);
fill_dot(5);
endtchar; etest;

stest(pcquote); telchar "punctuation closing quote";
begintchar(p_cquote_code,p_comma_width#,asc_height#,0,0,0,ur#);
p_comma_form;
erase fill fill_dot_p; erase sketch p_comma_p;
fill fill_dot_p  shifted (0,asc_height-2*dot_radius);
sketch p_comma_p  shifted (0,asc_height-2*dot_radius);
endtchar; etest;

stest(pcquotes); telchar "punctuation closing quotes";
begintchar(p_cquotes_code,2*p_comma_width#+u#,asc_height#,0,0,0,ur#);
p_comma_form;
erase fill fill_dot_p; erase sketch p_comma_p;
fill fill_dot_p  shifted (0,asc_height-2*dot_radius);
sketch p_comma_p  shifted (0,asc_height-2*dot_radius);
fill fill_dot_p  shifted (0,asc_height-2*dot_radius)
                                  shifted (p_comma_width+u,0);
sketch p_comma_p  shifted (0,asc_height-2*dot_radius)
                                  shifted (p_comma_width+u,0);
endtchar; etest;

stest(poquote); telchar "punctuation opening quote";
begintchar(p_oquote_code,p_comma_width#,asc_height#,0,0,0,ur#);
p_comma_form;
erase fill fill_dot_p; erase sketch p_comma_p;
lft z5 = z2;
top rt z6 =z3;
fill fill_dot_p rotatedaround (z5,-180) shifted(-x5,asc_height-abs(y6));
sketch p_comma_p rotatedaround (z5,-180) shifted(-x5,asc_height-abs(y6));
endtchar; etest;

stest(poquotes); telchar "punctuation opening quotes";
begintchar(p_oquotes_code,2*p_comma_width#+u#,asc_height#,0,0,0,ur#);
p_comma_form;
erase fill fill_dot_p; erase sketch p_comma_p;
lft z5 = z2;
top rt z6 =z3;
fill fill_dot_p rotatedaround (z5,-180) shifted(-x5,asc_height-abs(y6));
sketch p_comma_p rotatedaround (z5,-180) shifted(-x5,asc_height-abs(y6));
fill fill_dot_p rotatedaround (z5,-180) shifted(-x5,asc_height-abs(y6))
                                      shifted(p_comma_width+u,0);
sketch p_comma_p rotatedaround (z5,-180) shifted(-x5,asc_height-abs(y6))
                                      shifted(p_comma_width+u,0);
endtchar; etest;

stest(pdquotes);telchar "punctuation double quotes";
begintchar(p_dquotes_code,4.5u#,asc_height#,0,0,0,ur#);
top lft z1=(1.5u,h); bot lft z2=(0,x_height);
top rt z3=(w,h);  bot rt z4=(x1+1.5u,x_height);
sketch z1--z2; sketch z3--z4;
endtchar; etest;

%stest(pdquotes);telchar "punctuation double quotes";
%begintchar(p_dquotes_code,2*dot_radius#+u#,asc_height#,0,0,0,ur#);
%%begintchar(p_dquotes_code,4*dot_radius#+u#,asc_height#,0,0,0,ur#);
%path pa;
%%z1=(dot_radius,h-dot_radius);z1l=(0,y1);z1r=(2x1,y1);z1t=(x1,h);
%z1=(dot_radius/2,h-dot_radius/2);z1l=(0,y1);z1r=(2x1,y1);z1t=(x1,h);
%z2=(x1,x_height);
%%z2=(x1,x_height);z2l=(dot_radius/2,y2);z2r=(x2+(x2-x2l),y2);
%%pa= z2l--z1l & flex(z1l,z1t,z1r) & z1r--z2r--cycle; fill pa;
%pa= z2--z1l & flex(z1l,z1t,z1r) & z1r--z2--cycle; filldraw pa;
%filldraw pa  shifted(dot_radius+u,0);
%%fill pa  shifted(2dot_radius+u,0);
%endtchar; etest;

stest(pslash); telchar "punctuation virgule (slash)";
begintchar(p_slash_code,6u#,asc_height#,des_depth#,0,0,ur#);
p_slash_form;
sketch p_slash_p;
endtchar; etest;

stest(phash); telchar "punctuation hash mark (number sign)";
begintchar(p_hash_code,12u#,asc_height#,des_depth#,0,0,ur#);
numeric midpoint;
midpoint = (-des_depth+asc_height)/2;
lft z1=(0,midpoint+2u); rt z2=(w,y1);
lft z3=(0,midpoint-2u); rt z4=(w,y3);
bot z5=(2u,-d); top z6=(x5+4u,h);
z7=(x5+4u,y5); z8=(x7+4u,y6);
sketch z1--z2; sketch z3--z4;
sketch z5--z6; sketch z7--z8;
endtchar; etest;

%stest(pexcla); telchar "punctuation exclamation point";
%begintchar(p_excla_code,dot_radius#,asc_height#,0,0,0,ur#);
%pickup pencircle;
%z1=(dot_radius/2,dot_radius/2);  
%filldraw fullcircle scaled 2x1 shifted z1;
%z2=(x1,5*y1); z3 =(x1,h-y1);
%z2l=(x1-dot_radius/4,y2); z2r=(x1+dot_radius/4,y2);
%z3l=(0,y3);  z3r=(x1+dot_radius/2,y3);  z3t=(x1,h);
%filldraw z2l--z3l & flex(z3l,z3t,z3r) & z3r--z2r--cycle;
%endtchar; etest;

stest(pexcla); telchar "punctuation exclamation point";
begintchar(p_excla_code,dot_radius#,asc_height#,0,0,0,ur#);
z1=(dot_radius,dot_radius);  
fill_dot(1);
fill fullcircle scaled 2x1 shifted z1;
top z2=(x1,h); bot z3 =(x1,4*y1);
sketch z2--z3;
endtchar; etest;

stest(pasterisk); telchar "punctuation asterisk";
begintchar(p_asterisk_code,x_height#,x_height#,0,0,0,ur#);
z1=(1/2w,1/2h);
   for d=30 step 60 until 330:
   z[d]=z1+0.5 dir d xscaled w yscaled h;
   sketch z1--z[d];
   penlabels(z[d]);
   endfor;
endtchar; etest;

stest(pplus); telchar "punctuation plus";
begintchar(p_plus_code,x_height#,x_height#,0,0,0,ur#);
lft z1=(0,h/2);  rt z2=(w,y1);  top z3=(w/2,h);  bot z4=(x3,0);
sketch z1--z2;  sketch z3--z4;
endtchar; etest;


stest(plbracket); telchar "punctuation left bracket";
begintchar(p_lbracket_code,3u#,top_height#,bot_depth#,0,0,ur#);
p_lbracket_form;
sketch p_lbracket_p;
endtchar; etest;

stest(prbracket); telchar "punctuation right bracket";
begintchar(p_rbracket_code,3u#,top_height#,bot_depth#,0,0,ur#);
p_lbracket_form;
sketch p_lbracket_p shifted (-w,0) reflectedabout ((0,0),(0,h));
endtchar; etest;

stest(plparen); telchar "punctuation left parenthesis";
begintchar(p_lparen_code,3u#,top_height#,bot_depth#,0,0,ur#);
p_rparen_form;
sketch p_rparen_p shifted (-w,0) reflectedabout ((0,0),(0,h));
endtchar; etest;

stest(prparen); telchar "punctuation right parenthesis";
begintchar(p_rparen_code,3u#,top_height#,bot_depth#,0,0,ur#);
p_rparen_form;
sketch p_rparen_p;
endtchar; etest;

stest(plbrace); telchar "punctuation left brace";
begintchar(p_lbrace_code,4u#,top_height#,bot_depth#,0,0,ur#);
p_lbrace_form;
sketch p_lbrace_p;
endtchar; etest;

stest(prbrace); telchar "punctuation right brace";
begintchar(p_rbrace_code,4u#,top_height#,bot_depth#,0,0,ur#);
p_lbrace_form;
 sketch (p_lbrace_p shifted (-w,0) reflectedabout ((0,0),(0,h)) );
endtchar; etest;

stest(ppercent); telchar "punctuation percent sign";
begintchar(p_percent_code,6u#,asc_height#,des_depth#,0,0,ur#);
p_slash_form;
sketch p_slash_p;
z3=(3(x1+x2)/8,-d+7/8(h+d)); 
z4=(w-x3,-d+(h-y3));
sketch fullcircle scaled (1.5u) shifted z3;
sketch fullcircle scaled (1.5u) shifted z4;
endtchar; etest;

stest(pbslash); telchar "punctuation backslash";
begintchar(p_bslash_code,6u#,asc_height#,des_depth#,0,0,ur#);
p_slash_form;
sketch p_slash_p reflectedabout ((w/2,h),(w/2,0));
endtchar; etest;

stest(plbar); telchar "punctuation long bar";
begintchar(p_lbar_code,u#,asc_height#,des_depth#,0,0,ur#);
top z1=(w/2,h);  bot z2=(x1,-d);
sketch z1--z2;
endtchar; etest;

stest(phyphen); telchar "punctuation hyphen";
begintchar(p_hyphen_code,6u#,1/2x_height#,0,0,0,ur#);
top lft z1=(0,h);  top rt z2=(w,h);
sketch z1--z2;
endtchar; etest;

stest(plhyphen); telchar "punctuation long hyphen";
begintchar(p_lhyphen_code,9u#,1/2x_height#,0,0,0,ur#);
top lft z1=(0,h);  top rt z2=(w,h);
sketch z1--z2;
endtchar; etest;

stest(pvlhyphen); telchar "punctuation very long hyphen";
begintchar(p_vlhyphen_code,15u#,1/2x_height#,0,0,0,ur#);
top lft z1=(0,h);  top rt z2=(w,h);
sketch z1--z2;
endtchar; etest;

stest(pubar); telchar "punctuation underbar";
begintchar(p_ubar_code,x_height#,0,uh#,0,0,ur#);
bot lft z1=(0,-d);  bot rt z2=(w,-d);
sketch z1--z2;
endtchar;  etest;

stest(pquestion); telchar "punctuation question mark";
begintchar(p_question_code,6u#,asc_height#,0,0,0,ur#);
lft z1=(0,h-2dot_radius); top z2=(w/2,h);
rt z3=(w,y1); z4=(x2,1/2x_height);
z5=(x2,1/3(y2+y4));  z6=(x2,dot_radius);fill_dot(6);
sketch z1..z2..z3..z5..tension 1.5..z4;
endtchar; etest;

stest(pdollar); telchar "punctuation dollar sign";
begintchar(p_dollar_code,cb_ka_width#,x_height#+1.5uh#,1.5uh#,0,0,ur#);
cb_ka_form;
sketch z1..z2..z3..z4..z5..z6..z7;
top z11 = (w/2,h); bot z12 = (w/2,-d);
sketch z11--z12;
endtchar; etest;

stest(pgreater); telchar "punctuation greater than";
begintchar(p_greater_code,7u#,x_height#,0,0,0,ur#);
bot lft z1=(0,0);  top lft z2=(0,x_height);  rt z3=(w,1/2(y1+y2));
sketch z1--z3;  sketch z2--z3;
endtchar; etest;

stest(pless); telchar "punctuation less than";
begintchar(p_less_code,7u#,x_height#,0,0,0,ur#);
bot rt z1=(w,0);  top rt z2=(w,x_height);  lft z3=(0,1/2(y1+y2));
sketch z1--z3;  sketch z2--z3;
endtchar; etest;

stest(pat); telchar "punctuation at sign";
begintchar(p_at_code,10u#,asc_height#,0,0,0,ur#);
z1=(w/2,3/4h);  z2=(1/5w,1/2h);
z3=(x1,1/4h);   z4=(4/5w,5/8h);
z5=(4/5w,3/8h); z6=(9/10w,y3);
rt z7=(w,y2); top z8=(x1,h);
lft z9=(0,y2);   bot z10=(x1,0);   rt z11=(x7,1/8h);
sketch z5..z3..z2..z1..z4&z4--z5& z5..z6..z7{up}..{left}z8..z9..z10..z11;
endtchar; etest;

stest(ptilde); telchar "punctuation tilde sign";
begintchar(p_tilde_code,9u#,asc_height#,0,0,0,ur#);
top lft z1=(0,asc_height2); top z2=(w/3,h); 
z3=(2/3w,y1); top rt z4=(w,y2);
sketch z1..z2..z3..z4;
endtchar; etest;

stest(phat); telchar "punctuation circumflex(hat)";
begintchar(p_hat_code,5u#,asc_height#,0,0,0,ur#);
lft z1=(0,asc_height1);  rt z2=(w,y1);  top z3=(1/2(x1+x2),h);
sketch z1--z3;  sketch z3--z2;
endtchar;  etest;

stest(pampersand); telchar "punctuation ampersand";
begintchar(p_ampersand_code,11u#,asc_height#,0,0,0,ur#);
rt z11=(w,1/4x_height);  bot z10=(3/4w,0);
z1=(x10+u,x_height); y1a=y1; x1-x1a=w-x1; rt z1b=(w,x_height);
bot z2=(w/4,0);lft z3=(0,y11);   z4=(w/8,1/2x_height+uh);
z5=(x2,3/4x_height);   z6=(w/2,asc_height1);
top z7=(5/12w,h);  z8=(5/24w,y6);  %z9=(x7,1/2x_height);
sketch z1a--z1b;  
sketch z1..{left}z2..z3..z4..z5..z6..z7..z8..z5..z10..z11;
penlabels (1a,1b);
endtchar; etest;

% ---------------- end of punctuation ------------