summaryrefslogtreecommitdiff
path: root/tex/context/fonts
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/fonts')
-rw-r--r--tex/context/fonts/mkiv/bonum-math.lfg3
-rw-r--r--tex/context/fonts/mkiv/common-math-jmn.lfg104
-rw-r--r--tex/context/fonts/mkiv/concrete-math.lfg3
-rw-r--r--tex/context/fonts/mkiv/dejavu-math.lfg3
-rw-r--r--tex/context/fonts/mkiv/ebgaramond-math.lfg3
-rw-r--r--tex/context/fonts/mkiv/erewhon-math.lfg3
-rw-r--r--tex/context/fonts/mkiv/kpfonts-math.lfg3
-rw-r--r--tex/context/fonts/mkiv/modern-math.lfg3
-rw-r--r--tex/context/fonts/mkiv/newcomputermodern-math.lfg3
-rw-r--r--tex/context/fonts/mkiv/pagella-math.lfg3
-rw-r--r--tex/context/fonts/mkiv/schola-math.lfg3
-rw-r--r--tex/context/fonts/mkiv/stixtwo-math.lfg13
-rw-r--r--tex/context/fonts/mkiv/termes-math.lfg3
-rw-r--r--tex/context/fonts/mkiv/xcharter-math.lfg3
14 files changed, 141 insertions, 12 deletions
diff --git a/tex/context/fonts/mkiv/bonum-math.lfg b/tex/context/fonts/mkiv/bonum-math.lfg
index 2852c6449..ce36da352 100644
--- a/tex/context/fonts/mkiv/bonum-math.lfg
+++ b/tex/context/fonts/mkiv/bonum-math.lfg
@@ -71,6 +71,9 @@ return {
presets.wipeanchors { },
presets.wipeitalics { },
{
+ tweak = "checkaccents",
+ },
+ {
-- We need to check these, are the tweaks necessary or not?
tweak = "dimensions",
list = {
diff --git a/tex/context/fonts/mkiv/common-math-jmn.lfg b/tex/context/fonts/mkiv/common-math-jmn.lfg
index 1ebb7db39..995da0db6 100644
--- a/tex/context/fonts/mkiv/common-math-jmn.lfg
+++ b/tex/context/fonts/mkiv/common-math-jmn.lfg
@@ -1,3 +1,15 @@
+local nps = fonts.helpers.newprivateslot
+
+local fake20D6 = nps("arrow fake 0x20D6")
+local fake20D7 = nps("arrow fake 0x20D7")
+local fake20E1 = nps("arrow fake 0x20E1")
+
+local fake20EE = nps("arrow fake 0x20EE")
+local fake20EF = nps("arrow fake 0x20EF")
+local fake034D = nps("arrow fake 0x034D")
+
+local real034D = nps("arrow real 0x034D")
+
return {
name = "common-math-jmn",
version = "1.00",
@@ -118,7 +130,7 @@ return {
builders.horibar(main,0x203E,false,false,false,0x02212)
end
- local ffactor = antykwa and 1 or 1
+ local ffactor = antykwa and 1 or 1 -- check MS
local mfactor = antykwa and 1 or .8
local lfactor = antykwa and 1 or .8
@@ -131,8 +143,11 @@ return {
builders.extension(main,0x27F9,dfl,dfm,dar,ffactor,mfactor,lfactor)
builders.extension(main,0x27FA,dal,dfm,dar,ffactor,mfactor,lfactor)
- local tfactor = antykwa and -0.8 or -0.8
- local bfactor = antykwa and 0.1 or 0.1
+ local tfactor = antykwa and -0.8 or -1.1 -- move up check MS
+ local bfactor = antykwa and 0.1 or 0.2
+
+local tfactor = antykwa and -0.6 or -.6 -- move up check MS
+local bfactor = antykwa and 0.1 or 0.2
local left = characters[0x27F5]
local right = characters[0x27F6]
@@ -141,17 +156,82 @@ return {
local height = max(left.height or 0,right.height or 0,both.height or 0)
local depth = max(left.depth or 0,right.depth or 0,both.depth or 0)
- left .height = height left .depth = depth
- right.height = height right.depth = depth
- both .height = height both .depth = depth
+ left .height = height ; left .depth = depth
+ right.height = height ; right.depth = depth
+ both .height = height ; both .depth = depth
+
+ -- top and bottom arrows : a real mess but now we're drawn into patching it; why are these
+ -- small ones shifted in the bbox; we could do a better job on top and bottom anchors; we
+ -- also could use the bbox as in opentype (\wideoverleftarrow etc)
+
+ local rightarrow = characters[0x20D7]
+ local leftarrow = copytable(rightarrow)
+ local doublearrow = copytable(rightarrow)
+ local width = rightarrow.width
+ local height = rightarrow.height
+
+ -- top
+
+ characters[0x20D6] = leftarrow
+ characters[0x20E1] = doublearrow
+
+ rightarrow.xoffset = -.2*width
+ leftarrow.commands = {
+ { "offset", width, 0, 0x20D7, -1, 1 }
+ }
+ doublearrow.commands = {
+ { "offset", antykwa and .9*width or width, 0, 0x20D7, -1, 1 },
+ { "offset", antykwa and .1*width or 0, 0, 0x20D7, 1, 1 }
+ }
+
+ -- bottom
+
+ local rightarrow = copytable(rightarrow)
+ local leftarrow = copytable(leftarrow)
+ local doublearrow = copytable(doublearrow)
+
+ characters[0x20EE] = leftarrow
+ characters[0x20EF] = rightarrow
+ characters[0x034D] = doublearrow
+
+ local bheight = .40*height -- can be tuned to match top
+ local yoffset = -.65*height -- can be tuned to match top
+
+ leftarrow .height = bheight
+ rightarrow .height = bheight
+ doublearrow.height = bheight
+
+ rightarrow .yoffset = yoffset
+ leftarrow .yoffset = yoffset
+ doublearrow.yoffset = yoffset
+
+ leftarrow.commands = {
+ { "offset", width, 0, 0x20D7, -1, 1 }
+ }
+ doublearrow.commands = {
+ { "offset", antykwa and .9*width or width, 0, 0x20D7, -1, 1 },
+ { "offset", antykwa and .1*width or 0, 0, 0x20D7, 1, 1 }
+ }
+
+ -- extensibles
+
+ local tl = copytable(left) ; characters[fake20D6] = tl ; characters[0x20D6].next = fake20D6 -- over
+ local tm = copytable(right) ; characters[fake20D7] = tm ; characters[0x20D7].next = fake20D7
+ local tr = copytable(both) ; characters[fake20E1] = tr ; characters[0x20E1].next = fake20E1
+
+ tl.inneryoffset = tfactor*height ; tl.innerlocation = "top" ; tl.next = nil ; tl.italic = nil
+ tm.inneryoffset = tfactor*height ; tm.innerlocation = "top" ; tm.next = nil ; tm.italic = nil
+ tr.inneryoffset = tfactor*height ; tr.innerlocation = "top" ; tr.next = nil ; tr.italic = nil
+
+ local bl = copytable(left) ; characters[fake20EE] = bl ; characters[0x20EE].next = fake20EE -- under
+ local bm = copytable(right) ; characters[fake20EF] = bm ; characters[0x20EF].next = fake20EF
+ local br = copytable(both) ; characters[fake034D] = br ; characters[0x034D].next = fake034D
- local t = copytable(left) characters[0x20D6] = t t.inneryoffset = tfactor*height t.innerlocation = "top" t.next = nil t.italic = nil -- over
- local t = copytable(right) characters[0x20D7] = t t.inneryoffset = tfactor*height t.innerlocation = "top" t.next = nil t.italic = nil
- local t = copytable(both) characters[0x20E1] = t t.inneryoffset = tfactor*height t.innerlocation = "top" t.next = nil t.italic = nil
+ bl.inneryoffset = bfactor*height bl.innerlocation = "bottom" ; bl.next = nil ; bl.italic = nil
+ bm.inneryoffset = bfactor*height bm.innerlocation = "bottom" ; bm.next = nil ; bm.italic = nil
+ br.inneryoffset = bfactor*height br.innerlocation = "bottom" ; br.next = nil ; br.italic = nil
- local t = copytable(left) characters[0x20EE] = t t.inneryoffset = bfactor*height t.innerlocation = "bottom" t.next = nil t.italic = nil -- under
- local t = copytable(right) characters[0x20EF] = t t.inneryoffset = bfactor*height t.innerlocation = "bottom" t.next = nil t.italic = nil
- local t = copytable(both) characters[0x034D] = t t.inneryoffset = bfactor*height t.innerlocation = "bottom" t.next = nil t.italic = nil
+ --
local tfactor = antykwa and -15 or -15
local bfactor = antykwa and 1 or 1
diff --git a/tex/context/fonts/mkiv/concrete-math.lfg b/tex/context/fonts/mkiv/concrete-math.lfg
index 142778015..e92bb122a 100644
--- a/tex/context/fonts/mkiv/concrete-math.lfg
+++ b/tex/context/fonts/mkiv/concrete-math.lfg
@@ -35,6 +35,9 @@ return {
presets.moveintegrals { factor = 1.5 },
presets.wipeitalics { },
{
+ tweak = "checkaccents",
+ },
+ {
tweak = "kerns",
list = {
[0x002F] = { topleft = -0.2, bottomright = -0.2 },
diff --git a/tex/context/fonts/mkiv/dejavu-math.lfg b/tex/context/fonts/mkiv/dejavu-math.lfg
index c97765122..4098a32d0 100644
--- a/tex/context/fonts/mkiv/dejavu-math.lfg
+++ b/tex/context/fonts/mkiv/dejavu-math.lfg
@@ -57,6 +57,9 @@ return {
-- because once the advance is set the move is blocked and the ic stil wiped. So,
-- we kern. Actually the upright (ascii) f has italic correction.
{
+ tweak = "checkaccents",
+ },
+ {
tweak = "kerns",
list = {
[0x1D453] = { bottomright = -.2 },
diff --git a/tex/context/fonts/mkiv/ebgaramond-math.lfg b/tex/context/fonts/mkiv/ebgaramond-math.lfg
index d2ef73f55..c25147b14 100644
--- a/tex/context/fonts/mkiv/ebgaramond-math.lfg
+++ b/tex/context/fonts/mkiv/ebgaramond-math.lfg
@@ -51,6 +51,9 @@ return {
presets.moveintegrals { factor = 1.5 },
presets.wipeitalics { },
{
+ tweak = "checkaccents",
+ },
+ {
tweak = "simplifykerns",
},
{
diff --git a/tex/context/fonts/mkiv/erewhon-math.lfg b/tex/context/fonts/mkiv/erewhon-math.lfg
index 223927184..5a28735f1 100644
--- a/tex/context/fonts/mkiv/erewhon-math.lfg
+++ b/tex/context/fonts/mkiv/erewhon-math.lfg
@@ -53,6 +53,9 @@ return {
presets.moveintegrals { factor = 1.5 },
presets.wipeitalics { },
{
+ tweak = "checkaccents",
+ },
+ {
tweak = "kerns",
list = {
[0x002F] = { topleft = -0.15, bottomright = -0.15 },
diff --git a/tex/context/fonts/mkiv/kpfonts-math.lfg b/tex/context/fonts/mkiv/kpfonts-math.lfg
index 1b2eea45f..db3e44be8 100644
--- a/tex/context/fonts/mkiv/kpfonts-math.lfg
+++ b/tex/context/fonts/mkiv/kpfonts-math.lfg
@@ -26,6 +26,9 @@ return {
expected = "Version 0.40",
},
{
+ tweak = "checkaccents",
+ },
+ {
tweak = "dimensions",
list = {
[0x2A3F] = { factor = 0.84625 }
diff --git a/tex/context/fonts/mkiv/modern-math.lfg b/tex/context/fonts/mkiv/modern-math.lfg
index fb9c8fd4b..fa4216263 100644
--- a/tex/context/fonts/mkiv/modern-math.lfg
+++ b/tex/context/fonts/mkiv/modern-math.lfg
@@ -56,6 +56,9 @@ return {
presets.wipeanchors { },
presets.wipeitalics { },
{
+ tweak = "checkaccents",
+ },
+ {
tweak = "dimensions",
list = {
[0x1D487] = { anchor = 0.9 }, -- bold italic f
diff --git a/tex/context/fonts/mkiv/newcomputermodern-math.lfg b/tex/context/fonts/mkiv/newcomputermodern-math.lfg
index 9e5e6ab3a..d147e787e 100644
--- a/tex/context/fonts/mkiv/newcomputermodern-math.lfg
+++ b/tex/context/fonts/mkiv/newcomputermodern-math.lfg
@@ -108,6 +108,9 @@ return {
presets.wipeanchors { },
presets.wipeitalics { },
{
+ tweak = "checkaccents",
+ },
+ {
tweak = "kerns",
list = {
[0x0002F] = { topleft = -0.2, bottomright = -0.2 }, -- solidus
diff --git a/tex/context/fonts/mkiv/pagella-math.lfg b/tex/context/fonts/mkiv/pagella-math.lfg
index a9b3ea4bb..3aa3ef24b 100644
--- a/tex/context/fonts/mkiv/pagella-math.lfg
+++ b/tex/context/fonts/mkiv/pagella-math.lfg
@@ -83,6 +83,9 @@ return {
presets.wipeanchors { },
presets.wipeitalics { },
{
+ tweak = "checkaccents",
+ },
+ {
tweak = "parameters",
feature = "euleroverpagella",
list = {
diff --git a/tex/context/fonts/mkiv/schola-math.lfg b/tex/context/fonts/mkiv/schola-math.lfg
index 58eb1a6ea..f0155cb57 100644
--- a/tex/context/fonts/mkiv/schola-math.lfg
+++ b/tex/context/fonts/mkiv/schola-math.lfg
@@ -47,6 +47,9 @@ return {
presets.moveintegrals { },
presets.wipeitalics { },
{
+ tweak = "checkaccents",
+ },
+ {
tweak = "kerns",
list = {
[0x002F] = { topleft = -0.2, bottomright = -0.2 },
diff --git a/tex/context/fonts/mkiv/stixtwo-math.lfg b/tex/context/fonts/mkiv/stixtwo-math.lfg
index ebacf7a81..bbe4e3685 100644
--- a/tex/context/fonts/mkiv/stixtwo-math.lfg
+++ b/tex/context/fonts/mkiv/stixtwo-math.lfg
@@ -99,6 +99,19 @@ return {
presets.moveintegrals { },
presets.wipeitalics { },
{
+ tweak = "checkaccents",
+ },
+ -- Extensibles use .s1 (variant 1), so we cannot wipe all
+ {
+ tweak = "wipevariants",
+ list = {
+ [0x20D6] = 3,
+ [0x20D7] = 3,
+ [0x20EE] = 3,
+ [0x20EF] = 3,
+ },
+ },
+ {
tweak = "simplifykerns",
},
{
diff --git a/tex/context/fonts/mkiv/termes-math.lfg b/tex/context/fonts/mkiv/termes-math.lfg
index 504249878..c74228179 100644
--- a/tex/context/fonts/mkiv/termes-math.lfg
+++ b/tex/context/fonts/mkiv/termes-math.lfg
@@ -49,6 +49,9 @@ return {
presets.moveintegrals { factor = 1.5 },
presets.wipeitalics { },
{
+ tweak = "checkaccents",
+ },
+ {
tweak = "kerns",
list = {
[0x002F] = { topleft = -0.2, bottomright = -0.2 },
diff --git a/tex/context/fonts/mkiv/xcharter-math.lfg b/tex/context/fonts/mkiv/xcharter-math.lfg
index e2ed3e116..48b1cad5d 100644
--- a/tex/context/fonts/mkiv/xcharter-math.lfg
+++ b/tex/context/fonts/mkiv/xcharter-math.lfg
@@ -39,6 +39,9 @@ return {
presets.moveintegrals { factor = 1.5 },
presets.wipeitalics { },
{
+ tweak = "checkaccents",
+ },
+ {
tweak = "kerns",
list = {
[0x002F] = { topleft = -0.15, bottomright = -0.15 },