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