summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2015-11-22 00:11:07 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2015-11-22 00:11:07 +0100
commit8e66c317251ad8efcfef34a40ac747435e37ed29 (patch)
tree323a00fa52b2d809a1f8a46537870da9d8429c43
parent6c3d70e21b100c6c7ffa11e1c6d9260b32ccc781 (diff)
parent7c6bf5503a31142a91f4414d2f5ef4e6b0baed46 (diff)
downloadluaotfload-8e66c317251ad8efcfef34a40ac747435e37ed29.tar.gz
Merge pull request #287 from davidcarlisle/master
Patch to just load ltluatex, not luatexbase
-rw-r--r--src/luaotfload-loaders.lua12
-rw-r--r--src/luaotfload-main.lua1
-rw-r--r--src/luaotfload.sty18
3 files changed, 20 insertions, 11 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"],
diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua
index 62765e4..17d06d4 100644
--- a/src/luaotfload-main.lua
+++ b/src/luaotfload-main.lua
@@ -217,7 +217,6 @@ local install_loaders = function ()
return loaders
end
-
luaotfload.main = function ()
luaotfload.loaders = install_loaders ()
diff --git a/src/luaotfload.sty b/src/luaotfload.sty
index ec62dad..1b31b1d 100644
--- a/src/luaotfload.sty
+++ b/src/luaotfload.sty
@@ -33,17 +33,17 @@
%%
\csname ifluaotfloadloaded\endcsname
\let\ifluaotfloadloaded\endinput
-\bgroup\expandafter\expandafter\expandafter\egroup
-\expandafter\ifx\csname selectfont\endcsname\relax
- \input luatexbase.sty
-\else
- \NeedsTeXFormat{LaTeX2e}
+\ifx\newluafunction\@undefined
+ \input ltluatex
+\fi
+\ifdefined\ProvidesPackage
\ProvidesPackage{luaotfload}%
%% FIXME The date is meaningless, we need to find a way to
%% use the git revision instead.
- [2015/03/29 v2.6 OpenType layout system]
- \RequirePackage{luatexbase}
+ [2015/03/29 v2.6 OpenType layout system]
\fi
-\RequireLuaModule{luaotfload-main}
-\directlua{local _void = luaotfload.main ()}
+\directlua{
+require('luaotfload-main')
+local _void = luaotfload.main ()
+}