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 {
27 tweak = "addcomposites",
28 },
29 presets.scripttocalligraphic { },
30 presets.rsfstoscript { rscale = 0.97 },
31 presets.rsfsuprighttoscript { rscale = 0.97 },
32 presets.moderntocalligraphic { rscale = 0.97 },
33 presets.eulertocalligraphic { rscale = 0.97 },
34 presets.xitsarabic { rscale = 0.95 },
35 presets.fallbacks { },
36 presets.moveitalics { correct = true },
37 presets.moveitalics { correct = true, letters = true },
38 presets.moveintegrals { factor = 1.5},
39 presets.wipeitalics { },
40 presets.pagellaradical { },
41 {
42 tweak = "simplifykerns",
43 },
44 {
45 tweak = "kerns",
46 list = {
47 [0x002F] = { topleft = -0.2, bottomright = -0.2 },
48 ["0x002F.variants.*"] = { topleft = -0.2, bottomright = -0.2 },
49
50 [0x007D] = { topright = -0.05, bottomright = -0.05 },
51 ["0x7D.variants.*"] = { topright = -0.10, bottomright = -0.10 },
52 ["0x7D.parts.top"] = { topright = -0.10, },
53 ["0x7D.parts.bottom"] = { bottomright = -0.10 },
54 [0x0029] = { topright = -0.15, bottomright = -0.15 },
55 ["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 },
56 ["0x29.parts.top"] = { topright = -0.15, },
57 ["0x29.parts.bottom"] = { bottomright = -0.15 },
58 [0x221A] = { topright = 0.2, bottomright = 0.2 },
59 ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
60 ["0x221A.parts.top"] = { topright = 0.2, },
61 ["0x221A.parts.bottom"] = { bottomright = 0.2 },
62 [0x27E9] = { topright = -0.1, bottomright = -0.1 },
63 ["0x27E9.variants.*"] = { topright = -0.3, bottomright = -0.3 },
64 [0x27EB] = { topright = -0.1, bottomright = -0.1 },
65 ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
66
67 [0x2A0C] = { bottomright = -0.1 },
68 },
69 },
70
71
72
73
74 {
75 tweak = "extendaccents",
76 },
77 {
78 tweak = "fixaccents",
79 },
80 {
81 tweak = "radicaldegreeanchors",
82 list = {
83 [0x221A] = { location = "left", hfactor = -0.15, vfactor = 0.75 },
84 ["0x221A.variants.*"] = { location = "left", hfactor = -0.1, vfactor = 0.15 },
85 ["0x221A.variants.1"] = { location = "left", hfactor = -0.1, vfactor = 0.55 },
86 ["0x221A.variants.2"] = { location = "left", hfactor = -0.1, vfactor = 0.375 },
87 ["0x221A.variants.3"] = { location = "left", hfactor = -0.1, vfactor = 0.275 },
88 ["0x221A.variants.4"] = { location = "left", hfactor = -0.1, vfactor = 0.22 },
89 ["0x221A.variants.5"] = { location = "left", hfactor = -0.1, vfactor = 0.175 },
90 ["0x221A.parts.bottom"] = { location = "left", hfactor = -0.1, vfactor = 0.95 },
91 }
92 },
93{
94 tweak = "wipevariants",
95 list = {
96 [0x221A] = 1,
97 },
98},
99
100
101
102
103
104
105
106
107
108
109
110
111
112 {
113 tweak = "dimensions",
114 list = {
115
116 [0x020DB] = { yoffset = -0.03, height = .95, all = true },
117 },
118 },
119
120
121 {
122 tweak = "copyaccents",
123 },
124
125
126 {
127 tweak = "fixprimes",
128 factor = 0.83,
129 fake = 0.8,
130 },
131 {
132 tweak = "checkspacing",
133 },
134 {
135 tweak = "addscripts",
136 },
137 {
138 tweak = "accentdimensions",
139 list = { "over", "under" },
140 },
141 {
142 tweak = "addrules",
143 },
144 {
145 tweak = "replacerules",
146 minus = {
147 leftoffset = .0925,
148 rightoffset = .0925,
149 },
150 fraction = {
151 height = .204,
152 yoffset = .796,
153 },
154 radical = {
155 height = .204,
156 yoffset = .796,
157 leftoffset = .0925,
158 rightoffset = .0925,
159 },
160 stacker = {
161 height = .204,
162 yoffset = .796,
163 },
164 },
165 {
166 tweak = "wipecues",
167 },
168 {
169 tweak = "addarrows",
170 },
171 {
172 tweak = "fixslashes",
173 },
174 {
175 tweak = "addbars",
176 advance = 0.33,
177 },
178 {
179 tweak = "addactuarian",
180 },
181 {
182 tweak = "addequals",
183 },
184 {
185 tweak = "addfourier",
186 variant = 2,
187 },
188 {
189 tweak = "addprimed",
190 },
191 },
192 },
193 bigslots = {
194 1, 2, 3, 4
195 },
196 },
197}
198 |