[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: More restrictive `axis=` parsing (e056d57)

Marcel Fabian Krüger tex at 2krueger.de
Wed Jun 1 10:26:06 CEST 2022


Repository : https://github.com/latex3/luaotfload
On branch  : dev
Link       : https://github.com/latex3/luaotfload/commit/e056d578d136135ae0160aadeab0a61cb5152202

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

commit e056d578d136135ae0160aadeab0a61cb5152202
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Wed Jun 1 10:26:06 2022 +0200

    More restrictive `axis=` parsing


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

e056d578d136135ae0160aadeab0a61cb5152202
 src/luaotfload-features.lua    | 2 +-
 src/luaotfload-harf-define.lua | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index 0b1aba6..c1f42f0 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -494,7 +494,7 @@ do
     function helpers.getfactors(tfmdata, instance) -- `instance` might refer to an `axis` value here
         assert(instance == true or type(instance) == "string", "Fontloader changed interface of helpers.getfactors. This is a bug, please notify the luaotfload maintainers.")
         local variabledata = tfmdata.variabledata
-        if not variabledata or instance == "" then return end
+        if not variabledata then return end
         local instances = variabledata.instances
         local axis = variabledata.axis
         local designaxis = variabledata.designaxis
diff --git a/src/luaotfload-harf-define.lua b/src/luaotfload-harf-define.lua
index 6f57ede..a1b07b4 100644
--- a/src/luaotfload-harf-define.lua
+++ b/src/luaotfload-harf-define.lua
@@ -87,7 +87,7 @@ local variable_pattern do
   local number = l.C(l.S'+-'^-1 * (l.R'09'^1 * ('.' * l.R'09'^0)^-1 + '.' * l.R'09'^1))
   local name_or_tag = l.C(l.R('AZ', 'az')^1)
   local pair = l.Ct(name_or_tag * white * '=' * white * (number + l.Cc(nil) * 'auto'))
-  variable_pattern = l.Ct(pair * (white * ',' * white * pair)^0)
+  variable_pattern = l.Ct(pair * (white * ',' * white * pair)^0) * -1
 end
 
 local function loadfont(spec)





More information about the latex3-commits mailing list.