summaryrefslogtreecommitdiff
path: root/language/turkish/mf/turkit.mf
blob: 5a222cf6ed8ccb7cdc872d570e38ede6508e2da9 (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
% Turkish Text Italic with full diacriticals, based on
% The Computer Modern Text Italic family (by D. E. Knuth, 1979--1985)

% Adapted for Turkish by P. A. MacKay, January, 1987.

% If command line includes |pxlfont=128;|, |use_pxl| becomes true
boolean use_pxl;
if unknown pxlfont: use_pxl:=false; else: use_pxl:=true; fi

% Use the roman questionmark for this class of fonts
% This will come out of romanp.mf if a 256-character font is being
% written, otherwise it will be supplied by conditional code in
% tkpnct.mf.  This code is activated by a known value in |romquery|.
if use_pxl: romquery=oct"077"; 
else: spanish_shriek=oct"016"; spanish_query=oct"017"; fi

if not monospace: izafet_dot= if use_pxl: oct"0175" else: oct"0375" fi ; fi

if ligs>0: font_coding_scheme:="TeX Turkish"
else: font_coding_scheme:="TeX typewriter Turkish" fi;

mode_setup; font_setup;

input romanu;  % upper case (majuscules)
input tkital;  % itall.mf lower case (minuscules) with undotted i
input itald;  % numerals
if ligs>0: input comlig; fi % ligatures common with roman text
input tkpnct;  % punctuation common to roman and italic (reduced set)
input aynhmz; % ayn and hamza, izafet dot |iff not monospace|
if use_pxl: 
else:
  input greeku;  % upper case Greek letters
  input romanp;  % ampersand, question marks, currency sign
  input romspl;  % lowercase specials (dotless \i, ligature \ae, etc.)
  input romspu;  % uppercase specials (\AE, \OE, \O)
  input accent;  % accents common to roman and italic text
  if ligs<=1: input romsub; fi  % substitutes for ligatures

  ligtable "!": "`" =: spanish_shriek;
  ligtable "?": "`" =: spanish_query;
  extra_endchar:=extra_endchar&"charcode:=charcode+code_offset";
  code_offset:=128; % move accented chars into 128..255 region
fi
input tkdotu; % upper case with dotted diacriticals
input tkdtil; % lower case italic with dotted diacriticals
input tkaccu; % upper case with assorted acents
input tkacil; % lower case italic assorted accents
if ligs<=0: input tksub; fi  % substitutes for ligatures

% A thoroughly mixed list of names for the accented characters.
% These follow English, Arabic and Turkish conventions rather arbitrarily
% Only the letters that appear more than once in the ligtable are coded here.

if use_pxl:
 HAT_A=oct"044"; CHIM=oct"013"; DAD=oct"000"; DHAL=oct"014"; 
 CUP_G=oct"015"; GHAYN=oct"001"; QAF=oct"004"; 
 DOT_O=oct"005"; TTA=oct"007"; 
 DOT_U=oct"010"; HAT_U=oct"046"; 
 hat_a=oct"074"; chim=oct"033"; dhal=oct"034"; dad=oct"020";
 cup_g=oct"035"; ghayn=oct"021"; 
 hha=oct"022"; kha=oct"036"; dot_i=oct"023"; hat_i=oct"075"; 
 qaf=oct"024"; gnaf=oct"037"; dot_o=oct"025";  hat_o=oct"040";
 tta=oct"027"; dot_u=oct"030"; hat_u=oct"076";
else:
 HAT_A=oct"0244"; CHIM=oct"0213"; DAD=oct"0200"; DHAL=oct"0214"; 
 CUP_G=oct"0215"; GHAYN=oct"0201"; QAF=oct"0204"; 
 DOT_O=oct"0205"; TTA=oct"0207"; 
 DOT_U=oct"0210"; HAT_U=oct"0246"; 
 hat_a=oct"0274"; chim=oct"0233"; dhal=oct"0234"; dad=oct"0220";
 cup_g=oct"0235"; ghayn=oct"0221"; 
 hha=oct"0222"; kha=oct"0236"; dot_i=oct"0223"; hat_i=oct"0275"; 
 qaf=oct"0224"; gnaf=oct"0237"; dot_o=oct"0225";  hat_o=oct"0240";
 tta=oct"0227"; dot_u=oct"0230"; hat_u=oct"0276";
fi

font_slant slant; font_x_height x_height#;

% Accent ligatures not complicated by questions of kerning
% good for both monospace and variable-space fonts.

ligtable "C": ":"=:CHIM; ligtable "G": ":"=:GHAYN, "="=:CUP_G;
ligtable "H": "="=:if use_pxl: oct"016" else: oct"0216" fi, 
              "!"=:if use_pxl: oct"002" else: oct"0202" fi; 
ligtable "I": ":"=:if use_pxl: oct"003" else: oct"0203" fi, 
               "="=:if use_pxl: oct"045" else: oct"0245" fi;
ligtable "N": "="=:if use_pxl: oct"017" else: oct"0217" fi;
ligtable "S": ":"=:if use_pxl: oct"052" else: oct"0252" fi, 
              "="=:if use_pxl: oct"0136" else: oct"0336" fi, 
              "!"=:if use_pxl: oct"006" else: oct"0206" fi;
ligtable "U": ":"=:DOT_U, "="=:HAT_U;
ligtable "Z": ":"=:if use_pxl: oct"011" else: oct"0211" fi, 
              "="=:if use_pxl: oct"0137" else: oct"0337" fi, 
              "!"=:if use_pxl: oct"012" else: oct"0212" fi;

ligtable "a": "="=:hat_a;
ligtable "g": ":"=:ghayn, "="=:cup_g;
ligtable "h": "="=:kha, "!"=:hha; 
ligtable "i": ":"=:dot_i, "="=:hat_i;
ligtable "s": ":"=:if use_pxl: oct"053" else: oct"0253" fi, 
              "="=:if use_pxl: oct"0176" else: oct"0376" fi, 
              "!"=:if use_pxl: oct"026" else: oct"0226" fi;
ligtable "t": "!"=:tta;
ligtable "u": ":"=:dot_u, "="=:hat_u; 
ligtable "z": ":"=:if use_pxl: oct"031" else: oct"0231" fi, 
              "="=:if use_pxl: oct"0177" else: oct"0377" fi, 
              "!"=:if use_pxl: oct"032" else: oct"0232" fi;

if monospace: font_normal_space 9u#; % no stretching or shrinking
 font_quad 18u#;
 font_extra_space 9u#;
 letter_fit#:=letter_fit:=0;
 ligtable "A": "="=:HAT_A;
 ligtable "D": "="=:DHAL, "!"=:DAD;
 ligtable "K": "!"=:QAF; ligtable "k": "!"=:qaf;
 ligtable "O": ":"=:DOT_O; % no |hat_o| here
 ligtable "T": "!"=:TTA; 
 ligtable "c": ":"=:chim; ligtable "d": "="=:dhal, "!"=:dad; 
 ligtable "n": "="=:gnaf; ligtable "o": ":"=:dot_o; % no |hat_o| here
else: font_normal_space 6u#+2letter_fit#;
 font_normal_stretch 3u#; font_normal_shrink 2u#;
 font_quad 18u#+4letter_fit#;
 font_extra_space 2u#; 
 k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning

% The following ligtable entries are based on the entries in
% roman.mf.  It has been necessary to extract many parts of the
% original entries in order to keep the ligature structure clear.

 ligtable "F": "V": "o" kern kk#, dot_o kern kk#, hat_o kern kk#, 
   "e" kern kk#,
   "u" kern kk#, dot_u kern kk#, hat_u kern kk#, 
   "r" kern kk#, "a" kern kk#, hat_a kern kk#, 
   "A" kern kkk#, HAT_A kern kkk#,
  "K": "!"=:QAF,
  QAF: "X": "O" kern k#, DOT_O kern k#, "C" kern k#, CHIM kern k#, 
   "G" kern k#, GHAYN kern k#, CUP_G kern k#, "Q" kern k#;

 ligtable "T": "!"=:TTA, TTA: "y" kern kk#,
  "Y": "e" kern kk#, "o" kern kk#, dot_o kern kk#, hat_o kern kk#, 
   "r" kern kk#, "a" kern kk#, hat_a kern kk#, 
   "u" kern kk#, dot_u kern kk#, hat_u kern kk#,
  "P": "W": "A" kern kk#, HAT_A kern kk#;

 ligtable "D": "="=:DHAL, "!"=:DAD,
  DHAL: DAD: "X" kern k#, "W" kern k#, "A" kern k#, HAT_A kern k#,
   "V" kern k#, "Y" kern k#;
 ligtable "O": ":"=:DOT_O, 
  DOT_O: "X" kern k#, "W" kern k#, "A" kern k#, HAT_A kern k#,
   "V" kern k#, "Y" kern k#;

 ligtable "A": "="=: HAT_A,
  HAT_A: "R": "n" kern k#, gnaf kern k#, 
   "l" kern k#, "r" kern k#, "u" kern k#, dot_u kern k#, hat_u kern k#,
   "m" kern k#, "t" kern k#, tta kern k#, 
   "i" kern k#, dot_i kern k#, hat_i kern k#, 
   "C" kern k#, CHIM kern k#, "O" kern k#, DOT_O kern k#, 
   "G" kern k#, GHAYN kern k#, CUP_G kern k#,
   "h" kern k#, kha kern k#, hha kern k#, "b" kern k#, 
   "U" kern k#, DOT_U kern k#, HAT_U kern  k#, 
   "k" kern k#, qaf kern k#, "v" kern k#, "w" kern k#, "Q" kern k#, 
  "L": "T" kern kk#, TTA kern kk#, 
   "Y" kern kk#, "V" kern kkk#, "W" kern kkk#,
  "b": "e": "p": "r": "e" kern -u#, 
   "a" kern -u#, hat_a kern -u#, 
   "o" kern -u#, dot_o kern -u#, hat_o kern -u#,
   "d" kern -u#, dhal kern -u#, dad kern -u#, 
   "c" kern -u#, chim kern -u#, 
   "g" kern -u#, ghayn kern -u#, cup_g kern -u#, "q" kern -u#;

 ligtable "c": ":"=:chim, 
  chim: "e" kern -u#, 
   "a" kern -u#, hat_a kern -u#, 
   "o" kern -u#, dot_o kern -u#, hat_o kern -u#,
   "d" kern -u#, dhal kern -u#, dad kern -u#, 
   "c" kern -u#, chim kern -u#, 
   "g" kern -u#, ghayn kern -u#, cup_g kern -u#, "q" kern -u#;

 ligtable "d": "="=:dhal, "!"=:dad,
  dhal: dad: "w": "l": "l" kern +u#;

 ligtable "o": ":"=:dot_o, "="=:hat_o,
  dot_o: hat_o: "e" kern -u#, 
   "a" kern -u#, hat_a kern -u#, 
   "o" kern -u#, dot_o kern -u#, hat_o kern -u#,
   "d" kern -u#, dhal kern -u#, dad kern -u#, 
   "c" kern -u#, chim kern -u#, 
   "g" kern -u#, ghayn kern -u#, cup_g kern -u#, "q" kern -u#;
 ligtable "n": "="=:gnaf, "'" kern kkk#, gnaf: "'" kern kk#; 
 ligtable oct"043": oct"100":  % kerns for ayn and hamza
   "A" kern kkk#, HAT_A kern kkk#, 
   "a" kern k#, hat_a kern k#;
 ligtable ".": "."=:if use_pxl: oct"0175" else: oct"0375" fi; % izafet dot
 ligtable "f": % Turkish cannot use the ordinary ligatures for |"f"|.
   hat_i kern 3u#, dot_i kern 3u#, % and therefore needs these kerns
   oct"043" kern 3u#, oct"0100" kern 3u#;
fi
 % ligatures for |"-"|, |"`"|, and |"'"| in the {\tt comlig} file
bye.