diff options
Diffstat (limited to 'tex/context/base/node-fnt.lua')
-rw-r--r-- | tex/context/base/node-fnt.lua | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tex/context/base/node-fnt.lua b/tex/context/base/node-fnt.lua index ff02c0930..667cf4d62 100644 --- a/tex/context/base/node-fnt.lua +++ b/tex/context/base/node-fnt.lua @@ -46,7 +46,9 @@ local getchar = nuts.getchar local getnext = nuts.getnext local getprev = nuts.getprev local getfield = nuts.getfield -local setfield = nuts.setfield +----- getdisc = nuts.getdisc +local setchar = nuts.setchar +local setlink = nuts.setlink local traverse_id = nuts.traverse_id local delete_node = nuts.delete @@ -239,7 +241,7 @@ function handlers.characters(head) if trace_variants then report_fonts("replacing %C by %C",char,variant) end - setfield(p,"char",variant) + setchar(p,variant) if not redundant then redundant = { n } else @@ -422,12 +424,10 @@ function handlers.characters(head) start = kerning(start) end if prev then - setfield(start,"prev",prev) - setfield(prev,"next",start) + setlink(prev,start) end if next then - setfield(stop,"next",next) - setfield(next,"prev",start) + setlink(stop,next) end if front then head = start @@ -592,7 +592,7 @@ end -- if p and getid(p) == glyph_code then -- local variant = hash[getchar(p)] -- if variant then --- setfield(p,"char",variant) +-- setchar(p,variant) -- delete_node(nuthead,n) -- end -- end @@ -648,9 +648,10 @@ handlers.unprotectglyphs = function(n) return d_unprotect_glyphs(tonut(n)) end -- function handlers.protectglyphs(h) -- local h = tonut(h) -- for n in traverse_id(disc_code,h) do --- local d = getfield(n,"pre") if d then d_protect_glyphs(d) end --- local d = getfield(n,"post") if d then d_protect_glyphs(d) end --- local d = getfield(n,"replace") if d then d_protect_glyphs(d) end +-- local pre, post, replace = getdisc(n) +-- if pre then d_protect_glyphs(pre) end +-- if post then d_protect_glyphs(post) end +-- if replace then d_protect_glyphs(replace) end -- end -- return d_protect_glyphs(h) -- end |