diff options
-rw-r--r-- | luaotfload.dtx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/luaotfload.dtx b/luaotfload.dtx index 5d9d12d..3144cb2 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -420,6 +420,21 @@ 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} @@ -429,7 +444,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', fonts.vf.find, 'luaotfload.find_vf_file') + callback.add('find_vf_file', luaotfload.find_vf_file, 'luaotfload.find_vf_file') end function luaotfload.unregister_callbacks() |