minion-math.lfg /size: 6512 b    last modification: 2024-01-16 09: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                presets.rsfstoscript         { rscale  = 0.97 },
49                presets.rsfsuprighttoscript  { rscale  = 0.97 },
50                presets.moderntocalligraphic { rscale  = 0.97 },
51                presets.eulertocalligraphic  { rscale  = 0.97 },
52                presets.xitsarabic           { rscale  = 0.88 },
53                presets.fallbacks            { },
54                presets.moveitalics          { correct = true },
55                presets.moveitalics          { correct = true, letters = true },
56                presets.moveintegrals        { factor  = 1.3  },
57                presets.wipeitalics          { },
58
59                {
60                    tweak = "kerns",
61                    list  = {
62                        [0x002F]                = { topleft  = -0.2,  bottomright = -0.2 },
63                        ["0x002F.variants.*"]   = { topleft  = -0.2,  bottomright = -0.2 },
64                        --
65                        [0x007D]                = { topright = -0.05, bottomright = -0.05 }, -- right brace variants
66                        ["0x7D.variants.*"]     = { topright = -0.10, bottomright = -0.10 }, -- right brace variants
67                        ["0x7D.parts.top"]      = { topright = -0.10,                     }, -- right brace top
68                        ["0x7D.parts.bottom"]   = {                   bottomright = -0.10 }, -- right brace bottom
69                        [0x0029]                = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
70                        ["0x29.variants.*"]     = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
71                        ["0x29.parts.top"]      = { topright = -0.15,                     }, -- right parenthesis top
72                        ["0x29.parts.bottom"]   = {                   bottomright = -0.15 }, -- right parenthesis bottom
73                        [0x221A]                = { topright =  0.2,  bottomright =  0.2  }, -- radical
74                        ["0x221A.variants.*"]   = { topright =  0.2,  bottomright =  0.2  },
75                        ["0x221A.parts.top"]    = { topright =  0.2,                      },
76                        ["0x221A.parts.bottom"] = {                   bottomright =  0.2  },
77                        [0x27E9]                = { topright = -0.1,  bottomright = -0.1  }, -- angle
78                        ["0x27E9.variants.*"]   = { topright = -0.3,  bottomright = -0.3  },
79                        [0x27EB]                = { topright = -0.1,  bottomright = -0.1  },
80                        ["0x27EB.variants.*"]   = { topright = -0.2,  bottomright = -0.2  },
81                        -- Keep as example. not needed in cambria (after all it is the reference):
82                        [0x2A0C] = { bottomright = -0.1 }, -- iiiint does not have any ic
83                    },
84                },
85                {
86                    tweak = "simplifykerns",
87                },
88                {
89                    tweak = "extendaccents",
90                },
91                {
92                    tweak   = "radicaldegreeanchors",
93                    list = {
94                        [0x221A]                = { location = "left", hfactor  = -0.15, vfactor  = .75 },
95                        ["0x221A.variants.*"]   = { location = "left", hfactor  = -0.1, vfactor  = .575 },
96                        ["0x221A.variants.1"]   = { location = "left", hfactor  = -0.1, vfactor  = .725 },
97                        ["0x221A.variants.2"]   = { location = "left", hfactor  = -0.1, vfactor  = .65 },
98                        ["0x221A.variants.3"]   = { location = "left", hfactor  = -0.1, vfactor  = .625 },
99                        ["0x221A.variants.4"]   = { location = "left", hfactor  = -0.1, vfactor  = .625 },
100                        ["0x221A.parts.bottom"] = { location = "left", hfactor  = -0.1, vfactor  = 0.85 },
101                    }
102                },
103                {
104                    tweak = "fixaccents",
105                },
106                {
107                    tweak = "copyaccents",
108                },
109                {
110                    tweak  = "fixprimes",
111                    factor = 1,
112                },
113                {
114                    tweak = "addfourier",
115                    variant = 1,
116                },
117                {
118                    tweak = "addprimed",
119                },
120                -- this is the mkiv section
121                {
122                    tweak   = "emulatelmtx",
123                    feature = "emulatelmtx",
124                    comment = "this is for mkiv",
125                },
126            },
127        },
128    },
129}
130