From 3d54718f98098de05b995e35de7e18b5239a710d Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 20 Feb 2010 06:55:30 +0200 Subject: Updating to latest ConTeXt beta (2010.02.18) + Remove some, now unneeded, code. --- luaotfload.dtx | 36 ++---------------------------------- otfl-font-def.lua | 4 ++-- otfl-luat-dum.lua | 3 +++ 3 files changed, 7 insertions(+), 36 deletions(-) diff --git a/luaotfload.dtx b/luaotfload.dtx index 52320be..22b87f2 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -484,24 +484,7 @@ luaotfload.loadmodule('font-otb.lua') luaotfload.loadmodule('font-otn.lua') luaotfload.loadmodule('font-ota.lua') luaotfload.loadmodule('font-otc.lua') - -% \end{macrocode} -% -% \texttt{font-def.lua} calls the function \texttt{callback.register} to -% register its callbacks. We override it with a dumb function so that it -% does not register any callback. We will register the callbacks later. -% -% \begin{macrocode} - -do - local temp = callback.register - callback.register = function (...) - return - end - luaotfload.loadmodule('font-def.lua') - callback.register = temp -end - +luaotfload.loadmodule('font-def.lua') luaotfload.loadmodule('font-xtx.lua') luaotfload.loadmodule('font-map.lua') luaotfload.loadmodule('font-dum.lua') @@ -515,21 +498,6 @@ luaotfload.loadmodule('font-clr.lua') fonts.enc.known = {} -% \end{macrocode} -% -% We have to register a function in the |find_vf_file| callback in order to make everything work. -% -% \begin{macrocode} - -function luaotfload.find_vf_file(name) - name = file.removesuffix(file.basename(name)) - local result = kpse.find_file(name, "vf") or "" - if result == "" then - result = kpse.find_file(name, "ovf") or "" - end - return result -end - % \end{macrocode} % % Finally two functions @@ -541,7 +509,7 @@ function luaotfload.register_callbacks() callback.add('hpack_filter', nodes.simple_font_handler, 'luaotfload.hpack_filter') callback.reset('define_font') callback.add('define_font', fonts.define.read, 'luaotfload.define_font', 1) - callback.add('find_vf_file', luaotfload.find_vf_file, 'luaotfload.find_vf_file') + callback.add('find_vf_file', fonts.vf.find, 'luaotfload.find_vf_file') end function luaotfload.unregister_callbacks() diff --git a/otfl-font-def.lua b/otfl-font-def.lua index 47b1755..f93a95c 100644 --- a/otfl-font-def.lua +++ b/otfl-font-def.lua @@ -644,5 +644,5 @@ end

We overload both the and readers.

--ldx]]-- -callback.register('define_font' , define.read) -callback.register('find_vf_file', vf.find ) -- not that relevant any more +callbacks.register('define_font' , define.read, "definition of fonts (tfmtable preparation)") +callbacks.register('find_vf_file', vf.find , "locating virtual fonts, insofar needed") -- not that relevant any more diff --git a/otfl-luat-dum.lua b/otfl-luat-dum.lua index 2b818ce..a594b64 100644 --- a/otfl-luat-dum.lua +++ b/otfl-luat-dum.lua @@ -42,6 +42,9 @@ tasks = { appendaction = dummyfunction, prependaction = dummyfunction, } +callbacks = { + register = dummyfunction, +} -- we need to cheat a bit here -- cgit v1.2.3