[latex3-commits] [git/LaTeX3-latex3-luaotfload] fun_with_disc_nodes--take_omega_plus_one: Fix multiple discretionaries at start of run (04613e2)
Marcel Fabian Krüger
tex at 2krueger.de
Wed Mar 10 15:15:44 CET 2021
Repository : https://github.com/latex3/luaotfload
On branch : fun_with_disc_nodes--take_omega_plus_one
Link : https://github.com/latex3/luaotfload/commit/04613e21354e8a1c93829f69dd6e0989c925d42a
>---------------------------------------------------------------
commit 04613e21354e8a1c93829f69dd6e0989c925d42a
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Wed Mar 10 15:15:44 2021 +0100
Fix multiple discretionaries at start of run
>---------------------------------------------------------------
04613e21354e8a1c93829f69dd6e0989c925d42a
src/luaotfload-harf-plug.lua | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/luaotfload-harf-plug.lua b/src/luaotfload-harf-plug.lua
index e0fda7e..d86c1c5 100644
--- a/src/luaotfload-harf-plug.lua
+++ b/src/luaotfload-harf-plug.lua
@@ -181,7 +181,8 @@ local function itemize(head, fontid, direction)
local dirstack = {}
local currdir = direction or 0
local lastskip, lastdir = true
- local lastrun = {}
+ local dummyrun = { start = 0, len = 0 }
+ local lastrun = dummyrun
local lastdisc
local in_disc
@@ -226,9 +227,6 @@ local function itemize(head, fontid, direction)
setlink(prev, n)
code = nil
skip = false
- if not prev then
- head = n
- end
else
skip = true
end
@@ -272,6 +270,9 @@ local function itemize(head, fontid, direction)
lastrun.len = lastrun.len + 1
elseif disc then
if lastdisc then
+ if lastrun.len == 0 then
+ runs[#runs - 1].after = n
+ end
lastdisc.next = disc
lastdisc = disc
else
@@ -280,7 +281,7 @@ local function itemize(head, fontid, direction)
end
end
- return head, runs
+ return dummyrun.after, runs
end
More information about the latex3-commits
mailing list.