blob: 0214dc8cc721f6e14309026dab9fb1bb0f3cbc19 (
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
|
% lkligtbl.mf
%
%% Cyrillic font container with T2 encoding beta-support
%
% This file is future part of lxfonts package
% Version 3.4 // Patchlevel=0
% (c) A.Berdnikov
%
% This package belongs to the public domain 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 to save it under the same name.
%
% Content:
%
% Macro definitions for lig & kern data
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LHver_check(3,4); % like |version_check| in ec
if known loaded_lgligtbl: endinput; fi
loaded_lgligtbl:=1; % if known this file has been loaded
%if unknown loaded_lgerrors:
% index:=0; input lgerrors; % error messages;
%fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% Procedures which may be used to make the ligtable data %%
%% independent from the particular font coding scheme %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if unknown dummy_kern_char:
numeric dummy_kern_char; dummy_kern_char:=0;
fi
boolean debug_ligdata; debug_ligdata:=false;
def beginligtable =
boolean flag_gener, flag_sp, flag_fst;
flag_gener:=false; flag_sp:=false; flag_fst:=true;
def table_data = enddef;
enddef;
vardef labelchar (text chars) =
forsuffixes $=chars:
if (str $) <> "": if known $: if $ > -1:
if flag_sp:
flag_fst:=false;
expandafter def expandafter table_data expandafter =
table_data , $ :
enddef;
else:
expandafter def expandafter table_data expandafter =
table_data $ :
enddef;
fi
flag_gener:=true; flag_sp:=false;
fi fi fi
endfor;
enddef;
vardef setkern @# (text chars)=
if flag_gener:
forsuffixes $=chars:
if (str $) <> "": if known $: if $ > -1:
if flag_sp:
expandafter def expandafter table_data expandafter =
table_data , $ kern @#
enddef;
else:
expandafter def expandafter table_data expandafter =
table_data $ kern @#
enddef;
fi
flag_sp:=true;
fi fi fi
endfor;
fi;
enddef;
vardef setlig(suffix charA, charB) =
if flag_gener:
if (known charA) and (known charB):
if (charA > -1) and (charB > -1):
if flag_sp:
expandafter def expandafter table_data expandafter =
table_data , charA =: charB
enddef;
else:
expandafter def expandafter table_data expandafter =
table_data charA =: charB
enddef;
fi;
flag_sp:=true;
fi fi;
fi;
enddef;
vardef endligtable=
if debug_ligdata: showtoken table_data; fi
if flag_gener:
if not flag_sp:
if not flag_fst:
message ("Something is wrong in ligtable:");
showtoken table_data;
message ("Dummy kerning with char "
& (decimal dummy_kern_char) & " is inserted");
expandafter def expandafter table_data expandafter =
table_data dummy_kern_char kern 0
enddef;
ligtable table_data;
fi
else:
ligtable table_data;
fi;
fi;
def table_data = enddef;
enddef;
vardef liggroup @# (text chars)=
def @# = enddef;
forsuffixes $=chars:
if (str $) <> "": if known $: if $ > -1:
expandafter def expandafter @# expandafter =
@# , $
enddef;
fi fi fi
endfor;
if debug_ligdata: showtoken @#; fi
enddef;
endinput;
% end-of-file
|