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 {
81 tweak = "replacealphabets",
82 list = {
83 {
84 source = "uppercasescript",
85 target = "uppercasecalligraphic",
86 unicode = "uppercasescript",
87 },
88 {
89 source = "uppercasescript",
90 target = "uppercasescript",
91 feature = "ss01",
92 },
93 {
94 source = { first = 0xE17D, last = 0xE195 },
95 target = "uppercasesansgreek",
96 unicode = "uppercasegreeknormal",
97 },
98 {
99 source = { first = 0xE196, last = 0xE1AE },
100 target = "lowercasesansgreek",
101 unicode = "lowercasegreeknormal",
102 },
103 {
104 source = { first = 0xE1BF, last = 0xE1D7 },
105 target = "uppercaseitalicsansgreek",
106 unicode = "uppercasegreekitalic",
107 },
108 {
109 source = { first = 0xE1D8, last = 0xE1F0 },
110 target = "lowercaseitalicsansgreek",
111 unicode = "lowercasegreekitalic",
112 },
113 },
114 },
115
116 presets.scripttocalligraphic { },
117 presets.rsfstoscript { },
118 presets.rsfsuprighttoscript { },
119 presets.moderntocalligraphic { },
120 presets.eulertocalligraphic { },
121 presets.xitsarabic { rscale = 0.95 },
122 presets.fallbacks { },
123 presets.moveitalics { correct = true },
124 presets.moveitalics { correct = true, letters = true },
125 presets.moveintegrals { },
126 presets.wipeitalics { },
127 {
128 tweak = "checkaccents",
129 },
130
131 {
132 tweak = "wipevariants",
133 list = {
134 [0x20D6] = 3,
135 [0x20D7] = 3,
136 [0x20EE] = 3,
137 [0x20EF] = 3,
138 },
139 },
140 {
141 tweak = "simplifykerns",
142 },
143 {
144 tweak = "kerns",
145 list = {
146 [0x002F] = { topleft = -0.2, bottomright = -0.2 },
147 ["0x7D.parts.top"] = { topright = -0.15, },
148 ["0x7D.parts.bottom"] = { bottomright = -0.15 },
149 ["0x29.parts.top"] = { topright = -0.1, },
150 ["0x29.parts.bottom"] = { bottomright = -0.1 },
151 ["0x29.variants.*"] = { topright = -0.2, bottomright = -0.2 },
152 ["0x221A.parts.top"] = { topright = 0.2, },
153 ["0x221A.parts.bottom"] = { bottomright = 0.2 },
154 ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
155 [0x27E9] = { topright = -0.1, bottomright = -0.1 },
156 ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 },
157 [0x27EB] = { topright = -0.1, bottomright = -0.1 },
158 ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
159
160 ["0x222B.parts.bottom"] = { bottomright = -0.30 },
161 },
162 },
163
164
165
166 {
167 tweak = "extendaccents",
168 },
169 {
170 tweak = "radicaldegreeanchors",
171 list = {
172 [0x221A] = { location = "left", hfactor = 0.00, vfactor = 0.7 },
173 ["0x221A.variants.*"] = { location = "left", hfactor = 0.00, vfactor = 0.55 },
174 ["0x221A.variants.3"] = { location = "left", hfactor = 0.00, vfactor = .525 },
175 ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.00 },
176 }
177 },
178 {
179 tweak = "flattenaccents",
180 },
181 {
182 tweak = "fixaccents",
183 },
184
185
186
187
188
189
190
191
192
193
194
195
196
197 {
198 tweak = "dimensions",
199 list = {
200
201 [0x020DB] = { yoffset = 0.025, height = .95, all = true },
202 },
203 },
204
205
206 {
207 tweak = "copyaccents",
208 },
209
210 {
211 tweak = "checkspacing",
212 },
213 {
214 tweak = "addscripts",
215 },
216 {
217 tweak = "accentdimensions",
218 },
219 {
220 tweak = "addrules",
221 },
222 {
223 tweak = "addarrows",
224 },
225 {
226 tweak = "fixslashes",
227 },
228 {
229 tweak = "replacerules",
230 minus = {
231 height = .233,
232 yoffset = .768,
233 leftoffset = .08,
234 rightoffset = .08,
235 },
236 fraction = {
237 height = .233,
238 yoffset = .768,
239 },
240 radical = {
241 height = .233,
242 yoffset = .768,
243 leftoffset = .08,
244 rightoffset = .08,
245 },
246 stacker = {
247 height = .233,
248 yoffset = .768,
249 },
250 },
251 {
252 tweak = "addactuarian",
253 },
254 {
255 tweak = "addfourier",
256 variant = 1,
257 },
258 {
259 tweak = "addprimed",
260 },
261 {
262 tweak = "addparts",
263 list = {
264 [0x21F4] = {
265 horizontal = true,
266 template = 0x2192,
267 sequence = {
268 { glyph = "first", factor = 2 },
269 { glyph = 0x2218 },
270 { glyph = "first", factor = 2 },
271 { glyph = "last" },
272 }
273 }
274 }
275 },
276{
277 tweak = "addbars",
278 advance = 0.3,
279 check = true,
280},
281
282 {
283 tweak = "emulatelmtx",
284 feature = "emulatelmtx",
285 comment = "this is for mkiv",
286 },
287 },
288 },
289 bigslots = {
290 1, 3, 5, 7
291 },
292 },
293}
294 |