diff options
Diffstat (limited to 'macros/luatex/generic/luaotfload/luaotfload-fallback.lua')
-rw-r--r-- | macros/luatex/generic/luaotfload/luaotfload-fallback.lua | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/macros/luatex/generic/luaotfload/luaotfload-fallback.lua b/macros/luatex/generic/luaotfload/luaotfload-fallback.lua index e07b3c726a..9b790ae854 100644 --- a/macros/luatex/generic/luaotfload/luaotfload-fallback.lua +++ b/macros/luatex/generic/luaotfload/luaotfload-fallback.lua @@ -5,8 +5,8 @@ local ProvidesLuaModule = { name = "luaotfload-fallback", - version = "3.12", --TAGVERSION - date = "2020-02-02", --TAGDATE + version = "3.13", --TAGVERSION + date = "2020-05-01", --TAGDATE description = "luaotfload submodule / fallback", license = "GPL v2.0", author = "Marcel Krüger" @@ -26,7 +26,7 @@ local protect_glyph = node.direct.protect_glyph local otffeatures = fonts.constructors.newfeatures "otf" -- local normalize = fonts.handlers.otf.features.normalize local definers = fonts.definers -local define_font = luaotfload.define_font +local define_font -- = luaotfload.define_font % This is set when the first font is loaded. local fallback_table_fontnames = {} @@ -89,8 +89,8 @@ local function makefallbackfont(tfmdata, _, fallback) end local glyph_id = node.id'glyph' --- TODO: unset last_script, matching parentheses etc -function dofallback(head, _, _, _, direction) +-- TODO: inherited fonts (combining accents etc.) +local function dofallback(head, _, _, _, direction) head = node.direct.todirect(head) local last_fid, last_fallbacks for cur, cid, fid in traverse_char(head) do @@ -107,6 +107,7 @@ function dofallback(head, _, _, _, direction) end function luaotfload.add_fallback(name, fonts) + define_font = define_font or luaotfload.define_font -- Lazy loading because this file get's loaded before define_font is defined if fonts == nil then fonts = name name = #fallback_table_fontnames + 1 @@ -131,4 +132,7 @@ otffeatures.register { -- } } +return { + process = dofallback, +} --- vim:sw=2:ts=2:expandtab:tw=71 |