summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--luaotfload.dtx36
-rw-r--r--otfl-font-def.lua4
-rw-r--r--otfl-luat-dum.lua3
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')
@@ -517,21 +500,6 @@ 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
%
% \begin{macrocode}
@@ -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
<p>We overload both the <l n='tfm'/> and <l n='vf'/> readers.</p>
--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