summaryrefslogtreecommitdiff
path: root/fonts/greek/kd/mf/kdilower.mf
blob: a94780a895854d25655469619626bebaa594663b (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
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
% ======================================================================
%		   KD Classical Greek Family of Fonts
%		   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%
%	A set of MF source fonts for use with TeX version 3.0 or higher
%	accompanied with macros and hyphenation tables to facilitate
%	the typesetting of greek texts
%
%	This piece of work is partially based on original work of
%	Sylvio Levi (design of an excellent set of fonts)  
%	and Yianni Haralambous (ideas about macros other fonts).
%
%	This file is part of the greektex package and abides to 
%	copyright laws of the GNU general public software licence
%
%	You are allowed to use or modify this file as long as the 
%	original authors are clearly mentioned. It is ILLEGAL to sell
%	any part of this work or work derived from it. You may not
%	charge for this work except to cover for reasonable media 
%	expensess.
%
%	K J Dryllerakis (C) 1991-1992 
%
% ======================================================================
%
%
%	File : kdilower.mf
%
%
%

% ======================================================================
% ALFA
% ======================================================================
 
def width =   8.5u enddef;
def height = x_height enddef;
def dims = width#,height#,0 enddef;
def ital = 0 enddef;
def fit_params = 0,.5u# enddef;
def acc_corr = 1.5u enddef;
 
def gen_letter =
adjust_fit(0,0); pickup fine.nib; w:=w+.5u;
pos0(hair,0); pos1(vair,90); pos2(curve,180); pos3(vair,270);
pos4(stem,0); x4=x0; y4+.5stem=vround .98h;
x1=x3=.5[x0,x2]; lft x2r=hround(1.5u-.5curve);
rt x4r=hround(w-2.5u+.5stem);
top y1r=h+oo; bot y3r=-oo; y0=y2=.5[y1,y3];
filldraw stroke super_arc.e(0,1) & pulled_arc.e(1,2)
 & pulled_arc.e(2,3) & super_arc.e(3,0);  % bowl
x5=x4; x7=w; hook_out(5,6,7);  % closing hook
filldraw circ_stroke z4e--z5e;  % stem
math_fit(-.3x_height#*slant+.5curve#-u#,ic#);
    numeric x_baryctr; x_baryctr=.25[x1,x4];          %accent reference
  numeric pos_stem; pos_stem=x_baryctr;               %iota reference
  traba(-.5u);
enddef;

cmchar "Lowercase alpha";
beginchar("a",dims);
this_letter; penlabels(0,1,2,3,4,5,6,7); endchar;

cmchar "Lowercase alpha with rough breathing";
beginchar(oct"200",width#+u#,acc_ht#,0);
this_letter; spirit(x_baryctr)<; endchar;

cmchar "Lowercase alpha with smooth breathing";
beginchar(oct"210",width#+u#,acc_ht#,0);
this_letter; spirit(x_baryctr)>; endchar;
%
cmchar "Lowercase alpha with acute";
beginchar(oct"220",width#+u#,acc_ht#,0);
this_letter; acute(x_baryctr); endchar;
%
cmchar "Lowercase alpha with rough breathing and acute";
beginchar(oct"230",width#+u#,acc_ht#,0);
this_letter; spirit_acute(x_baryctr)<; endchar;
%
cmchar "Lowercase alpha with smooth breathing and acute";
beginchar(oct"240",width#+u#,acc_ht#,0);
this_letter; spirit_acute(x_baryctr)>; endchar;
%
cmchar "Lowercase alpha with rough breathing and grave";
beginchar(oct"260",width#+u#,acc_ht#,0);
this_letter; spirit_grave(x_baryctr)<; endchar;
%
cmchar "Lowercase alpha with smooth breathing and grave";
beginchar(oct"270",width#+u#,acc_ht#,0);
this_letter; spirit_grave(x_baryctr)>; endchar;
%
cmchar "Lowercase alpha with circumflex";
beginchar(oct"207",width#+u#,circ_ht#,0);
this_letter; circumflex(x_baryctr); endchar;
%
cmchar "Lowercase alpha with grave";
beginchar(oct"250",width#+u#,acc_ht#,0);
this_letter; grave(x_baryctr); endchar;
%

cmchar "Lowercase alpha with rough breathing and circumflex";
beginchar(oct"300",width#+u#,Circ_ht#,0);
this_letter; spirit_circumflex(x_baryctr)<; endchar;

cmchar "Lowercase alpha with smooth breathing and circumflex";
beginchar(oct"310",width#+u#,Circ_ht#,0);
this_letter; spirit_circumflex(x_baryctr)>; endchar;
%
cmchar "Lowercase alpha with iota subscript";
beginchar(oct"320",width#+u#,height#,iota_dp#);
this_letter; iota_sub(pos_stem); endchar;
%
cmchar "Lowercase alpha with acute and iota subscript";
beginchar(oct"301",width#+u#,acc_ht#,iota_dp#);
this_letter; acute(x_baryctr); iota_sub(pos_stem); endchar;

cmchar "Lowercase alpha with grave and iota subscript";
beginchar(oct"330",width#+u#,acc_ht#,iota_dp#);
this_letter; grave(x_baryctr); iota_sub(pos_stem); endchar;

cmchar "Lowercase alpha with rough breathing and iota subscript";
beginchar(oct"340",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit(x_baryctr)<; iota_sub(pos_stem); endchar;

cmchar "Lowercase alpha with smooth breathing and iota subscript";
beginchar(oct"350",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit(x_baryctr)>; iota_sub(pos_stem); endchar;

cmchar "Lowercase alpha with rough breathing, grave and iota subscript";
beginchar(oct"360",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit_grave(x_baryctr)<; iota_sub(pos_stem); endchar;

cmchar "Lowercase alpha with smooth breathing, grave and iota subscript";
beginchar(oct"361",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit_grave(x_baryctr)>; iota_sub(pos_stem); endchar;

cmchar "Lowercase alpha with rough breathing and acute and iota subscript";
beginchar(oct"311",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit_acute(x_baryctr)>; iota_sub(pos_stem); endchar;

cmchar "Lowercase alpha with smooth breathing and acute and iota subscript";
beginchar(oct"321",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit_acute(x_baryctr)>; iota_sub(pos_stem); endchar;

cmchar "Lowercase alpha with circumflex and iota subscript";
beginchar(oct"331",width#+u#,circ_ht#,iota_dp#);
this_letter; circumflex(x_baryctr); iota_sub(pos_stem); endchar;

cmchar "Lowercase alpha with rough breathing, circumflex and iota subscript";
beginchar(oct"341",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit_circumflex(x_baryctr)<; iota_sub(pos_stem); endchar;

cmchar "Lowercase alpha with smooth breathing, circumflex and iota subscript";
beginchar(oct"351",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit_circumflex(x_baryctr)>; iota_sub(pos_stem); endchar;

picture pic.iota;
picture savedpicture;
 
% ======================================================================
% BHTA
% ======================================================================
 
def dims = 8u#,asc_height#,desc_depth# enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
 
def gen_letter=
adjust_fit(0,0); pickup fine.nib; w:=w+1.5u;
pos0(.5[hair,stem],180); pos1(.5[hair,stem],180); pos2(vair,90);
pos3(stem,0); pos4(vair,-90); pos5(hair,-180);
pos6(vair,-270); pos7(curve,-360); pos8(vair,-450); pos9(hair,-540);
x0=x1=x9; lft x0l=hround(1.5u-.5hair); x2=x4=x6=x8=.5w+.25u;
rt x3r=hround(w-1.5u); rt x7r=hround(w-1.5u+.5curve); rt x5l=hround(x4-u);
bot y0=-d; y1=top y6r=x_height; top y2r=h+oo; y3=.5[y2,y4];
y5=.5[y4,y6]; top y6r-bot y4r=vstem+eps; bot y8=-oo; y7=y9=.5[y6,y8];
if y6l<y4l: y6l:=y4l:=y5; fi
filldraw stroke z0e---z1e...pulled_arc.e(2,3)
 & pulled_arc.e(3,4)...{up}z5e;  % stem and upper bowl
filldraw stroke z5e{up}...pulled_arc.e(6,7)
 & pulled_arc.e(7,8)...{up}z9e;  % lower bowl
math_fit(desc_depth#*slant+.5hair#-u#,.7x_height#*slant+.5curve#-1.5u#);
traba(-.5u);
enddef;
 
cmchar "Lowercase beta";
beginchar("b",dims);
this_letter; penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
 
picture savedpicture;
 
% ======================================================================
% GAMMA
% ======================================================================
 
def dims = 8.5u#,x_height#,desc_depth# enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
 
def gen_letter=
  adjust_fit(0,0); pickup fine.nib; w:=w+1.5u;
pos1(hair,180); pos2(vstem+dw,90);
pos4(hair,0); pos5(vair,-90); pos6(hair,-180); pos7(hair,-180);
bot y1=.5772156649h; top y2r=h+oo; y4=y6=-.5d;
bot y5r=-d-o; top y7=h;
lft x1r=hround(.5u-.5hair); x2=2.5u; rt x4r=hround(w-3u); x5=.5[x4,x6];
rt x4l-lft x6l=curve; rt x7l=hround(w-u);
if x4l<x6l: x4l:=x6l:=x5; fi
pos3(hair,angle(z4-z2)+90); x3=superness[x2,x4]; y3=superness[y4,y2];
filldraw stroke z1e{up}...z2e{right}...z3e{z4-z2}
 ...z4e{down}...{left}z5e; % arc
filldraw stroke z5e{left}...z6e{up}..{2(x7-x6),y7-y6}z7e;  % stem
math_fit(-.5772156649x_height#*slant,ic#-u#);
traba(-.5u);
enddef;
 
cmchar "Lowercase gamma";
beginchar("g",dims);
this_letter; penlabels(1,2,3,4,5,6,7);  endchar;
 
picture savedpicture;
 
% ======================================================================
% DELTA
% ======================================================================

def dims = 7.25u#,asc_height#,0 enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
 
def gen_letter =
  adjust_fit(0,0); pickup fine.nib; w:=w+.75u;
pos1(hair,-180); pos2(vair,-90);
numeric theta; theta=angle(18u,-h); pos9(hair,theta);
pos3(stem,theta+90); pos4(stem,theta+90); pos5(1/4[hair,stem],20);
pos6(vair,-90); pos7(curve,-180); pos8(vair,-270);
rt x1l=hround(w-2u+.5hair); x2=.5w; x3r=3u; rt x5r=hround(w-u);
x9l=hround(x1+u); y9=y1;
x4=x6=x8=.5w+.5u; lft x7r=hround(1.5u-.5curve);
top y2l=h+oo; y1=min(.9h,y2r-eps); top y8r=x_height+oo; y4=y8;
z4-z3=whatever*(18u,-h); y5=y7=.5[y6,y8]; bot y6=-oo;
filldraw stroke z1e{x2-x1,3(y2-y1)}...z2e{left}...z3e---z4e
 ....z5e{down}...pulled_arc.e(6,7) & pulled_arc.e(7,8);  % hook and bowl
filldraw stroke z1{x1-x2,3(y1-y2)}...{x1-x2,3(y2-y1)}z9;
math_fit(-.3x_height#*slant+.5curve#-u#,.7x_height#*slant-.5u#);
traba(-.5u);
enddef;

cmchar "Lowercase delta";
beginchar("d",dims);
this_letter; penlabels(1,2,3,4,5,6,7,8); endchar;

picture savedpicture;
%
% ======================================================================
% EYILON
% ======================================================================
%
def width = 6.5u enddef;
def height = x_height enddef;
def dims = width#,height#,0 enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
def acc_corr = 1.5u enddef;

def gen_letter =
adjust_fit(0,0); pickup fine.nib; w:=w+1.5u;
numeric light_vstem; light_vstem=Vround 2/3[vair,vstem];
pos2(light_vstem,90); x2=x8=.5w+.5u; top y2r=h+o;
x1+.5light_vstem=hround(w-u); y1=.2[y2,bar_height];
pos1(light_vstem,angle(x1-x2,2(y1-y2))+90); pos3(hair,180); pos4(vair,270);
pos5(hair,360); pos6(vair,450); pos7(hair,540); pos8(light_vstem,630);
lft x3r=hround u; x4=x6=.5w; rt x5r=hround(w-2.5u); x7=x3;
y3=.5[y2,y4]; y5=bar_height=.5[y4,y6]; y7=.5[y6,y8]; bot y8r=-o;
top y6r-bot y4r=vstem+eps; if y6l<y4l: y6l:=y4l:=y5; fi
x9+.5vair=hround(w-.5u); y9=1/3[y8,bar_height];
pos9(vair,angle(x8-x9,2(y8-y9))+90);
filldraw circ_stroke z1e{x2-x1,2(y2-y1)}...pulled_super_arc.e(2,3)(.5superpull)
 & super_arc.e(3,4)...{up}z5e;  % upper arc
filldraw circ_stroke z9e{x8-x9,8(y8-y9)}...pulled_arc.e(8,7)
 & super_arc.e(7,6)...{down}z5e;  % lower arc
math_fit(-.5bar_height#*slant-.5u#,ic#);
   numeric x_baryctr; x_baryctr=x2;                    %   accent reference
traba(-.5u);
enddef;
 
cmchar "Lowercase epsilon";
beginchar("e",dims);
this_letter; penlabels(1,2,3,4,5,6,7,8,9); endchar;
%
cmchar "Lowercase epsilon with rough breathing";
beginchar(oct"201",width#+1.2u#,acc_ht#,0);
this_letter; spirit(x_baryctr)<; endchar;

cmchar "Lowercase epsilon with smooth breathing";
beginchar(oct"211",width#+1.2u#,acc_ht#,0);
this_letter; spirit(x_baryctr)>; endchar;

cmchar "Lowercase epsilon with acute";
beginchar(oct"221",width#+1.2u#,acc_ht#,0);
this_letter; acute(x_baryctr); endchar;

cmchar "Lowercase epsilon with rough breathing and acute";
beginchar(oct"231",width#+1.2u#,acc_ht#,0);
this_letter; spirit_acute(x_baryctr)<; endchar;

cmchar "Lowercase epsilon with smooth breathing and acute";
beginchar(oct"241",width#+1.2u#,acc_ht#,0);
this_letter; spirit_acute(x_baryctr)>; endchar;

cmchar "Lowercase epsilon with rough breathing and grave";
beginchar(oct"261",width#+1.2u#,acc_ht#,0);
this_letter; spirit_grave(x_baryctr)<; endchar;

cmchar "Lowercase epsilon with smooth breathing and grave";
beginchar(oct"271",width#+1.2u#,acc_ht#,0);
this_letter; spirit_grave(x_baryctr)>; endchar;

cmchar "Lowercase epsilon with grave";
beginchar(oct"251",width#+1.2u#,acc_ht#,0);
this_letter; grave(x_baryctr); endchar;
%
picture savedpicture;
%
% ======================================================================
% ZHTA
% ======================================================================
%
def dims = 7u#,asc_height#,desc_depth# enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
%
def gen_letter=
adjust_fit(0,0); pickup fine.nib; w:=w+u;
pos0(hair,-360); pos1(vair,-270); pos2(hair,-180); pos3(vair,-90);
numeric theta; theta=90-angle(25u,x_height); slope:=-x_height/25u;
pos6(stem,theta); pos7(vair,-90); pos8(vair,-135);
lft x0l=hround 3.5u; x1=x3=.5[x0,x2]; rt x2l=hround max(rt x0r,w-2u)+eps;
top y0=h; top y3l=bot y1l+vstem+eps=vround(y0-.25(h-x_height)); y2=.5[y1,y3];
if y1r>y3r: y1r:=y3r:=y2; fi
lft x4l=hround u; x4r-x4l=(hround .6[vair,stem])-fine;
x6+.5u=x7=w-2u; x8=.5w+.75u;
y6=-.1d; y8=-3/4d-oo; bot y7r=-d-oo;
ellipse_set(3l,4l,5l,6l); ellipse_set(3r,4r,5r,6r);
y4l:=.9[y6,y4l]; y4=y4r:=.9[y6,y4r];
filldraw circ_stroke z0e{down}...z1e{right}...{up}z2e;  % opening hook
filldraw circ_stroke z8e{x7-x8,2(y7-y8)}...z7e{right}
 ...z6e---z5e....{up}z4e
 ..tension 1 and atleast1.5..{right}z3e...{down}z2e;  % main stroke
math_fit(-.2asc_height#*slant-.5u#,0);
traba(-.5u);
enddef;
%
cmchar "Lowercase zeta";
beginchar("z",dims);
this_letter; penlabels(0,1,2,3,4,5,6,7,8); endchar;
%
picture savedpicture;
%
% ======================================================================
% HTA [Bug fixed by Knappen June 1992]
% ======================================================================
%
def width = 8.5u enddef;
def dims = width#,x_height#,desc_depth# enddef;
def ital = 0 enddef;
def fit_params = if straight: .75 else: .5 fi u#,0 enddef;
def acc_corr = 1.5u enddef;
%
def gen_letter =
adjust_fit(0,0); pickup fine.nib; w:=w+.5u;
x0=0; x1=x2; pos2(stem,0); lft x2l=hround(2.5u-.5stem); y2-.5stem=-oo;
hook_in(0,a,1);  % opening hook
filldraw circ_stroke z2e--z1e;  % left stem
x4+.5stem=hround(w-1.5u+.5stem); ital_arch(2,3,4);  % arch
pos5(stem,0); x5=x4; y5-.5stem=-d-o;
filldraw circ_stroke z5e--z4e;  % right stem
math_fit(-2/3x_height#*slant+.5hair#+.5u#,ic#-1/3x_height#*slant);
 numeric x_baryctr; x_baryctr=.1[x3,x0];           % accent reference
 numeric pos_stem; pos_stem=x2;                         % iota reference
enddef;
%
cmchar "Lowercase eta";
beginchar("h",dims);
this_letter; penlabels(0,a,1,2,3,4,5); endchar;
%
cmchar "Lowercase eta with rough breathing";
beginchar(oct"202",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; spirit(x_baryctr)<; endchar;
 
cmchar "Lowercase eta with smooth breathing";
beginchar(oct"212",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; spirit(x_baryctr)>; endchar;
 
cmchar "Lowercase eta with acute";
beginchar(oct"222",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; acute(x_baryctr); endchar;
 
cmchar "Lowercase eta with rough breathing and acute";
beginchar(oct"232",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; spirit_acute(x_baryctr)<; endchar;
 
cmchar "Lowercase eta with smooth breathing and acute";
beginchar(oct"242",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; spirit_acute(x_baryctr)>; endchar;
%
cmchar "Lowercase eta with rough breathing and grave";
beginchar(oct"262",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; spirit_grave(x_baryctr)<; endchar;
 
cmchar "Lowercase eta with smooth breathing and grave";
beginchar(oct"272",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; spirit_grave(x_baryctr)>; endchar;
%
cmchar "Lowercase eta with circumflex";
beginchar(oct"217",width#+1.3u#,circ_ht#,desc_depth#);
this_letter; circumflex(x_baryctr); endchar;
%
cmchar "Lowercase eta with grave";
beginchar(oct"252",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; grave(x_baryctr); endchar;
%

cmchar "Lowercase eta with rough breathing and circumflex";
beginchar(oct"302",width#+1.3u#,Circ_ht#,desc_depth#);
this_letter; spirit_circumflex(x_baryctr)<; endchar;

cmchar "Lowercase eta with smooth breathing and circumflex";
beginchar(oct"312",width#+1.3u#,Circ_ht#,desc_depth#);
this_letter; spirit_circumflex(x_baryctr)>; endchar;

cmchar "Lowercase eta with grave and iota subscript";
beginchar(oct"332",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; grave(x_baryctr); iota_sub(pos_stem); endchar;

cmchar "Lowercase eta with rough breathing and iota subscript";
beginchar(oct"342",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; spirit(x_baryctr)<; iota_sub(pos_stem); endchar;

cmchar "Lowercase eta with smooth breathing and iota subscript";
beginchar(oct"352",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; spirit(x_baryctr)>; iota_sub(pos_stem); endchar;

cmchar "Lowercase eta with acute and iota subscript";
beginchar(oct"303",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; acute(x_baryctr); iota_sub(pos_stem); endchar;

cmchar "Lowercase eta with rough breathing, acute and iota subscript";
beginchar(oct"313",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; spirit_acute(x_baryctr)<; iota_sub(pos_stem); endchar;

cmchar "Lowercase eta with smooth breathing and acute and iota subscript";
beginchar(oct"323",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; spirit_acute(x_baryctr)>; iota_sub(pos_stem); endchar;

cmchar "Lowercase eta with rough breathing, grave and iota subscript";
beginchar(oct"362",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; spirit_grave(x_baryctr)<; iota_sub(pos_stem); endchar;

cmchar "Lowercase eta with smooth breathing and grave and iota subscript";
beginchar(oct"363",width#+1.3u#,acc_ht#,desc_depth#);
this_letter; spirit_grave(x_baryctr)>; iota_sub(pos_stem); endchar;

cmchar "Lowercase eta with circumflex and iota subscript";
beginchar(oct"333",width#+1.3u#,circ_ht#,desc_depth#);
this_letter; circumflex(x_baryctr); iota_sub(pos_stem); endchar;

cmchar "Lowercase eta with rough breathing, circumflex and iota subscript";
beginchar(oct"343",width#+1.3u#,Circ_ht#,desc_depth#);
this_letter; spirit_circumflex(x_baryctr)<; iota_sub(pos_stem); endchar;

cmchar "Lowercase eta with smooth breathing, circumflex and iota subscript";
beginchar(oct"353",width#+1.3u#,Circ_ht#,desc_depth#);
this_letter; spirit_circumflex(x_baryctr)>; iota_sub(pos_stem); endchar;

cmchar "Lowercase eta with iota subscript";
beginchar(oct"322",width#+1.3u#,x_height#,desc_depth#);
this_letter; iota_sub(pos_stem); endchar;
 
picture pic.iota;
picture savedpicture;
%
% ======================================================================
% JHTA
% ======================================================================
%
def dims = 7u#,asc_height#,0 enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
%
def gen_letter=
adjust_fit(0,0); pickup fine.nib; w:=w+1.25u;
pos1(vair,90); pos2(curve,180); pos3(vair,270); pos4(curve,360);
x1=x3=.5w; lft x2r=hround(1.5u-.5curve); x4=w-x2;
top y1r=h+oo; y2=y4=.5[y1,y3]; bot y3r=-oo;
filldraw stroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
 & pulled_arc.e(3,4) & pulled_arc.e(4,1);  % bowl
pos2'(bar,90); pos4'(bar,90); z2'=z2l; z4'=z4l;
filldraw stroke z2'e--z4'e;  % bar
math_fit(-.3asc_height#*slant-u#+.5curve#,ic#-.5u#);
traba(-.5u);
enddef;
%
cmchar "Lowercase theta";
beginchar("j",dims);
this_letter; penlabels(1,2,3,4); endchar;
%
picture savedpicture;
%
% ======================================================================
% IWTA
% ======================================================================
%
def width = 5u enddef;
def dims = width#,x_height#,0 enddef;
def ital = 0 enddef;
def fit_params = if monospace: u#,u# else:0,2curve#-3u# fi enddef;
def acc_corr = 0 enddef;
%
def gen_letter=
adjust_fit(if monospace: u#,u# else: 0,0 fi); pickup fine.nib;
pos1(stem,0); lft x1l=hround(1.5u-.5stem); y1+.5stem=h+oo;
x2=x1-.25u; x4=w; hook_out(2,3,4)(skewed);  % closing hook
filldraw circ_stroke z1e{down}...{-u,-x_height}z2e;  % stem
math_fit(0,ic#);  numeric x_baryctr; x_baryctr=x1;
enddef;
%
cmchar "Lowercase iota";
beginchar("i",dims);
this_letter; penlabels(1,2,3,4); endchar;
%
cmchar "Lowercase iota with rough breathing";
beginchar(oct"205",width#,acc_ht#,0);
this_letter; spirit(x_baryctr if serifs: +.25u fi)<; endchar;
%
cmchar "Lowercase iota with smooth breathing";
beginchar(oct"215",width#,acc_ht#,0);
this_letter; spirit(x_baryctr if serifs: -.25u fi)>; endchar;
%
cmchar "Lowercase iota with acute";
beginchar(oct"225",width#,acc_ht#,0);
this_letter; acute(x_baryctr); endchar;
%
cmchar "Lowercase iota with rough breathing and acute";
beginchar(oct"235",width#,acc_ht#,0);
this_letter; spirit_acute(x_baryctr)<; endchar;
%
cmchar "Lowercase iota with smooth breathing and acute";
beginchar(oct"245",width#,acc_ht#,0);
this_letter; spirit_acute(x_baryctr)>; endchar;
%
cmchar "Lowercase iota with rough breathing and grave";
beginchar(oct"265",width#,acc_ht#,0);
this_letter; spirit_grave(x_baryctr)<; endchar;
%
cmchar "Lowercase iota with smooth breathing and grave";
beginchar(oct"275",width#,acc_ht#,0);
this_letter; spirit_grave(x_baryctr)>; endchar;
%
cmchar "Lowercase iota with circumflex";
beginchar(oct"237",width#,circ_ht#,0);
this_letter; circumflex(x_baryctr); endchar;
%
cmchar "Lowercase iota with grave";
beginchar(oct"255",width#,acc_ht#,0);
this_letter; grave(x_baryctr); endchar;
%
cmchar "Lowercase iota with rough breathing and circumflex";
beginchar(oct"305",width#,Circ_ht#,0);
this_letter; spirit_circumflex(x_baryctr)<; endchar;

cmchar "Lowercase iota with smooth breathing and circumflex";
beginchar(oct"315",width#,Circ_ht#,0);
this_letter; spirit_circumflex(x_baryctr)>; endchar;

cmchar "Lowercase iota with diaeresis";
beginchar(oct"010",width#,circ_ht#,0);
this_letter; diaeresis(x_baryctr); endchar;

cmchar "Lowercase iota with diaeresis and grave";
beginchar(oct"012",width#,acc_ht#,0);
this_letter; diaeresis_grave(x_baryctr); endchar;

cmchar "Lowercase iota with diaeresis and acute";
beginchar(oct"011",width#,acc_ht#,0);
this_letter; diaeresis_acute(x_baryctr); endchar;

cmchar "Lowercase iota with diaeresis and circumflex";
beginchar(oct"013",width#,Circ_ht#,0);
this_letter; diaeresis_circumflex(x_baryctr); endchar;
%
picture savedpicture;
%
% ======================================================================
% KAPPA
% ======================================================================
%
def dims = 8.5u#,x_height#,0 enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
%
def gen_letter=
adjust_fit(0,0); pickup fine.nib; w:=w+.5u;
pos1(stem,0); pos2(stem,0); pos3(vair,90); pos4(vair,90); pos5(flare,90);
x1=x2=x3; lft x1l=hround(1.5u-.5stem); y1+.5stem=h+oo; y2-.5stem=-oo;
filldraw z1l---z2l..z2r---z1r..cycle;  % stem
y3=bar_height; top y4r=h; x4+.5flare=hround(w-1.5u); z5r=z4r;
path p,q; p=z3l{right}..{right}z4l; q=z5r{right}..z5l{left}...cycle;
numeric t; t=ypart(p intersectiontimes q);
filldraw stroke z3e{right}..{right}z4e;  % upper diagonal
filldraw subpath(0,t) of q--cycle;  % bulb
pos7(stem,0); pos8(vair,90); pos9(hair,180);
x9+.5hair=hround(w+.5hair-epsilon); y9=1/3x_height;
lft x7l=hround(w-2.75u-.5stem); y7=1/2y3; x8=w-1.2u; bot y8l=-oo;
filldraw stroke z3e{right}...z7e{down}
 ...z8e{right}...{up}z9e;  % lower diagonal
math_fit(0,ic#);
traba(-.5u);
enddef;
%
cmchar "Lowercase kappa";
beginchar("k",dims);
this_letter; penlabels(1,2,3,4,5,6,7,8,9); endchar;
%
picture savedpicture;
%
% ======================================================================
% LAMBDA
% ======================================================================
%
def dims =  8u#,asc_height#,0 enddef;
def ital = 0 enddef;
def fit_params = -.25u#,-.25u# enddef;
def krn = -.75u# enddef;
%
def gen_letter=
adjust_fit(0,0); pickup fine.nib; w:=w+2.5u;
pos1(vair,90); lft x1=hround .1u; top y1r=h;
x2=x1+2u; y2=.7[x_height,h]; x3=w-2u; bot y4=-oo; y3=max(.07h,y4+eps);
z4-(.25u,0)=whatever[z2,z3]; numeric theta; theta=angle(z2-z3)-90;
pos2(stem,theta); pos3(stem,theta); pos4(stem,0);
filldraw circ_stroke z1e{right}...z2e---z3e
 ...{2(x4e-x3e),y4e-y3e}z4e;  % long diagonal
y5=.5[bar_height,x_height]; z5=whatever[z2,z3];
x6=1.5u; y6-.5stem=-oo; pos5(hair,theta-90); pos6(stem,angle(z5-z6)-90);
filldraw circ_stroke z6e--z5e;
traba(-u);% short diagonal
enddef;
%
cmchar "Lowercase lambda";
beginchar("l",dims);
this_letter; penlabels(1,2,3,4,5,6); endchar;
 
picture savedpicture;
 
% ======================================================================
% MI
% ======================================================================
 
def dims = 8.25u#,x_height#,desc_depth# enddef;
def ital = 0 enddef;
def fit_params = 0,.5stem# enddef;
 
def gen_letter=
adjust_fit(0,0); pickup fine.nib;
w:=w+.75u; interim superness:=more_super;
pos1(stem,-180); pos2(stem,-180); x1=x2=x3; lft x1r=hround(1.5u-.5stem);
y1+.5stem=h+oo; y2-.5stem=-d-o;
filldraw z1r---z2r..z2l---z1l..cycle;  % left stem
pos3(stem,-180); pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5];
pos6(stem,0); rt x6r=hround(w-2.5u+.5stem);
x5=x6=x7; x9=w; hook_out(7,8,9);  % closing hook
y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h;
filldraw stroke super_arc.e(3,4)...{up}z5e; % left stem and arc
filldraw circ_stroke z6e--z7e;  % right stem
math_fit(desc_depth#*slant+.5stem#-u#,ic#);
traba(-.75u);
enddef;
 
cmchar "Lowercase mu";
beginchar("m",dims);
this_letter; penlabels(1,2,3,4,5,6,7,8,9); endchar;
 
picture savedpicture;
 
% ======================================================================
% NI
% ======================================================================
 
def dims = 8.5u#,x_height#,0 enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
 
def gen_letter =
adjust_fit(0,0); pickup fine.nib;
pos3(vair,-90); pos4(stem,0); bot y3r=0; y4+.5stem=h+oo;
x3-.5stem=hround(1.5u-.5stem); x4+.5stem=hround(w-1.5u+.5stem);
filldraw circ_stroke z4e{down}...{-36u,-h}z3e;  % diagonal
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
top y1=h+min(oo,serif_drop); bot y2=0; x1=x2=x3;
z=((z4{down}...{-36u,-h}z3)intersectionpoint((x2r,0)--(x2r,h)));
filldraw z1l--z2l--z--z1r--cycle;  % stem
sloped_serif.l(1,2,a,1/3,jut,serif_drop); traba(.5u);% upper left serif
math_fit(0,ic#-1/3x_height#*slant-.5u#); enddef;
 
cmchar "Lowercase nu";
beginchar("n",dims);
this_letter; penlabels(1,2,3,4); endchar;
 
picture savedpicture;
 
% ======================================================================
% XI
% ======================================================================
 
def dims = 7u#,asc_height#,desc_depth# enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
 
def gen_letter=
adjust_fit(0,0); pickup fine.nib; w:=w+u;
pos10(hair,-720); pos11(vair,-630); pos12(hair,-540); pos13(vair,-450);
lft x10l=hround 1/3w; x11=x13=.5[x10,x12]; rt x12l=hround(w-2.5u);
top y10=h; top y13l=bot y11l+vstem+eps=vround(y10-.25(h-x_height));
y12=.5[y11,y13]; if y11r>y13r: y11r:=y13r:=y12; fi
pos0(curve,-360); pos1(vair,-270); pos2(hair,-180); pos3(vair,-90);
numeric theta; theta=90-angle(22u,x_height); slope:=-x_height/22u;
pos6(stem,theta); pos7(vair,-90); pos8(vair,-135);
lft x0l=hround u; x1=x3=x11; x2=x12;
y0=.5[y13,y1]; top y3l=vround .5h=bot y1l+vstem+eps; y2=.5[y1,y3];
if y1r>y3r: y1r:=y3r:=y2; fi
lft x4l=hround u; x4r-x4l=hround .5[vair,stem]-fine;
x6=x7=w-2u; x8=.5w+.5u; y6=-.3d; bot y7r=-d-oo; y8=max(-3/4d-oo,y7l);
ellipse_set(3l,4l,5l,6l); ellipse_set(3r,4r,5r,6r);
y4l:=.9[y6,y4l]; y4=y4r:=.9[y6,y4r];
filldraw circ_stroke z10e{down}...z11e{right}...{up}z12e;  % opening hook
filldraw stroke z12e{up}...z13e{left}...z0e{down}
 ...z1e{right}...{up}z2e;  % upper arc
filldraw circ_stroke z8e{x7-x8,2(y7-y8)}...z7e{right}...z6e
 ---z5e...{up}z4e...{right}z3e...{down}z2e;  % main stroke
math_fit(-.2asc_height#*slant-.5u#,0);
traba(-.5u);
enddef;
 
cmchar "Lowercase xi";
beginchar("x",dims);
this_letter; penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13); endchar;
 
picture savedpicture;
%
% ======================================================================
% OMIKRON
% ======================================================================
%
def width = 8u enddef;
def dims = width#,x_height#,0 enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
%
def gen_letter =
adjust_fit(0,0); pickup fine.nib; w:=w+u;
pos1(vair,90); pos2(curve,180); pos3(vair,270); pos4(curve,360);
x1=x3=.5w; lft x2r=hround(1.5u-.5curve); x4=w-x2;
top y1r=h+oo; y2=y4=.5[y1,y3]; bot y3r=-oo;
filldraw stroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
 & pulled_arc.e(3,4) & pulled_arc.e(4,1); % bowl
math_fit(-.3x_height#*slant+.5curve#-u#,ic#);
  numeric x_baryctr; x_baryctr=.1[x1,x2];
traba(-.5u); % accent reference
enddef;
%
cmchar "Lowercase omicron";
beginchar("o",dims);
this_letter; penlabels(1,2,3,4); endchar;
%
cmchar "Lowercase omicron with rough breathing";
beginchar(oct"203",width#+.6u#,acc_ht#,0);
this_letter; spirit(x_baryctr)<; endchar;
%
cmchar "Lowercase omicron with smooth breathing";
beginchar(oct"213",width#+.6u#,acc_ht#,0);
this_letter; spirit(x_baryctr)>; endchar;
%
cmchar "Lowercase omicron with acute";
beginchar(oct"223",width#+.6u#,acc_ht#,0);
this_letter; acute(x_baryctr); endchar;
%
cmchar "Lowercase omicron with rough breathing and acute";
beginchar(oct"233",width#+.6u#,acc_ht#,0);
this_letter; spirit_acute(x_baryctr)<; endchar;
%
cmchar "Lowercase omicron with smooth breathing and acute";
beginchar(oct"243",width#+.6u#,acc_ht#,0);
this_letter; spirit_acute(x_baryctr)>; endchar;
%
cmchar "Lowercase omicron with rough breathing and grave";
beginchar(oct"263",width#+.6u#,acc_ht#,0);
this_letter; spirit_grave(x_baryctr)<; endchar;
%
cmchar "Lowercase omicron with smooth breathing and grave";
beginchar(oct"273",width#+.6u#,acc_ht#,0);
this_letter; spirit_grave(x_baryctr)>; endchar;
%
cmchar "Lowercase omicron with grave";
beginchar(oct"253",width#+.6u#,acc_ht#,0);
this_letter; grave(x_baryctr); endchar;
%
picture savedpicture;
%
% ======================================================================
% PI
% ======================================================================
%
def dims = 9u#,x_height#,0 enddef;
def ital = 0 enddef;
def fit_params = -.25,0 enddef;
%
def gen_letter =
adjust_fit(0,0); w:=w+u; pi_stroke; % hook and bar
pos4(hair,0); pos6(hair,0); x4=3.5u; x6=w-4u; y4=y6=y2;
x5=3u; x7=w-2.5u; y5=y7=.5stem-oo;
pair v[]; v1=(z4-z5) xscaled 3.14159; v2=(z6-z7) xscaled 3.14159;
pos5(stem,angle v1-90); pos7(stem,angle v2-90);
filldraw circ_stroke z5e{v1}...{up}z4e;  % left stem
filldraw circ_stroke z7e{v2}...{up}z6e;  % right stem
math_fit(-.7x_height#*slant+.5hair#+.5u#,ic#-1/3x_height#*slant);
enddef;
%
cmchar "Lowercase pi";
beginchar("p",dims);
this_letter; penlabels(1,2,3,4,5,6,7); endchar;
%
picture savedpicture;
%
% ======================================================================
% RO
% ======================================================================
%
def width = 7u enddef;
def height = x_height enddef;
def depth = desc_depth enddef;
def dims = width#,height#,depth# enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
%
def gen_letter =
adjust_fit(0,0); pickup fine.nib; w:=w+1.25u;
pos2(stem,180); pos3(vair,90); pos4(curve,0); pos5(vair,-90); pos6(stem,-180);
lft x2r=hround(1.5u-.5stem); x2=x6; x3=x5=.5[x2,x4];
rt x4r=hround(w-1.5u+.5curve);
y2=y4=y6=.5[y3,y5]; top y3r=h+oo; bot y5r=-oo;
filldraw circ_stroke pulled_arc.e(2,3) & pulled_arc.e(3,4)
 & pulled_arc.e(4,5) & pulled_arc.e(5,6);  % bowl
pos2'(hair,-180); z2'r=z2r; pos1(vstem,-90); pos1'(vstem,90); z1'=z1;
pos0(hair,0); rt x0r=hround(w-u); bot y0=-d; bot y1r=vround-.9d; x1=x5;
interim superness:=sqrt superness;
filldraw stroke pulled_arc.e(0,1'); filldraw stroke pulled_arc.e(1,2'); % tail
math_fit(desc_depth#*slant+.5stem#-u#,ic#);
  numeric x_baryctr; x_baryctr=x3;
  traba(-.5u);  % breathing placement
enddef;
%
cmchar "Lowercase rho";
beginchar("r",dims);
this_letter; penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
%

cmchar "Lowercase rho with rough breathing";
beginchar(oct"346",width#,acc_ht#,depth#);
this_letter; spirit(x_baryctr)<; endchar;

cmchar "Lowercase rho with smooth breathing";
beginchar(oct"356",width#,acc_ht#,depth#);
this_letter; spirit(x_baryctr)>; endchar;
%
picture savedpicture;
 
% ======================================================================
% SIGMA TELIKO
% ======================================================================
 
def dims= 7u#,x_height#,.5min(desc_depth#,.5x_height#) enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
 
def gen_letter =
adjust_fit(0,0); pickup fine.nib; w:=w+u;
numeric heavy_vair; heavy_vair=.25[vair,vstem];
pos1(heavy_vair,-110); pos2(vair,-90);
x1+.5heavy_vair=hround(w-u); y1=.1[y2r,bar_height];
x2=min(.5w+u,x1r-eps); top y2l=h+oo;
filldraw circ_stroke z1e{x2-x1,2(y2-y1)}...{left}z2e;  % upper bulb
numeric theta; theta=90-angle(16u,x_height); slope:=-x_height/16u;
pos6(stem,theta); pos7(vair,-90); pos8(vair,-135);
lft x4l=hround u; x4r-x4l=(hround .5[vair,stem])-fine;
x6=x7=w-2u; x8=.5w+u; y6=.25[y8,y2]; y8=y7+1/8d; bot y7r=-d-oo;
ellipse_set(2l,4l,5l,6l); ellipse_set(2r,4r,5r,6r); y4=y4r;
filldraw circ_stroke z8e{x7-x8,2(y7-y8)}...z7e{right}...z6e
 ---z5e...{up}z4e...{right}z2e;  % main stroke
math_fit(-.5x_height#*slant-.5u#,0);
traba(-.5u);
enddef;
 
cmchar "Final lowercase sigma";
beginchar("c",dims);
this_letter; penlabels(1,2,3,4,5,6,7,8); endchar;
 
numeric gen_sigma; gen_sigma=1;
 
% ======================================================================
% SIGMA 
% ======================================================================
 
def dim_sigma =  8.75u#,x_height#,0 enddef;
def ital_sigma = 0 enddef;
def fit_params_sigma = 0,.75u# enddef;
 
def mid_sigma=
italcorr ital_sigma; adjust_fit(fit_params_sigma);
if known pic.c: currentpicture:=pic.c; else: gen_mid_sigma; fi
if not working_hard : picture pic.c; pic.c=currentpicture; fi
enddef;
 
def gen_mid_sigma =
adjust_fit(0,0); pickup fine.nib; w:=w+1.5u;
pos1(vstem,90); pos2(stem,0); pos3(vair,-90);
pos4(stem,-180); pos5(vstem,-270); pos6(vstem,-270);
x1=x3=x5=.5[x2,x4]; rt x2r=hround(w-2.5u);
lft x4r=hround(1.5u-.5curve);x6=w-1.5u;
top y1r=h; y2=y4=.5[y1,y3]; bot y3r=-oo; y5=y6=y1;
filldraw circ_stroke z6e..pulled_arc.e(5,4) & pulled_arc.e(4,3)
 & pulled_arc.e(3,2) & pulled_arc.e(2,1);  % ear and bowl
math_fit(-.3x_height#*slant+.5curve#-u#,ic#-1/3x_height#*slant);
traba(-.5u);
enddef;
 
cmchar "Initial and medial lowercase sigma";
beginchar("s",dim_sigma);
mid_sigma; penlabels(1,2,3,4,5,6); endchar;
 
picture savedpicture;
 
% ======================================================================
% TAU
% ======================================================================
 
def dims = 7.2u#,x_height#,0 enddef;
def ital = 0 enddef;
def fit_params = -.25,0 enddef;
 
def gen_letter=
adjust_fit(0,0); w:=w+u; pi_stroke; % hook and bar
pos4(stem,0);
x4-.5stem=hround(.5w-.5u-.5stem); y4=y2; x5=x4-.25u; x7=x4+3u;
hook_out(5,6,7)(skewed);
filldraw circ_stroke z4e{down}...{-u,-x_height}z5e;  % stem
math_fit(-.7x_height#*slant+.5hair#+.5u#,-.5u#);
enddef;
 
cmchar "Lowercase tau";
beginchar("t",dims);
this_letter; penlabels(1,2,3,4,5,6,7); endchar;
 
picture savedpicture;
 
% ======================================================================
% YPSILON
% ======================================================================
 
 
def width = 8.5u enddef;
def dims = width#,x_height#,0 enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
def acc_corr =.5u enddef;
 
def gen_letter=
adjust_fit(0,0); pickup fine.nib;
w:=w+.5u; interim superness:=more_super;
x0=0; x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem);
hook_in(0,1,2)(skewed);  % opening hook
pos2'(stem,-180); z2'=z2; pos4(vair,-90); pos5(hair,0);
x4=.5w+u; rt x5r=hround(w-.5u); y3=.7[y4,y5]; bot y4r=-oo; y5=.57h;
filldraw stroke z2'e{-u,-x_height}...super_arc.e(3,4)
 ..tension atleast 1.05..{up}z5e; % left stem and arc
v_bulb(5,6);  % closing bulb
math_fit(-2/3x_height#*slant+.5hair#+.5u#,2/3ic#);
  numeric x_baryctr; x_baryctr=x4-u;
enddef;
 
cmchar "Lowercase upsilon";
beginchar("u",dims);
this_letter; penlabels(0,1,2,3,4,5,6,7); endchar;

%
cmchar "Lowercase upsilon with rough breathing";
beginchar(oct"206",width#+.9u#,acc_ht#,0);
this_letter; spirit(x_baryctr)<; endchar;
%
cmchar "Lowercase upsilon with smooth breathing";
beginchar(oct"216",width#+.9u#,acc_ht#,0);
this_letter; spirit(x_baryctr)>; endchar;
%
cmchar "Lowercase upsilon with acute";
beginchar(oct"226",width#+.9u#,acc_ht#,0);
this_letter; acute(x_baryctr); endchar;
%
cmchar "Lowercase upsilon with rough breathing and acute";
beginchar(oct"236",width#+.9u#,acc_ht#,0);
this_letter; spirit_acute(x_baryctr)<; endchar;
%
cmchar "Lowercase upsilon with smooth breathing and acute";
beginchar(oct"246",width#+.9u#,acc_ht#,0);
this_letter; spirit_acute(x_baryctr)>; endchar;
%
cmchar "Lowercase upsilon with rough breathing and grave";
beginchar(oct"266",width#+.9u#,acc_ht#,0);
this_letter; spirit_grave(x_baryctr)<; endchar;
%
cmchar "Lowercase upsilon with smooth breathing and grave";
beginchar(oct"276",width#+.9u#,acc_ht#,0);
this_letter; spirit_grave(x_baryctr)>; endchar;
%
cmchar "Lowercase upsilon with circumflex";
beginchar(oct"247",width#+.9u#,circ_ht#,0);
this_letter; circumflex(x_baryctr); endchar;
%
cmchar "Lowercase upsilon with grave";
beginchar(oct"256",width#+.9u#,acc_ht#,0);
this_letter; grave(x_baryctr); endchar;
%
cmchar "Lowercase upsilon with rough breathing and circumflex";
beginchar(oct"306",width#+.9u#,Circ_ht#,0);
this_letter; spirit_circumflex(x_baryctr)<; endchar;
%
cmchar "Lowercase upsilon with smooth breathing and circumflex";
beginchar(oct"316",width#+.9u#,Circ_ht#,0);
this_letter; spirit_circumflex(x_baryctr)>; endchar;
%
cmchar "Lowercase upsilon with diaeresis";
beginchar(oct"014",width#+.9u#,circ_ht#,0);
this_letter; diaeresis(x_baryctr); endchar;

cmchar "Lowercase upsilon with diaeresis and grave";
beginchar(oct"016",width#+.9u#,acc_ht#,0);
this_letter; diaeresis_grave(x_baryctr); endchar;

cmchar "Lowercase upsilon with diaeresis and acute";
beginchar(oct"015",width#+.9u#,acc_ht#,0);
this_letter; diaeresis_acute(x_baryctr); endchar;

cmchar "Lowercase upsilon with diaeresis and circumflex";
beginchar(oct"017",width#+.9u#,Circ_ht#,0);
this_letter; diaeresis_circumflex(x_baryctr); endchar;

picture savedpicture;
%
% ======================================================================
% FI
% ======================================================================
%
def dims = 10.5u#,x_height#,desc_depth# enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
%
def gen_letter =
adjust_fit(0,0); pickup fine.nib; w:=w+.5u;
pos1(hair,-180); x1=x2+.75u; top y1=h;
pos2(hair,-180); lft x2r=hround .5u; y2=bar_height;
pos3(vstem,-90); x3=.5(w+u); bot y3r=-oo;
pos4(hair,0); rt x4r=hround(w-.5u); y4=y2;
pos5(vstem,90); x5=.52[x6,x4]; top y5r=h+oo;
pos6(hair,180); x6=x7; y6=1/3h;
pos7(stem,180); lft x7r=hround(.5w-.5u-.5stem); y7-.5stem=-d-o;
filldraw circ_stroke z7e---z6e...{right}z5e...{down}z4e...{left}z3e
 ...{up}z2e...{3(x1-x2),y1-y2}z1e;  % bowl and stem
math_fit(-.3x_height#*slant,ic#);
enddef;
%
cmchar "Lowercase phi";
beginchar("f",dims);
this_letter; penlabels(1,2,3,4,5,6,7); endchar;
%
picture savedpicture;
%
% ======================================================================
% QI
% ======================================================================
%
def ital = 0 enddef;
def fit_params = 0,0 enddef;
def dims =  9u#,x_height#,desc_depth# enddef;
 
def gen_letter=
adjust_fit(0,0); pickup fine.nib; w:=w+u;
pos1(hair,180); pos2(vair,80); pos5(vair,80); pos6(hair,180);
x1-.5hair=hround-.5hair; x6=w-x1; x2=w-x5=u;
y1=y2l-h/8; top y2r=h+oo; bot y5l=-d-oo; y6=y5r+h/8;
z0=.5[z2,z5]; z2'=z2l+(.5u,0); z5'=z5r-(.5u,0);
numeric theta; theta=angle(z5'-z2')+90;
pos3(stem,theta); pos4(stem,theta);
y3r=y2r-h/8; y4l=y5l+h/8; z3l=whatever[z2',z0]; z4r=whatever[z0,z5'];
filldraw stroke z1e{up}...z2e{right}...z3e{z4r-z3l}
 ..z4e{z4r-z3l}...{right}z5e...{up}z6e;  % major diagonal and hooks
x8=w-x7=2u; y7+.5hair=h; y8-.5hair=-d;
numeric theta; theta=angle(z7-z8)-90;
pos7(hair,theta); pos8(hair,theta);
filldraw z7l---z8l..z8r---z7r..cycle;  % minor diagonal
math_fit((desc_depth#-x_height#)*slant+ic#,ic#);traba(.3u);
enddef;
 
cmchar "Lowercase chi";
beginchar("q",dims);
this_letter; penlabels(0,1,2,2',3,4,5',5,6,7,8); endchar;
 
picture savedpicture;
 
% ======================================================================
% YI
% ======================================================================
 
def dims = 10.5u#,asc_height#,desc_depth# enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
 
def gen_letter =
adjust_fit(0,0); pickup fine.nib;
w:=w+.5u; interim superness:=more_super;
x0=0; x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem);
hook_in(0,1,2)(skewed);  % opening hook
pos2'(stem,-180); z2'=z2; pos4(vair,-90); pos5(hair,0);
x4=.5w+u; rt x5r=hround(w-.5u);
y3=.7[y4,y5]; bot y4r=-oo; y5=.57x_height;
filldraw stroke z2'e{-u,-x_height}...super_arc.e(3,4)
 ..tension atleast 1.05..{up}z5e; % left stem and arc
v_bulb(5,6);  % closing bulb
pos7(.5[hair,stem],0); pos8(.5[hair,stem],0); x7=x8=.5w+.5u;
top y7=h; bot y8=-d-oo;
filldraw stroke z7e--z8e;  % stem
math_fit(-2/3x_height#*slant+.5hair#+.5u#,2/3ic#);
enddef;
 
cmchar "Lowercase psi";
beginchar("y",dims);
this_letter; penlabels(0,1,2,3,4,5,6,7,8); endchar;
 
picture savedpicture;
%
% ======================================================================
% WMEGA
% ======================================================================
%
def width =  8.3u enddef;
def height = x_height enddef;
def dims = width#,height#,0 enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
def acc_corr=.5u enddef;
 
def gen_letter =
adjust_fit(0,0); pickup fine.nib; w:=w+1.2u;
pos2(hair,-180); lft x2r=hround.5u; y2=y4=y6=y8=bar_height;
y1+.5hair=h; x1=x2+.75u; pos1(hair,angle(2(x1-x2),y1-y2)+90);
pos3(vstem+dw,-90); pos4(hair,0); pos5(vair,90);
pos6(hair,180); pos7(vstem+dw,270); pos8(hair,360);
bot y3r=bot y7r=-oo; top y5r=vround(.2[y4,h]+.5vair);
x3=.5[x2,x4]; x7+.25u=.5[x6,x8]; rt x8r=hround(w-.5u);
x5+.5stem=hround(.5w+.5stem)+eps;
x5=.5[x4,x6]; rt x4r-lft x6r=min(stem,2hair)+2eps;
if x4l<x6l: x4l:=x6l:=x5; fi
filldraw circ_stroke z1e{2(x2-x1),y2-y1}...z2e{down}...z3e{right}
 ...{up}z4e...{left}z5e;  % left arc
filldraw stroke z5e{left}...z6e{down}...z7e{right}...{up}z8e;  % right arc
v_bulb(8,9);  % closing bulb
math_fit(-bar_height#*slant,2/3ic#);
  numeric x_baryctr; x_baryctr=.5[x4,x6];
  numeric pos_stem; pos_stem=x_baryctr; traba(-.5u);
enddef;
 
cmchar "Lowercase omega";
beginchar("w",dims);
this_letter; penlabels(1,2,3,4,5,6,7,8,9); endchar;
%
cmchar "Lowercase omega with rough breathing";
beginchar(oct"204",width#+u#,acc_ht#,0);
this_letter; spirit(x_baryctr)<; endchar;
%
cmchar "Lowercase omega with smooth breathing";
beginchar(oct"214",width#+u#,acc_ht#,0);
this_letter; spirit(x_baryctr)>; endchar;
%
cmchar "Lowercase omega with acute";
beginchar(oct"224",width#+u#,acc_ht#,0);
this_letter; acute(x_baryctr); endchar;
%
cmchar "Lowercase omega with rough breathing and acute";
beginchar(oct"234",width#+u#,acc_ht#,0);
this_letter; spirit_acute(x_baryctr)<; endchar;
%
cmchar "Lowercase omega with smooth breathing and acute";
beginchar(oct"244",width#+u#,acc_ht#,0);
this_letter; spirit_acute(x_baryctr)>; endchar;
%
cmchar "Lowercase omega with rough breathing and grave";
beginchar(oct"264",width#+u#,acc_ht#,0);
this_letter; spirit_grave(x_baryctr)<; endchar;
%
cmchar "Lowercase omega with smooth breathing and grave";
beginchar(oct"274",width#+u#,acc_ht#,0);
this_letter; spirit_grave(x_baryctr)>; endchar;
%
cmchar "Lowercase omega with circumflex";
beginchar(oct"227",width#+u#,circ_ht#,0);
this_letter; circumflex(x_baryctr); endchar;
%
%
cmchar "Lowercase omega with grave";
beginchar(oct"254",width#+u#,acc_ht#,0);
this_letter; grave(x_baryctr); endchar;
%
cmchar "Lowercase omega with rough breathing and circumflex";
beginchar(oct"304",width#+u#,Circ_ht#,0);
this_letter; spirit_circumflex(x_baryctr)<; endchar;

cmchar "Lowercase omega with smooth breathing and circumflex";
beginchar(oct"314",width#+u#,Circ_ht#,0);
this_letter; spirit_circumflex(x_baryctr)>; endchar;
%
cmchar "Lowercase omega with grave and iota subscript";
beginchar(oct"334",width#+u#,acc_ht#,iota_dp#);
this_letter; grave(x_baryctr); iota_sub(pos_stem); endchar;

cmchar "Lowercase omega with rough breathing and iota subscript";
beginchar(oct"344",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit(x_baryctr)<; iota_sub(pos_stem); endchar;

cmchar "Lowercase omega with smooth breathing and iota subscript";
beginchar(oct"354",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit(x_baryctr)>; iota_sub(pos_stem); endchar;

cmchar "Lowercase omega with acute and iota subscript";
beginchar(oct"325",width#+u#,acc_ht#,iota_dp#);
this_letter; acute(x_baryctr); iota_sub(pos_stem); endchar;

cmchar "Lowercase omega with rough breathing, acute and iota subscript";
beginchar(oct"335",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit_acute(x_baryctr)<; iota_sub(pos_stem); endchar;

cmchar "Lowercase omega with smooth breathing and acute and iota subscript";
beginchar(oct"345",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit_acute(x_baryctr)>; iota_sub(pos_stem); endchar;

cmchar "Lowercase omega with rough breathing, grave and iota subscript";
beginchar(oct"364",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit_grave(x_baryctr)<; iota_sub(pos_stem); endchar;

cmchar "Lowercase omega with smooth breathing and grave and iota subscript";
beginchar(oct"365",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit_grave(x_baryctr)>; iota_sub(pos_stem); endchar;

cmchar "Lowercase omega with circumflex and iota subscript";
beginchar(oct"355",width#+u#,circ_ht#,iota_dp#);
this_letter; circumflex(x_baryctr); iota_sub(pos_stem); endchar;

cmchar "Lowercase omega with rough breathing, circumflex and iota subscript";
beginchar(oct"326",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit_circumflex(x_baryctr)<; iota_sub(pos_stem); endchar;

cmchar "Lowercase omega with smooth breathing, circumflex and iota subscript";
beginchar(oct"336",width#+u#,acc_ht#,iota_dp#);
this_letter; spirit_circumflex(x_baryctr)>; iota_sub(pos_stem); endchar;

cmchar "Lowercase omega with iota subscript";
beginchar(oct"324",width#+u#,height#,iota_dp#);
this_letter; iota_sub(pos_stem); endchar;

picture pic.iota;
picture savedpicture;

endinput; 
% ======================================================================