minion-math.lfg /size: 6594 b    last modification: 2025-02-21 11:03
1-- This math font has not yet been set up. We will only do that when those involved
2-- ConTeXt (math) develoipment have official copies of all the text minion and math
3-- fonts without restrictions of usage in documents.
4
5local common  = fonts.goodies.load("common-math.lfg")
6local presets = common.mathematics.tweaks.presets
7
8return {
9    name = "minion-math",
10    version = "1.00",
11    comment = "Goodies that complement minion math.",
12    author = "Hans Hagen & Mikael Sundqvist",
13    copyright = "ConTeXt development team",
14    designsizes = {
15        ["Minion-Math"] = {
16            ["8.4pt"] = "file:MinionMath-Tiny.otf",
17            ["9.8pt"] = "file:MinionMath-Capt.otf",
18            default   = "file:MinionMath-Regular.otf",
19        },
20        ["Minion-BoldMath"] = {
21            default   = "file:MinionMath-Semibold.otf",
22        },
23        ["Minion-MediumMath"] = {
24            default   = "file:MinionMath-Semibold.otf",
25        },
26    },
27    mathematics = {
28        parameters = {
29            DelimiterPercent                  =  85,
30            DelimiterShortfall                = 400,
31            DelimiterDisplayPercent           =  90,
32            DelimiterDisplayShortfall         = 400,
33            SubscriptShiftDown                = 200, -- 250 in font
34            SubscriptShiftDownWithSuperscript = "1.40*SubscriptShiftDown", -- 1.5* in math-act
35            PrimeShiftUp                      = "1.15*SuperscriptShiftUp",
36            PrimeShiftUpCramped               = "1.15*SuperscriptShiftUp",
37            RadicalDisplayStyleVerticalGap    = "RadicalVerticalGap", --104, 54
38        },
39        tweaks = {
40            aftercopying = {
41             -- {
42             --     tweak    = "version",
43             --     expected = "unknown", -- todo
44             -- },
45                {
46                    tweak = "addmirrors",
47                },
48                {
49                    tweak = "addcomposites",
50                },
51                presets.rsfstoscript         { rscale  = 0.97 },
52                presets.rsfsuprighttoscript  { rscale  = 0.97 },
53                presets.moderntocalligraphic { rscale  = 0.97 },
54                presets.eulertocalligraphic  { rscale  = 0.97 },
55                presets.xitsarabic           { rscale  = 0.88 },
56                presets.fallbacks            { },
57                presets.moveitalics          { correct = true },
58                presets.moveitalics          { correct = true, letters = true },
59                presets.moveintegrals        { factor  = 1.3  },
60                presets.wipeitalics          { },
61
62                {
63                    tweak = "kerns",
64                    list  = {
65                        [0x002F]                = { topleft  = -0.2,  bottomright = -0.2 },
66                        ["0x002F.variants.*"]   = { topleft  = -0.2,  bottomright = -0.2 },
67                        --
68                        [0x007D]                = { topright = -0.05, bottomright = -0.05 }, -- right brace variants
69                        ["0x7D.variants.*"]     = { topright = -0.10, bottomright = -0.10 }, -- right brace variants
70                        ["0x7D.parts.top"]      = { topright = -0.10,                     }, -- right brace top
71                        ["0x7D.parts.bottom"]   = {                   bottomright = -0.10 }, -- right brace bottom
72                        [0x0029]                = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
73                        ["0x29.variants.*"]     = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
74                        ["0x29.parts.top"]      = { topright = -0.15,                     }, -- right parenthesis top
75                        ["0x29.parts.bottom"]   = {                   bottomright = -0.15 }, -- right parenthesis bottom
76                        [0x221A]                = { topright =  0.2,  bottomright =  0.2  }, -- radical
77                        ["0x221A.variants.*"]   = { topright =  0.2,  bottomright =  0.2  },
78                        ["0x221A.parts.top"]    = { topright =  0.2,                      },
79                        ["0x221A.parts.bottom"] = {                   bottomright =  0.2  },
80                        [0x27E9]                = { topright = -0.1,  bottomright = -0.1  }, -- angle
81                        ["0x27E9.variants.*"]   = { topright = -0.3,  bottomright = -0.3  },
82                        [0x27EB]                = { topright = -0.1,  bottomright = -0.1  },
83                        ["0x27EB.variants.*"]   = { topright = -0.2,  bottomright = -0.2  },
84                        -- Keep as example. not needed in cambria (after all it is the reference):
85                        [0x2A0C] = { bottomright = -0.1 }, -- iiiint does not have any ic
86                    },
87                },
88                {
89                    tweak = "simplifykerns",
90                },
91                {
92                    tweak = "extendaccents",
93                },
94                {
95                    tweak   = "radicaldegreeanchors",
96                    list = {
97                        [0x221A]                = { location = "left", hfactor  = -0.15, vfactor  = .75 },
98                        ["0x221A.variants.*"]   = { location = "left", hfactor  = -0.1, vfactor  = .575 },
99                        ["0x221A.variants.1"]   = { location = "left", hfactor  = -0.1, vfactor  = .725 },
100                        ["0x221A.variants.2"]   = { location = "left", hfactor  = -0.1, vfactor  = .65 },
101                        ["0x221A.variants.3"]   = { location = "left", hfactor  = -0.1, vfactor  = .625 },
102                        ["0x221A.variants.4"]   = { location = "left", hfactor  = -0.1, vfactor  = .625 },
103                        ["0x221A.parts.bottom"] = { location = "left", hfactor  = -0.1, vfactor  = 0.85 },
104                    }
105                },
106                {
107                    tweak = "fixaccents",
108                },
109                {
110                    tweak = "copyaccents",
111                },
112                {
113                    tweak  = "fixprimes",
114                    factor = 1,
115                },
116                {
117                    tweak = "addfourier",
118                    variant = 1,
119                },
120                {
121                    tweak = "addprimed",
122                },
123                -- this is the mkiv section
124                {
125                    tweak   = "emulatelmtx",
126                    feature = "emulatelmtx",
127                    comment = "this is for mkiv",
128                },
129            },
130        },
131    },
132}
133