1local common = fonts.goodies.load("common-math.lfg")
2local presets = common.mathematics.tweaks.presets
3
4local integral_variants = { bottomright = -0.20 }
5local integral_top = { topright = 0 }
6local integral_bottom = { bottomright = -0.10 }
7
8return {
9 name = "bonum-math",
10 version = "1.00",
11 comment = "Goodies that complement bonum.",
12 author = "Hans Hagen & Mikael Sundqvist",
13 copyright = "ConTeXt development team",
14 mathematics = {
15 parameters = {
16 AccentTopShiftUp = -15,
17 FlattenedAccentTopShiftUp = -15,
18 AccentBaseDepth = 50,
19 DelimiterPercent = 85,
20 DelimiterShortfall = 400,
21 DelimiterDisplayPercent = 90,
22 DelimiterDisplayShortfall = 400,
23 DisplayOperatorMinHeight = 1900,
24 SubscriptShiftDown = 201,
25 SuperscriptShiftUp = 364,
26 SubscriptShiftDownWithSuperscript = "1.4*SubscriptShiftDown",
27 PrimeShiftUp = "1.25*SuperscriptShiftUp",
28 PrimeShiftUpCramped = "1.25*SuperscriptShiftUp",
29 },
30 tweaks = {
31 aftercopying = {
32 {
33 tweak = "version",
34 expected = "Version 1.005",
35 },
36 {
37 tweak = "fixprimes",
38 factor = 0.77,
39 },
40 {
41 tweak = "addmirrors",
42 },
43 {
44 tweak = "replacealphabets",
45 list = {
46 {
47 source = { first = 0x003B1 },
48 filename = "texgyrebonummath-companion.otf",
49 },
50 {
51 source = { first = 0x1D6FC },
52 filename = "texgyrebonummath-companion.otf",
53 },
54 {
55 source = { first = 0x1D6C2 },
56 filename = "texgyrebonummath-companion.otf",
57 },
58 {
59 source = { first = 0x1D736 },
60 filename = "texgyrebonummath-companion.otf",
61 },
62 {
63 source = { first = 0x02980 },
64 filename = "TeXGyreBonumMath-Companion.otf",
65 },
66 },
67 },
68 presets.smalldigits { factor = 0.95 },
69 presets.scripttocalligraphic { },
70 presets.rsfstoscript { rscale = 0.98 },
71 presets.rsfsuprighttoscript { rscale = 0.98 },
72 presets.moderntocalligraphic { rscale = 0.98 },
73 presets.eulertocalligraphic { rscale = 0.98 },
74 presets.xitsarabic { rscale = 1 },
75 presets.fallbacks { },
76 presets.moveintegrals { factor = 1.5 },
77 presets.moveitalics { correct = true },
78 presets.wipeanchors { },
79 presets.wipeitalics { },
80 {
81 tweak = "checkaccents",
82 },
83 {
84
85 tweak = "dimensions",
86 list = {
87 ["lowercasefraktur"] = {
88 width = 1.25,
89 extend = 1.25,
90 height = 1.15,
91 depth = 1.15,
92 squeeze = 1.15,
93 },
94
95 ["lowercasescript"] = {
96 factor = 1.2,
97 },
98 },
99 },
100 {
101 tweak = "kerns",
102 list = {
103 [0x002F] = { topleft = -0.2, bottomright = -0.2 },
104 ["0x002F.variants.*"] = { topleft = -0.2, bottomright = -0.2 },
105 [0x007D] = { topright = -0.05, bottomright = -0.05 },
106 ["0x7D.variants.*"] = { topright = -0.05, bottomright = -0.05 },
107 ["0x7D.parts.top"] = { topright = -0.15, },
108 ["0x7D.parts.bottom"] = { bottomright = -0.15 },
109 [0x0029] = { topright = -0.15, bottomright = -0.15 },
110 ["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 },
111 ["0x29.parts.top"] = { topright = -0.15, },
112 ["0x29.parts.bottom"] = { bottomright = -0.15 },
113 [0x221A] = { topright = 0.2, bottomright = 0.2 },
114 ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
115 ["0x221A.parts.top"] = { topright = 0.2, },
116 ["0x221A.parts.bottom"] = { bottomright = 0.2 },
117 [0x27E9] = { topright = -0.1, bottomright = -0.1 },
118 ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 },
119 [0x27EB] = { topright = -0.1, bottomright = -0.1 },
120 ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
121
122 [0x1D465] = { bottomright = -0.05 },
123 [0x00393] = { bottomright = -0.30 },
124 [0x1D43F] = { bottomright = 0.01 },
125 ["0x222B.parts.bottom"] = { bottomright = -0.20 },
126 ["0x222C.parts.bottom"] = { bottomright = -0.15 },
127 ["0x222D.parts.bottom"] = { bottomright = -0.10 },
128 ["0x2A0C.parts.bottom"] = { bottomright = -0.05 },
129 },
130 },
131
132
133
134 {
135 tweak = "extendaccents",
136 },
137 {
138 tweak = "flattenaccents",
139 },
140 {
141 tweak = "fixaccents",
142 },
143 {
144 tweak = "radicaldegreeanchors",
145 list = {
146 [0x221A] = { location = "left", hfactor = .1, vfactor = .3 },
147 ["0x221A.variants.*"] = { location = "left", hfactor = .1, vfactor = .625 },
148 ["0x221A.variants.1"] = { location = "left", hfactor = .1, vfactor = .575 },
149 ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.15 },
150 }
151 },
152 {
153 tweak = "dimensions",
154 list = {
155
156 ["0x7C"] = { width = 1.4, xoffset=0.2 },
157
158
159
160 },
161 },
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176 {
177 tweak = "copyaccents",
178 },
179
180 {
181
182
183 tweak = "margins",
184 list = {
185 [0x1D7DC] = { left = -.1, right = -.1 },
186
187 [0x1D712] = { left = -.1, right = -.1 },
188 [0x1D713] = { left = -.1, right = -.1 },
189 [0x1D714] = { left = -.1, right = -.1 },
190
191 [0x003B1] = { left = -.1, right = -.1 },
192 [0x003B3] = { left = -.1, right = -.1 },
193 [0x003BA] = { left = -.1, right = -.1 },
194 [0x003BC] = { left = -.1, right = -.1 },
195 [0x003C0] = { left = -.1, right = -.1 },
196 [0x003C3] = { left = -.1, right = -.1 },
197 [0x003C5] = { left = -.1, right = -.1 },
198 [0x003C6] = { left = -.1, right = -.1 },
199 [0x003C8] = { left = -.1, right = -.1 },
200 [0x003C9] = { left = -.1, right = -.1 },
201
202
203
204 [0x1D451] = { left = -.1, right = -.1 },
205 [0x1D453] = { left = -.1, right = -.1 },
206
207 [0x00394] = { left = .1, right = .1 },
208 [0x003A3] = { left = .1, right = .1 },
209
210 [0x00046] = { left = .1, right = .1 },
211 [0x0004C] = { left = .1, right = .1 },
212 [0x00050] = { left = .1, right = .1 },
213 [0x00053] = { left = .1, right = .1 },
214 [0x00054] = { left = .1, right = .1 },
215 [0x0005A] = { left = .1, right = .1 },
216
217 [0x1D43D] = { left = -.1, right = -.1 },
218 [0x1D44B] = { left = -.05, right = -.05 },
219 },
220 },
221 {
222
223 tweak = "dimensions",
224 list = {
225 ["0x1D463"] = { width = 1.075, },
226 },
227 },
228 {
229 tweak = "addprivates",
230 },
231 {
232 tweak = "addscripts",
233 },
234 {
235 tweak = "accentdimensions",
236 },
237 {
238 tweak = "addrules",
239 },
240 {
241 tweak = "replacerules",
242 fraction = { height = .244, yoffset = .758 },
243 radical = { height = .244, yoffset = .758, leftoffset = .1, rightoffset = .1 },
244 stacker = { height = .244, yoffset = .758 },
245 },
246 {
247
248
249 tweak = "addarrows",
250
251 left = 0.05,
252 right = 0.05,
253 slack = 0.10,
254
255
256
257 list = { [0x3D] = { squeeze = .85, yoffset = .0975 } }
258 },
259 {
260
261
262
263 tweak = "kernpairs",
264 list = {
265 [mathematics.tweaks.subsets.acenorsuvxz] = {
266 [0x1D453] = -.1,
267 [0x1D457] = -.1,
268 },
269 [mathematics.tweaks.subsets.bhklt] = {
270 [0x1D453] = -.1,
271 [0x1D457] = -.1,
272 },
273 [mathematics.tweaks.subsets.d] = {
274 [0x1D453] = -.075,
275 [0x1D457] = -.075,
276 },
277 [mathematics.tweaks.subsets.f] = {
278
279 [mathematics.tweaks.subsets.gjqy] = -.15,
280 [0x1D453] = -.2,
281 },
282 [mathematics.tweaks.subsets.i] = {
283 [0x1D453] = -.2,
284 [0x1D457] = -.2,
285 },
286 [mathematics.tweaks.subsets.mw] = {
287 [0x1D453] = -.05,
288 [0x1D457] = -.05,
289 },
290 [mathematics.tweaks.subsets.p] = {
291 [0x1D453] = -.05,
292 [0x1D457] = -.05,
293 },
294 [0x1D45F] = {
295 [0x1D460] = -.1,
296 },
297 }
298 },
299
300
301
302
303 {
304 tweak = "addactuarian",
305 },
306 {
307 tweak = "addequals",
308 },
309 {
310 tweak = "addfourier",
311 variant = 1,
312 },
313 {
314 tweak = "addprimed",
315 },
316
317 {
318 tweak = "emulatelmtx",
319 feature = "emulatelmtx",
320 comment = "this is for mkiv",
321 },
322 },
323 },
324 alternates = {
325 dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
326 },
327 bigslots = {
328 1, 3, 5, 7
329 },
330 },
331}
332 |