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 {
36 tweak = "addcomposites",
37 },
38 presets.scripttocalligraphic { },
39 presets.rsfstoscript { },
40 presets.rsfsuprighttoscript { },
41 presets.moderntocalligraphic { },
42 presets.eulertocalligraphic { },
43 presets.xitsarabic { rscale = 0.90 },
44 presets.fallbacks { },
45 presets.moveitalics { correct = true },
46 presets.moveitalics { correct = true, letters = true },
47 presets.moveintegrals { factor = 1.5 },
48 presets.wipeitalics { },
49 {
50 tweak = "checkaccents",
51 },
52 {
53 tweak = "kerns",
54 list = {
55 [0x002F] = { topleft = -0.15, bottomright = -0.15 },
56 ["0x7D.parts.top"] = { topright = -0.15, },
57 ["0x7D.parts.bottom"] = { bottomright = -0.15 },
58 ["0x7D.variants.*"] = { topright = -0.05, bottomright = -0.05 },
59 ["0x29.parts.top"] = { topright = -0.1, },
60 ["0x29.parts.bottom"] = { bottomright = -0.1 },
61 ["0x29.variants.*"] = { topright = -0.1, bottomright = -0.1 },
62 ["0x221A.parts.top"] = { topright = 0.2, },
63 ["0x221A.parts.bottom"] = { bottomright = 0.2 },
64 ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
65 [0x27E9] = { topright = -0.1, bottomright = -0.1 },
66 ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 },
67 [0x27EB] = { topright = -0.1, bottomright = -0.1 },
68 ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
69
70 [0x00393] = { bottomright = -0.20, },
71 },
72 },
73 {
74 tweak = "radicaldegreeanchors",
75 list = {
76 ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.025 },
77 }
78 },
79 {
80 tweak = "flattenaccents",
81 },
82 {
83 tweak = "checkspacing",
84 },
85 {
86 tweak = "addscripts",
87 },
88 {
89 tweak = "accentdimensions",
90 },
91 {
92 tweak = "addrules",
93 },
94{
95 tweak = "replacerules",
96
97
98
99
100
101
102 fraction = {
103 height = .188,
104 yoffset = .812,
105 },
106 radical = {
107 height = .188,
108 yoffset = .812,
109 leftoffset = 0.95,
110 rightoffset = 0.95,
111
112
113 },
114 stacker = {
115 height = .188,
116 yoffset = .812,
117 },
118},
119 {
120 tweak = "addactuarian",
121 },
122 {
123 tweak = "addequals",
124 },
125 {
126 tweak = "addprimed",
127 },
128
129
130
131 {
132 tweak = "addfourier",
133 variant = 2,
134 },
135 {
136 tweak = "setoptions",
137
138 },
139 },
140 },
141 bigslots = {
142 1, 2, 3, 4
143 },
144 },
145
146}
147 |