summaryrefslogtreecommitdiff
path: root/tex/context/fonts
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/fonts')
-rw-r--r--tex/context/fonts/mkiv/libertinus-math.lfg55
-rw-r--r--tex/context/fonts/mkiv/pagella-math.lfg4
-rw-r--r--tex/context/fonts/mkiv/termes-math.lfg4
-rw-r--r--tex/context/fonts/mkiv/type-imp-libertinus.mkiv4
4 files changed, 61 insertions, 6 deletions
diff --git a/tex/context/fonts/mkiv/libertinus-math.lfg b/tex/context/fonts/mkiv/libertinus-math.lfg
new file mode 100644
index 000000000..24f58eb48
--- /dev/null
+++ b/tex/context/fonts/mkiv/libertinus-math.lfg
@@ -0,0 +1,55 @@
+-- Well, here we have yet another math font that does things differently: a huge prime in the ssty1
+-- slot (not an alternate but a single) and a small one in the normal location. Actually, only primes
+-- have an ssty feature. Now, because we have some magic with primes in ConTeXt we cannot use some
+-- fix-feature or just disable ssty, but we have to revert to a runtime fix. Lucky me that I didn't
+-- remove that hardly needed 'tweaks' mechanism yet.
+
+return {
+ name = "libertinus-math",
+ version = "1.00",
+ comment = "Goodies that complement libertinus.",
+ author = "Hans Hagen",
+ copyright = "ConTeXt development team",
+ mathematics = {
+ tweaks = {
+ aftercopying = {
+ function(target,original)
+ local okay = 983068
+ local crap = {
+ ["minute"] = "minute.ssty1",
+ ["second"] = "second.ssty1",
+ -- [8242] = 983068,
+ -- [8243] = 983069,
+ [8244] = 983070,
+ [8245] = 983071,
+ [8246] = 983072,
+ [8247] = 983073,
+ }
+ local characters = target.characters
+ local descriptions = target.descriptions
+ local unicodes = original.resources.unicodes
+ if unicodes["minute.ssty1"] == okay then
+ for old, new in next, crap do
+ if type(old) == "string" then
+ old = unicodes[old]
+ end
+ if type(new) == "string" then
+ new = unicodes[new]
+ end
+ if old and new and characters[old] then
+ local c = characters[new]
+ if c then
+ characters[old] = c
+ c.commands = { { "up", .1 * c.height }, { "slot", 0, new, .7 } }
+ end
+ end
+ end
+ else
+ logs.report("fonts","the libertinus tweaks need to be checked")
+ end
+ end,
+ },
+ },
+ },
+}
+
diff --git a/tex/context/fonts/mkiv/pagella-math.lfg b/tex/context/fonts/mkiv/pagella-math.lfg
index 3908112d0..262196f70 100644
--- a/tex/context/fonts/mkiv/pagella-math.lfg
+++ b/tex/context/fonts/mkiv/pagella-math.lfg
@@ -1,7 +1,7 @@
local kern_V = { bottomright = { { kern = -200 } } }
local kern_W = { bottomright = { { kern = -100 } } }
----- kern_f = { bottomright = { { kern = -100 } } }
-local offset_f = { xoffset = "llx" }
+-- local offset_f = { xoffset = "llx" }
-- Beware of updates in ssty slots!
@@ -18,7 +18,7 @@ return {
-- [0x1D453] = offset_f, -- 𝑓
-- ["1:0x1D453"] = offset_f, -- needed for compact
-- ["2:0x1D453"] = offset_f, -- needed for compact
- ["*:0x1D453"] = offset_f, -- 𝑓
+-- ["*:0x1D453"] = offset_f, -- 𝑓
},
},
kerns = {
diff --git a/tex/context/fonts/mkiv/termes-math.lfg b/tex/context/fonts/mkiv/termes-math.lfg
index 3cf8685eb..da5a13d77 100644
--- a/tex/context/fonts/mkiv/termes-math.lfg
+++ b/tex/context/fonts/mkiv/termes-math.lfg
@@ -1,6 +1,6 @@
local kern_V = { bottomright = { { kern = -200 } } }
local kern_W = { bottomright = { { kern = -100 } } }
-local offset_f = { xoffset = "llx" }
+-- local offset_f = { xoffset = "llx" }
-- Beware of updates in ssty slots!
@@ -16,7 +16,7 @@ return {
-- [0x1D453] = offset_f, -- 𝑓
-- ["1:0x1D453"] = offset_f, -- needed for compact
-- ["2:0x1D453"] = offset_f, -- needed for compact
- ["*:0x1D453"] = offset_f, -- 𝑓
+-- ["*:0x1D453"] = offset_f, -- 𝑓
},
},
kerns = {
diff --git a/tex/context/fonts/mkiv/type-imp-libertinus.mkiv b/tex/context/fonts/mkiv/type-imp-libertinus.mkiv
index 26d17bc03..00b2a6abd 100644
--- a/tex/context/fonts/mkiv/type-imp-libertinus.mkiv
+++ b/tex/context/fonts/mkiv/type-imp-libertinus.mkiv
@@ -72,8 +72,8 @@
\stoptypescript
\starttypescript [\s!math] [libertinus] [\s!name]
- \definefontsynonym[\s!MathRoman ] [\s!file:libertinusmath-regular.otf] [\s!features={\s!math\mathsizesuffix,mathextra}]
- \definefontsynonym[\s!MathRomanBold] [\s!file:libertinusmath-regular.otf] [\s!features={\s!math\mathsizesuffix,mathextra}]
+ \definefontsynonym[\s!MathRoman ] [\s!file:libertinusmath-regular.otf] [\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=libertinus-math.lfg]
+ \definefontsynonym[\s!MathRomanBold] [\s!file:libertinusmath-regular.otf] [\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=libertinus-math.lfg]
\stoptypescript
\starttypescript [libertinus]