1local common = fonts.goodies.load("common-math.lfg")
2local presets = common.mathematics.tweaks.presets
3
4return {
5 name = "cambria-math",
6 version = "1.00",
7 comment = "Goodies that complement cambria.",
8 author = "Hans Hagen & Mikael Sundqvist",
9 copyright = "ConTeXt development team",
10 mathematics = {
11 parameters = {
12 AccentBaseDepth = 300,
13 DelimiterPercent = 90,
14 DelimiterShortfall = 400,
15 DisplayOperatorMinHeight = 2800,
16 PrimeShiftUp = "1.25*SuperscriptShiftUp",
17 PrimeShiftUpCramped = "1.25*SuperscriptShiftUp",
18 RadicalVerticalGap = 100,
19 RadicalDisplayStyleVerticalGap = 200,
20 },
21 tweaks = {
22 aftercopying = {
23 {
24 tweak = "addmirrors",
25 },
26 presets.scripttocalligraphic { },
27 presets.rsfstoscript { rscale = 0.97 },
28 presets.rsfsuprighttoscript { rscale = 0.97 },
29 presets.moderntocalligraphic { rscale = 0.97 },
30 presets.eulertocalligraphic { rscale = 0.97 },
31 presets.xitsarabic { rscale = 0.95 },
32 presets.fallbacks { },
33 presets.moveitalics { correct = true },
34 presets.moveitalics { correct = true, letters = true },
35 presets.moveintegrals { factor = 1.5},
36 presets.wipeitalics { },
37 presets.pagellaradical { },
38 {
39 tweak = "simplifykerns",
40 },
41 {
42 tweak = "kerns",
43 list = {
44 [0x002F] = { topleft = -0.2, bottomright = -0.2 },
45 ["0x002F.variants.*"] = { topleft = -0.2, bottomright = -0.2 },
46
47 [0x007D] = { topright = -0.05, bottomright = -0.05 },
48 ["0x7D.variants.*"] = { topright = -0.10, bottomright = -0.10 },
49 ["0x7D.parts.top"] = { topright = -0.10, },
50 ["0x7D.parts.bottom"] = { bottomright = -0.10 },
51 [0x0029] = { topright = -0.15, bottomright = -0.15 },
52 ["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 },
53 ["0x29.parts.top"] = { topright = -0.15, },
54 ["0x29.parts.bottom"] = { bottomright = -0.15 },
55 [0x221A] = { topright = 0.2, bottomright = 0.2 },
56 ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
57 ["0x221A.parts.top"] = { topright = 0.2, },
58 ["0x221A.parts.bottom"] = { bottomright = 0.2 },
59 [0x27E9] = { topright = -0.1, bottomright = -0.1 },
60 ["0x27E9.variants.*"] = { topright = -0.3, bottomright = -0.3 },
61 [0x27EB] = { topright = -0.1, bottomright = -0.1 },
62 ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
63
64 [0x2A0C] = { bottomright = -0.1 },
65 },
66 },
67
68
69
70
71 {
72 tweak = "extendaccents",
73 },
74 {
75 tweak = "fixaccents",
76 },
77 {
78 tweak = "radicaldegreeanchors",
79 list = {
80 [0x221A] = { location = "left", hfactor = -0.15, vfactor = 0.75 },
81 ["0x221A.variants.*"] = { location = "left", hfactor = -0.1, vfactor = 0.15 },
82 ["0x221A.variants.1"] = { location = "left", hfactor = -0.1, vfactor = 0.55 },
83 ["0x221A.variants.2"] = { location = "left", hfactor = -0.1, vfactor = 0.375 },
84 ["0x221A.variants.3"] = { location = "left", hfactor = -0.1, vfactor = 0.275 },
85 ["0x221A.variants.4"] = { location = "left", hfactor = -0.1, vfactor = 0.22 },
86 ["0x221A.variants.5"] = { location = "left", hfactor = -0.1, vfactor = 0.175 },
87 ["0x221A.parts.bottom"] = { location = "left", hfactor = -0.1, vfactor = 0.95 },
88 }
89 },
90{
91 tweak = "wipevariants",
92 list = {
93 [0x221A] = 1,
94 },
95},
96
97
98
99
100
101
102
103
104
105
106
107
108
109 {
110 tweak = "dimensions",
111 list = {
112
113 [0x020DB] = { yoffset = -0.03, height = .95, all = true },
114 },
115 },
116
117
118 {
119 tweak = "copyaccents",
120 },
121
122
123 {
124 tweak = "fixprimes",
125 factor = 0.83,
126 fake = 0.8,
127 },
128 {
129 tweak = "checkspacing",
130 },
131 {
132 tweak = "addscripts",
133 },
134 {
135 tweak = "accentdimensions",
136 list = { "over", "under" },
137 },
138 {
139 tweak = "addrules",
140 },
141 {
142 tweak = "replacerules",
143 minus = {
144 leftoffset = .0925,
145 rightoffset = .0925,
146 },
147 fraction = {
148 height = .204,
149 yoffset = .796,
150 },
151 radical = {
152 height = .204,
153 yoffset = .796,
154 leftoffset = .0925,
155 rightoffset = .0925,
156 },
157 stacker = {
158 height = .204,
159 yoffset = .796,
160 },
161 },
162 {
163 tweak = "wipecues",
164 },
165 {
166 tweak = "addarrows",
167 },
168 {
169 tweak = "fixslashes",
170 },
171 {
172 tweak = "addbars",
173 advance = 0.33,
174 },
175 {
176 tweak = "addactuarian",
177 },
178 {
179 tweak = "addequals",
180 },
181 {
182 tweak = "addfourier",
183 variant = 2,
184 },
185 {
186 tweak = "addprimed",
187 },
188 },
189 },
190 bigslots = {
191 1, 2, 3, 4
192 },
193 },
194}
195 |