From 9e4beeabe84e0a34f4afc545a5f591fed292bc32 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Tue, 8 Sep 2009 21:50:22 +0300 Subject: fixing a bug on vf files appeared with the last commit --- luaotfload.dtx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/luaotfload.dtx b/luaotfload.dtx index 5d9d12d..3144cb2 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -418,6 +418,21 @@ luaotfload.loadmodule('font-dum.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 @@ -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() -- cgit v1.2.3