summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/lh/base/llvligtb.mf
blob: b5dc5de6d739e7dab96e5039510f22f4f68279af (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
%
% llvligtb.mf
%
%% Cyrillic font container with T2 encoding beta-support
%
% This file is future part of lxfonts package
% Version 3.1 // Patchlevel=0
% (c) O.Lapko
%
% This package is freeware product under conditions similar to
% those of D. E. Knuth specified for the Computer Modern family of fonts.
% In particular, only the authors are entitled to modify this file
% (and all this package as well) and to save it under the same name.
%
% Content:
%
% Ligatures
% This file should be called for NOT monospaced fonts !
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

LHver_check(3,5); % like |version_check| in ec

% The following ligatures are integrated:
%
% for CM fonts:
% !`
% ?`
% for T2
% --  gives -
% --- gives --
% -<hyphenchar> gives <hyphenchar>
% common
% <<
% >>
% ,,(LH:in new version only)
% ''
% ``
%

if known spanish_shriek: % for CM fonts only

   ligtable "!": "`" =: spanish_shriek;
   ligtable "?": "`" =: spanish_query;

fi

if genmode="ex": % for T2 only

   %english quotes
   ligtable
    "`":  "`"=:oct"020",       %ec:``
          oct"020" kern 2u#,   %ec:``
          "?" kern 2u#,
          "!" kern 2u#;

   ligtable
    "'":  "'"=:oct"021",       %ec:''
          oct"021" kern 2u#,   %ec:''
          "?" kern 2u#,
          "!" kern 2u#;

   %dashes
   ligtable
    "-":  "-" =: oct"025",     %endash
     oct"177" =: oct"177";     % <hyphen><hyphenchar> => <hyphenchar>

   ligtable
    oct"025": "-"=: oct"026";  % "---"  => cyremdash in t2 !!!

fi


% ligatures for cyrillic quotes
if (altcoding and (ligs <> 0)) % for CM
   or (genmode="ex"):          % or if T2 started

      beginligtable
         labelchar ([ASCII"<"]);
            setlig ([ASCII"<"],CYR_.flqq);  % "<<"
      endligtable;

      beginligtable
         labelchar ([ASCII">"]);
            setlig ([ASCII">"],CYR_.frqq);  % ">>"
      endligtable;

      beginligtable
         labelchar ([ASCII","]);
            setlig ([ASCII","],CYR_.baseqq);  % ",,"
      endligtable;

% ligatures for closing cyrillic quotes in CM
      beginligtable
         labelchar ([oct"134"]);
            setlig ([ASCII"`"],CYR_.grqq);  % "```"
      endligtable;

      beginligtable
         labelchar ([oct"042"]);
            setlig ([ASCII"'"],CYR_.grqq);  % "'''"
      endligtable;

fi

k#:=-.5u#; ku#:=-1u#; kk#:=-1.5u#; kkk#:=-2u#; % four degrees of kerning

% kerning for T2 only
if genmode="ex":

      beginligtable
         labelchar (boundarychar);
           setkern [-kk#] ([oct"020"], %ec:``
                           [oct"021"], %ec:''
                           CYR_.baseqq,%t2:,,
                           [oct"055"], %-
                           [oct"140"], %`
                           [oct"047"]);%'
      endligtable;

      beginligtable
         labelchar ([oct"020"]);       %ec:``
           setkern [2u#]  ([oct"140"], %`
                           [oct"020"]);%ec:``
           setkern [-kk#] (boundarychar);
      endligtable;

      beginligtable
         labelchar ([oct"021"]);       %ec:''
%           setlig ([ASCII"'"],[oct"020"]);  % "'''" - CM compatibility
           setkern [2u#]  ([oct"047"], %'
                           [oct"021"]);%ec:''
           setkern [-kk#] (boundarychar);
      endligtable;

fi % for T2 only


% here is used full Cyrillic letter stuff for kerning
   beginligtable
        labelchar (CYR_.baseqq);      %ec[oct"022"]:,,
           if roman_ec:
              setkern [2u#]  ([oct"015"]); %ec:,
           fi
           if altcoding or roman_ec:
              setkern [2u#]  ([ASCII","]);
           fi
        if roman_ec:
           labelchar ([oct"015"]);
        fi
              setkern [2u#]  (CYR_.baseqq);%t2:,,
              setkern [-kk#] (boundarychar);
              if altcoding or roman_ec:
                 setkern [kkk#] ([ASCII"V"]);
                 setkern [kk#]  ([ASCII"W"],
                                 [ASCII"Y"]);
                 setkern [k#]   ([ASCII"O"],
                                 [ASCII"C"],
                                 [ASCII"G"],
                                 [ASCII"Q"]);
                 if not TITLEfont:
                    if ROMANfont:
                       setkern [-kkk#] ([ASCII"j"]);
                       setkern [u#]    ([ASCII"g"]);
                    fi
                    if ROMANfont or SmallCapsfont:
                       setkern [u#]    ([ASCII"y"]);
                    fi
                    setkern [kk#]      ([ASCII"v"]);
                    setkern [-u#]      ([ASCII"w"]);
                 fi
              fi
              setkern [-kk#] (CYR_.D);
              setkern [kkk#]  (CYR_.IZH,
                               CYR_.IZH_dgr,
                               CYR_.IZH_uml,
                               CYR_.IZH_ac);
              setkern [kk#]   (CYR_.Y,
                               CYR_.Y_hcrs,
                               CYR_.Y_bar,
                               CYR_.Y_ac,
                               CYR_.LAT_W);
              setkern [kk#]   (CYR_.U,
                               CYR_.U_shrt,
                               CYR_.U_bar,
                               CYR_.U_gr,
                               CYR_.U_ac,
                               CYR_.U_uml,
                               CYR_.U_dac,
                               CYR_.U_hat,
                               CYR_.U_tld,
                               CYR_.U_com);
              setkern [k#]    (CYR_.O,
                               CYR_.O_uml,
                               CYR_.O_lcom,
                               CYR_.O_bar,
                               CYR_.O_ac,
                               CYR_.F,
                               CYR_.OTLD,
                               CYR_.OTLD_uml,
                               CYR_.OTLD_bar,
                               CYR_.OTLD_ac,
                               CYR_.ABH_HA,
                               CYR_.LAT_Q,
                               CYR_.OMGA,
                               CYR_.OMGA_tlo,
                               CYR_.OT,
                               CYR_.PSI,
                               CYR_.FITA,
                               CYR_.OMGA_rnd,
                               CYR_.OO_cdot,
                               CYR_.OO_cddot,
                               CYR_.S,
                               CYR_.S_dsc,
                               CYR_.UKR_E,
                               CYR_.UKR_E_ac,
                               CYR_.KOPPA,
                               CYR_.VKOPPA);
           if not TITLEfont:
              if ROMANfont:
                 setkern [-kkk#] (CYR_.lat_j);
              fi
              if ROMANfont or SmallCapsfont:
              setkern [-kk#] (CYR_.d);
              setkern [u#]    (CYR_.u,
                               CYR_.u_shrt,
                               CYR_.u_bar,
                               CYR_.u_gr,
                               CYR_.u_ac,
                               CYR_.u_uml,
                               CYR_.u_dac,
                               CYR_.u_hat,
                               CYR_.u_tld,
                               CYR_.u_com);
              fi
              setkern [-u#]   (CYR_.lat_w);
              setkern [kk#]   (CYR_.izh,
                               CYR_.izh_dgr,
                               CYR_.izh_uml,
                               CYR_.izh_ac,
                               CYR_.lat_w,
                               CYR_.y,
                               CYR_.y_hcrs,
                               CYR_.y_bar,
                               CYR_.y_ac);
           fi
   endligtable;

   beginligtable
         labelchar (CYR_.frqq);%ec[oct"024"]:>>
              setkern [kk#]   ([ASCII"."],
			       [ASCII","]);
   endligtable;

endinput;
%end of file