diff options
Diffstat (limited to 'macros/luatex/generic/luaotfload/luaotfload-init.lua')
-rw-r--r-- | macros/luatex/generic/luaotfload/luaotfload-init.lua | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/macros/luatex/generic/luaotfload/luaotfload-init.lua b/macros/luatex/generic/luaotfload/luaotfload-init.lua index e136d6cf63..0f8d7b3206 100644 --- a/macros/luatex/generic/luaotfload/luaotfload-init.lua +++ b/macros/luatex/generic/luaotfload/luaotfload-init.lua @@ -7,8 +7,8 @@ local ProvidesLuaModule = { name = "luaotfload-init", - version = "3.11", --TAGVERSION - date = "2019-11-10", --TAGDATE + version = "3.12", --TAGVERSION + date = "2020-02-02", --TAGDATE description = "luaotfload submodule / initialization", license = "GPL v2.0" } @@ -192,6 +192,22 @@ local load_context_modules = function (pth) end +local function verify_context_dir (pth) + if lfsisdir(file.join(pth, ltx)) then + return true + end + for _, d in ipairs(ctx) do + if lfsisdir(file.join(pth, d)) then + return true + end + end + logreport("both", 0, "init", "A directory name has been passed as \z + fontloader name but this directory does not acutally seem to contain \z + a font loader. I will try to interpret your fontloader name in another \z + way for now, but please fix your settings.") + return false +end + local function init_main(early_hook) config = config or { } --- global config.luaotfload = config.luaotfload or { } @@ -374,7 +390,7 @@ local function init_main(early_hook) "Loading Context modules in lookup path.") load_context_modules () - elseif lfsisdir (fontloader) then + elseif lfsisdir (fontloader) and verify_context_dir (fontloader) then logreport ("log", 0, "init", "Loading Context files under prefix ā%sā.", fontloader) @@ -439,6 +455,7 @@ local init_post_install_callbacks = function () direction = tex.get'textdir' end domultiscript(head, nil, nil, nil, direction) + dofallback(head, nil, nil, nil, direction) return handler(head, groupcode, nil, nil, direction) end luatexbase.add_to_callback("pre_linebreak_filter", |