From 8166a5e9f5e1aba799f25498651bb582102ed0a8 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 26 Nov 2010 17:36:23 +0200 Subject: Apply Philipp's patch from #20 --- luaotfload.dtx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/luaotfload.dtx b/luaotfload.dtx index 9577eea..c4e4e27 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -591,6 +591,10 @@ luaotfload.loadmodule('font-clr.lua') % to the \tex end. % % \begin{macrocode} +local function default_callback(fontdata) + -- do nothing +end +luatexbase.create_callback("luaotfload.patch_font", "simple", default_callback) local function def_font(...) local fontdata = fonts.define.read(...) if type(fontdata) == "table" and fontdata.shared then @@ -659,7 +663,7 @@ local function def_font(...) fontdata.parameters[11] = 50 end end - + luatexbase.call_callback("luaotfload.patch_font", fontdata) end return fontdata end @@ -688,6 +692,10 @@ local gsubs = { for _,v in next, gsubs do register_base_sub(v) end + +function luaotfload.add_patch_callback(...) + luatexbase.add_to_callback("luaotfload.patch_font", ...) +end % \end{macrocode} % % Finally we register the callbacks -- cgit v1.2.3