summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-11-26 17:36:23 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2010-11-26 17:36:23 +0200
commit8166a5e9f5e1aba799f25498651bb582102ed0a8 (patch)
tree9c80e55931f3c7339f730ec3bf0e5621df0c94f9
parent45b788e4736369be90c39f938012960c6dd7d3ea (diff)
downloadluaotfload-8166a5e9f5e1aba799f25498651bb582102ed0a8.tar.gz
Apply Philipp's patch from #20
-rw-r--r--luaotfload.dtx10
1 files changed, 9 insertions, 1 deletions
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