modern-math.lfg /size: 32 Kb    last modification: 2024-01-16 10:22
1-- In order to be able to use beta math fonts, we use our own file name and
2-- always remap.
3
4local common  = fonts.goodies.load("common-math.lfg")
5local presets = common.mathematics.tweaks.presets
6
7local punctuation = mathematics.tweaks.kernsets[".,"]
8
9return {
10    name = "latin modern math",
11    version = "1.00",
12    comment = "Goodies that complement latin modern math.",
13    author = "Hans Hagen & Mikael Sundqvist",
14    copyright = "ConTeXt development team",
15    mathematics = {
16        parameters = {
17            FractionNumeratorDisplayStyleShiftUp = 600, -- used to be a function
18            AccentTopShiftUp                     = -30,
19            FlattenedAccentTopShiftUp            = -30,
20            AccentSuperscriptDrop                = 100, -- drop the superscripts if accents are present. Amount in percentage of height of accent(?)
21            AccentSuperscriptPercent             =   0,
22            DelimiterPercent                     =  85,
23            DelimiterShortfall                   = 400,
24            DelimiterDisplayPercent              =  90, -- MS
25            DelimiterDisplayShortfall            = 400,
26            SubscriptShiftDown                   = 150, -- 247 in font (multiplied to be consistent with cm)
27            SubscriptShiftDownWithSuperscript    = 247, -- relates to the previous one (see math-act)
28         -- SubscriptTopMax                      = 344, -- 344 in font .8 exheight
29         -- SuperscriptBaselineDropMax           = 386, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm)) 0 means: align the baseline of the superscript at the (top)
30            SuperscriptBaselineDropMax           = 0.6*431, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm))
31            SubscriptBaselineDropMin             = 0.1*431, -- 200 in font
32         -- SuperscriptBottomMaxWithSubscript    = 344, -- 344 in font .8 exheight
33         -- SuperscriptBottomMin                 = 108, -- 108 in font .25 exheight
34            SuperscriptShiftUp                   = 413, -- 363 in font (multiplied with 4.9547/4.3536, got 413)
35            SuperscriptShiftUpCramped            = 329, -- 289 in font (no distinction, old TeX)
36            PrimeShiftUp                         = "1.05*SuperscriptShiftUp",
37            PrimeShiftUpCramped                  = "1.05*SuperscriptShiftUp",
38         -- PrimeRaisePercent                    =   0, -- set to 0 in math-act
39         -- PrimeRaiseComposedPercent            =   0, -- set to 0 in math-act
40            RadicalDisplayStyleVerticalGap       = 120,--"RadicalVerticalGap" too small, 148, 50
41            -- RadicalVerticalGap                   =  50,-- Going smaller looks too cramped
42        },
43        tweaks = {
44            aftercopying = {
45                {
46                    tweak    = "version",
47                    expected = "Version 1.959",
48                },
49                {
50                    tweak   = "replacealphabets",
51                    list    = {
52                        {
53                            -- source   = { first = 0x02980 }, -- triplebar
54                            filename = "LatinModernMath-Companion.otf",
55                            feature = "ss01",
56                            unicodes = {
57                                0x00028, -- left parenthesis
58                                0x00029, -- right parenthesis
59                                0x0005B, -- left bracket
60                                0x0005D, -- right bracket
61                                0x027EE, -- left flattened parenthesis
62                                0x027EF, -- right falttened parenthesis
63                                0x02308, -- left ceiling
64                                0x02309, -- right ceiling
65                                0x0230A, -- left floor
66                                0x0230B, -- right floor
67                                0x027E6, -- left white bracket
68                                0x027E7, -- right white bracket
69                            },
70                        },
71                        {
72                            -- source   = { first = 0x02980 }, -- triplebar
73                            filename = "LatinModernMath-Companion.otf",
74                            feature = "ss02",
75                            unicodes = {
76                                0x0007B, -- left brace
77                                0x0007D, -- right brace
78                            },
79                        },
80                        {
81                            filename = "LatinModernMath-Companion.otf",
82                            feature = "ss03",
83                            unicodes = {
84                                0x0221A, -- radical
85                            },
86                        },
87                        {
88                            -- source   = { first = 0x02980 }, -- triplebar
89                            filename = "LatinModernMath-Companion.otf",
90                            unicodes = {
91                                0x0002F, -- solidus
92                                -- 0x00028, -- left parenthesis
93                                -- 0x00029, -- right parenthesis
94                                -- 0x0005B, -- left bracket
95                                0x0005C, -- reverse solidus
96                                -- 0x0005D, -- right bracket
97                                -- 0x0007B, -- left brace
98                                0x0007C, -- single vertical bar
99                                -- 0x0007D, -- right brace
100                                0x02016, -- double vertical bar
101                                -- 0x02308, -- left ceiling
102                                -- 0x02309, -- right ceiling
103                                -- 0x0230A, -- left floor
104                                -- 0x0230B, -- right floor
105                                -- 0x027E6, -- left white bracket
106                                -- 0x027E7, -- right white bracket
107                                0x027E8, -- left angle
108                                0x027E9, -- right angle
109                                0x027EA, -- left double angle
110                                0x027EB, -- right double angle
111                                -- 0x027EE, -- left flattened parenthesis
112                                -- 0x027EF, -- right flattened parenthesis
113                                0x02980, -- triple vertical bar
114                            },
115                        },
116                    },
117                },
118                {
119                    tweak = "addmirrors", --bidi
120                },
121                presets.scripttocalligraphic { },
122                presets.rsfstoscript         { },
123                presets.rsfsuprighttoscript  { },
124                presets.moderntocalligraphic { },
125                presets.eulertocalligraphic  { },
126                presets.xitsarabic           { rscale  = 0.80 },
127                presets.fallbacks            { },
128                presets.moveitalics          { correct = true, letters = true },
129                presets.moveitalics          { correct = true, list = mathematics.tweaks.subsets.letterlike },
130                presets.moveintegrals        { factor = 1.4, icfactor = 0.8 }, -- the icfactor is due to the very slanted integral.
131                presets.wipeanchors          { },
132                presets.wipeitalics          { },
133                {
134                    tweak = "checkaccents",
135                },
136                {
137                    tweak = "dimensions",
138                    list  = {
139                        [0x1D487] = { anchor = 0.9  }, -- bold italic f
140                        [0x1D489] = { anchor = 1.2  }, -- bold italic h
141                        [0x1D48C] = { anchor = 1.2  }, -- bold italic k
142                        [0x1D48F] = { anchor = 1.1  }, -- bold italic n
143                        [0x1D491] = { anchor = 1.2  }, -- bold italic p
144                        [0x1D492] = { anchor = 0.9  }, -- bold italic q
145                        [0x1D49B] = { anchor = 0.9  }, -- bold italic z
146
147                        [0x1D736] = { anchor = 0.9  }, -- bold italic alpha
148                        [0x1D737] = { anchor = 0.9  }, -- bold italic beta
149                        [0x1D738] = { anchor = 1.1  }, -- bold italic gamma
150                        [0x1D740] = { anchor = 1.2  }, -- bold italic lambda
151                        [0x1D744] = { anchor = 1.2  }, -- bold italic omicron
152
153                        [0x1D6FE] = { anchor = 1.1  }, -- italic gamma
154                        [0x1D702] = { anchor = 1.1  }, -- italic eta
155
156                        [0x1D44F] = { anchor = 1.15 }, -- italic b
157                        [0x1D451] = { anchor = 0.8, }, -- italic d
158                        [0x1D455] = { anchor = 1.15 }, -- italic h
159                        [0x1D458] = { anchor = 1.15 }, -- italic k
160                        [0x1D45B] = { anchor = 1.1  }, -- italic n
161                        [0x1D45D] = { anchor = 1.1  }, -- italic p
162                        [0x1D45E] = { anchor = 0.9  }, -- italic q
163                        [0x1D467] = { anchor = 0.9  }, -- italic z
164
165                        [0x1D6FE] = { anchor = 1.2  }, -- italic gamma
166                        [0x1D706] = { anchor = 1.2  }, -- italic lambda
167                        [0x1D70A] = { anchor = 1.1  }, -- italic omikron
168                        [0x1D70D] = { anchor = 1.1  }, -- italic varsigma
169
170                        [0x1D46A] = { anchor = 0.75 }, -- bold italic C
171                        [0x1D46B] = { anchor = 1.1  }, -- bold italic D
172                        [0x1D46E] = { anchor = 0.75 }, -- bold italic G
173                        [0x1D479] = { anchor = 1.2  }, -- bold italic R
174                        [0x1D47A] = { anchor = 0.8  }, -- bold italic S
175                        -- uppercaseboldscript could be improved
176                        [0x1D435] = { anchor = 1.05 }, -- italic B
177                        [0x1D436] = { anchor = 0.7  }, -- italic C
178                        [0x1D437] = { anchor = 1.05 }, -- italic D
179                        [0x1D43A] = { anchor = 0.8  }, -- italic G
180                        [0x1D443] = { anchor = 1.1  }, -- italic P
181                        [0x1D445] = { anchor = 1.05 }, -- italic R
182                        [0x1D446] = { anchor = 0.85 }, -- italic S
183                        [0x1D49C] = { anchor = 0.9  }, -- script A
184                        [0x1D49D] = { anchor = 0.95 }, -- script B
185                        [0x1D49E] = { anchor = 0.8  }, -- script C
186                        [0x1D49F] = { anchor = 0.95 }, -- script D
187                        [0x1D4A0] = { anchor = 0.85 }, -- script E
188                        [0x1D4A1] = { anchor = 0.75 }, -- script F
189                        [0x1D4A2] = { anchor = 0.9  }, -- script G
190                        [0x1D4A3] = { anchor = 0.85 }, -- script H
191                        [0x1D4A4] = { anchor = 0.8  }, -- script I
192                        [0x1D4A5] = { anchor = 0.8  }, -- script J
193                        [0x1D4A6] = { anchor = 0.85 }, -- script K
194                        [0x1D4A7] = { anchor = 0.75 }, -- script L
195                        [0x1D4A8] = { anchor = 0.9  }, -- script M
196                        [0x1D4A9] = { anchor = 0.85 }, -- script N
197                        [0x1D4AA] = { anchor = 0.95 }, -- script O
198                        [0x1D4AB] = { anchor = 0.95 }, -- script P
199                        [0x1D4AC] = { anchor = 0.95 }, -- script Q
200                        [0x1D4AD] = { anchor = 0.95 }, -- script R
201                        [0x1D4AE] = { anchor = 0.9  }, -- script S
202                        [0x1D4AF] = { anchor = 0.75 }, -- script T
203                        [0x1D4B0] = { anchor = 0.9, }, -- script U
204                        [0x1D4B1] = { anchor = 0.95 }, -- script V
205                        [0x1D4B2] = { anchor = 0.95 }, -- script W
206                        [0x1D4B3] = { anchor = 0.95 }, -- script X
207                        [0x1D4B4] = { anchor = 0.9  }, -- script Y
208                        [0x1D4B5] = { anchor = 1    }, -- script Z
209                     -- ["0x7C.variants.1"]={ squeeze = 0.90, height = 0.90, depth = 0.90 },
210                     -- ["0x7C.variants.2"]={ squeeze = 0.85, height = 0.85, depth = 0.85 },
211                     -- ["0x7C.variants.3"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
212                     -- ["0x7C.variants.4"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
213                     -- ["0x7C.variants.5"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
214                     -- ["0x7C.variants.6"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
215                     -- ["0x7C.variants.7"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
216                    },
217                },
218                {
219                    tweak = "kernpairs",
220                    list = {
221                        -- Values taken from lmmi10
222                        [0x1D436] = punctuation[-0.07], -- italic C
223                        [0x1D439] = punctuation[-0.14], -- italic F
224                        [0x1D43B] = punctuation[-0.06], -- italic H
225                        [0x1D43D] = punctuation[-0.17], -- italic J
226                        [0x1D43E] = punctuation[-0.06], -- italic K
227                        [0x1D440] = punctuation[-0.05], -- italic M
228                        [0x1D441] = punctuation[-0.06], -- italic N
229                        [0x1D443] = punctuation[-0.14], -- italic P
230                        [0x1D446] = punctuation[-0.08], -- italic S
231                        [0x1D447] = punctuation[-0.08], -- italic T
232                        [0x1D448] = punctuation[-0.14], -- italic U
233                        [0x1D449] = punctuation[-0.21], -- italic V
234                        [0x1D44A] = punctuation[-0.15], -- italic W
235                        [0x1D44B] = punctuation[-0.06], -- italic X
236                        [0x1D44C] = punctuation[-0.21], -- italic Y
237                        [0x1D44D] = punctuation[-0.07], -- italic Z
238                        [0x1D451] = { -- italic d
239                            [0x1D44C] =  .11, -- italic Y
240                            [0x1D449] = -.11, -- italic Z
241                            [0x1D453] = -.32, -- italic f (DEK)
242                            [0x1D453] = -.22, -- italic f (this one wins here)
243                            [0x1D457] = -.21, -- italic j (DEK)
244                            [0x1D457] = -.11, -- italic j (this one wins here)
245                        },
246                        [0x1D453] = punctuation[-0.09], -- italic f
247                        [0x1D457] = punctuation[-0.12], -- italic j
248                        [0x1D45F] = punctuation[-0.12], -- italic r
249                        [0x00393] = punctuation[-0.15], -- upright Gamma
250                        [0x003A0] = punctuation[-0.06], -- upright Pi
251                        [0x003A5] = punctuation[-0.15], -- upright Ypsilon
252                        [0x003A8] = punctuation[-0.08], -- upright Psi
253                        [0x1D6FF] = punctuation[-0.12], -- italic delta
254                        [0x1D708] = punctuation[-0.10], -- italic nu
255                        [0x1D70E] = punctuation[-0.09], -- italic sigma
256                        [0x1D70F] = punctuation[-0.10], -- italic tau
257                        -- Values taken from lmmib10 (same ratios)
258                        [0x1D46A] = punctuation[-0.07], -- bold italic C
259                        [0x1D46D] = punctuation[-0.15], -- bold italic F
260                        [0x1D46F] = punctuation[-0.06], -- bold italic H
261                        [0x1D471] = punctuation[-0.17], -- bold italic J
262                        [0x1D472] = punctuation[-0.06], -- bold italic K
263                        [0x1D474] = punctuation[-0.05], -- bold italic M
264                        [0x1D475] = punctuation[-0.06], -- bold italic N
265                        [0x1D477] = punctuation[-0.14], -- bold italic P
266                        [0x1D47A] = punctuation[-0.09], -- bold italic S
267                        [0x1D47B] = punctuation[-0.08], -- bold italic T
268                        [0x1D47C] = punctuation[-0.14], -- bold italic U
269                        [0x1D47D] = punctuation[-0.21], -- bold italic V
270                        [0x1D47E] = punctuation[-0.15], -- bold italic W
271                        [0x1D47F] = punctuation[-0.06], -- bold italic X
272                        [0x1D480] = punctuation[-0.21], -- bold italic Y
273                        [0x1D481] = punctuation[-0.08], -- bold italic Z
274                        [0x1D485] = { -- bold italic d
275                            [0x1D480] =  .10, -- italic Y
276                            [0x1D481] = -.10, -- italic Z
277                            [0x1D487] = -.31, -- italic f
278                            [0x1D48B] = -.21, -- italic j
279                        },
280                        [0x1D487] = punctuation[-0.09], -- bold italic f
281                        [0x1D48B] = punctuation[-0.12], -- bold italic j
282                        [0x1D493] = punctuation[-0.11], -- bold italic r
283                        [0x1D6AA] = punctuation[-0.16], -- bold upright Gamma
284                        [0x1D6B7] = punctuation[-0.06], -- bold upright Pi
285                        [0x1D6BC] = punctuation[-0.15], -- bold upright Ypsilon
286                        [0x1D6BF] = punctuation[-0.08], -- bold upright Psi
287                        [0x1D739] = punctuation[-0.11], -- bold italic delta
288                        [0x1D742] = punctuation[-0.10], -- bold italic nu
289                        [0x1D748] = punctuation[-0.09], -- bold italic sigma
290                        [0x1D749] = punctuation[-0.10], -- bold italic tau
291                    },
292                },
293                -- Accents are a mess. We migrate the extensibles from the combiners to the base accent
294                -- and then need to tweak the width (which is auto set because it was zero with a large
295                -- accent anchor offset). First we copy and fix.
296                {
297                    tweak = "extendaccents",
298                },
299                {
300                    tweak = "flattenaccents",
301                },
302                {
303                    tweak = "fixaccents",
304                },
305                {
306                    tweak   = "radicaldegreeanchors",
307                    list = {
308                        ["0x221A.parts.bottom"] = { location = "left", hfactor  = 0.05, vfactor  = 1.05 },
309                    }
310                },
311                {
312                    tweak = "radicalbodymargins",
313                    list  = {
314                        -- [0x221A]                = { left = 0.025 },
315                        ["0x221A.variants.*"]   = { left = 0.05 },
316                        ["0x221A.variants.1"]   = { left = 0 },
317                        ["0x221A.variants.2"]   = { left = 0 },
318                        ["0x221A.variants.3"]   = { left = 0 },
319                        ["0x221A.variants.4"]   = { left = 0 },
320                        ["0x221A.variants.5"]   = { left = 0 },
321                        ["0x221A.variants.6"]   = { left = 0.025 },
322                        ["0x221A.variants.7"]   = { left = 0.025 },
323                        ["0x221A.variants.8"]   = { left = 0.025 },
324                        ["0x221A.variants.9"]   = { left = 0.025 },
325                        ["0x221A.variants.10"]   = { left = 0.025 },
326                        ["0x221A.parts.bottom"] = { left = 0.10 },
327                    }
328                },
329                -- First we set the dimensions of the initial accent which started out as zero but we want
330                -- a proper width.
331             -- {
332             --     tweak = "dimensions",
333             --     list  = {
334             --         [0x00302] = { width = 1.4, anchor = 1.20, xoffset =  .10 }, -- widehat
335             --         [0x00303] = { width = 1.4, anchor = 1.20, xoffset =  .10 }, -- widetilde
336             --         [0x00306] = { width = 1.4, anchor = 1.20, xoffset =  .10 }, -- widebreve
337             --         [0x0030C] = { width = 1.4, anchor = 1.20, xoffset =  .10 }, -- widecheck
338             --     },
339             -- },
340                -- Then we deal with all offsets and heights in one go. So we treat the initial accent
341                -- as well as the variants here.
342                {
343                    tweak = "dimensions",
344                    list  = {
345                        [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self)
346                    },
347                },
348                -- We now copy these to the not wide slots so that we can set these to stretch as well,
349                -- if only because it is less confusing and more consistent.
350                {
351                    tweak = "copyaccents",
352                },
353                -- So far for the accents.
354                {
355                    -- Here we modify "corner kerns".
356                    -- We started with 0x2F, the solidus
357                    -- to have the 2 in x^2/5 a bit over the slash
358                    tweak = "kerns",
359                    list  = {
360                        [0x0002F] = { topleft = -0.2, bottomright = -0.2 }, -- solidus
361                        --
362                        [0x1D49C] = { bottomright = -0.05, }, -- script A
363                        [0x1D49D] = { bottomright = -0.05, }, -- script B
364                        [0x1D49E] = { bottomright = -0.25, }, -- script C
365                        [0x1D49F] = { bottomright = -0.11, }, -- script D
366                        [0x1D4A0] = { bottomright = -0.18, }, -- script E
367                        [0x1D4A1] = { bottomright = -0.30, }, -- script F
368                        [0x1D4A2] = { bottomright = -0.11, }, -- script G
369                        [0x1D4A3] = { bottomright = -0.18, }, -- script H
370                        [0x1D4A4] = { bottomright = -0.25, }, -- script I
371                        [0x1D4A5] = { bottomright = -0.25, }, -- script J
372                        [0x1D4A6] = { bottomright = -0.11, }, -- script K
373                        [0x1D4A7] = { bottomright = -0.05, }, -- script L
374                        [0x1D4A8] = { bottomright = -0.11, }, -- script M
375                        [0x1D4A9] = { bottomright = -0.18, }, -- script N
376                        [0x1D4AA] = { bottomright = -0.05, }, -- script O
377                        [0x1D4AB] = { bottomright = -0.25, }, -- script P
378                        [0x1D4AC] = { bottomright = -0.05, }, -- script Q
379                        [0x1D4AD] = { bottomright = -0.05, }, -- script R
380                        [0x1D4AE] = { bottomright = -0.11, }, -- script S
381                        [0x1D4AF] = { bottomright = -0.33, }, -- script T
382                        [0x1D4B0] = { bottomright = -0.11, }, -- script U
383                        [0x1D4B1] = { bottomright = -0.25, }, -- script V
384                        [0x1D4B2] = { bottomright = -0.25, }, -- script W
385                        [0x1D4B3] = { bottomright = -0.11, }, -- script X
386                        [0x1D4B4] = { bottomright = -0.18, }, -- script Y
387                        [0x1D4B5] = { bottomright = -0.05, }, -- script Z
388                        --
389                        [0x00393] = { bottomright = -0.20, }, -- upright Gamma
390                        [0x02207] = { bottomright = -0.20, }, -- nabla
391                        [0x1D6C1] = { bottomright = -0.20, }, -- bold nabla
392                        [0x1D6FB] = { bottomright = -0.25, }, -- italic nabla
393                        [0x1D735] = { bottomright = -0.25, }, -- bold italic nabla
394                        --
395                        ["0x7D.parts.top"]      = { topright = -0.25                      }, -- right brace top
396                        ["0x7D.parts.bottom"]   = {                   bottomright = -0.25 }, -- right brace bottom
397                        ["0x7D.variants.*"]     = { topright = -0.25, bottomright = -0.25 }, -- right brace variants
398                        ["0x29.parts.top"]      = { topright = -0.3,                      }, -- right parenthesis top
399                        ["0x29.parts.bottom"]   = {                   bottomright = -0.3  }, -- right parenthesis bottom
400                        ["0x29.variants.*"]     = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
401                        ["0x221A.parts.top"]    = { topright =  0.2,                      }, -- right radical top
402                        ["0x221A.parts.bottom"] = {                   bottomright =  0.2  }, -- right radical bottom
403                        ["0x221A.variants.*"]   = { topright =  0.2,  bottomright =  0.2  }, -- right radical variants
404                        [0x27E9]                = { topright = -0.2,  bottomright = -0.2  }, -- angles
405                        ["0x27E9.variants.*"]   = { topright = -0.3,  bottomright = -0.3  },
406                        [0x27EB]                = { topright = -0.2,  bottomright = -0.2  },
407                        ["0x27EB.variants.*"]   = { topright = -0.3,  bottomright = -0.3  },
408                    },
409                },
410                {
411                    -- This one fakes margins to get larger/smaller accents
412                    -- with for example \widetilde.
413                    tweak = "margins",
414                    list  = {
415                        [0x1D487] = { left = -.2,  right = -.2 }, -- bold italic f
416                        [0x1D489] = { left = -.2,  right = -.2 }, -- bold italic h
417                        [0x1D496] = { left = -.1,  right = -.1 }, -- bold italic u
418                        [0x1D499] = { left = -.1,  right = -.1 }, -- bold italic x
419
420                        [0x1D711] = { left = -.1,  right = -.1 }, -- italic varphi
421                        [0x1D713] = { left = -.1,  right = -.1 }, -- italic psi
422
423                        [0x1D659] = { left = -.1,  right = -.1 }, -- sans bold italic d
424                        [0x1D65C] = { left = -.1,  right = -.1 }, -- sans bold italic g
425
426                        [0x1D409] = { left =  .1,  right =  .1 }, -- bold upright J
427                        [0x1D412] = { left =  .1,  right =  .1 }, -- bold upright S
428
429                        [0x1D509] = { left =  .1,  right =  .1 }, -- fraktur F
430                        [0x1D50C] = { left =  .1,  right =  .1 }, -- fraktur I
431                        [0x1D50D] = { left =  .1,  right =  .1 }, -- fraktur J
432                        [0x1D51D] = { left =  .1,  right =  .1 }, -- fraktur Z
433
434                        [0x1D538] = { left =  .1,  right =  .1 }, -- doublestruck A
435                        [0x1D539] = { left =  .1,  right =  .1 }, -- doublestruck B
436                        [0x1D53C] = { left =  .1,  right =  .1 }, -- doublestruck E
437                        [0x1D53D] = { left =  .1,  right =  .1 }, -- doublestruck F
438                        [0x1D541] = { left =  .1,  right =  .1 }, -- doublestruck J
439                        [0x1D542] = { left =  .1,  right =  .1 }, -- doublestruck K
440                        [0x1D543] = { left =  .1,  right =  .1 }, -- doublestruck L
441                        [0x1D547] = { left =  .1,  right =  .1 }, -- doublestruck P
442                        [0x1D549] = { left =  .1,  right =  .1 }, -- doublestruck R
443                        [0x1D54A] = { left =  .1,  right =  .1 }, -- doublestruck S
444                        [0x1D54B] = { left =  .1,  right =  .1 }, -- doublestruck T
445                        [0x1D54D] = { left =  .1,  right =  .1 }, -- doublestruck V
446                        [0x1D550] = { left =  .1,  right =  .1 }, -- doublestruck Y
447
448                        [0x1D506] = { left =  .1,  right =  .1 }, -- fraktur C
449
450                        [0x00393] = { left =  .1,  right =  .1 }, -- upfight Gamma
451                        [0x00396] = { left =  .1,  right =  .1 }, -- upfight Zeta
452
453                        [0x1D5D8] = { left =  .1,  right =  .1 }, -- sans bold E
454                        [0x1D5D9] = { left =  .1,  right =  .1 }, -- sans bold F
455                        [0x1D5DF] = { left =  .1,  right =  .1 }, -- sans bold L
456                        [0x1D5E6] = { left =  .1,  right =  .1 }, -- sans bold S
457
458                        [0x1D61A] = { left =  .1,  right =  .1 }, -- sans italic S
459
460                        [0x1D5A2] = { left =  .1,  right =  .1 }, -- sans C
461                        [0x1D5A4] = { left =  .1,  right =  .1 }, -- sans E
462                        [0x1D5A5] = { left =  .1,  right =  .1 }, -- sans F
463                        [0x1D5AF] = { left =  .1,  right =  .1 }, -- sans P
464                        [0x1D5B2] = { left =  .1,  right =  .1 }, -- sans S
465                        [0x1D5B9] = { left =  .1,  right =  .1 }, -- sans Z
466
467                        [0x1D4A0] = { left =  .1,  right =  .1 }, -- script E
468                        [0x1D4AE] = { left =  .1,  right =  .1 }, -- script S
469                        [0x1D4B4] = { left =  .1,  right =  .1 }, -- script Y
470
471                        [0x0004C] = { left =  .1,  right =  .1 }, -- L
472                        [0x00053] = { left =  .1,  right =  .1 }, -- S
473                        [0x0005A] = { left =  .1,  right =  .1 }, -- Z
474
475                        [0x1D43D] = { left = -.1,  right = -.1  }, -- italic J
476                        [0x1D409] = { left = -.1,  right = -.1  }, -- bold J
477                        [0x1D471] = { left = -.1,  right = -.1  }, -- bold italic J
478                        [0x1D4D9] = { left = -.05, right = -.05 }, -- bold script J
479                    },
480                },
481                {
482                    tweak   = "fixprimes",
483                    factor  = 0.825,
484                },
485                {
486                    tweak = "checkspacing",
487                },
488                {
489                    tweak = "fixradicals",
490                },
491                {
492                    tweak = "addprivates",
493                },
494                {
495                    tweak = "addscripts",
496                },
497                {
498                    tweak = "accentdimensions",
499                },
500                {
501                    tweak = "addrules",
502                },
503                {
504                    tweak    = "replacerules",
505                 -- minus    = true, -- we have an extensible
506                    fraction = { height = .15, yoffset = .85 },
507                    radical  = { height = .15, yoffset = .85, leftoffset = .065, rightoffset = .065, leftoverlap = 0.023, rightoverlap = 0.023 },
508                    stacker  = { height = .15, yoffset = .85 },
509                },
510                -- This is gone:
511             -- {
512             --     tweak   = "addbars",
513             --     advance = 0.52,
514             -- },
515                -- And instead we now have this:
516                -- {
517                --     tweak = "fixvariants",
518                --     list  = {
519                --         -- watch out, showglyphs is now fuzzy
520                --         [0x0028] = { template = 0x005B, index = 1, yoffset = .03 },
521                --         [0x0029] = { template = 0x005D, index = 1, yoffset = .03 },
522                --         [0x007C] = { template = 0x005B, index = 1, yoffset = .03 },
523                --         [0x2016] = { template = 0x005B, index = 1, yoffset = .03 },
524                --         [0x2980] = { template = 0x005B, index = 1, yoffset = .03 },
525                --     }
526                -- },
527             -- {
528             --     tweak   = "addbars",
529             --     advance = 0.52,
530             --     check   = true,
531             -- --     variant = 1,
532             -- },
533                {
534                    tweak = "addactuarian",
535                },
536             -- {
537             --     comment = "demo",
538             --     tweak   = "radicalbodymargins",
539             --     list    = {
540             --         ["delimited right annuity.parts.bottom"] = { right = 1 },
541             --     }
542             -- },
543                {
544                    tweak = "addfourier",
545                    variant = 1,
546                },
547                {
548                    tweak = "addprimed",
549                },
550                {
551                    tweak = "addequals",
552                },
553                -- this is the mkiv section
554                {
555                    tweak   = "emulatelmtx",
556                    feature = "emulatelmtx",
557                    comment = "this is for mkiv",
558                },
559            -- { tweak = "inspect", slot = 0x2212 },
560            -- { tweak = "inspect", slot = 0x003D },
561            --
562            -- only for testing
563            --
564                {
565                    tweak   = "dimensions",
566                    feature = "mathforme",
567                    list    = {
568                        [0x58] = { -- upright X
569                         -- scale   = 0.5,
570                            xoffset = 0.5,
571                            yoffset = 0.5,
572                        },
573                    }
574                },
575            },
576        },
577        bigslots = {
578            2, 4, 6, 7 -- In fact, 7 is the last one.
579        },
580    },
581}
582