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.30 }
6
7return {
8 name = "termes-math",
9 version = "1.00",
10 comment = "Goodies that complement termes.",
11 author = "Hans Hagen & Mikael Sundqvist",
12 copyright = "ConTeXt development team",
13 mathematics = {
14 parameters = {
15 AccentTopShiftUp = -15,
16 FlattenedAccentTopShiftUp = -15,
17 AccentBaseDepth = 50,
18 DelimiterPercent = 85,
19 DelimiterShortfall = 400,
20 DelimiterDisplayPercent = 90,
21 DelimiterDisplayShortfall = 400,
22 DisplayOperatorMinHeight = 1800,
23 SuperscriptShiftUp = 310,
24 SubscriptShiftDown = 200,
25 SubscriptShiftDownWithSuperscript = "1.40*SubscriptShiftDown",
26 PrimeShiftUp = "1.35*SuperscriptShiftUp",
27 PrimeShiftUpCramped = "1.35*SuperscriptShiftUp",
28 },
29 tweaks = {
30 aftercopying = {
31 {
32 tweak = "version",
33 expected = "Version 1.543",
34 },
35 {
36 tweak = "fixprimes",
37 factor = 0.76,
38 },
39 {
40 tweak = "addmirrors",
41 },
42 {
43 tweak = "addcomposites",
44 },
45 {
46 tweak = "replacealphabets",
47 list = {
48 {
49 source = { first = 0x02980 },
50 filename = "texgyretermesmathcompanion-regular.otf",
51 },
52 },
53 },
54 presets.scripttocalligraphic { },
55 presets.rsfstoscript { rscale = 0.97 },
56 presets.rsfsuprighttoscript { rscale = 0.97 },
57 presets.moderntocalligraphic { rscale = 0.97 },
58 presets.eulertocalligraphic { rscale = 0.97 },
59 presets.xitsarabic { rscale = 0.88 },
60 presets.fallbacks { },
61 presets.moveitalics { correct = true },
62 presets.moveitalics { correct = true, letters = true },
63 presets.moveintegrals { factor = 1.5 },
64 presets.wipeitalics { },
65 {
66 tweak = "checkaccents",
67 },
68 {
69 tweak = "wipecues",
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.1, bottomright = -0.1 },
78 ["0x29.parts.top"] = { topright = -0.1, },
79 ["0x29.parts.bottom"] = { bottomright = -0.1 },
80 ["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 },
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.20, },
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 = "flattenaccents",
105 },
106 {
107 tweak = "fixaccents",
108 },
109 {
110 tweak = "radicaldegreeanchors",
111 list = {
112 [0x221A] = { location = "left", hfactor = 0.0, vfactor = 0.6 },
113 ["0x221A.variants.*"] = { location = "left", hfactor = 0.0, vfactor = 0.6 },
114 ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.1 },
115 }
116 },
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132 {
133 tweak = "copyaccents",
134 },
135
136 presets.addmathkerns { },
137 {
138 tweak = "checkspacing",
139 },
140 {
141 tweak = "addscripts",
142 },
143 {
144 tweak = "accentdimensions",
145 },
146 {
147 tweak = "addrules",
148 },
149 {
150 tweak = "replacerules",
151 fraction = { height = .2, xleftoffset = .115, xrightoffset = .115, yoffset = .81 },
152 radical = { height = .2, leftoffset = .115, rightoffset = .115, yoffset = .81 },
153 stacker = { height = .2, xleftoffset = .115, xrightoffset = .115, yoffset = .81 },
154 },
155
156
157
158
159
160
161
162
163
164
165
166 {
167 tweak = "addactuarian",
168 },
169 {
170 tweak = "addprimed",
171 },
172 {
173 tweak = "addequals",
174 },
175 {
176 tweak = "addfourier",
177 variant = 1,
178 },
179
180 {
181 tweak = "emulatelmtx",
182 feature = "emulatelmtx",
183 comment = "this is for mkiv",
184 },
185 },
186 },
187 bigslots = {
188 1, 3, 5, 7
189 },
190 alternates = {
191 dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
192 },
193 },
194}
195 |