diff options
-rw-r--r-- | luaotfload.lua | 14 | ||||
-rwxr-xr-x | mkluatexfontdb.lua | 8 |
2 files changed, 12 insertions, 10 deletions
diff --git a/luaotfload.lua b/luaotfload.lua index 0fba16e..c90109d 100644 --- a/luaotfload.lua +++ b/luaotfload.lua @@ -34,6 +34,13 @@ local luatexbase = luatexbase local type, next, dofile = type, next, dofile local stringfind = string.find +local add_to_callback, create_callback = + luatexbase.add_to_callback, luatexbase.create_callback +local reset_callback, call_callback = + luatexbase.reset_callback, luatexbase.call_callback + +local dummy_function = function () end + --[[doc-- No final decision has been made on how to handle font definition. At the moment, there are three candidates: The \textsf{generic} @@ -164,7 +171,6 @@ The imported font loader will call \verb|callback.register| once This is unavoidable but harmless, so we make it call a dummy instead. --doc]]-- local trapped_register = callback.register -local dummy_function = function () end callback.register = dummy_function --[[doc-- @@ -179,11 +185,6 @@ After the fontloader is ready we can restore the callback trap from callback.register = trapped_register -local add_to_callback, create_callback = - luatexbase.add_to_callback, luatexbase.create_callback -local reset_callback, call_callback = - luatexbase.reset_callback, luatexbase.call_callback - --[[doc-- We do our own callback handling with the means provided by luatexbase. @@ -208,7 +209,6 @@ loadmodule"font-clr.lua" --loadmodule"font-ovr.lua" loadmodule"font-ltx.lua" -local dummy_function = function ( ) end --- upvalue more efficient than lambda create_callback("luaotfload.patch_font", "simple", dummy_function) --[[doc-- diff --git a/mkluatexfontdb.lua b/mkluatexfontdb.lua index 38b9daa..ca955cb 100755 --- a/mkluatexfontdb.lua +++ b/mkluatexfontdb.lua @@ -13,13 +13,15 @@ function string.quoted(s) return string.format("%q",s) end -- XXX -- First we need to be able to load module (code copied from -- luatexbase-loader.sty): -local file = "luatexbase.loader.lua" -local path = assert(kpse.find_file(file, 'tex'), - "File '"..file.."' not found") +local loader_file = "luatexbase.loader.lua" +local path = assert(kpse.find_file(loader_file, 'tex'), + "File '"..loader_file.."' not found") texio.write_nl("("..path..")") dofile(path) require("lualibs") +--- TODO we seriously need recent lualibs +file.splitpath, file.collapsepath = file.split_path, file.collapse_path require("otfl-basics-gen.lua") require("otfl-font-nms") require("alt_getopt") |