[latex3-commits] [git/LaTeX3-latex3-luaotfload] harfnode-dev: Avoid excessive runs (17cf473)

Marcel Fabian Krüger tex at 2krueger.de
Sat Oct 19 13:32:50 CEST 2019


Repository : https://github.com/latex3/luaotfload
On branch  : harfnode-dev
Link       : https://github.com/latex3/luaotfload/commit/17cf4731e0a70045abe5dcdf0054a4ab3b72206d

>---------------------------------------------------------------

commit 17cf4731e0a70045abe5dcdf0054a4ab3b72206d
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sat Oct 19 13:32:50 2019 +0200

    Avoid excessive runs


>---------------------------------------------------------------

17cf4731e0a70045abe5dcdf0054a4ab3b72206d
 src/luaotfload-harf-plug.lua | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/luaotfload-harf-plug.lua b/src/luaotfload-harf-plug.lua
index 419d524..a22b6e6 100644
--- a/src/luaotfload-harf-plug.lua
+++ b/src/luaotfload-harf-plug.lua
@@ -187,7 +187,7 @@ local function itemize(head, fontid, direction)
   local runs, codes = {}, {}
   local dirstack = {}
   local currdir = direction or "TLT"
-  local lastdir, lastskip
+  local lastskip, lastdir = true
   local lastrun = {}
 
   for n, id, subtype in direct.traverse(head) do
@@ -202,10 +202,8 @@ local function itemize(head, fontid, direction)
       end
     elseif id == glue_t and subtype == spaceskip_t then
       code = 0x0020 -- SPACE
-    elseif id == disc_t -- FIXME
-      -- and (subtype == explicitdisc_t  -- \-
-      --   or subtype == regulardisc_t)  -- \discretionary
-    then
+      skip = lastskip
+    elseif id == disc_t then
       if uses_font(n, fontid) then
         code = 0x00AD -- SOFT HYPHEN
       else
@@ -222,8 +220,10 @@ local function itemize(head, fontid, direction)
         -- Pop the last direction from the stack.
         currdir = tableremove(dirstack)
       end
+      skip = lastskip
     elseif id == localpar_t then
       currdir = getdir(n)
+      skip = lastskip
     end
 
     if not skip and texlig then





More information about the latex3-commits mailing list