summaryrefslogtreecommitdiff
path: root/tex/context/fonts/mkiv/stix-two-math.lfg
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/fonts/mkiv/stix-two-math.lfg')
-rw-r--r--tex/context/fonts/mkiv/stix-two-math.lfg52
1 files changed, 16 insertions, 36 deletions
diff --git a/tex/context/fonts/mkiv/stix-two-math.lfg b/tex/context/fonts/mkiv/stix-two-math.lfg
index 8d9c9c71a..cc09da04b 100644
--- a/tex/context/fonts/mkiv/stix-two-math.lfg
+++ b/tex/context/fonts/mkiv/stix-two-math.lfg
@@ -1,34 +1,3 @@
--- Bah, I really hate these patches especially because one needs to make
--- sure that they are still valid when the font gets updated. So, let's
--- do it runtime (not in the cached copy) and issue a warning every run.
--- As we cannot rely on version numbers (if we have more patches) we
--- check for values instead.
---
--- This font also has inconsistent italics in smaller sizes which we can
--- fix in a more general way but I'm not sure if we want that.
-
-local function fix_italic(target,original,name,value,factor)
- local m = target.parameters.mathsize
- if m then
- local u = type(name) == "number" and name or original.resources.unicodes[name]
- if u then
- local c = target.characters[u]
- if c then
- local i = c.italic
- if i then
- local d = original.descriptions[u]
- if d and d.math.italic == value then
- if m then
- logs.report("patching font","fixing italic correction of %U at math size %i by %0.3f",u,m,factor)
- c.italic = factor * i
- end
- end
- end
- end
- end
- end
-end
-
return {
name = "stix-two-math",
version = "1.00",
@@ -36,7 +5,6 @@ return {
author = "Hans Hagen",
copyright = "ConTeXt development team",
mathematics = {
- -- these tags are suggestions and can still change
alternates = {
calligraphic = { feature = 'ss01', value = 1, comment = "Mathematical Alternative Calligraphic Characters" },
italic = { feature = 'ss02', value = 1, comment = "Mathematical Alternative Lowercase Italic" },
@@ -54,10 +22,22 @@ return {
},
tweaks = {
aftercopying = {
- function(target,original)
- fix_italic(target,original,"uni222B.updsp",80,3.5)
- fix_italic(target,original,"uni222B.up", 80,2.5)
- end,
+ {
+ tweak = "dimensions",
+ list = {
+ -- nothing yet
+ },
+ },
+ {
+ tweak = "fixprimes",
+ factor = 0.85,
+ },
+ {
+ tweak = "checkspacing",
+ },
+ {
+ tweak = "addscripts",
+ },
},
},
},