1local common = fonts.goodies.load("common-math.lfg")
2local presets = common.mathematics.tweaks.presets
3
4local integral_variants = { bottomright = -0.4 }
5
6local integral_bottom = { bottomright = -0.35 }
7
8return {
9 name = "stix-two-math",
10 version = "1.00",
11 comment = "Goodies that complement stix two opentype.",
12 author = "Hans Hagen & Mikael Sundqvist",
13 copyright = "ConTeXt development team",
14 mathematics = {
15 alternates = {
16 lambdabar = { feature = 'cv01', value = 1, comment = "Mathematical Alternative Lambda Bar" },
17 ramshorn = { feature = 'cv02', value = 1, comment = "Mathematical Alternative Rams Horn" },
18 emptyset = { feature = 'cv03', value = 1, comment = "Mathematical Alternative Empty Set" },
19 setminus = { feature = 'cv04', value = 1, comment = "Mathematical Alternative Setminus" },
20 calligraphic = { feature = 'ss01', value = 1, comment = "Mathematical Alternative Calligraphic Characters" },
21 italic = { feature = 'ss02', value = 1, comment = "Mathematical Alternative Lowercase Italic" },
22 barred = { feature = 'ss03', value = 1, comment = "Mathematical Alternative Barred Characters" },
23 primes = { feature = 'ss04', value = 1, comment = "Mathematical Alternative Primes" },
24 arrow = { feature = 'ss05', value = 1, comment = "Mathematical Alternative Smaller Arrows" },
25 narrower = { feature = 'ss06', value = 1, comment = "Mathematical Alternative Narrower Elements" },
26 small = { feature = 'ss07', value = 1, comment = "Mathematical Alternative Smaller Operators" },
27 upright = { feature = 'ss08', value = 1, comment = "Mathematical Alternative Upright Symbols" },
28 negated = { feature = 'ss09', value = 1, comment = "Mathematical Alternative Negated Symbols" },
29 relation = { feature = 'ss10', value = 1, comment = "Mathematical Alternative Relations" },
30 negatedset = { feature = 'ss11', value = 1, comment = "Mathematical Alternative Negated Set Symbols" },
31 propfrown = { feature = 'ss12', value = 1, comment = "Mathematical Alternative Proportional and Frown" },
32 negsine = { feature = 'ss13', value = 1, comment = "Mathematical Alternative Negated Sine Wave" },
33 intprod = { feature = 'ss14', value = 1, comment = "Mathematical Alternative Interior Products" },
34 capcup = { feature = 'ss15', value = 1, comment = "Mathematical Alternative Intersection and Union with serif" },
35 circled = { feature = 'ss16', value = 1, comment = "Mathematical Alternative Circled Operators" },
36 simvar = { feature = 'ss20', value = 1, comment = "Mathematical Alternative Similar and some more unrelated" },
37
38 negated8774 = {
39 feature = 'ss09',
40 value = 1,
41 comment = "Mathematical Alternative Negated 8774",
42 list = { [8774] = true },
43 },
44 negated8775 = {
45 feature = 'ss09',
46 value = 1,
47 comment = "Mathematical Alternative Negated 8775",
48 list = { [8775] = true },
49 },
50 },
51 parameters = {
52 AccentBaseDepth = 30,
53 FlattenedAccentTopShiftUp = 0,
54 RadicalKernAfterDegree = -500,
55 DelimiterPercent = 85,
56 DelimiterShortfall = 400,
57 DelimiterDisplayPercent = 90,
58 DelimiterDisplayShortfall = 400,
59 DisplayOperatorMinHeight = 1800,
60 PrimeShiftUp = "1.3*SuperscriptShiftUp",
61 PrimeShiftUpCramped = "1.3*SuperscriptShiftUp",
62 RadicalDisplayStyleVerticalGap = "RadicalVerticalGap",
63
64
65 },
66 tweaks = {
67 aftercopying = {
68 {
69 tweak = "version",
70 expected = "Version 2.12 b168",
71 },
72 {
73 tweak = "fixprimes",
74 factor = 0.84,
75 },
76 {
77 tweak = "addmirrors",
78 },
79 {
80 tweak = "addcomposites",
81 },
82
83 {
84 tweak = "replacealphabets",
85 list = {
86 {
87 source = "uppercasescript",
88 target = "uppercasecalligraphic",
89 unicode = "uppercasescript",
90 },
91 {
92 source = "uppercasescript",
93 target = "uppercasescript",
94 feature = "ss01",
95 },
96 {
97 source = "uppercaseboldscript",
98 target = "uppercaseboldcalligraphic",
99 unicode = "uppercasescriptbold",
100 },
101 {
102 source = "uppercaseboldscript",
103 target = "uppercaseboldscript",
104 feature = "ss01",
105 },
106 {
107 source = { first = 0xE17D, last = 0xE195 },
108 target = "uppercasesansgreek",
109 unicode = "uppercasegreeknormal",
110 },
111 {
112 source = { first = 0xE196, last = 0xE1AE },
113 target = "lowercasesansgreek",
114 unicode = "lowercasegreeknormal",
115 },
116 {
117 source = { first = 0xE1BF, last = 0xE1D7 },
118 target = "uppercaseitalicsansgreek",
119 unicode = "uppercasegreekitalic",
120 },
121 {
122 source = { first = 0xE1D8, last = 0xE1F0 },
123 target = "lowercaseitalicsansgreek",
124 unicode = "lowercasegreekitalic",
125 },
126 },
127 },
128 {
129 tweak = "replacealphabets",
130 filename = "TeXGyrePagellaMath.otf",
131 list = {
132 { unicodes = { 0x007C, 0x2223, 0x2016, 0x2980, 0x007C } },
133 }
134 },
135 presets.scripttocalligraphic { },
136 presets.rsfstoscript { },
137 presets.rsfsuprighttoscript { },
138 presets.moderntocalligraphic { },
139 presets.eulertocalligraphic { },
140 presets.xitsarabic { rscale = 0.95 },
141 presets.fallbacks { },
142 presets.moveitalics { correct = true },
143 presets.moveitalics { correct = true, letters = true },
144 presets.moveintegrals { },
145 presets.wipeitalics { },
146 {
147 tweak = "checkaccents",
148 },
149 {
150 tweak = "wipecues",
151 },
152
153 {
154 tweak = "wipevariants",
155 list = {
156 [0x20D6] = 3,
157 [0x20D7] = 3,
158 [0x20EE] = 3,
159 [0x20EF] = 3,
160 },
161 },
162 {
163 tweak = "simplifykerns",
164 },
165 {
166 tweak = "kerns",
167 list = {
168 [0x002F] = { topleft = -0.2, bottomright = -0.2 },
169 ["0x7D.parts.top"] = { topright = -0.15, },
170 ["0x7D.parts.bottom"] = { bottomright = -0.15 },
171 ["0x29.parts.top"] = { topright = -0.1, },
172 ["0x29.parts.bottom"] = { bottomright = -0.1 },
173 ["0x29.variants.*"] = { topright = -0.2, bottomright = -0.2 },
174 ["0x221A.parts.top"] = { topright = 0.2, },
175 ["0x221A.parts.bottom"] = { bottomright = 0.2 },
176 ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
177 [0x27E9] = { topright = -0.1, bottomright = -0.1 },
178 ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 },
179 [0x27EB] = { topright = -0.1, bottomright = -0.1 },
180 ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
181
182 [0x1D45F] = { bottomright = -.20 },
183 ["0x222B.parts.bottom"] = { bottomright = -0.30 },
184 },
185 },
186
187
188
189 {
190 tweak = "extendaccents",
191 },
192 {
193 tweak = "radicaldegreeanchors",
194 list = {
195 [0x221A] = { location = "left", hfactor = 0.00, vfactor = 0.7 },
196 ["0x221A.variants.*"] = { location = "left", hfactor = 0.00, vfactor = 0.55 },
197 ["0x221A.variants.3"] = { location = "left", hfactor = 0.00, vfactor = .525 },
198 ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.00 },
199 }
200 },
201 {
202 tweak = "flattenaccents",
203 },
204 {
205 tweak = "fixaccents",
206 },
207
208
209
210
211
212
213
214
215
216
217
218
219
220 {
221 tweak = "dimensions",
222 list = {
223
224 [0x020DB] = { yoffset = 0.025, height = .95, all = true },
225 },
226 },
227
228
229 {
230 tweak = "copyaccents",
231 },
232
233 {
234 tweak = "checkspacing",
235 },
236 {
237 tweak = "addscripts",
238 },
239 {
240 tweak = "accentdimensions",
241 },
242 {
243 tweak = "addrules",
244 },
245 {
246 tweak = "addarrows",
247 },
248 {
249 tweak = "fixslashes",
250 },
251 {
252 tweak = "replacerules",
253 minus = {
254 height = .233,
255 yoffset = .768,
256 leftoffset = .08,
257 rightoffset = .08,
258 },
259 fraction = {
260 height = .233,
261 yoffset = .768,
262 },
263 radical = {
264 height = .233,
265 yoffset = .768,
266 leftoffset = .08,
267 rightoffset = .08,
268 },
269 stacker = {
270 height = .233,
271 yoffset = .768,
272 },
273 },
274 {
275 tweak = "addactuarian",
276 },
277 {
278 tweak = "addfourier",
279 variant = 1,
280 },
281 {
282 tweak = "addprimed",
283 },
284 {
285 tweak = "addparts",
286 list = {
287 [0x21F4] = {
288 horizontal = true,
289 template = 0x2192,
290 sequence = {
291 { glyph = "first", factor = 2 },
292 { glyph = 0x2218 },
293 { glyph = "first", factor = 2 },
294 { glyph = "last" },
295 }
296 }
297 }
298 },
299{
300 tweak = "addbars",
301 advance = 0.3,
302 check = true,
303},
304
305 {
306 tweak = "emulatelmtx",
307 feature = "emulatelmtx",
308 comment = "this is for mkiv",
309 },
310 },
311 },
312 bigslots = {
313 1, 3, 5, 7
314 },
315 },
316}
317 |