summaryrefslogtreecommitdiff
path: root/tex/generic
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2015-05-23 13:15:04 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2015-05-23 13:15:04 +0200
commite92a01a8876eb52c54d83d54323db89a2be097aa (patch)
treee91b7b42409f9797e2e5a3f17fde270165738f30 /tex/generic
parent84c9614c8d2e0a3beaa9fdf42530087f3df4b807 (diff)
downloadcontext-e92a01a8876eb52c54d83d54323db89a2be097aa.tar.gz
2015-05-23 10:16:00
Diffstat (limited to 'tex/generic')
-rw-r--r--tex/generic/context/luatex/luatex-fonts-cbk.lua17
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua19
2 files changed, 27 insertions, 9 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-cbk.lua b/tex/generic/context/luatex/luatex-fonts-cbk.lua
index 58162b4af..81b5b6e85 100644
--- a/tex/generic/context/luatex/luatex-fonts-cbk.lua
+++ b/tex/generic/context/luatex/luatex-fonts-cbk.lua
@@ -18,6 +18,7 @@ local nodes = nodes
local traverse_id = node.traverse_id
local free_node = node.free
+local remove_node = node.remove
local glyph_code = nodes.nodecodes.glyph
local disc_code = nodes.nodecodes.disc
@@ -60,6 +61,7 @@ function nodes.handlers.nodepass(head)
local prevfont = nil
local basefont = nil
local variants = nil
+ local redundant = nil
for n in traverse_id(glyph_code,head) do
local font = n.font
if font ~= prevfont then
@@ -104,17 +106,24 @@ function nodes.handlers.nodepass(head)
local variant = hash[p.char]
if variant then
p.char = variant
- p.next = n.next
- if n.next then
- n.next.prev = p
+ if not redundant then
+ redundant = { n }
+ else
+ redundant[#redundant+1] = n
end
- node.free(n)
end
end
end
end
end
end
+ if redundant then
+ for i=1,#redundant do
+ local n = redundant[i]
+ remove_node(head,n)
+ free_node(n)
+ end
+ end
for d in traverse_id(disc_code,head) do
local r = d.replace
if r then
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index c060dc304..fe61b3dcb 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 05/22/15 19:25:13
+-- merge date : 05/23/15 10:13:59
do -- begin closure to overcome local limits and interference
@@ -15211,6 +15211,7 @@ local fonts=fonts
local nodes=nodes
local traverse_id=node.traverse_id
local free_node=node.free
+local remove_node=node.remove
local glyph_code=nodes.nodecodes.glyph
local disc_code=nodes.nodecodes.disc
local ligaturing=node.ligaturing
@@ -15241,6 +15242,7 @@ function nodes.handlers.nodepass(head)
local prevfont=nil
local basefont=nil
local variants=nil
+ local redundant=nil
for n in traverse_id(glyph_code,head) do
local font=n.font
if font~=prevfont then
@@ -15285,17 +15287,24 @@ function nodes.handlers.nodepass(head)
local variant=hash[p.char]
if variant then
p.char=variant
- p.next=n.next
- if n.next then
- n.next.prev=p
+ if not redundant then
+ redundant={ n }
+ else
+ redundant[#redundant+1]=n
end
- node.free(n)
end
end
end
end
end
end
+ if redundant then
+ for i=1,#redundant do
+ local n=redundant[i]
+ remove_node(head,n)
+ free_node(n)
+ end
+ end
for d in traverse_id(disc_code,head) do
local r=d.replace
if r then