1local common = fonts.goodies.load("common-math.lfg")
2local presets = common.mathematics.tweaks.presets
3
4local integral_variants = { bottomright = -0.20 }
5local integral_bottom = { bottomright = -0.25 }
6
7return {
8 name = "dejavu-math",
9 version = "1.00",
10 comment = "Goodies that complement dejavu.",
11 author = "Hans Hagen & Mikael Sundqvist",
12 copyright = "ConTeXt development team",
13 mathematics = {
14 parameters = {
15 FractionRuleThickness = 60,
16 AccentTopShiftUp = -25,
17 FlattenedAccentTopShiftUp = -25,
18 AccentBaseDepth = 30,
19 DelimiterPercent = 85,
20 DelimiterShortfall = 400,
21 DelimiterDisplayPercent = 90,
22 DelimiterDisplayShortfall = 400,
23 DisplayOperatorMinHeight = 1800,
24 SubscriptShiftDown = 177,
25 SuperscriptShiftUp = 428,
26 SubscriptShiftDownWithSuperscript = "1.3*SubscriptShiftDown",
27 PrimeShiftUp = "1.4*SuperscriptShiftUp",
28 PrimeShiftUpCramped = "1.4*SuperscriptShiftUp",
29 PrimeBaselineDropMax = "0.5*SuperscriptBaselineDropMax",
30 },
31 tweaks = {
32 aftercopying = {
33 {
34 tweak = "version",
35 expected = "Version 1.106",
36 },
37 presets.braille { },
38 {
39 tweak = "fixprimes",
40 factor = 0.63,
41 },
42 {
43 tweak = "addmirrors",
44 },
45 {
46 tweak = "addcomposites",
47 },
48 presets.scripttocalligraphic { },
49 presets.rsfstoscript { rscale = 1.02 },
50 presets.rsfsuprighttoscript { rscale = 1.02 },
51 presets.moderntocalligraphic { rscale = 1.02 },
52 presets.eulertocalligraphic { rscale = 1.02 },
53 presets.xitsarabic { rscale = 1.05 },
54 presets.fallbacks { },
55 presets.moveitalics { correct = true },
56 presets.moveitalics { correct = true, letters = true },
57 presets.moveintegrals { factor = 1.5 },
58 presets.wipeitalics { },
59
60
61
62
63
64 {
65 tweak = "checkaccents",
66 },
67 {
68 tweak = "wipecues",
69 },
70
71 {
72 tweak = "kerns",
73 list = {
74 [0x002F] = { topleft = -0.2, bottomright = -0.2 },
75 ["0x7D.parts.top"] = { topright = -0.15, },
76 ["0x7D.parts.bottom"] = { bottomright = -0.15 },
77 ["0x7D.variants.*"] = { topright = -0.05, bottomright = -0.05 },
78 ["0x29.parts.top"] = { topright = -0.15, },
79 ["0x29.parts.bottom"] = { bottomright = -0.15 },
80 ["0x29.variants.*"] = { topright = -0.1, bottomright = -0.1 },
81 ["0x221A.parts.top"] = { topright = 0.2, },
82 ["0x221A.parts.bottom"] = { bottomright = 0.2 },
83 ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
84 [0x27E9] = { topright = -0.1, bottomright = -0.1 },
85 ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 },
86 [0x27EB] = { topright = -0.1, bottomright = -0.1 },
87 ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
88
89
90
91
92
93 [0x1D435] = { bottomright = -.05 },
94 [0x1D436] = { bottomright = -.1 },
95 [0x1D437] = { bottomright = -.05 },
96 [0x1D438] = { bottomright = -.1 },
97 [0x1D439] = { bottomright = -.1 },
98 [0x1D43A] = { bottomright = -.05 },
99 [0x1D43B] = { bottomright = -.1 },
100 [0x1D43C] = { bottomright = -.15 },
101 [0x1D43D] = { bottomright = -.15 },
102 [0x1D43E] = { bottomright = -.1 },
103 [0x1D440] = { bottomright = -.1 },
104 [0x1D441] = { bottomright = -.1 },
105 [0x1D443] = { bottomright = -.1 },
106 [0x1D446] = { bottomright = -.05 },
107 [0x1D447] = { bottomright = -.3 },
108 [0x1D448] = { bottomright = -.2 },
109 [0x1D449] = { bottomright = -.25 },
110 [0x1D44A] = { bottomright = -.2 },
111 [0x1D44B] = { bottomright = -.1 },
112 [0x1D44C] = { bottomright = -.25 },
113 [0x1D44D] = { bottomright = -.1 },
114 [0x1D451] = { bottomright = -.1 },
115 [0x1D453] = { bottomright = -.2 },
116 [0x1D45F] = { bottomright = -.1 },
117 [0x1D461] = { bottomright = -.1 },
118 [0x1D463] = { bottomright = -.1 },
119 [0x1D464] = { bottomright = -.05 },
120 [0x1D465] = { bottomright = -.05 },
121 [0x1D466] = { bottomright = -.05 },
122 [0x1D467] = { bottomright = -.05 },
123 [0x00393] = { bottomright = -0.3, },
124 [0x003A5] = { bottomright = -0.2, },
125 [0x003A8] = { bottomright = -0.1, },
126 [0x02207] = { bottomright = -0.2, },
127 [0x1D6FB] = { bottomright = -0.2, },
128 [0x1D701] = { bottomright = -.15 },
129 [0x1D703] = { bottomright = -.05 },
130 [0x1D705] = { bottomright = -.05 },
131 [0x1D709] = { bottomright = -.15 },
132 [0x1D70B] = { bottomright = -.1 },
133 [0x1D70E] = { bottomright = -.15 },
134 [0x1D70F] = { bottomright = -.15 },
135 [0x1D712] = { bottomright = -.15 },
136 [0x1D713] = { bottomright = -.1 },
137 [0x1D718] = { bottomright = -.05 },
138
139 ["0x222B.parts.bottom"] = { bottomright = -0.20 },
140 ["0x222C.parts.bottom"] = { bottomright = -0.15 },
141 ["0x222D.parts.bottom"] = { bottomright = -0.10 },
142 ["0x2A0C.parts.bottom"] = { bottomright = -0.05 },
143 },
144 },
145
146
147
148 {
149 tweak = "extendaccents",
150 },
151 {
152 tweak = "radicaldegreeanchors",
153 list = {
154 [0x221A] = { location = "left", hfactor = .1, vfactor = .65 },
155 ["0x221A.variants.*"] = { location = "left", hfactor = .1, vfactor = .6 },
156 ["0x221A.variants.1"] = { location = "left", hfactor = .1, vfactor = .65 },
157 ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .65 },
158 ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.1 },
159 }
160 },
161 {
162 tweak = "flattenaccents",
163 },
164 {
165 tweak = "fixaccents",
166 },
167
168
169
170
171
172
173
174
175
176
177
178
179
180 {
181 tweak = "dimensions",
182 list = {
183 [0x020DB] = { yoffset = 0.015, height = .95, all = true },
184 },
185 },
186
187
188 {
189 tweak = "copyaccents",
190 },
191 presets.addmathkerns { },
192 {
193 tweak = "checkspacing",
194 },
195 {
196 tweak = "addscripts",
197 },
198 {
199 tweak = "accentdimensions",
200 },
201 {
202 tweak = "addrules",
203 },
204 {
205 tweak = "replacerules",
206 fraction = { height = .254, yoffset = .746, leftoffset = .1, rightoffset = .1, },
207 radical = { height = .17, leftoffset = .1, rightoffset = .1, yoffset = .485, yscale = .65 },
208 stacker = { height = .254, yoffset = .746 },
209 },
210 {
211 tweak = "wipecues",
212 },
213 {
214 tweak = "addbars",
215 advance = 0.175,
216 },
217 {
218 tweak = "addactuarian",
219 },
220 {
221 tweak = "addequals",
222 },
223 {
224 tweak = "addfourier",
225 variant = 1,
226 },
227 {
228 tweak = "addprimed",
229 },
230
231 {
232 tweak = "emulatelmtx",
233 feature = "emulatelmtx",
234 comment = "this is for mkiv",
235 },
236 },
237 },
238 alternates = {
239 dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
240 },
241 bigslots = {
242 1, 3, 5, 7
243 },
244 },
245}
246 |