diff options
| author | Philipp Gesang <megas.kapaneus@gmail.com> | 2013-04-10 16:20:41 +0200 | 
|---|---|---|
| committer | Philipp Gesang <megas.kapaneus@gmail.com> | 2013-04-10 16:20:41 +0200 | 
| commit | b1db13ab10112f6d81522a3f0ab44a67754cf551 (patch) | |
| tree | e60e3c3c474fb47c9162c9acb0ee86f17f4efb6b | |
| parent | 3918e104cc75385e87b23707b2669c32eb112bea (diff) | |
| download | luaotfload-b1db13ab10112f6d81522a3f0ab44a67754cf551.tar.gz | |
circumvent the callback trap from luatexbase
| -rw-r--r-- | luaotfload.lua | 36 | 
1 files changed, 27 insertions, 9 deletions
| diff --git a/luaotfload.lua b/luaotfload.lua index 0a3b398..dd650fd 100644 --- a/luaotfload.lua +++ b/luaotfload.lua @@ -65,24 +65,35 @@ local loadmodule = function (name)  end  luaotfload.loadmodule = loadmodule --- required in deferred code +--[[doc-- +The imported font loader will call \verb|callback.register| once +(during \verb|font-def.lua|). +This is unavoidable but harmless, so we make it call a dummy instead. +--doc]]-- +local trapped_register = callback.register +local dummy_function   = function () end +callback.register      = dummy_function +  --[[-- keep --]]  --- from Hans (all merged): ----   file name              modified include name ---- × basics-gen.lua         t        luat-basics-gen ---- × font-def -> fonts-def  t        luatex-font-def (there’s also the normal font-def!) ---- × fonts-enc              f        luatex-font-enc ---- × fonts-ext              t        luatex-fonts-ext ---- × fonts-lua              f        luatex-fonts-lua ----   fonts-tfm              f        luatex-fonts-tfm ---- × fonts-cbk              f        luatex-fonts-lua +---   file name              modified  include name +--- × basics-gen.lua         t         luat-basics-gen +--- × font-def -> fonts-def  t         luatex-font-def (there’s also the normal font-def!) +--- × fonts-enc              f         luatex-font-enc +--- × fonts-ext              t         luatex-fonts-ext +--- × fonts-lua              f         luatex-fonts-lua +---   fonts-tfm              f         luatex-fonts-tfm +--- × fonts-cbk              f         luatex-fonts-lua + +--- from Hans (unmerged): +---   font-otc.lua -> otfl-font-otc.lua  --- from luaotfload:  ---   otfl-luat-ovr.lua    -- override some luat-dum functions  ---   otfl-font-clr.lua  ---   otfl-font-ltx.lua  ---   otfl-font-nms.lua ----   otfl-font-otc.lua  ---   otfl-font-pfb.lua    -- ?  --[[-- new --]] @@ -154,6 +165,13 @@ _G.non_generic_context = { luatex_fonts = {  loadmodule("fonts.lua") +--[[doc-- +After the fontloader is ready we can restore the callback trap from +\textsf{luatexbase}. +--doc]]-- + +callback.register = trapped_register +  --- then continue in luaotfload-deferred.lua  -- vim:tw=71:sw=2:ts=2:expandtab | 
