[latex3-commits] [git/LaTeX3-latex3-luaotfload] mathparams-dev: Do not load math parameters form text fonts (d033e4b)

Marcel Fabian Krüger tex at 2krueger.de
Mon Apr 20 14:35:56 CEST 2020


Repository : https://github.com/latex3/luaotfload
On branch  : mathparams-dev
Link       : https://github.com/latex3/luaotfload/commit/d033e4b82ca1f79c3b202ade67585dab0729b465

>---------------------------------------------------------------

commit d033e4b82ca1f79c3b202ade67585dab0729b465
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Mon Apr 20 14:35:56 2020 +0200

    Do not load math parameters form text fonts


>---------------------------------------------------------------

d033e4b82ca1f79c3b202ade67585dab0729b465
 src/luaotfload-features.lua | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index fe7f9fb..b0c40b5 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -582,6 +582,26 @@ end
 
 luaotfload.apply_default_features = apply_default_features
 
+do
+    local function mathparaminitializer(tfmdata, value, features)
+        if not next(tfmdata.mathparameters) then return end
+        if value == 'auto' then
+            if features.script == 'math' then return end
+        end
+        tfmdata.mathparameters = {}
+    end
+    fonts.constructors.features.otf.register {
+        name = 'nomathparam',
+        description = 'Set Math parameters based on this font',
+        default = 'auto',
+        initializers = {
+            base = mathparaminitializer,
+            node = mathparaminitializer,
+          -- plug = mathparaminitializer,
+        },
+    }
+end
+
 return function ()
     if not fonts and fonts.handlers then
         report ("log", 0, "features",





More information about the latex3-commits mailing list.