1
2
3
4local common = fonts.goodies.load("common-math.lfg")
5local presets = common.mathematics.tweaks.presets
6
7return {
8 name = "kpfonts-math",
9 version = "1.00",
10 comment = "KP Fonts.",
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 AccentBaseDepth = 30,
20 DelimiterPercent = 90,
21 DelimiterShortfall = 400,
22 PrimeShiftUp = "1.15*SuperscriptShiftUp",
23 PrimeShiftUpCramped = "1.15*SuperscriptShiftUp",
24 SubscriptShiftDownWithSuperscript = "1.2*SubscriptShiftDown",
25 RadicalDisplayStyleVerticalGap = "RadicalVerticalGap",
26 },
27 tweaks = {
28 aftercopying = {
29 {
30 tweak = "version",
31 expected = "Version 0.40",
32 },
33 {
34 tweak = "checkaccents",
35 },
36 {
37 tweak = "dimensions",
38 list = {
39 [0x2A3F] = { factor = 0.84625 }
40 },
41 },
42 {
43 tweak = "kerns",
44 list = {
45 [0x002F] = { topleft = -0.2, bottomright = -0.2 },
46 ["0x7D.parts.top"] = { topright = -0.25 },
47 ["0x7D.parts.bottom"] = { bottomright = -0.25 },
48 ["0x7D.variants.*"] = { topright = -0.1, bottomright = -0.1 },
49 ["0x29.parts.top"] = { topright = -0.05 },
50 ["0x29.parts.bottom"] = { bottomright = -0.05 },
51 ["0x29.variants.*"] = { topright = -0.05, bottomright = -0.05 },
52 ["0x221A.parts.top"] = { topright = 0.2 },
53 ["0x221A.parts.bottom"] = { bottomright = 0.2 },
54 ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
55
56 },
57 },
58 {
59 tweak = "fixprimes",
60 factor = 0.86,
61 smaller = true,
62 scale = 1,
63 fake = 0.8,
64 },
65 {
66 tweak = "addmirrors",
67 },
68 {
69
70 tweak = "replacealphabets",
71 list = {
72 {
73 source = "uppercasescript",
74 target = "uppercasecalligraphic",
75 },
76 {
77 source = { first = 0x0E7E1, last = 0x0E7FA },
78 target = "uppercasecalligraphic",
79 },
80 {
81 source = "uppercaseboldscript",
82 target = "uppercaseboldcalligraphic",
83 },
84 {
85 source = { first = 0x0E701, last = 0x0E71A },
86 target = "uppercaseboldcalligraphic",
87 },
88 },
89 },
90 presets.scripttocalligraphic { },
91 presets.rsfstoscript { rscale = 0.95 },
92 presets.rsfsuprighttoscript { rscale = 0.95 },
93 presets.moderntocalligraphic { rscale = 0.95 },
94 presets.eulertocalligraphic { rscale = 0.95 },
95 presets.xitsarabic { rscale = 0.92 },
96 presets.fallbacks { },
97 presets.moveitalics { correct = true },
98 presets.moveitalics { correct = true, letters = true },
99 presets.moveintegrals { factor = 1.4 },
100 presets.wipeitalics { },
101 {
102 tweak = "checkspacing",
103 },
104 {
105 tweak = "radicaldegreeanchors",
106 list = {
107 [0x221A] = { location = "left", hfactor = .0, vfactor = .75 },
108 ["0x221A.variants.*"] = { location = "left", hfactor = .0, vfactor = .55 },
109 ["0x221A.variants.1"] = { location = "left", hfactor = .0, vfactor = .6 },
110 ["0x221A.parts.bottom"] = { location = "left", hfactor = .0, vfactor = 0.65 },
111 }
112 },
113 {
114 tweak = "flattenaccents",
115 },
116 {
117 tweak = "addscripts",
118 },
119 {
120 tweak = "accentdimensions",
121 },
122 {
123 tweak = "addrules",
124 },
125{
126 tweak = "replacerules",
127
128
129
130
131
132
133 fraction = {
134 height = .1818,
135 yoffset = .818,
136 },
137 radical = {
138 height = .1818,
139 yoffset = .818,
140 leftoffset = 0.08,
141 rightoffset = 0.08,
142 },
143 stacker = {
144 height = .1818,
145 yoffset = .818,
146 },
147},
148 {
149
150 tweak = "addbars",
151 advance = 0.5,
152 },
153 {
154 tweak = "addactuarian",
155 },
156 {
157 tweak = "addequals",
158 },
159 {
160 tweak = "addfourier",
161 variant = 2,
162 },
163 {
164 tweak = "addprimed",
165 },
166 {
167 tweak = "setoptions",
168 set = { "ignorekerndimensions" }
169 },
170
171
172
173
174
175
176
177
178
179 }
180
181 },
182 alternates = {
183
184 },
185 bigslots = {
186 1, 2, 3, 4
187 },
188 },
189}
190 |