summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/archaic/copsn10.mf
blob: 5cba60ec790b43bba246f7042e986ccbac148944 (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
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
%%
%% This is file `copsn10.mf',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% oldprsn.dtx  (with options: `up')
%% ------------------------------------------------------------------
%%   Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
%%   Copyright 1999--2005 Peter R. Wilson
%% 
%%   This work may be distributed and/or modified under the
%%   conditions of the Latex Project Public License, either
%%   version 1.3 of this license or (at your option) any
%%   later version.
%%   The latest version of the license is in
%%     http://www.latex-project.org/lppl.txt
%%   and version 1.3 or later is part of all distributions of
%%   LaTeX version 2003/06/01 or later.
%% 
%%   This work has the LPPL maintenance status "author-maintained".
%% 
%%   This work consists of the files listed in the README file.
%% ------------------------------------------------------------------
%%% COPSN10.MF  Computer Old Persian Cuneiform font 10 point design size.


font_identifier:="oldprsn"; font_size 10pt#;

u#:=.2pt#;                 % unit width
ht#:=8pt#;                 % height of characters (CM cap-height is approx 6.8pt)
s#:=1.5pt#;                % width correction (right and left)
o#:=1/20pt#;               % overshoot
px#:=.4pt#;                % horizontal width of pen
font_normal_space:=7pt#;   % width of a blank space
font_normal_shrink:=.9pt#; % width correction for blank space
font_x_height:=4.5pt#;     % height of one ex
font_quad:=10pt#;          % an em

font_coding_scheme:="Old Persian glyphs";
mode_setup;

ho#:=o#;                   % horizontal overshoot
leftloc#:=s#;              % leftmost xcoord of character
py#:=px#;                % vertical thickness of the pen

define_pixels(s,u);
define_blacker_pixels(px,py);
define_good_x_pixels(leftloc);
define_corrected_pixels(o);             % turn on overshoot correction
define_horizontal_corrected_pixels(ho);

numeric midloc, rightloc, aw;
pickup pencircle xscaled px yscaled py;
stylus:=savepen;

numeric trht, trbs;
numeric th, tb;
th = 6/24; tb = 8/24;
numeric wiht, wibs;
numeric wh, wb;
wh = 10/24; wb = 20/24;
def beginglyph(expr code, unit_width) =
  beginchar(code, unit_width*ht#+2s#, ht#, 0);
  midloc:=1/2w; rightloc:=(w-s); aw := rightloc-leftloc;
  trht := th*h; trbs := tb*h;
  wiht := wh*h; wibs := wb*h;
  pickup stylus enddef;

let cmchar=\;


def triangle(suffix $)(expr ht, bs, ang) =
  path pth[];
  pair pr[];
  pr1 := (x$-ht,y$);  % midpoint of base in default position
  pr2 := pr1 shifted (1/2bs*up);   % base points
  pr3 := pr1 shifted (1/2bs*down);
  z$trl = pr2 rotatedaround(z$, ang);
  z$trr = pr3 rotatedaround(z$, ang);
  z$trc = 1/2[z$trl,z$trr];
  z$tic = 1/2[z$,z$trc];
  pth$ := z$--z$trl--z$trr--cycle;
enddef;


def trir(suffix $)(expr ht, bs) =
  path pth[];
  z$trc = (x$-ht, y$);              % midpoint of base
  z$trl = (x$trc, y$trc+1/2bs);     % base points
  z$trr = (x$trc, y$trc-1/2bs);
  z$tic = 1/2[z$,z$trc];
  pth$ := z$--z$trl--z$trr--cycle;
enddef;


def triu(suffix $)(expr ht, bs) =
  path pth[];
  z$trc = (x$, y$-ht);         % midpoint of base
  z$trl = (x$-1/2bs, y$trc);   % base points
  z$trr = (x$+1/2bs, y$trc);   % base points
  z$tic = 1/2[z$,z$trc];
  pth$ := z$--z$trl--z$trr--cycle;
enddef;


def tril(suffix $)(expr ht, bs) =
  path pth[];
  z$trc = (x$+ht, y$);              % midpoint of base
  z$trl = (x$trc, y$trc-1/2bs);     % base points
  z$trr = (x$trc, y$trc+1/2bs);
  z$tic = 1/2[z$,z$trc];
  pth$ := z$--z$trl--z$trr--cycle;
enddef;


def tril(suffix $)(expr ht, bs) =
  path pth[];
  z$trc = (x$+ht, y$);              % midpoint of base
  z$trl = (x$trc, y$trc-1/2bs);     % base points
  z$trr = (x$trc, y$trc+1/2bs);
  z$tic = 1/2[z$,z$trc];
  pth$ := z$--z$trl--z$trr--cycle;
enddef;


def trid(suffix $)(expr ht, bs) =
  path pth[];
  z$trc = (x$, y$+ht);         % midpoint of base
  z$trl = (x$+1/2bs, y$trc);   % base points
  z$trr = (x$-1/2bs, y$trc);   % base points
  z$tic = 1/2[z$,z$trc];
  pth$ := z$--z$trl--z$trr--cycle;
enddef;


def wing(suffix $)(expr ht, bs, ang) =
  path pth[];
  pair pr[];
  pr1 := (x$+ht,y$);  % midpoint of base in default position
  pr2 := pr1 shifted (1/2bs*down);   % base points
  pr3 := pr1 shifted (1/2bs*up);
  pr4 := pr1 rotatedaround(z$, ang);
  z$wil = pr2 rotatedaround(z$, ang);
  z$wir = pr3 rotatedaround(z$, ang);
  z$wic = 1/2[z$,pr4];
  pth$ := z$--z$wil{(z$wic-z$wil)}..z$wic..{(z$wir-z$wic)}z$wir--cycle;
enddef;


def wingl(suffix $)(expr ht, bs) =
  path pth[];
  z$wil = (x$+ht, y$-1/2bs);      % base points
  z$wir = (x$wil, y$+1/2bs);
  z$wic = (1/2[x$,x$wil], y$);    % midpoint of base curve
  pth$ := z$--z$wil{(z$wic-z$wil)}..z$wic..{(z$wir-z$wic)}z$wir--cycle;
enddef;


def wingd(suffix $)(expr ht, bs) =
  path pth[];
  z$wil = (x$+1/2bs, y$+ht);      % base points
  z$wir = (x$-1/2bs, y$wil);
  z$wic = (x$, 1/2[y$,y$wil]);    % midpoint of base curve
  pth$ := z$--z$wil{(z$wic-z$wil)}..z$wic..{(z$wir-z$wic)}z$wir--cycle;
enddef;


def wingr(suffix $)(expr ht, bs) =
  path pth[];
  z$wil = (x$-ht, y$+1/2bs);      % base points
  z$wir = (x$wil, y$-1/2bs);
  z$wic = (1/2[x$,x$wil], y$);    % midpoint of base curve
  pth$ := z$--z$wil{(z$wic-z$wil)}..z$wic..{(z$wir-z$wic)}z$wir--cycle;
enddef;


def wingu(suffix $)(expr ht, bs) =
  path pth[];
  z$wil = (x$-1/2bs, y$-ht);      % base points
  z$wir = (x$+1/2bs, y$wil);
  z$wic = (x$, 1/2[y$,y$wil]);    % midpoint of base curve
  pth$ := z$--z$wil{(z$wic-z$wil)}..z$wic..{(z$wir-z$wic)}z$wir--cycle;
enddef;

cmchar "Old Persian letter a";
beginglyph("a", (3tb+2th));
  z1trl=(leftloc,h);                   % top pin
  trir(1, trht, trbs); fill pth1;
  z1'=(rightloc,y1); draw z1tic--z1';
  z12trc=(midloc,y1trr);               % middle pin
  trid(12, trht, trbs); fill pth12;
  z12'=(x12,0); draw z12tic--z12';
  z11trl=z12trr;                       % left pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z13trr=z12trl;                       % right pin
  trid(13, trht, trbs); fill pth13;
  z13'=(x13,0); draw z13tic--z13';
  labels(1,11,12,13);
endchar;

cmchar "Old Persian letter i";
beginglyph("i", (2tb));        %% 3tb too large
  z1trl=(leftloc,h);                   % top pin
  trir(1, trht, trbs); fill pth1;
  z1'=(rightloc,y1); draw z1tic--z1';
  z11trr=z1trr;                        % left pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z12trr=z11trl;                       % middle pin
  trid(12, trht, trbs); fill pth12;
  z12'=(x12,0); draw z12tic--z12';
  z2trc=(x11trl,y1);                   % second top head
  trir(2, trht, trbs); fill pth2;
  labels(1,2,11,12,13);
endchar;

cmchar "Old Persian letter u";
beginglyph("u", (2tb+wh));     %% 3tb+wh too large
  z31=(leftloc,1/2h);                  % left wing
  wingl(31, wiht, wibs); fill pth31;
  z1trl=(x31wil,h);                   % top pin
  trir(1, trht, trbs); fill pth1;
  z1'=(rightloc,y1); draw z1tic--z1';
  z11trr=z1trr;                        % left pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z12trr=z11trl;                       % middle pin
  trid(12, trht, trbs); fill pth12;
  z12'=(x12,0); draw z12tic--z12';
  labels(1,2,11,12,13);
endchar;

cmchar "Old Persian syllable ka (k)";
beginglyph("k", (3tb));         %% 4tb too large
  z1trr=(leftloc,h);                       % left pin
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  z11trr=(x1trl,1/2h);                     % top pin
  trir(11, trht, trbs); fill pth11;
  z11'=(rightloc,y11); draw z11tic--z11';
  z12trl=z11trr;                           % bottom pin
  trir(12, trht, trbs); fill pth12;
  z12'=(rightloc,y12); draw z12tic--z12';
  labels(1,11,12);
endchar;

cmchar "Old Persian syllable ku (K)";
beginglyph("K", (tb+wh));
  z1=(leftloc,1/2h);                       % wing
  wingl(1, wiht, wibs); fill pth1;
  z2trr=(x1wil,h);                         % pin
  trid(2, trht, trbs); fill pth2;
  z2'=(x2,0); draw z2tic--z2';
  labels(1,2);
endchar;

cmchar "Old Persian syllable xa (x)";
beginglyph("x", (2tb+2wh));
  z1=(leftloc,1/2h);                       % left wing
  wingl(1, wiht, wibs); fill pth1;
  z2=(x1wil,y1);                           % right wing
  wingl(2, wiht, wibs); fill pth2;
  z11trr=(x2wil,h);                       % left pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z12trr=z11trl;                           % right pin
  trid(12, trht, trbs); fill pth12;
  z12'=(x12,0); draw z12tic--z12';
  labels(1,2,11,12);
endchar;

cmchar "Old Persian syllable ga (g)";
beginglyph("g", (3tb+wh));
  z1=(leftloc,1/2h);                      % wing
  wingl(1, wiht, wibs); fill pth1;
  z11trr=(x1wil,h);                       % left pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z12trr=z11trl;                           % right pin
  trid(12, trht, trbs); fill pth12;
  z12'=(x12,0); draw z12tic--z12';
  z21trc=(x12trl,y1);                      % small pin
  trir(21, trht, trbs); fill pth21;
  z21'=(rightloc,y21); draw z21tic--z21';
  labels(1,2,11,12,21);
endchar;

cmchar "Old Persian syllable gu (G)";
beginglyph("G", (2tb+th+wh));  %% 3tb+wh too large
  z1=(leftloc,1/2h);                      % wing
  wingl(1, wiht, wibs); fill pth1;
  z12trc=(x1wil, 1/2h);                   % middle pin
  trir(12, trht, trbs); fill pth12;
  z12'=(rightloc,y12); draw z12tic--z12';
  z13trl=z12trr;                          % bottom pin
  trir(13, trht, trbs); fill pth13;
  z13'=(rightloc,y13); draw z13tic--z13';
  z11trr=z12trl;                          % top pin
  trir(11, trht, trbs); fill pth11;
  z11'=(rightloc,y11); draw z11tic--z11';
  z111trc=1/2[z11trc,z11'];
  trir(111, trht, trbs); fill pth111;
  labels(1,2,3,4,5,6,11,12,13,111);
endchar;

cmchar "Old Persian syllable ca (c)";
beginglyph("c", (4tb));
  z1trl=(leftloc,h);                      % top pin
  trir(1, trht, trbs); fill pth1;
  z11trr=(x1, y1trr);                     % left pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z12trr=z11trl;                          % middle pin
  trid(12, trht, trbs); fill pth12;
  z12'=(x12,0); draw z12tic--z12';
  z2trl=z12trl;                           % bottom pin
  trir(2, trht, trbs); fill pth2;
  z2'=(rightloc,y2); draw z2tic--z2';
  z1'=(x2trl,y1); draw z1tic--z1';        % body of top pin
  labels(1,2,3,4,5,6,11,12,13);
endchar;

cmchar "Old Persian syllable ja (j)";
beginglyph("j", (th+tb+wh));
  z1trc=(leftloc,1/2h);                   % hor pin
  trir(1, trht, trbs); fill pth1;
  z2=(rightloc-wiht,y1);                  % wing
  wingl(2, wiht, wibs); fill pth2;
  draw z1tic--z2;
  z11trc=(1/2[x1,x2], h);                 % vert pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  labels(1,2,3,4,11,12,13);
endchar;

cmchar "Old Persian syllable ji (J)";
beginglyph("J",(7/2tb+wh));        %% 4tb+wh too large
  z1trc=(leftloc, 1/2h);            % left pin
  trir(1, trht, trbs); fill pth1;
  z2=(x1+trbs, y1);                 % wing
  draw z1tic--z2;
  wingl(2, wiht, wibs); fill pth2;
  z12trc=(x2wil,y1);                % middle pin
  trir(12, trht, trbs); fill pth12;
  z12'=(rightloc, y12); draw z12tic--z12';
  z11trr=z12trl;                    % top pin
  trir(11, trht, trbs); fill pth11;
  z11'=(rightloc, y11); draw z11tic--z11';
  z13trl=z12trr;                    % bottom pin
  trir(13, trht, trbs); fill pth13;
  z13'=(rightloc, y13); draw z13tic--z13';
  labels(1,2,3,4,5,6,7,8,9,10,11,12,13);
endchar;

cmchar "Old Persian syllable ta (t)";
beginglyph("t", (4tb+th));    %% 5tb too large
  z3trl=(rightloc,h);               % right pin
  trid(3, trht, trbs); fill pth3;
  z3'=(x3,0); draw z3tic--z3';
  z1trl=(x3trr-trbs,h);            % left pin
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  z11trr=(leftloc,1/2h);            % top pin
  trir(11, trht, trbs); fill pth11;
  z11'=(x1,y11); draw z11tic--z11';
  z12trl=z11trr;                    % bottom pin
  trir(12, trht, trbs); fill pth12;
  z12'=(x1,y12); draw z12tic--z12';
  z2trc=(1/2[x1,x3], y11trl);       % middle pin
  trid(2, trht, trbs); fill pth2;
  z2'=(x2,0); draw z2tic--z2';
  labels(1,2,3,4,5,6,7,8,9,10,11,12);
endchar;

cmchar "Old Persian syllable tu (T)";
beginglyph("T", (4tb+th));   %% 5tb too large
  z1trr=(leftloc,h);                 % left pin
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  z2trr=z1trl;                       % center pin
  trid(2, trht, trbs); fill pth2;
  z2'=(x2,0); draw z2tic--z2';
  z3trr=z2trl;                       % right pin
  trid(3, trht, trbs); fill pth3;
  z3'=(x3,0); draw z3tic--z3';
  z11trl=(x3trl, 1/2h);              % short hor pin
  trir(11, trht, trbs); fill pth11;
  z11'=(rightloc,y11); draw z11tic--z11';
  labels(1,2,3,11);
endchar;

cmchar "Old Persian syllable tha (o)";
beginglyph("o", (2tb+wh));
  z1trr=(leftloc,h);                     % left pin
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  z2=(x1,1/2h);                          % wing
  wingl(2, wiht, wibs); fill pth2;
  z3trr=(x2wil,h);                       % right pin
  trid(3, trht, trbs); fill pth3;
  z3'=(x3,0); draw z3tic--z3';
  labels(1,2,3);
endchar;

cmchar "Old Persian syllable c(cedilla)a (C)";
beginglyph("C", (2tb));
  z1trl=(leftloc,h);                   % top pin
  trir(1, trht, trbs); fill pth1;
  z1'=(rightloc,y1); draw z1tic--z1';
  z2trl=z1trr;                         % center pin
  trir(2, trht, trbs); fill pth2;
  z2'=(rightloc,y2); draw z2tic--z2';
  z11trr=z2trr;                        % left pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z12trr=z11trl;                       % right pin
  trid(12, trht, trbs); fill pth12;
  z12'=(x12,0); draw z12tic--z12';
  labels(1,2,11,12);
endchar;

cmchar "Old Persian syllable da (d)";
beginglyph("d", (2tb));
  z1trl=(leftloc,h);                   % top pin
  trir(1, trht, trbs); fill pth1;
  z1'=(rightloc,y1); draw z1tic--z1';
  z11trr=z1trr;                        % left pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z12trr=z11trl;                       % right pin
  trid(12, trht, trbs); fill pth12;
  z12'=(x12,0); draw z12tic--z12';
  labels(1,2,11,12);
endchar;

cmchar "Old Persian syllable di (P)";
beginglyph("P", (3tb+th));   %% 4tb too large
  z2trl=(rightloc,h);                  % right pin
  trid(2, trht, trbs); fill pth2;
  z2'=(x2,0); draw z2tic--z2';
  z1trl=z2trr;                         % left pin
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  z12trc=(leftloc,1/2h);               % center pin
  trir(12, trht, trbs); fill pth12;
  z12'=(x1,y12); draw z12tic--z12';
  z11trr=z12trl;                       % top pin
  trir(11, trht, trbs); fill pth11;
  z11'=(x1,y11); draw z11tic--z11';
  z13trl=z12trr;                       % bottom pin
  trir(13, trht, trbs); fill pth13;
  z13'=(x1,y13); draw z13tic--z13';
  labels(1,2,11,12,13);
endchar;

cmchar "Old Persian syllable du (D)";
beginglyph("D", (2tb+th+wh));   %% 3tb+wh too large
  z1=(leftloc,h/2);                     % wing
  wingl(1, wiht, wibs); fill pth1;
  z2trl=(rightloc,h);                   % right pin
  trid(2, trht, trbs); fill pth2;
  z2'=(x2,0); draw z2tic--z2';
  z12trc=(x1wil,h/2);                   % center pin
  trir(12, trht, trbs); fill pth12;
  z12'=(x2,y12); draw z12tic--z12';
  z11trr=z12trl;                       % top pin
  trir(11, trht, trbs); fill pth11;
  z11'=(x2,y11); draw z11tic--z11';
  z13trl=z12trr;                       % bottom pin
  trir(13, trht, trbs); fill pth13;
  z13'=(x2,y13); draw z13tic--z13';
  labels(1,2,11,12,13);
endchar;

cmchar "Old Persian syllable na (n)";
beginglyph("n", (2tb+wh));
  z1=(rightloc-wiht, h/2);                  % wing
  wingl(1, wiht, wibs); fill pth1;
  z11trr=(leftloc,h/2);                     % top pin
  trir(11, trht, trbs); fill pth11;
  z11'=(x1,y11); draw z11tic--z11';
  z12trl=z11trr;                            % bottom pin
  trir(12, trht, trbs); fill pth12;
  z12'=(x1,y12); draw z12tic--z12';
  labels(1,11,12);
endchar;

cmchar "Old Persian syllable nu (N)";
beginglyph("N", (2tb+2wh));
  z1=(leftloc, h/2);                        % left wing
  wingl(1, wiht, wibs); fill pth1;
  z2=(x1wil, y1);                           % right wing
  wingl(2, wiht, wibs); fill pth2;
  z11trr=(x2wil,h/2);                       % top pin
  trir(11, trht, trbs); fill pth11;
  z11'=(rightloc,y11); draw z11tic--z11';
  z12trl=z11trr;                            % bottom pin
  trir(12, trht, trbs); fill pth12;
  z12'=(rightloc,y12); draw z12tic--z12';
  labels(1,2,11,12);
endchar;

cmchar "Old Persian syllable pa (p)";
beginglyph("p", (2tb));
  z1trc=(leftloc,h);                       % top pin
  trir(1, trht, trbs); fill pth1;
  z1'=(rightloc,y1); draw z1tic--z1';
  z2trl=(x1,y1);                        % middle pin
  trir(2, trht, trbs); fill pth2;
  z2'=(rightloc,y2); draw z2tic--z2';
  z3trl=(x1trc,y2);                     % bottom pin
  trir(3, trht, trbs); fill pth3;
  z3'=(rightloc,y3); draw z3tic--z3';
  z11trr=z3trr;                      % left pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z12trr=z11trl;                           % right pin
  trid(12, trht, trbs); fill pth12;
  z12'=(x12,0); draw z12tic--z12';
  labels(1,2,3,11,12);
endchar;

cmchar "Old Persian syllable fa (f)";
beginglyph("f", (tb+2wh));
  z1trr=(leftloc,h);                      % left pin
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  z11=(x1,h/2);                           % left wing
  wingl(11, wiht, wibs); fill pth11;
  z12=(x11wil,y11);                       % right wing
  wingl(12, wiht, wibs); fill pth12;
  labels(1,11,12);
endchar;

cmchar "Old Persian syllable ba (b)";
beginglyph("b", (3tb));
  z1trl=(rightloc,h);                   % right pin
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  z11trr=(leftloc,h/2);                 % top pin
  trir(11, trht, trbs); fill pth11;
  z11'=(x1,y11); draw z11tic--z11';
  z12trl=z11trr;                        % bottom pin
  trir(12, trht, trbs); fill pth12;
  z12'=(x1,y12); draw z12tic--z12';
  labels(1,11,12);
endchar;

cmchar "Old Persian syllable ma (m)";
beginglyph("m", (4tb+th));   %% 5tb too large
  z3trl=(rightloc,h);                  % right pin
  trid(3, trht, trbs); fill pth3;
  z3'=(x3,0); draw z3tic--z3';
  z2trl=(x3trr,y3);                    % center pin
  trid(2, trht, trbs); fill pth2;
  z2'=(x2,0); draw z2tic--z2';
  z1trl=(x2trr,h);                     % left pin
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  z11trc=(leftloc, h/2);               % hor pin
  trir(11, trht, trbs); fill pth11;
  z11'=(x1,y11); draw z11tic--z11';
  labels(1,2,3,11);
endchar;

cmchar "Old Persian syllable mi (w)";
beginglyph("w", (2tb+wh));
  z1trr=(leftloc,h);                 % left pin
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  z2=(x1,h/2);                       % wing
  wingl(2, wiht, wibs); fill pth2;
  z11trr=(x2wil, h/2);               % top pin
  trir(11, trht, trbs); fill pth11;
  z11'=(rightloc,y11); draw z11tic--z11';
  z12trl=z11trr;                     % bottom pin
  trir(12, trht, trbs); fill pth12;
  z12'=(rightloc,y12); draw z12tic--z12';
  labels(1,2,11,12);
endchar;

cmchar "Old Persian syllable mu (M)";
beginglyph("M", (5tb+wh));
  z5trc=(rightloc-2trbs, h/2);          % right pin
  trir(5, trht, trbs); fill pth5;
  z5'=(rightloc,y5); draw z5tic--z5';
  z4=(x5trc-wiht,y5);                   % wing
  wingl(4, wiht, wibs); fill pth4;
  z2trc=(leftloc+trht,y5);              % middle pin
  trir(2, trht, trbs); fill pth2;
  z2'=z4; draw z2tic--z2';
  z1trr=(leftloc,y2trl);                % top pin
  trir(1, trht, trbs); fill pth1;
  z1'=(3/4[x1,x2'],y1); draw z1tic--z1';
  z3trl=(leftloc,y2trr);                % bottom pin
  trir(3, trht, trbs); fill pth3;
  z3'=(x1',y3); draw z3tic--z3';
  labels(1,2,3,4);
endchar;

cmchar "Old Persian syllable ya (y)";
beginglyph("y", (2tb+wh));
  z1trr=(leftloc,h);                 % left pin
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  z2=(x1,h/2);                       % wing
  wingl(2, wiht, wibs); fill pth2;
  z11trc=(x2wil, h/2);               % right pin
  trir(11, trht, trbs); fill pth11;
  z11'=(rightloc,y11); draw z11tic--z11';
  labels(1,2,11,12);
endchar;

cmchar "Old Persian syllable ra (r)";
beginglyph("r", (3tb+th));   %% 4tb too large
  z11trl=(rightloc, h);                 % right pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z2trc=(leftloc+trht,h/2);              % middle pin
  trir(2, trht, trbs); fill pth2;
  z2'=(x11,y2); draw z2tic--z2';
  z1trr=(leftloc,y2trl);                % top pin
  trir(1, trht, trbs); fill pth1;
  z1'=(x2',y1); draw z1tic--z1';
  z3trl=(leftloc,y2trr);                % bottom pin
  trir(3, trht, trbs); fill pth3;
  z3'=(x2',y3); draw z3tic--z3';
  labels(1,2,3,4);
endchar;

cmchar "Old Persian syllable ru (R)";
beginglyph("R", (tb+th+2wh));  %% 2tb+2wh too large
  z3=(rightloc-wiht,h/2);               % right wing
  wingl(3, wiht, wibs); fill pth3;
  z2=(x3-wiht,y3);                      % left wing
  wingl(2, wiht, wibs); fill pth2;
  z1trc=(leftloc,y3);                   % pin
  trir(1, trht, trbs); fill pth1;
  z1'=z2; draw z1tic--z1';
  labels(1,2,3);
endchar;

cmchar "Old Persian syllable la (l)";
beginglyph("l", (3tb+th));  %% 4tb too large
  z11trl=(rightloc,h);                    % right pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z2trc=(leftloc,h/2);                  % middle pin
  trir(2, trht, trbs); fill pth2;
  z2'=(x11,y2); draw z2tic--z2';
  z1trr=(x2,y2trl);                % top pin
  trir(1, trht, trbs); fill pth1;
  z1'=(x2',y1); draw z1tic--z1';
  z3trl=(x1trr,y2trr);                % bottom pin
  trir(3, trht, trbs); fill pth3;
  z3'=(x2',y3); draw z3tic--z3';
  labels(1,2,3,11);
endchar;

cmchar "Old Persian syllable va (v)";
beginglyph("v", (5tb));
  z11trc=(leftloc,h/2);                    % left hor pin
  trir(11, trht, trbs); fill pth11;
  z11'=(x11+trbs,y11); draw z11tic--z11';
  z12trc=(x11',h);                         % vert pin
  trid(12, trht, trbs); fill pth12;
  z12'=(x12,0); draw z12tic--z12';
  z2=(x12+1/2trbs+2trht, h/2);             % middle pin
  trir(2, trht, trbs); fill pth2;
  z2'=(rightloc,y2); draw z2tic--z2';
  z1trr=(x2trc-trht,y2trl);                % top pin
  trir(1, trht, trbs); fill pth1;
  z1'=(x2',y1); draw z1tic--z1';
  z3trl=(x1trr,y2trr);                % bottom pin
  trir(3, trht, trbs); fill pth3;
  z3'=(x2',y3); draw z3tic--z3';
  labels(1,2,3,11);
endchar;

cmchar "Old Persian syllable vi (V)";
beginglyph("V", (2tb));
  z1trl=(midloc,1/3h);               % left pin
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  z2trr=z1trl;                       % right pin
  trid(2, trht, trbs); fill pth2;
  z2'=(x2,0); draw z2tic--z2';
  z3trc=(x1trl,h);                   % top pin
  trid(3, trht, trbs); fill pth3;
  z3'=(x3,y1trl); draw z3tic--z3';
  z11trc=(leftloc, 1/2[y1trl,y3trl]);  % hor pin
  trir(11, trht, trbs); fill pth11;
  z11'=(rightloc,y11); draw z11tic--z11';
  labels(1,2,3,4,11);
endchar;

cmchar "Old Persian syllable sa (s)";
beginglyph("s", (3tb+th));  %% 4tb too large
  z12trr=(leftloc,h);                         % vert pin
  trid(12, trht, trbs); fill pth12;
  z12'=(x12,0); draw z12tic--z12';
  z2=(x12+1/2trbs+2trht, h/2);             % middle pin
  trir(2, trht, trbs); fill pth2;
  z2'=(rightloc,y2); draw z2tic--z2';
  z1trr=(x2trc-trht,y2trl);                % top pin
  trir(1, trht, trbs); fill pth1;
  z1'=(x2',y1); draw z1tic--z1';
  z3trl=(x1trr,y2trr);                % bottom pin
  trir(3, trht, trbs); fill pth3;
  z3'=(x2',y3); draw z3tic--z3';
  labels(1,2,3,11,12);
endchar;

cmchar "Old Persian syllable sva (S)";
beginglyph("S", (2wh));
  z1=(leftloc,1/2wibs);                 % left wing
  wingl(1, wiht, wibs); fill pth1;
  z2=(x1+wiht,y1);                      % right wing
  wingl(2, wiht, wibs); fill pth2;
  z3trl=(leftloc,h);                    % pin
  trir(3, trht, trbs); fill pth3;
  z3'=(rightloc,y3); draw z3tic--z3';
  labels(1,2,3);
endchar;

cmchar "Old Persian syllable za (z)";
beginglyph("z", (4tb));
  z1trr=(leftloc,h);                    % left pin
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  z2trl=(rightloc,h);                    % right pin
  trid(2, trht, trbs); fill pth2;
  z2'=(x2,0); draw z2tic--z2';
  z11trc=(x1trl,h/2);                    % hor pins
  trir(11, trht, trbs); fill pth11;
  z11'=(x2trr,y11); draw z11tic--z11';
  z12trc=1/2[z11trc,z11'];
  trir(12, trht, trbs); fill pth12;
  labels(1,2,11);
endchar;

cmchar "Old Persian syllable ha (h)";
beginglyph("h", (2tb+2wh));
  z1=(leftloc,h/2);                % left wing
  wingl(1, wiht, wibs); fill pth1;
  z2=(rightloc-wiht,y1);            % right wing
  wingl(2, wiht, wibs); fill pth2;
  z11trr=(x1wil,y1);                % top pin
  trir(11, trht, trbs); fill pth11;
  z11'=(x2,y11); draw z11tic--z11';
  z12trl=z11trr;                    % bottom pin
  trir(12, trht, trbs); fill pth12;
  z12'=(x2,y12); draw z12tic--z12';
  labels(1,2,11,12);
endchar;

cmchar "Old Persian word: king (X)";
beginglyph("X", (3tb+2wh));
  z4=(rightloc-wiht, h/2);                  % right wing
  wingl(4, wiht, wibs); fill pth4;
  z11trc=(x4,h);                           % center vert pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z3wir=(x11trr,y4wir);                    % left wing
  wingl(3, wiht, wibs); fill pth3;
  z1trr=(leftloc,y4);                      % top pin
  trir(1, trht, trbs); fill pth1;
  z1'=(x3,y1); draw z1tic--z1';
  z2trl=z1trr;                             % bottom pin
  trir(2, trht, trbs); fill pth2;
  z2'=(x1',y2); draw z2tic--z2';
  labels(1,2,3,4,11);
endchar;

cmchar "Old Persian word: country (version a) (q)";
beginglyph("q", (9/4tb+wh));  %% 5/2tb+wh too large
  numeric n[];
  n1 := 1/2wiht;
  n2 := 1/2wibs;
  z12trl=(rightloc,h);                    % right pin
  trid(12, trht, trbs); fill pth12;
  z12'=(x12,0); draw z12tic--z12';
  z11trl=z12trr;                          % left pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z1=(leftloc, h-1/2n2);                  % top left wing
  wingl(1, n1, n2); fill pth1;
  z2=(x1wil, y1);                         % top right wing
  wingl(2, n1, n2); fill pth2;
  z3=(x1, 1/2n2);                         % bottom left wing
  wingl(3, n1, n2); fill pth3;
  z4=(x2, y3);                            % bottom right wing
  wingl(4, n1, n2); fill pth4;
  labels(1,2,3,4,11,12);
endchar;

cmchar "Old Persian word: country (version b) (Q)";
beginglyph("Q", (5/4tb+wh));  %% 3/2tb+wh too large
  numeric n[];
  n1 := 1/2wiht;
  n2 := 1/2wibs;
  z11trl=(rightloc,h);                    % right pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  z1=(leftloc, h-1/2n2);                  % top left wing
  wingl(1, n1, n2); fill pth1;
  z2=(x1wil, y1);                         % top right wing
  wingl(2, n1, n2); fill pth2;
  z3=(x1, 1/2n2);                         % bottom left wing
  wingl(3, n1, n2); fill pth3;
  z4=(x2, y3);                            % bottom right wing
  wingl(4, n1, n2); fill pth4;
  labels(1,2,3,4,11,12);
endchar;

cmchar "Old Persian word: earth (L)";
beginglyph("L", (3wh));
  z1=(leftloc, wiht);              % left wing
  wingl(1, wiht, wibs); fill pth1;
  z2=(x1wil, y1);                  % center wing
  wingl(2, wiht, wibs); fill pth2;
  z3=(x2wil, y1);                  % right wing
  wingl(3, wiht, wibs); fill pth3;
  z11trr=(x1,y1wir);               % top pin
  trir(11, trht, trbs); fill pth11;
  z11'=(rightloc,y11); draw z11tic--z11';
  z12trc=(x2,y11);
  trir(12, trht, trbs); fill pth12;
  z13trc=(x3,y11);
  trir(13, trht, trbs); fill pth13;
  labels(1,2,3,11,12,13);
endchar;

cmchar "Old Persian word: god (B)";
beginglyph("B", (2tb+2wh));
  z4=(rightloc-wiht, h/2);       % right wing
  wingl(4, wiht, wibs); fill pth4;
  z3=(x4-wiht, y4);              % left wing
  wingl(3, wiht, wibs); fill pth3;
  z1trc=(leftloc,y4);            % pin
  trir(1, trht, trbs); fill pth1;
  z1'=z3; draw z1tic--z1';
  z2trc=1/2[z1trc,z1'];
  trir(2, trht, trbs); fill pth2;
  labels(1,2,3,4);
endchar;

cmchar "Old Persian word: Auramazda (version a) (e)";
beginglyph("e", (3tb+wh));
  z43=(rightloc-wiht, h/2);       % wing
  wingl(43, wiht, wibs); fill pth43;
  z46trc=(x43,h);                 % vert pin
  trid(46, trht, trbs); fill pth46;
  z46'=(x46,0); draw z46tic--z46';
  z14trr=(leftloc,h/2);           % pin 3
  trir(14, trht, trbs); fill pth14;
  z14'=(x46,y14); draw z14tic--z14';
  z24trc=1/2[z14trc,z14']; z34trc=2/3[z14trc,z14'];
  trir(24, trht, trbs); fill pth24;

  z12trl=z14trr;                  % pin 2
  trir(12, trht, trbs); fill pth12;
  z12'=(x46,y12); draw z12tic--z12';
  z22=(x24,y12); z32=(x34,y12);
  trir(22, trht, trbs); fill pth22;

  labels(12,14,21,22,23,24,25,31,32,33,34,35,41,42,43,44,45,46);
endchar;

cmchar "Old Persian word: Auramazda (version b) (E)";
beginglyph("E", (4tb));
%%  z43=(rightloc-wiht, h/2);       % wing
%%  wingl(43, wiht, wibs); fill pth43;
  z46trc=(rightloc,h+trht);                 % vert pin
  trid(46, trht, trbs); fill pth46;
  z46'=(x46,-1/2trbs); draw z46tic--z46';
  z14trr=(leftloc,h/2);           % pin 3
  trir(14, trht, trbs); fill pth14;
  z14'=(x46,y14); draw z14tic--z14';
  z24trc=1/3[z14trc,z14']; z34trc=2/3[z14trc,z14'];
  trir(24, trht, trbs); fill pth24;
  trir(34, trht, trbs); fill pth34;

  z12trl=z14trr;                  % pin 2
  trir(12, trht, trbs); fill pth12;
  z12'=(x46,y12); draw z12tic--z12';
  z22=(x24,y12); z32=(x34,y12);
  trir(22, trht, trbs); fill pth22;
  trir(32, trht, trbs); fill pth32;

  z21trl=(x24trc, y12trr);        % pin 1
  trir(21, trht, trbs); fill pth21;
  z21'=(x46,y21); draw z21tic--z21';
  z31=(x34,y21);
  trir(31, trht, trbs); fill pth31;

  z25trr=(x24trc, y14trl);        % pin 4
  trir(25, trht, trbs); fill pth25;
  z25'=(x46,y25); draw z25tic--z25';
  z35=(x34,y25);
  trir(35, trht, trbs); fill pth35;
  labels(12,14,21,22,23,24,25,31,32,33,34,35,41,42,43,44,45,46);
endchar;

cmchar "Old Persian word: Auramazda (version c) (F)";
beginglyph("F", (4tb+wh));
  z43=(rightloc-wiht, h/2);       % wing
  wingl(43, wiht, wibs); fill pth43;
  z46trc=(x43,h+trht);                 % vert pin
  trid(46, trht, trbs); fill pth46;
  z46'=(x46,-1/2trbs); draw z46tic--z46';
  z14trr=(leftloc,y43);           % pin 3
  trir(14, trht, trbs); fill pth14;
  z14'=(x46,y14); draw z14tic--z14';
  z24trc=1/3[z14trc,z14']; z34trc=2/3[z14trc,z14'];
  trir(24, trht, trbs); fill pth24;
  trir(34, trht, trbs); fill pth34;

  z12trl=z14trr;                  % pin 2
  trir(12, trht, trbs); fill pth12;
  z12'=(x46,y12); draw z12tic--z12';
  z22=(x24,y12); z32=(x34,y12);
  trir(22, trht, trbs); fill pth22;
  trir(32, trht, trbs); fill pth32;

  z21trl=(x24trc, y12trr);        % pin 1
  trir(21, trht, trbs); fill pth21;
  z21'=(x46,y21); draw z21tic--z21';
  z31=(x34,y21);
  trir(31, trht, trbs); fill pth31;

  z25trr=(x24trc, y14trl);        % pin 4
  trir(25, trht, trbs); fill pth25;
  z25'=(x46,y25); draw z25tic--z25';
  z35=(x34,y25);
  trir(35, trht, trbs); fill pth35;
  labels(12,14,21,22,23,24,25,31,32,33,34,35,41,42,43,44,45,46);
endchar;

cmchar "Old Persian numeral 1 (1)";
beginglyph("1", (tb));
  z1trc=(midloc,h);
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  labels(1,2);
endchar;

cmchar "Old Persian numeral 2 (2)";
beginglyph("2", (tb));
  z1trc=(midloc,h);
  trid(1, trht, trbs); fill pth1;
  z1'=(x1,0); draw z1tic--z1';
  z2trc=1/2[z1trc,z1'];
  trid(2, trht, trbs); fill pth2;
  labels(1,2);
endchar;

cmchar "Old Persian numeral 10 (3)";
beginglyph("3", (wh));
  z1=(leftloc,h/2);
  wingl(1, wiht, wibs); fill pth1;
  labels(1,2);
endchar;

cmchar "Old Persian numeral 20 (4)";
beginglyph("4", (1/2wh));
  z1=(leftloc,3/4h);
  wingl(1, 1/2wiht, 1/2wibs); fill pth1;
  z2=(leftloc,1/4h);
  wingl(2, 1/2wiht, 1/2wibs); fill pth2;
  labels(1,2);
endchar;

cmchar "Old Persian numeral 100 (5)";
beginglyph("5", (tb+2th));
  z1trl=(leftloc,h);                   % top pins
  trir(1, trht, trbs); fill pth1;
  z2trr=(rightloc,h);
  tril(2, trht, trbs); fill pth2;
  draw z1tic--z2tic;
  z11trc=(1/2[x1,x2],y1trr);           % vertical pin
  trid(11, trht, trbs); fill pth11;
  z11'=(x11,0); draw z11tic--z11';
  labels(1,2,11);
endchar;

cmchar "Old Persian word divider (:)";
beginglyph(":", (3tb));
  numeric alpha;
  alpha := trbs;
  z1=(leftloc+alpha, h-alpha);
  z2=(rightloc-alpha, alpha);
  triangle(1, trht, trbs, angle((z2-z1)));
  fill pth1; draw z1tic--z2;
  labels(1,2);
endchar;

end