1local common = fonts.goodies.load("common-math.lfg")
2local presets = common.mathematics.tweaks.presets
3
4local integral_variants = { bottomright = -0.20 }
5
6local integral_bottom = { bottomright = -0.45 }
7
8return {
9 name = "lucida-opentype-math",
10 version = "1.00",
11 comment = "Goodies that complement lucida opentype.",
12 author = "Hans Hagen & Mikael Sundqvist",
13 copyright = "ConTeXt development team",
14 mathematics = {
15 parameters = {
16 FractionRuleThickness = 55,
17
18 FlattenedAccentBaseHeight = 710,
19 DelimiterPercent = 85,
20 DelimiterShortfall = 400,
21 DelimiterDisplayPercent = 90,
22 DelimiterDisplayShortfall = 400,
23 SuperscriptBottomMaxWithSubscript = 325,
24 PrimeShiftUp = "1.3*SuperscriptShiftUp",
25 PrimeShiftUpCramped = "1.3*SuperscriptShiftUp",
26 PrimeBaselineDropMax = "0.5*SuperscriptBaselineDropMax",
27 RadicalDisplayStyleVerticalGap = "RadicalVerticalGap",
28
29
30 },
31 scales = {
32 scriptxscale = 1025,
33 scriptyscale = 975,
34 scriptscriptxscale = 1050,
35 scriptscriptyscale = 950,
36 scriptweight = 20,
37 scriptscriptweight = 40,
38 },
39 tweaks = {
40
41
42
43
44
45
46
47
48
49 aftercopying = {
50 {
51 tweak = "version",
52 expected = "Version 1.901",
53 },
54 {
55 tweak = "fixoldschool",
56 version = "Version 1.802",
57 },
58 {
59 tweak = "parameters",
60 feature = "boldmath",
61 list = {
62 RadicalRuleThickness = 60,
63
64
65
66
67 }
68 },
69 {
70 tweak = "addmirrors",
71 },
72 presets.smalldigits { factor = 0.90 },
73 presets.scripttocalligraphic { },
74 presets.rsfstoscript { rscale = 1 },
75 presets.rsfsuprighttoscript { rscale = 1 },
76 presets.moderntocalligraphic { rscale = 1 },
77 presets.eulertocalligraphic { rscale = 1 },
78 presets.xitsarabic { rscale = 1.05 },
79 presets.fallbacks { },
80 presets.moveitalics { correct = true },
81 presets.moveitalics { correct = true, letters = true },
82 presets.moveintegrals { factor = 1.5 },
83 presets.wipeitalics { },
84 {
85 tweak = "replacealphabets",
86 filename = "lucidabrightot.otf",
87 keep = true,
88 list = {
89 { source = "latinsupplement" },
90
91
92
93
94
95
96
97
98 },
99 },
100 {
101 tweak = "replacealphabets",
102 list = {
103 {
104 source = "uppercasescript",
105 target = "uppercasecalligraphic",
106 feature = "ss04",
107 },
108 {
109 source = "lowercasescript",
110 target = "lowercasecalligraphic",
111 feature = "ss04",
112 },
113 {
114 source = "uppercaseboldscript",
115 target = "uppercaseboldcalligraphic",
116 feature = "ss04",
117 },
118
119 },
120 },
121 {
122 tweak = "dimensions",
123 version = "Version 1.802",
124 list = {
125
126 ["0x003C"] = { scale = 1.09057, width = 1.09057, height = 1.09057 },
127 ["0x003E"] = { scale = 1.09057, width = 1.09057, height = 1.09057 },
128 },
129 },
130 {
131 tweak = "dimensions",
132 version = "Version 1.802",
133 list = {
134
135 ["0x23DC.parts.1"] = { xoffset = -0.075, height = 0.4, yoffset = -0.6 },
136 ["0x23DC.parts.2"] = { height = 0.4, yoffset = -0.6 },
137 ["0x23DC.parts.3"] = { xoffset = 0.075, height = 0.4, yoffset = -0.6 },
138 ["0x23DD.parts.1"] = { xoffset = -0.075, depth = 0.8, yoffset = 0.2 },
139 ["0x23DD.parts.2"] = { depth = 0.8, yoffset = 0.2 },
140 ["0x23DD.parts.3"] = { xoffset = 0.075, depth = 0.8, yoffset = 0.2 },
141 ["0x7C.variants.3"] = { squeeze = 0.90, height = 0.90, depth = 0.90 },
142 ["0x7C.variants.4"] = { squeeze = 0.80, height = 0.80, depth = 0.80 },
143 },
144 },
145
146
147
148 {
149 tweak = "checkaccents",
150 },
151 {
152 tweak = "extendaccents",
153 },
154 {
155 tweak = "flattenaccents",
156 },
157 {
158 tweak = "fixaccents",
159 },
160{
161 tweak = "keepbases",
162 list = { 0x302 }
163},
164 {
165 tweak = "radicaldegreeanchors",
166 list = {
167 ["0x221A.variants.3"] = { location = "left", hfactor = 0, vfactor = .55 },
168 ["0x221A.variants.4"] = { location = "left", hfactor = 0, vfactor = .50 },
169 ["0x221A.parts.bottom"] = { location = "left", hfactor = 0, vfactor = .85 },
170 }
171 },
172
173
174
175
176
177
178 {
179 tweak = "copyaccents",
180 },
181
182 {
183 tweak = "fixslashes",
184 },
185 {
186 tweak = "addbreve",
187 },
188 {
189 tweak = "kerns",
190 list = {
191 [0x002F] = { topleft = -0.2, bottomright = -0.2 },
192 ["0x007D.parts.top"] = { topright = -0.15 },
193 ["0x007D.parts.bottom"] = { bottomright = -0.15 },
194 ["0x007D.variants.*"] = { topright = -0.15, bottomright = -0.15 },
195 ["0x0029.parts.top"] = { topright = -0.25 },
196 ["0x0029.parts.bottom"] = { bottomright = -0.25 },
197 ["0x0029.variants.*"] = { topright = -0.2, bottomright = -0.2 },
198 ["0x221A.parts.top"] = { topright = 0.2 },
199 ["0x221A.parts.bottom"] = { bottomright = 0.2 },
200 ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
201 [0x27E9] = { topright = -0.2, bottomright = -0.2 },
202 ["0x27E9.variants.*"] = { topright = -0.3, bottomright = -0.3 },
203 [0x27EB] = { topright = -0.2, bottomright = -0.2 },
204 ["0x27EB.variants.*"] = { topright = -0.3, bottomright = -0.3 },
205 },
206 },
207 {
208 tweak = "fixprimes",
209 factor = 0.7,
210 fake = 0.65,
211 },
212 {
213 tweak = "checkspacing",
214 },
215 {
216 tweak = "addscripts",
217 },
218 {
219 tweak = "accentdimensions",
220 },
221 {
222 tweak = "addrules",
223 },
224 {
225 tweak = "replacerules",
226 minus = {
227 leftoffset = .12,
228 rightoffset = .12,
229 },
230 fraction = {
231 height = .2,
232 yoffset = .825,
233 },
234 radical = {
235 height = .13,
236 yoffset = .825,
237 leftoffset = .124,
238 rightoffset = .124,
239 yscale = .940,
240 },
241radical = {
242 height = .140,
243 yoffset = .610,
244 yscale = .720,
245 leftoffset = .124,
246 rightoffset = .124,
247},
248 stacker = {
249 height = .2,
250 yoffset = .825,
251 },
252 },
253 {
254 tweak = "addactuarian",
255 },
256 {
257 tweak = "addfourier",
258 variant = 1,
259 },
260 {
261 tweak = "addprimed",
262 },
263 {
264 tweak = "addarrows",
265 left = 0.1,
266 right = 0.1,
267 slack = 0.20,
268 list = {
269 [0x21A9] = false,
270 [0x21AA] = false,
271 [0x2190] = false,
272 [0x2192] = false,
273 [0x219E] = false,
274 [0x21A0] = false,
275 }
276 },
277
278 {
279 tweak = "sortvariants",
280 list = { 0x23DE },
281 orientation = "horizontal",
282 },
283
284 {
285 tweak = "emulatelmtx",
286 feature = "emulatelmtx",
287 comment = "this is for mkiv",
288 },
289 },
290 },
291 alternates = {
292 textitalic = { feature = 'ss01', value = 1, comment = "Mathematical Alternative Lowercase Italic" },
293 arrow = { feature = 'ss02', value = 1, comment = "Mathematical Alternative Smaller Arrows" },
294 operator = { feature = 'ss03', value = 1, comment = "Mathematical Alternative Smaller Operators" },
295 calligraphic = { feature = 'ss04', value = 1, comment = "Mathematical Alternative Calligraphic Characters" },
296 zero = { feature = 'ss05', value = 1, comment = "Mathematical Alternative Zero" },
297 multipledots = { feature = 'ss06', value = 1, comment = "Mathematical Alternative Multiple Dots" },
298 ldots = { feature = 'ss07', value = 1, comment = "Mathematical Alternative Ellipsis" },
299 },
300 bigslots = {
301 1, 2, 3, 4
302 },
303
304
305
306 dimensions = dimensions,
307 kerns = kerns,
308 },
309}
310 |