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 presets.scripttocalligraphic { },
46 presets.rsfstoscript { rscale = 1.02 },
47 presets.rsfsuprighttoscript { rscale = 1.02 },
48 presets.moderntocalligraphic { rscale = 1.02 },
49 presets.eulertocalligraphic { rscale = 1.02 },
50 presets.xitsarabic { rscale = 1.05 },
51 presets.fallbacks { },
52 presets.moveitalics { correct = true },
53 presets.moveitalics { correct = true, letters = true },
54 presets.moveintegrals { factor = 1.5 },
55 presets.wipeitalics { },
56
57
58
59
60
61 {
62 tweak = "checkaccents",
63 },
64 {
65 tweak = "kerns",
66 list = {
67 [0x1D453] = { bottomright = -.2 },
68 }
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 [0x00393] = { bottomright = -0.30, },
90
91 ["0x222B.parts.bottom"] = { bottomright = -0.20 },
92 ["0x222C.parts.bottom"] = { bottomright = -0.15 },
93 ["0x222D.parts.bottom"] = { bottomright = -0.10 },
94 ["0x2A0C.parts.bottom"] = { bottomright = -0.05 },
95 },
96 },
97
98
99
100 {
101 tweak = "extendaccents",
102 },
103 {
104 tweak = "radicaldegreeanchors",
105 list = {
106 [0x221A] = { location = "left", hfactor = .1, vfactor = .65 },
107 ["0x221A.variants.*"] = { location = "left", hfactor = .1, vfactor = .6 },
108 ["0x221A.variants.1"] = { location = "left", hfactor = .1, vfactor = .65 },
109 ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .65 },
110 ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.1 },
111 }
112 },
113 {
114 tweak = "flattenaccents",
115 },
116 {
117 tweak = "fixaccents",
118 },
119
120
121
122
123
124
125
126
127
128
129
130
131
132 {
133 tweak = "dimensions",
134 list = {
135 [0x020DB] = { yoffset = 0.015, height = .95, all = true },
136 },
137 },
138
139
140 {
141 tweak = "copyaccents",
142 },
143 presets.addmathkerns { },
144 {
145 tweak = "checkspacing",
146 },
147 {
148 tweak = "addscripts",
149 },
150 {
151 tweak = "accentdimensions",
152 },
153 {
154 tweak = "addrules",
155 },
156 {
157 tweak = "replacerules",
158 fraction = { height = .254, yoffset = .746, leftoffset = .1, rightoffset = .1, },
159 radical = { height = .17, leftoffset = .1, rightoffset = .1, yoffset = .485, yscale = .65 },
160 stacker = { height = .254, yoffset = .746 },
161 },
162 {
163 tweak = "wipecues",
164 },
165 {
166 tweak = "addbars",
167 advance = 0.175,
168 },
169 {
170 tweak = "addactuarian",
171 },
172 {
173 tweak = "addequals",
174 },
175 {
176 tweak = "addfourier",
177 variant = 1,
178 },
179 {
180 tweak = "addprimed",
181 },
182
183 {
184 tweak = "emulatelmtx",
185 feature = "emulatelmtx",
186 comment = "this is for mkiv",
187 },
188 },
189 },
190 alternates = {
191 dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
192 },
193 bigslots = {
194 1, 3, 5, 7
195 },
196 },
197}
198 |