summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-fallback.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-05-02 21:00:47 +0000
committerKarl Berry <karl@freefriends.org>2020-05-02 21:00:47 +0000
commit16dc363f7718f96063d15f77eecf3db8a19789cc (patch)
tree4c6c7df92086e8d28dceddad5011d5abddf185db /Master/texmf-dist/tex/luatex/luaotfload/luaotfload-fallback.lua
parent83bce5369c17e79e461fc45c3707d11990d9c9a7 (diff)
luaotfload (2may20)
git-svn-id: svn://tug.org/texlive/trunk@54971 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/luaotfload-fallback.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-fallback.lua14
1 files changed, 9 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-fallback.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-fallback.lua
index e07b3c726ad..9b790ae8549 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-fallback.lua
+++ b/Master/texmf-dist/tex/luatex/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