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
|
% The Fetamont typeface extends the Logo fonts to
% complete the T1 encoding. The designs of the glyphs
% A, E, F, M, N, O, P, S, T are based on the
% Metafont constructions by D. E. Knuth.
% The glyphs Y and 1 imitate the shapes of the
% corresponding glyphs in the METATYPE1 logo
% that is due to the METATYPE1 team (Boguslaw Jackowski,
% Janusz M. Nowacki and Piotr Strzelczyk).
% There exists a LaTeX package for the Fetamont
% typeface. Both the package and the typeface
% are distributed under the terms of the
% LaTeX Project Public License (LPPL).
mode_setup;
if unknown slant: slant:=0 else: currenttransform:=
identity slanted slant yscaled aspect_ratio fi;
ho#:=o#; % horizontal overshoot
leftstemloc#:=2.5u#+s#; % position of left stem
font_coding_scheme "T1";
font_slant slant;
font_normal_space 6u#+2s#;
font_normal_stretch 3u#;
font_normal_shrink 2u#;
font_x_height x_ht#;
font_quad 18u#+2s#;
font_extra_space 2u#;
define_pixels(s,u);
define_whole_pixels(xgap);
define_whole_vertical_pixels(ygap);
define_blacker_pixels(px,py);
pickup pencircle xscaled px yscaled py rotated prot;
logo_pen:=savepen;
define_good_x_pixels(leftstemloc);
define_good_y_pixels(barheight,x_ht,ht);
define_corrected_pixels(o);
define_horizontal_corrected_pixels(ho);
% enc encodes names to numbers, so enc("A")=65
% altough defining an array first seems to be
% a good idea, it turns out that this variant
% is significantly faster!
def enc(expr name)=
if (font_coding_scheme_="T1"):
if name="grave":
0
elseif name="acute":
1
elseif name="circumflex":
2
elseif name="tilde":
3
elseif name="dieresis":
4
elseif name="hungarumlaut":
5
elseif name="ring":
6
elseif name="caron":
7
elseif name="breve":
8
elseif name="macron":
9
elseif name="dotaccent":
10
elseif name="cedilla":
11
elseif name="ogonek":
12
elseif name="quotesinglbase":
13
elseif name="guilsinglleft":
14
elseif name="guilsinglright":
15
elseif name="quotedblleft":
16
elseif name="quotedblright":
17
elseif name="quotedblbase":
18
elseif name="guillemotleft":
19
elseif name="guillemotright":
20
elseif name="endash":
21
elseif name="emdash":
22
elseif name="cwm":
23
elseif name="perthousandzero":
24
elseif name="dotlessi":
25
elseif name="dotlessj":
26
elseif name="ff":
27
elseif name="fi":
28
elseif name="fl":
29
elseif name="ffi":
30
elseif name="ffl":
31
elseif name="visiblespace":
32
elseif name="exclam":
33
elseif name="quotedbl":
34
elseif name="numbersign":
35
elseif name="dollar":
36
elseif name="percent":
37
elseif name="ampersand":
38
elseif name="quoteright":
39
elseif name="parenleft":
40
elseif name="parenright":
41
elseif name="asterisk":
42
elseif name="plus":
43
elseif name="comma":
44
elseif name="hyphen":
45
elseif name="period":
46
elseif name="slash":
47
elseif name="zero":
48
elseif name="one":
49
elseif name="two":
50
elseif name="three":
51
elseif name="four":
52
elseif name="five":
53
elseif name="six":
54
elseif name="seven":
55
elseif name="eight":
56
elseif name="nine":
57
elseif name="colon":
58
elseif name="semicolon":
59
elseif name="less":
60
elseif name="equal":
61
elseif name="greater":
62
elseif name="question":
63
elseif name="at":
64
elseif name="A":
65
elseif name="B":
66
elseif name="C":
67
elseif name="D":
68
elseif name="E":
69
elseif name="F":
70
elseif name="G":
71
elseif name="H":
72
elseif name="I":
73
elseif name="J":
74
elseif name="K":
75
elseif name="L":
76
elseif name="M":
77
elseif name="N":
78
elseif name="O":
79
elseif name="P":
80
elseif name="Q":
81
elseif name="R":
82
elseif name="S":
83
elseif name="T":
84
elseif name="U":
85
elseif name="V":
86
elseif name="W":
87
elseif name="X":
88
elseif name="Y":
89
elseif name="Z":
90
elseif name="bracketleft":
91
elseif name="backslash":
92
elseif name="bracketright":
93
elseif name="asciicircum":
94
elseif name="underscore":
95
elseif name="quoteleft":
96
elseif name="a":
97
elseif name="b":
98
elseif name="c":
99
elseif name="d":
100
elseif name="e":
101
elseif name="f":
102
elseif name="g":
103
elseif name="h":
104
elseif name="i":
105
elseif name="j":
106
elseif name="k":
107
elseif name="l":
108
elseif name="m":
109
elseif name="n":
110
elseif name="o":
111
elseif name="p":
112
elseif name="q":
113
elseif name="r":
114
elseif name="s":
115
elseif name="t":
116
elseif name="u":
117
elseif name="v":
118
elseif name="w":
119
elseif name="x":
120
elseif name="y":
121
elseif name="z":
122
elseif name="braceleft":
123
elseif name="bar":
124
elseif name="braceright":
125
elseif name="asciitilde":
126
elseif name="dash":
127
elseif name="Abreve":
128
elseif name="Aogonek":
129
elseif name="Cacute":
130
elseif name="Ccaron":
131
elseif name="Dcaron":
132
elseif name="Ecaron":
133
elseif name="Eogonek":
134
elseif name="Gbreve":
135
elseif name="Lacute":
136
elseif name="Lcaron":
137
elseif name="Lslash":
138
elseif name="Nacute":
139
elseif name="Ncaron":
140
elseif name="Eng":
141
elseif name="Ohungarumlaut":
142
elseif name="Racute":
143
elseif name="Rcaron":
144
elseif name="Sacute":
145
elseif name="Scaron":
146
elseif name="Scedilla":
147
elseif name="Tcaron":
148
elseif name="Tcedilla":
149
elseif name="Uhungarumlaut":
150
elseif name="Uring":
151
elseif name="Ydieresis":
152
elseif name="Zacute":
153
elseif name="Zcaron":
154
elseif name="Zdotaccent":
155
elseif name="IJ":
156
elseif name="Idotaccent":
157
elseif name="dcroat":
158
elseif name="section":
159
elseif name="abreve":
160
elseif name="aogonek":
161
elseif name="cacute":
162
elseif name="ccaron":
163
elseif name="dcaron":
164
elseif name="ecaron":
165
elseif name="eogonek":
166
elseif name="gbreve":
167
elseif name="lacute":
168
elseif name="lcaron":
169
elseif name="lslash":
170
elseif name="nacute":
171
elseif name="ncaron":
172
elseif name="eng":
173
elseif name="ohungarumlaut":
174
elseif name="racute":
175
elseif name="rcaron":
176
elseif name="sacute":
177
elseif name="scaron":
178
elseif name="scedilla":
179
elseif name="tcaron":
180
elseif name="tcedilla":
181
elseif name="uhungarumlaut":
182
elseif name="uring":
183
elseif name="ydieresis":
184
elseif name="zacute":
185
elseif name="zcaron":
186
elseif name="zdotaccent":
187
elseif name="ij":
188
elseif name="exclamdown":
189
elseif name="questiondown":
190
elseif name="sterling":
191
elseif name="Agrave":
192
elseif name="Aacute":
193
elseif name="Acircumflex":
194
elseif name="Atilde":
195
elseif name="Adieresis":
196
elseif name="Aring":
197
elseif name="AE":
198
elseif name="Ccedilla":
199
elseif name="Egrave":
200
elseif name="Eacute":
201
elseif name="Ecircumflex":
202
elseif name="Edieresis":
203
elseif name="Igrave":
204
elseif name="Iacute":
205
elseif name="Icircumflex":
206
elseif name="Idieresis":
207
elseif name="Eth":
208
elseif name="Ntilde":
209
elseif name="Ograve":
210
elseif name="Oacute":
211
elseif name="Ocircumflex":
212
elseif name="Otilde":
213
elseif name="Odieresis":
214
elseif name="OE":
215
elseif name="Oslash":
216
elseif name="Ugrave":
217
elseif name="Uacute":
218
elseif name="Ucircumflex":
219
elseif name="Udieresis":
220
elseif name="Yacute":
221
elseif name="Thorn":
222
elseif name="Germandbls":
223
elseif name="agrave":
224
elseif name="aacute":
225
elseif name="acircumflex":
226
elseif name="atilde":
227
elseif name="adieresis":
228
elseif name="aring":
229
elseif name="ae":
230
elseif name="ccedilla":
231
elseif name="egrave":
232
elseif name="eacute":
233
elseif name="ecircumflex":
234
elseif name="edieresis":
235
elseif name="igrave":
236
elseif name="iacute":
237
elseif name="icircumflex":
238
elseif name="idieresis":
239
elseif name="eth":
240
elseif name="ntilde":
241
elseif name="ograve":
242
elseif name="oacute":
243
elseif name="ocircumflex":
244
elseif name="otilde":
245
elseif name="odieresis":
246
elseif name="oe":
247
elseif name="oslash":
248
elseif name="ugrave":
249
elseif name="uacute":
250
elseif name="ucircumflex":
251
elseif name="udieresis":
252
elseif name="yacute":
253
elseif name="thorn":
254
elseif name="germandbls":
255
else:
errmessage("unknown name to encode");
fi
else:
errmessage("tell me somewhere that the font_coding_scheme is T1");
fi
enddef;
% the randomization is fixed
% but still special for every style
fixedseed:=2.71828designsize;
for i=1 upto length font_identifier_:
fixedseed:=fixedseed
+sqrt(ASCII(substring (i-1,i) of font_identifier_));
endfor
randomseed:=fixedseed;
vardef noise =
normaldeviate*craziness
enddef;
vardef randrt = %random direction towards right
(12u,normaldeviate*craziness)
enddef;
vardef randup = %random direction towards up
(normaldeviate*craziness,ht)
enddef;
code_offset:=0; %later used for small caps
numeric charwidths_[];
numeric charheights_[];
numeric chardepths_[];
numeric charitalcorrs_[];
picture charpictures_[];
pair charanchortops_[];
pair charanchorbots_[];
pair charanchortoprights_[];
def ffmchar(expr name, unit_width, height, depth) =
beginchar(enc(name)+code_offset,if unit_width=0: 0 else: unit_width*u#+2s# fi,height,depth);
pickup logo_pen
enddef;
extra_endchar := extra_endchar&"charpictures_[charcode]:=currentpicture;"
&"charwidths_[charcode]=charwd;"
&"charheights_[charcode]=charht;"
&"chardepths_[charcode]=chardp;"
&"charitalcorrs_[charcode]=charic;";
def ffmcombinedchar(expr namea,nameb,namec,anchor,height,depth) =
beginchar(enc(namea)+code_offset,charwidths_[enc(nameb)+code_offset],height,depth);
charic:=charitalcorrs_[enc(nameb)+code_offset];
addto currentpicture also charpictures_[enc(nameb)+code_offset];
if anchor="top":
addto currentpicture also charpictures_[enc(namec)] shifted
((charanchortops_[enc(nameb)+code_offset]-charanchortops_[enc(namec)]) slanted slant);
elseif anchor="bot":
addto currentpicture also charpictures_[enc(namec)] shifted
((charanchorbots_[enc(nameb)+code_offset]-charanchorbots_[enc(namec)]) slanted slant);
elseif anchor="topright":
addto currentpicture also charpictures_[enc(namec)] shifted
((charanchortoprights_[enc(nameb)+code_offset]-charanchortoprights_[enc(namec)]) slanted slant);
else:
errmessage "Wrong anchor name";
fi
endchar;
enddef;
% chain two chars like "f" and "l" to "fl"
def ffmchainedchar(expr namea,nameb,namec) =
beginchar(
enc(namea)+code_offset,
charwidths_[enc(nameb)+code_offset]
+charwidths_[enc(namec)+code_offset],
max(charheights_[enc(nameb)+code_offset],
charheights_[enc(namec)+code_offset]),
max(chardepths_[enc(nameb)+code_offset],
chardepths_[enc(namec)+code_offset])
);
charic:=charitalcorrs_[enc(nameb)+code_offset];
addto currentpicture also charpictures_[enc(nameb)+code_offset];
addto currentpicture also charpictures_[enc(namec)+code_offset]
shifted (charwidths_[enc(nameb)+code_offset]*hppp,0);
endchar;
enddef;
% copy a letter nameb to namea
def ffmcopiedchar(expr namea,nameb) =
beginchar(
enc(namea),
charwidths_[enc(nameb)],
charheights_[enc(nameb)],
chardepths_[enc(nameb)]
);
charic:=charitalcorrs_[enc(nameb)];
addto currentpicture also charpictures_[enc(nameb)];
endchar;
enddef;
% an arc is kind of a quarter of a skewed superellipse
vardef arc(expr zi,diri,zj,dirj) =
zi{diri}...
begingroup
save corner,zij;
pair corner,zij;
corner=zi+whatever*diri=zj+whatever*dirj;
zij=zi
+superness*(corner-zi)
+(1-superness)*(zj-corner);
zij
endgroup{zj-zi}
...zj{dirj}
enddef;
% two concatenated arcs
def half(expr zi,diri,zj,dirj,zk,dirk) =
arc(zi,diri,zj,dirj)
& arc(zj,dirj,zk,dirk)
enddef;
% two concatenated halfs
def full(expr zi,diri,zj,dirj,zk,dirk,zl,dirl) =
half(zi,diri,zj,dirj,zk,dirk)
& half(zk,dirk,zl,dirl,zi,diri)
enddef;
% for dots...
def dotcircle(expr zi,zj) =
zi..zj..cycle & zi
enddef;
% general letters with no lowercase counterpart
input ffmchars_nonscalable
% uppercase with lowercase counterpart
input ffmchars_scalable
% uppercase with no lowercase counterpart
ffmcombinedchar("Idotaccent","I","dotaccent","top",ht#+acc_ht#,0);
% now try again with lowercase settings
ht#:=x_ht#; % new characters height (for lowercase)
u#:=.9u#; % new unit width
barheight#:=.5x_ht#; % new height of bar lines (for lowercase)
define_pixels(u);
define_good_y_pixels(barheight);
code_offset:=ASCII"a" - ASCII"A";
input ffmchars_scalable
% restore the most important things
code_offset:=0;
u#:=u#/.9;
define_pixels(u);
ffmcopiedchar("dotlessi","i");
ffmcopiedchar("dotlessj","j");
ffmcopiedchar("dcroat","eth");
ffmchainedchar("ff","f","f");
ffmchainedchar("fi","f","i");
ffmchainedchar("fl","f","l");
ffmchainedchar("ffi","ff","i");
ffmchainedchar("ffl","ff","l");
% kernings
numeric kernclassesf_[][], % list of kerning classes (first position)
kernclassess_[][], % list of kerning classes (second position)
ligmatrix_[][][]; % matrix with kern and ligature entries: 255 times X times 2
kernclassesf_[0][0]=0; % number of kernclassesf (will be increased)
kernclassess_[0][0]=0; % number of kernclassess (will be increased)
for i=0 upto 255:
ligmatrix_[i][0][0]:=0; % every char i begins with no kernings (will be increased)
endfor
def addkernclassf(text a) = % add a kerning class to kernclassesf
kernclassesf_[0][0]:=kernclassesf_[0][0]+1; % number of kernclassesf
begingroup
save i;
i:=0; % number of chars in current class
for b=a:
i:=i+1;
kernclassesf_[kernclassesf_[0][0]][i]:=enc(b);
endfor
% number of chars in current class is stored at 0th position
kernclassesf_[kernclassesf_[0][0]][0]:=i;
endgroup
enddef;
def addkernclasss(text a) = % add a kerning class to kernclassess
kernclassess_[0][0]:=kernclassess_[0][0]+1; % number of kernclassess
begingroup
save i,n;
n:=kernclassess_[0][0]; % current last class (being written)
i:=0; % number of chars in current class
for b=a:
i:=i+1;
kernclassess_[n][i]:=enc(b);
endfor
% number of chars in current class is stored at 0th position
kernclassess_[n][0]:=i;
endgroup
enddef;
def addlig(expr first,second,third) = % replace first and second to the ligature third
begingroup
save i,n;
i:=enc(first); % encoding number of first
ligmatrix_[i][0][0]:=ligmatrix_[i][0][0]+1;
n:=ligmatrix_[i][0][0]; % current last ligature entry index of i (being written)
ligmatrix_[i][0][0]:=n;
ligmatrix_[i][n][0]:=-enc(second); % the minus is a flag for "ligature" instead of "kern"
ligmatrix_[i][n][1]:=enc(third);
endgroup
enddef;
def addclasskern(expr first,second,kvalue) = % kern all chars of first class and second class by kvalue
begingroup
save i,j,m,n;
% get the indices i and j of the two classes:
i:=0; % default value (cannot be true)
j:=0; % default value (cannot be true)
forever:
i:=i+1;
exitif kernclassesf_[i][1]=enc(first);
if i>255:
errmessage("unknown first kerning class");
fi
endfor
forever:
j:=j+1;
exitif kernclassess_[j][1]=enc(second);
if j>255:
errmessage("unknown first kerning class");
fi
endfor
for k=1 upto kernclassesf_[i][0]:
m:=kernclassesf_[i][k]; % current first glyph
for l=1 upto kernclassess_[j][0]:
ligmatrix_[m][0][0]:=ligmatrix_[m][0][0]+1;
n:=ligmatrix_[m][0][0]; % current last entry index (being written)
ligmatrix_[m][n][0]:=kernclassess_[j][l];
ligmatrix_[m][n][1]:=kvalue;
endfor
endfor
endgroup
enddef;
def writeligtable = % write all kernings/ligatures at once
begingroup
save n;
for i=0 upto 255: % current glyph i
n:=ligmatrix_[i][0][0]; % number n of entries for glyph i
if n<>0: % skip empty entries
ligtable i:
for j=1 upto n-1: %last entry needs a semicolon
if ligmatrix_[i][j][0]<0: % the minus is a flag for "ligature"
-ligmatrix_[i][j][0]=:ligmatrix_[i][j][1],
else:
ligmatrix_[i][j][0] kern ligmatrix_[i][j][1],
fi
endfor
%last entry needs a semicolon:
if ligmatrix_[i][n][0]<0: % the minus is a flag for "ligature"
-ligmatrix_[i][n][0]=:ligmatrix_[i][n][1];
else:
ligmatrix_[i][n][0] kern ligmatrix_[i][n][1];
fi
fi
endfor
endgroup
enddef;
addkernclassf("A","Abreve","Aogonek","Agrave","Aacute","Acircumflex","Atilde","Adieresis","Aring");
addkernclassf("B");
addkernclassf("C","Cacute","Ccaron","Ccedilla");
addkernclassf("D","Dcaron","O","Ohungarumlaut","Ograve","Oacute","Ocircumflex","Otilde","Odieresis","Eth");
addkernclassf("F");
addkernclassf("J","U","Uhungarumlaut","Ugrave","Uacute","Ucircumflex","Udieresis","IJ","Oslash");
addkernclassf("K","X");
addkernclassf("L","Lacute","Lcaron","Lslash");
addkernclassf("P");
addkernclassf("Thorn");
addkernclassf("Q");
addkernclassf("R","Racute","Rcaron");
addkernclassf("S","Sacute","Scedilla","Scaron");
addkernclassf("T","Tcaron","Tcedilla");
addkernclassf("V","W");
addkernclassf("Y","Ydieresis","Yacute");
addkernclassf("Z","Zacute","Zcaron","Zdotaccent");
addkernclassf("a","abreve","aogonek","agrave","aacute","acircumflex","atilde","adieresis","aring");
addkernclassf("b");
addkernclassf("c","cacute","ccaron","ccedilla");
addkernclassf("d","dcaron","o","ohungarumlaut","ograve","oacute","ocircumflex","otilde","odieresis","eth");
addkernclassf("f");
addkernclassf("j","u","uhungarumlaut","ugrave","uacute","ucircumflex","udieresis","ij","oslash");
addkernclassf("k","x");
addkernclassf("l","lacute","lcaron","lslash");
addkernclassf("p");
addkernclassf("thorn");
addkernclassf("q");
addkernclassf("r","racute","rcaron");
addkernclassf("s","scedilla","sacute","scaron");
addkernclassf("t","tcaron","tcedilla");
addkernclassf("v","w");
addkernclassf("y","ydieresis","yacute");
addkernclassf("zero","three","eight","nine");
addkernclassf("two");
addkernclassf("four");
addkernclassf("five","six");
addkernclassf("seven");
addkernclasss("A","Abreve","Aogonek","Agrave","Aacute","Acircumflex","Atilde","Adieresis","Aring","AE","Germandbls");
addkernclasss("C","G","O","Q","Cacute","Ccaron","Gbreve","Ohungarumlaut","Ccedilla","Ograve","Oacute","Ocircumflex","Otilde","Odieresis","OE","Oslash");
addkernclasss("J");
addkernclasss("S","Sacute","Scedilla","Scaron");
addkernclasss("T","Tcaron","Tcedilla");
addkernclasss("U","Uhungarumlaut","Ugrave","Uacute","Ucircumflex","Udieresis","IJ","Oslash");
addkernclasss("V","W");
addkernclasss("X");
addkernclasss("Y","Ydieresis","Yacute");
addkernclasss("a","aogonek","ae","germandbls");
addkernclasss("abreve","agrave","aacute","acircumflex","atilde","adieresis","aring");
addkernclasss("b","d","e","f","h","i","k","l","m","n","p","r","eogonek","lslash","lcaron","eng","thorn");
addkernclasss("dcaron","ecaron","lacute","nacute","ncaron","racute","rcaron","egrave","eacute","edieresis","igrave","iacute","icircumflex","idieresis","ntilde");
addkernclasss("c","g","o","q","ccedilla","oe","oslash");
addkernclasss("cacute","ccaron","gbreve","ohungarumlaut","ograve","oacute","ocircumflex","otilde","odieresis");
addkernclasss("j");
addkernclasss("s","scedilla");
addkernclasss("sacute","scaron");
addkernclasss("t","tcedilla");
addkernclasss("tcaron");
addkernclasss("u");
addkernclasss("uhungarumlaut","ugrave","uacute","ucircumflex","udieresis","ij");
addkernclasss("v","w");
addkernclasss("x");
addkernclasss("y");
addkernclasss("ydieresis","yacute");
addkernclasss("z");
addkernclasss("zacute","zcaron","zdotaccent");
addkernclasss("period","comma");
addkernclasss("zero","six","eight");
addkernclasss("one");
addkernclasss("two");
addkernclasss("three");
addkernclasss("four");
addkernclasss("five");
addkernclasss("seven");
addkernclasss("nine");
addclasskern("A","T",-.5u#);
addclasskern("A","V",-.25u#);
addclasskern("A","one",-.25u#);
addclasskern("A","three",-.5u#);
addclasskern("A","seven",-u#);
addclasskern("B","C",.5u#);
addclasskern("B","T",-u#);
addclasskern("B","V",-.5u#);
addclasskern("B","c",.5u#);
addclasskern("B","cacute",.5u#);
addclasskern("B","zero",.5u#);
addclasskern("B","seven",-u#);
addclasskern("C","C",-.5u#);
addclasskern("C","zero",-.5u#);
addclasskern("C","one",-u#);
addclasskern("C","four",-u#);
addclasskern("D","C",u#);
addclasskern("D","S",.5u#); % make compatible with METAPOST-logo
addclasskern("D","T",-.5u#);
addclasskern("D","X",-.5u#);
addclasskern("D","c",.5u#);
addclasskern("D","cacute",.5u#);
addclasskern("D","s",.5u#);
addclasskern("D","period",-u#);
addclasskern("D","zero",.5u#);
addclasskern("D","one",.5u#);
addclasskern("D","two",.5u#);
addclasskern("D","four",.5u#);
addclasskern("D","nine",u#);
addclasskern("F","C",-u#); % original
addclasskern("F","J",-3u#);
addclasskern("F","c",-u#);
addclasskern("F","cacute",-u#);
addclasskern("F","j",-3u#);
addclasskern("F","period",-3u#);
addclasskern("F","zero",-u#);
addclasskern("F","one",-.5u#);
addclasskern("F","two",-.5u#);
addclasskern("F","three",-.5u#);
addclasskern("F","four",-u#);
addclasskern("F","seven",-.5u#);
addclasskern("J","period",-u#);
addclasskern("J","three",-.5u#);
addclasskern("J","four",-.5u#);
addclasskern("K","C",-.5u#);
addclasskern("K","t",-u#);
addclasskern("K","one",-.5u#);
addclasskern("K","two",.5u#);
addclasskern("K","three",.5u#);
addclasskern("K","four",-.5u#);
addclasskern("L","T",-2.5u#);
addclasskern("L","V",-2u#);
addclasskern("L","Y",-2u#);
addclasskern("L","t",-2.5u#);
addclasskern("L","tcaron",-2.5u#);
addclasskern("L","v",-1.5u#);
addclasskern("L","y",-1.5u#);
addclasskern("L","ydieresis",-1.5u#);
addclasskern("L","zero",.5u#);
addclasskern("L","one",-u#);
addclasskern("L","two",.5u#);
addclasskern("L","three",.5u#);
addclasskern("L","seven",-u#);
addclasskern("P","C",u#); % original
addclasskern("P","J",-2u#);
addclasskern("P","V",-.25u#);
addclasskern("P","c",u#);
addclasskern("P","cacute",u#);
addclasskern("P","j",-2u#);
addclasskern("P","period",-3u#);
addclasskern("P","zero",.5u#);
addclasskern("P","one",.5u#);
addclasskern("P","two",-.5u#);
addclasskern("P","three",-.5u#);
addclasskern("P","four",-.5u#);
addclasskern("P","seven",-.25u#);
addclasskern("P","nine",u#);
addclasskern("Thorn","T",-.5u#);
addclasskern("Thorn","V",-.25u#);
addclasskern("Thorn","X",-u#);
addclasskern("Thorn","period",-3u#);
addclasskern("Thorn","one",.5u#);
addclasskern("Thorn","three",-u#);
addclasskern("Thorn","seven",-.5u#);
addclasskern("Q","C",u#);
addclasskern("Q","S",.5u#);
addclasskern("Q","T",-.5u#);
addclasskern("Q","c",.5u#);
addclasskern("Q","cacute",.5u#);
addclasskern("Q","s",.5u#);
addclasskern("Q","zero",u#);
addclasskern("Q","one",.5u#);
addclasskern("Q","two",u#);
addclasskern("Q","three",.5u#);
addclasskern("Q","four",.5u#);
addclasskern("Q","five",.5u#);
addclasskern("Q","nine",u#);
addclasskern("R","C",u#);
addclasskern("R","zero",u#);
addclasskern("R","one",.5u#);
addclasskern("R","two",.5u#);
addclasskern("R","five",.5u#);
addclasskern("R","nine",u#);
addclasskern("S","C",u#);
addclasskern("S","T",-.5u#); % make compatible with METAPOST-logo
addclasskern("S","c",.5u#);
addclasskern("S","cacute",.5u#);
addclasskern("S","zero",.5u#);
addclasskern("S","three",-.5u#);
addclasskern("S","seven",-.5u#);
addclasskern("T","A",-.5u#); % original
addclasskern("T","C",-.5u#);
addclasskern("T","J",-2.5u#);
addclasskern("T","T",u#);
addclasskern("T","a",-1.5u#);
addclasskern("T","abreve",-u#);
addclasskern("T","b",-1.5u#);
addclasskern("T","dcaron",-u#);
addclasskern("T","c",-1.5u#);
addclasskern("T","cacute",-u#);
addclasskern("T","j",-u#);
addclasskern("T","s",-1.5u#);
addclasskern("T","sacute",-u#);
addclasskern("T","t",-1.5u#);
addclasskern("T","tcaron",-u#);
addclasskern("T","u",-1.5u#);
addclasskern("T","uhungarumlaut",-u#);
addclasskern("T","v",-1.5u#);
addclasskern("T","x",-1.5u#);
addclasskern("T","y",-1.5u#);
addclasskern("T","ydieresis",-u#);
addclasskern("T","z",-1.5u#);
addclasskern("T","zacute",-u#);
addclasskern("T","period",-3u#);
addclasskern("T","one",-.5u#);
addclasskern("T","two",.5u#);
addclasskern("T","three",.5u#);
addclasskern("T","four",-u#);
addclasskern("T","seven",u#);
addclasskern("V","A",-.25u#);
addclasskern("V","C",-.25u#);
addclasskern("V","J",-u#);
addclasskern("V","V",u#);
addclasskern("V","a",-u#);
addclasskern("V","abreve",-.5u#);
addclasskern("V","b",-.5u#);
addclasskern("V","c",-u#);
addclasskern("V","cacute",-.5u#);
addclasskern("V","j",-u#);
addclasskern("V","s",-u#);
addclasskern("V","sacute",-.5u#);
addclasskern("V","u",-.5u#);
addclasskern("V","x",-.5u#);
addclasskern("V","ydieresis",.5u#);
addclasskern("V","z",-.5u#);
addclasskern("V","period",-3u#);
addclasskern("V","zero",-.25u#);
addclasskern("V","four",-u#);
addclasskern("Y","C",-.5u#);
addclasskern("Y","J",-u#);
addclasskern("Y","j",-u#);
addclasskern("Y","period",-u#);
addclasskern("Y","zero",-.5u#);
addclasskern("Y","two",-u#);
addclasskern("Y","three",-.5u#);
addclasskern("Y","four",-u#);
addclasskern("Y","five",-.5u#);
addclasskern("Y","seven",-.5u#);
addclasskern("Z","C",-.5u#);
addclasskern("Z","zero",-.5u#);
addclasskern("Z","one",-u#);
addclasskern("Z","two",-.5u#);
addclasskern("Z","three",-.5u#);
addclasskern("Z","four",-u#);
addclasskern("Z","five",-.5u#);
addclasskern("Z","seven",-.5u#);
addclasskern("Z","nine",-.5u#);
addclasskern("a","t",-.5u#);
addclasskern("a","tcaron",-.5u#);
addclasskern("a","v",-.25u#);
addclasskern("b","c",.5u#);
addclasskern("b","cacute",.5u#);
addclasskern("b","t",-u#);
addclasskern("b","tcaron",-u#);
addclasskern("b","v",-.5u#);
addclasskern("c","c",-.5u#);
addclasskern("c","cacute",-.5u#);
addclasskern("c","four",-.5u#);
addclasskern("d","c",u#);
addclasskern("d","cacute",u#);
addclasskern("d","s",.5u#); % make compatible with METAPOST-logo
addclasskern("d","t",-.5u#);
addclasskern("d","tcaron",-.5u#);
addclasskern("d","x",-.5u#);
addclasskern("d","period",-u#);
addclasskern("d","zero",.5u#);
addclasskern("d","two",.5u#);
addclasskern("d","four",.5u#);
addclasskern("f","c",-u#);
addclasskern("f","cacute",-u#);
addclasskern("f","j",-3u#);
addclasskern("f","period",-3u#);
addclasskern("f","two",-u#);
addclasskern("f","four",-.5u#);
addclasskern("j","period",-u#);
addclasskern("k","c",-.5u#);
addclasskern("k","cacute",-.5u#);
addclasskern("k","zero",.5u#);
addclasskern("l","t",-2.5u#);
addclasskern("l","tcaron",-2.5u#);
addclasskern("l","v",-1.5u#);
addclasskern("l","y",-1.5u#);
addclasskern("l","ydieresis",-1.5u#);
addclasskern("p","c",u#);
addclasskern("p","j",-2u#);
addclasskern("p","v",-.25u#);
addclasskern("p","period",-3u#);
addclasskern("thorn","t",-.5u#);
addclasskern("thorn","tcaron",-.5u#);
addclasskern("thorn","v",-.25u#);
addclasskern("thorn","x",-u#);
addclasskern("thorn","period",-3u#);
addclasskern("q","t",-.5u#);
addclasskern("q","period",-u#);
addclasskern("q","zero",u#);
addclasskern("q","two",u#);
addclasskern("q","four",.5u#);
addclasskern("q","five",.5u#);
addclasskern("r","c",u#);
addclasskern("r","cacute",u#);
addclasskern("s","t",-.5u#); % make compatible with METAPOST-logo
addclasskern("s","c",.5u#);
addclasskern("s","cacute",.5u#);
addclasskern("t","a",-.5u#); % original
addclasskern("t","abreve",-.5u#);
addclasskern("t","c",-.5u#);
addclasskern("t","cacute",-.5u#);
addclasskern("t","j",-2.5u#);
addclasskern("t","t",u#);
addclasskern("t","tcaron",u#);
addclasskern("t","period",-3u#);
addclasskern("t","zero",.5u#);
addclasskern("v","a",-.25u#);
addclasskern("v","abreve",-.25u#);
addclasskern("v","c",-.25u#);
addclasskern("v","cacute",-.25u#);
addclasskern("v","j",-u#);
addclasskern("v","v",u#);
addclasskern("v","period",-3u#);
addclasskern("v","zero",.5u#);
addclasskern("y","j",-u#);
addclasskern("y","period",-u#);
addclasskern("y","zero",-.5u#);
addclasskern("y","four",-.5u#);
addclasskern("zero","C",.5u#);
addclasskern("zero","S",.5u#);
addclasskern("zero","V",-.5u#);
addclasskern("zero","c",.5u#);
addclasskern("zero","cacute",.5u#);
addclasskern("zero","j",.5u#);
addclasskern("zero","s",.5u#);
addclasskern("zero","sacute",.5u#);
addclasskern("zero","t",.5u#);
addclasskern("zero","tcaron",.5u#);
addclasskern("zero","v",.5u#);
addclasskern("zero","x",.5u#);
addclasskern("zero","y",-.5u#);
addclasskern("zero","ydieresis",-.5u#);
addclasskern("zero","period",-u#);
addclasskern("two","U",-.25u#);
addclasskern("two","V",-.5u#);
addclasskern("two","Y",-.5u#);
addclasskern("two","j",.5u#);
addclasskern("two","t",.5u#);
addclasskern("two","tcaron",.5u#);
addclasskern("two","y",-.5u#);
addclasskern("two","ydieresis",-.5u#);
addclasskern("four","C",.5u#);
addclasskern("four","V",-.5u#);
addclasskern("four","Y",-.5u#);
addclasskern("four","c",.5u#);
addclasskern("four","cacute",.5u#);
addclasskern("four","y",-.5u#);
addclasskern("four","ydieresis",-.5u#);
addclasskern("four","z",-.5u#);
addclasskern("five","y",-.5u#);
addclasskern("five","ydieresis",-.5u#);
addclasskern("seven","t",.5u#);
addclasskern("seven","tcaron",.5u#);
%remember: ligatures will overwrite existing kerning pairs
addlig("f","i","fi");
addlig("f","f","ff");
addlig("f","l","fl");
addlig("ff","i","ffi");
addlig("ff","l","ffl");
addlig("quoteleft","quoteleft","quotedblleft");
addlig("quoteright","quoteright","quotedblright");
addlig("comma","comma","quotedblbase");
addlig("hyphen","hyphen","endash");
addlig("endash","hyphen","emdash");
addlig("less","less","guillemotleft");
addlig("greater","greater","guillemotright");
addlig("exclam","quoteleft","exclamdown");
addlig("question","quoteleft","questiondown");
writeligtable;
bye.
|