[latex3-commits] [git/LaTeX3-latex3-luaotfload] harfnode-dev: Might actually work now (5200d64)
Marcel Fabian Krüger
tex at 2krueger.de
Mon Oct 7 12:26:53 CEST 2019
Repository : https://github.com/latex3/luaotfload
On branch : harfnode-dev
Link : https://github.com/latex3/luaotfload/commit/5200d64cde35d8277cc28c60465be9f6007a2272
>---------------------------------------------------------------
commit 5200d64cde35d8277cc28c60465be9f6007a2272
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Mon Oct 7 12:26:53 2019 +0200
Might actually work now
>---------------------------------------------------------------
5200d64cde35d8277cc28c60465be9f6007a2272
src/harf/harf-node.lua | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/harf/harf-node.lua b/src/harf/harf-node.lua
index d390b8b..b6f2ddd 100644
--- a/src/harf/harf-node.lua
+++ b/src/harf/harf-node.lua
@@ -365,12 +365,9 @@ shape = function(head, node, run)
local i = 0
while i < #glyphs do
- print(i, #glyphs)
i = i + 1
local glyph = glyphs[i]
local nodeindex = glyph.cluster + 1
- printnodes(nodeindex, head)
- print(glyph, node)
local nchars, nglyphs = chars_in_glyph(i, glyphs, offset + len)
glyph.nchars, glyph.nglyphs = nchars, nglyphs
@@ -456,6 +453,7 @@ shape = function(head, node, run)
local glyph = glyphs[j]
glyph.cluster = glyph.cluster - (stopindex - startindex)
end
+ len = len - (stopindex - startindex)
table.move(glyphs, stopglyph, #glyphs + stopglyph - i - 1, i + 1)
-- -- Mark these glyph for skipping since they will be replaced by the
-- -- discretionary fields.
@@ -486,7 +484,6 @@ shape = function(head, node, run)
local pre, post, rep, lastpre, lastpost, lastrep = getdisc(disc, true)
local precodes, postcodes, repcodes = {}, {}, {}
- print(subcodes, 1, subindex, 1, repcodes)
table.move(subcodes, 1, subindex, 1, repcodes)
for n, id, subtype in traverse(rep) do
repcodes[#repcodes + 1] = id == glyph_t and getchar(n) or 0xFFFC
@@ -791,7 +788,7 @@ local function tonodes(head, node, run, glyphs, color)
for j = nodeindex + 1, run.start + #run.codes do
local oldnode = node
head, node = removenode(head, node)
- freenode(node)
+ freenode(oldnode)
end
return head, node
More information about the latex3-commits
mailing list