summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Carlisle <d.p.carlisle@gmail.com>2015-11-21 21:47:18 +0000
committerDavid Carlisle <d.p.carlisle@gmail.com>2015-11-21 21:47:18 +0000
commit7c6bf5503a31142a91f4414d2f5ef4e6b0baed46 (patch)
tree323a00fa52b2d809a1f8a46537870da9d8429c43 /src
parentb46f13e0949e310b46e97e791fd4e9e38635a491 (diff)
downloadluaotfload-7c6bf5503a31142a91f4414d2f5ef4e6b0baed46.tar.gz
local reset_callback definition for ltluatex
Diffstat (limited to 'src')
-rw-r--r--src/luaotfload-loaders.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/luaotfload-loaders.lua b/src/luaotfload-loaders.lua
index 38062f6..715aa8a 100644
--- a/src/luaotfload-loaders.lua
+++ b/src/luaotfload-loaders.lua
@@ -110,12 +110,22 @@ end
--doc]]--
+local function reset_callback(name,make_false)
+ for _,v in pairs(luatexbase.callback_descriptions(name))
+ do
+ luatexbase.remove_from_callback(name,v)
+ end
+ if make_false == true then
+ luatexbase.disable_callback(name)
+ end
+end
+
local install_callbacks = function ()
local create_callback = luatexbase.create_callback
local dummy_function = function () end
create_callback ("luaotfload.patch_font", "simple", dummy_function)
create_callback ("luaotfload.patch_font_unsafe", "simple", dummy_function)
- luatexbase.reset_callback "define_font"
+ reset_callback "define_font"
local definer = config.luaotfload.run.definer
luatexbase.add_to_callback ("define_font",
definers[definer or "patch"],