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 = "replacealphabets",
44 list = {
45 {
46 source = { first = 0x02980 },
47 filename = "TeXGyreTermesMath-Companion.otf",
48 },
49 },
50 },
51 presets.scripttocalligraphic { },
52 presets.rsfstoscript { rscale = 0.97 },
53 presets.rsfsuprighttoscript { rscale = 0.97 },
54 presets.moderntocalligraphic { rscale = 0.97 },
55 presets.eulertocalligraphic { rscale = 0.97 },
56 presets.xitsarabic { rscale = 0.88 },
57 presets.fallbacks { },
58 presets.moveitalics { correct = true },
59 presets.moveitalics { correct = true, letters = true },
60 presets.moveintegrals { factor = 1.5 },
61 presets.wipeitalics { },
62 {
63 tweak = "checkaccents",
64 },
65 {
66 tweak = "kerns",
67 list = {
68 [0x002F] = { topleft = -0.2, bottomright = -0.2 },
69 ["0x7D.parts.top"] = { topright = -0.15, },
70 ["0x7D.parts.bottom"] = { bottomright = -0.15 },
71 ["0x7D.variants.*"] = { topright = -0.1, bottomright = -0.1 },
72 ["0x29.parts.top"] = { topright = -0.1, },
73 ["0x29.parts.bottom"] = { bottomright = -0.1 },
74 ["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 },
75 ["0x221A.parts.top"] = { topright = 0.2, },
76 ["0x221A.parts.bottom"] = { bottomright = 0.2 },
77 ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
78 [0x27E9] = { topright = -0.1, bottomright = -0.1 },
79 ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 },
80 [0x27EB] = { topright = -0.1, bottomright = -0.1 },
81 ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
82
83 [0x00393] = { bottomright = -0.20, },
84
85 ["0x222B.parts.bottom"] = { bottomright = -0.20 },
86 ["0x222C.parts.bottom"] = { bottomright = -0.15 },
87 ["0x222D.parts.bottom"] = { bottomright = -0.10 },
88 ["0x2A0C.parts.bottom"] = { bottomright = -0.05 },
89 },
90 },
91
92
93
94 {
95 tweak = "extendaccents",
96 },
97 {
98 tweak = "flattenaccents",
99 },
100 {
101 tweak = "fixaccents",
102 },
103 {
104 tweak = "radicaldegreeanchors",
105 list = {
106 [0x221A] = { location = "left", hfactor = 0.0, vfactor = 0.6 },
107 ["0x221A.variants.*"] = { location = "left", hfactor = 0.0, vfactor = 0.6 },
108 ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.1 },
109 }
110 },
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126 {
127 tweak = "copyaccents",
128 },
129
130 presets.addmathkerns { },
131 {
132 tweak = "checkspacing",
133 },
134 {
135 tweak = "addscripts",
136 },
137 {
138 tweak = "accentdimensions",
139 },
140 {
141 tweak = "addrules",
142 },
143 {
144 tweak = "replacerules",
145 fraction = { height = .2, xleftoffset = .115, xrightoffset = .115, yoffset = .81 },
146 radical = { height = .2, leftoffset = .115, rightoffset = .115, yoffset = .81 },
147 stacker = { height = .2, xleftoffset = .115, xrightoffset = .115, yoffset = .81 },
148 },
149
150
151
152
153
154
155
156
157
158
159
160 {
161 tweak = "addactuarian",
162 },
163 {
164 tweak = "addprimed",
165 },
166 {
167 tweak = "addequals",
168 },
169 {
170 tweak = "addfourier",
171 variant = 1,
172 },
173
174 {
175 tweak = "emulatelmtx",
176 feature = "emulatelmtx",
177 comment = "this is for mkiv",
178 },
179 },
180 },
181 bigslots = {
182 1, 3, 5, 7
183 },
184 alternates = {
185 dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
186 },
187 },
188}
189 |