1
2
3
4local common = fonts.goodies.load("common-math.lfg")
5local presets = common.mathematics.tweaks.presets
6
7return {
8 name = "xcharter-math",
9 version = "1.00",
10 comment = "Goodies that complement xcharter math.",
11 author = "Hans Hagen & Mikael Sundqvist",
12 copyright = "ConTeXt development team",
13 mathematics = {
14 parameters = {
15 DelimiterPercent = 85,
16 DelimiterShortfall = 400,
17 DelimiterDisplayPercent = 90,
18 DelimiterDisplayShortfall = 400,
19 SubscriptShiftDown = 200,
20 SubscriptShiftDownWithSuperscript = "1.3*SubscriptShiftDown",
21 PrimeShiftUp = "1.2*SuperscriptShiftUp",
22 PrimeShiftUpCramped = "1.2*SuperscriptShiftUp",
23 PrimeBaselineDropMax = "0.5*SuperscriptBaselineDropMax",
24 RadicalDisplayStyleVerticalGap = "RadicalVerticalGap",
25 },
26 tweaks = {
27 aftercopying = {
28 {
29 tweak = "fixprimes",
30 factor = 0.92,
31 },
32 {
33 tweak = "addmirrors",
34 },
35 presets.scripttocalligraphic { },
36 presets.rsfstoscript { },
37 presets.rsfsuprighttoscript { },
38 presets.moderntocalligraphic { },
39 presets.eulertocalligraphic { },
40 presets.xitsarabic { rscale = 0.90 },
41 presets.fallbacks { },
42 presets.moveitalics { correct = true },
43 presets.moveitalics { correct = true, letters = true },
44 presets.moveintegrals { factor = 1.5 },
45 presets.wipeitalics { },
46 {
47 tweak = "checkaccents",
48 },
49 {
50 tweak = "kerns",
51 list = {
52 [0x002F] = { topleft = -0.15, bottomright = -0.15 },
53 ["0x7D.parts.top"] = { topright = -0.15, },
54 ["0x7D.parts.bottom"] = { bottomright = -0.15 },
55 ["0x7D.variants.*"] = { topright = -0.05, bottomright = -0.05 },
56 ["0x29.parts.top"] = { topright = -0.1, },
57 ["0x29.parts.bottom"] = { bottomright = -0.1 },
58 ["0x29.variants.*"] = { topright = -0.1, bottomright = -0.1 },
59 ["0x221A.parts.top"] = { topright = 0.2, },
60 ["0x221A.parts.bottom"] = { bottomright = 0.2 },
61 ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
62 [0x27E9] = { topright = -0.1, bottomright = -0.1 },
63 ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 },
64 [0x27EB] = { topright = -0.1, bottomright = -0.1 },
65 ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
66
67 [0x00393] = { bottomright = -0.20, },
68 },
69 },
70 {
71 tweak = "radicaldegreeanchors",
72 list = {
73 ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.025 },
74 }
75 },
76 {
77 tweak = "flattenaccents",
78 },
79 {
80 tweak = "checkspacing",
81 },
82 {
83 tweak = "addscripts",
84 },
85 {
86 tweak = "accentdimensions",
87 },
88 {
89 tweak = "addrules",
90 },
91{
92 tweak = "replacerules",
93
94
95
96
97
98
99 fraction = {
100 height = .188,
101 yoffset = .812,
102 },
103 radical = {
104 height = .188,
105 yoffset = .812,
106 leftoffset = 0.95,
107 rightoffset = 0.95,
108
109
110 },
111 stacker = {
112 height = .188,
113 yoffset = .812,
114 },
115},
116 {
117 tweak = "addactuarian",
118 },
119 {
120 tweak = "addequals",
121 },
122 {
123 tweak = "addprimed",
124 },
125
126
127
128 {
129 tweak = "addfourier",
130 variant = 2,
131 },
132 {
133 tweak = "setoptions",
134
135 },
136 },
137 },
138 bigslots = {
139 1, 2, 3, 4
140 },
141 },
142
143}
144 |