1local common = fonts.goodies.load("common-math.lfg")
2local presets = common.mathematics.tweaks.presets
3
4local integral_variants = { bottomright = -0.20 }
5
6local integral_bottom = { bottomright = -0.20 }
7
8return {
9 name = "pagella-math",
10 version = "1.00",
11 comment = "Goodies that complement pagella.",
12 author = "Hans Hagen & Mikael Sundqvist",
13 copyright = "ConTeXt development team",
14 mathematics = {
15 parameters = {
16 AccentTopShiftUp = 10,
17 FlattenedAccentTopShiftUp = 20,
18 AccentBaseDepth = 80,
19 DelimiterPercent = 85,
20 DelimiterShortfall = 400,
21 DelimiterDisplayPercent = 90,
22 DelimiterDisplayShortfall = 400,
23 DisplayOperatorMinHeight = 1800,
24 SuperscriptShiftUp = 386,
25 SubscriptShiftDown = 200,
26 SubscriptShiftDownWithSuperscript = "1.4*SubscriptShiftDown",
27 PrimeShiftUp = "1.1*SuperscriptShiftUp",
28 PrimeShiftUpCramped = "1.1*SuperscriptShiftUp",
29 },
30 tweaks = {
31 aftercopying = {
32 {
33 tweak = "version",
34 expected = "Version 1.632",
35 },
36 {
37 tweak = "fixprimes",
38 factor = 0.8,
39 },
40 {
41 tweak = "replacealphabets",
42 feature = "euleroverpagella",
43 filename = "euler-math.otf",
44 list = {
45 { source = "lowercasenormal", target = "lowercaseitalic" },
46 { source = "lowercasebold", target = "lowercasebolditalic" },
47 { source = "lowercasegreeknormal", target = "lowercasegreekitalic" },
48 { source = "lowercasegreekbold", target = "lowercasegreekbolditalic" },
49 { source = "uppercasenormal", target = "uppercaseitalic" },
50 { source = "uppercasebold", target = "uppercasebolditalic" },
51 { source = "uppercasegreeknormal", target = "uppercasegreekitalic" },
52 { source = "uppercasegreekbold", target = "uppercasegreekbolditalic" },
53 { source = "lowercasenormal", target = "lowercasenormal" },
54 { source = "lowercasebold", target = "lowercasebold" },
55 { source = "lowercasegreeknormal", target = "lowercasegreeknormal" },
56 { source = "lowercasegreekbold", target = "lowercasegreekbold" },
57 { source = "uppercasenormal", target = "uppercasenormal" },
58 { source = "uppercasebold", target = "uppercasebold" },
59 { source = "uppercasegreeknormal", target = "uppercasegreeknormal" },
60 { source = "uppercasegreekbold", target = "uppercasegreekbold" },
61 { source = "digitsnormal", target = "digitsnormal" },
62
63
64
65
66
67
68
69
70
71
72 { source = { first = 0x02100, last = 0x0239A } },
73 { source = { first = 0x023B5, last = 0x02BFF } },
74
75 { source = { first = 0x1D400, last = 0x1D7FF } },
76 },
77 },
78 {
79 tweak = "addmirrors",
80 },
81 {
82 tweak = "addcomposites",
83 },
84 {
85 tweak = "fixoldschool",
86 feature = "euleroverpagella",
87 },
88 {
89 tweak = "replacealphabets",
90 list = {
91 {
92 source = { first = 0x02980 },
93 filename = "texgyrepagellamathcompanion-regular.otf",
94 },
95 },
96 },
97 presets.scripttocalligraphic { },
98 presets.rsfstoscript { },
99 presets.rsfsuprighttoscript { },
100 presets.moderntocalligraphic { },
101 presets.eulertocalligraphic { },
102 presets.xitsarabic { rscale = 0.95 },
103 presets.fallbacks { },
104 presets.moveitalics { correct = true },
105 presets.moveitalics { correct = true, letters = true },
106 presets.moveintegrals { factor = 1.5 },
107 presets.wipeanchors { },
108 presets.wipeitalics { },
109 {
110 tweak = "checkaccents",
111 },
112 {
113 tweak = "wipecues",
114 },
115 {
116 tweak = "parameters",
117 feature = "euleroverpagella",
118 list = {
119 RadicalRuleThickness = 54,
120 }
121 },
122 {
123 tweak = "setovershoots",
124 list = {
125 {
126 target = "uppercasescript",
127
128 topovershoot = 0.05,
129 },
130 {
131 target = "uppercaseboldscript",
132
133 topovershoot = 0.05,
134 },
135 },
136 },
137
138
139
140 {
141 tweak = "extendaccents",
142 },
143 {
144 tweak = "flattenaccents",
145 },
146 {
147 tweak = "fixaccents",
148 },
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165 {
166 tweak = "dimensions",
167 list = {
168
169 [0x020DB] = { yoffset = -0.01, height = .95, all = true },
170 },
171 },
172
173
174 {
175 tweak = "copyaccents",
176 },
177
178 {
179 tweak = "radicaldegreeanchors",
180 list = {
181 ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.0, vfactor = 1.1 },
182 }
183 },
184 {
185 tweak = "fixslashes",
186 },
187 {
188 tweak = "kerns",
189 list = {
190 [0x002F] = { topleft = -0.2, bottomright = -0.2 },
191
192 ["0x7D.parts.top"] = { topright = -0.15, },
193 ["0x7D.parts.bottom"] = { bottomright = -0.15 },
194 ["0x7D.variants.*"] = { topright = -0.15, bottomright = -0.15 },
195 ["0x29.parts.top"] = { topright = -0.25, },
196 ["0x29.parts.bottom"] = { bottomright = -0.25 },
197 ["0x29.variants.*"] = { topright = -0.2, bottomright = -0.2 },
198 ["0x221A.parts.top"] = { topright = 0.2, },
199 ["0x221A.parts.bottom"] = { bottomright = 0.2 },
200 ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
201
202 [0x27E9] = { topright = -0.2, bottomright = -0.2 },
203 ["0x27E9.variants.*"] = { topright = -0.3, bottomright = -0.3 },
204 [0x27EB] = { topright = -0.2, bottomright = -0.2 },
205 ["0x27EB.variants.*"] = { topright = -0.3, bottomright = -0.3 },
206
207 [0x0393] = { bottomright = -0.20, },
208
209 ["0x222B.parts.bottom"] = { bottomright = -0.20 },
210 ["0x222C.parts.bottom"] = { bottomright = -0.15 },
211 ["0x222D.parts.bottom"] = { bottomright = -0.10 },
212 ["0x2A0C.parts.bottom"] = { bottomright = -0.05 },
213 },
214 },
215 presets.addmathkerns { },
216 {
217 tweak = "checkspacing",
218 },
219 {
220 tweak = "addscripts",
221 },
222 {
223 tweak = "addprivates",
224 },
225 {
226 tweak = "accentdimensions",
227 },
228 {
229 tweak = "addrules",
230 },
231 {
232 tweak = "addarrows",
233 },
234
235
236
237
238
239 {
240 tweak = "replacerules",
241 fraction = { height = .215, yoffset = .785 },
242 radical = { height = .215, yoffset = .785, leftoffset = .1, rightoffset = .1 },
243 stacker = { height = .215, yoffset = .785 },
244 },
245
246 {
247 tweak = "replacerules",
248 feature = "euleroverpagella",
249 fraction = { height = .15, yoffset = .85 },
250 radical = { height = .22, yoffset = .8, leftoffset = .05, rightoffset = .05, leftoverlap = .01 },
251 stacker = { height = .15, yoffset = .85 },
252 },
253 {
254 tweak = "addactuarian",
255 },
256 {
257 tweak = "addequals",
258 },
259 {
260 tweak = "addfourier",
261 variant = 1,
262 },
263
264
265
266 {
267 tweak = "kernpairs",
268 list = {
269
270 [0x1D453] = {
271 [0x3A] = -.1,
272 [0x3B] = -.1,
273 },
274 },
275 },
276
277 {
278 tweak = "emulatelmtx",
279 feature = "emulatelmtx",
280 comment = "this is for mkiv",
281 },
282 {
283 tweak = "parameters",
284 feature = "emulatelmtx",
285 comment = "this is for mkiv",
286 list = {
287 AccentBaseHeight = 400,
288 }
289 },
290 },
291 },
292 bigslots = {
293 1, 3, 5, 7
294 },
295 alternates = {
296 dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
297 },
298 },
299}
300 |