[latex3-commits] [git/LaTeX3-latex3-luaotfload] new-fontloader-2012: Hotfix for fontloader bug (0495f3b)
Marcel Fabian Krüger
tex at 2krueger.de
Sun Dec 27 17:13:13 CET 2020
Repository : https://github.com/latex3/luaotfload
On branch : new-fontloader-2012
Link : https://github.com/latex3/luaotfload/commit/0495f3b84703c999799eb44b770af5d4d7ca56ba
>---------------------------------------------------------------
commit 0495f3b84703c999799eb44b770af5d4d7ca56ba
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Sun Dec 27 17:13:13 2020 +0100
Hotfix for fontloader bug
>---------------------------------------------------------------
0495f3b84703c999799eb44b770af5d4d7ca56ba
src/luaotfload.lua | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/luaotfload.lua b/src/luaotfload.lua
index 0484171..a8ca567 100644
--- a/src/luaotfload.lua
+++ b/src/luaotfload.lua
@@ -225,7 +225,19 @@ local function dummy_loader (name)
name)
end
-local context_environment = setmetatable({}, {__index = _G})
+local context_environment = setmetatable({}, {__index = _G, __newindex = function(t, k, v)
+ if k == 'nodes' then
+ getmetatable(t).__newindex = nil
+ setmetatable(v, {__newindex = function(_, kk, vv)
+ if kk == 'nuts' then
+ setmetatable(v, nil)
+ function vv.flush_components() end
+ end
+ return rawset(v, kk, vv)
+ end})
+ end
+ return rawset(t, k, v)
+end})
luaotfload.fontloader = context_environment
local function context_isolated_load(name)
local fullname = kpse.find_file(name, 'lua')
More information about the latex3-commits
mailing list.