diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-08-20 19:19:52 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-08-20 19:19:52 +0200 |
commit | f6e7648f6126ffe087071531f03c674be32930f1 (patch) | |
tree | 2f2346b6d7cc3178c1ea7b3239b603c6f00e3493 /tex/context/base/mkiv/typo-ovl.lua | |
parent | f72c2cf29d36ae836c894bad29dfd965d1af0236 (diff) | |
download | context-f6e7648f6126ffe087071531f03c674be32930f1.tar.gz |
2019-08-20 17:28:00
Diffstat (limited to 'tex/context/base/mkiv/typo-ovl.lua')
-rw-r--r-- | tex/context/base/mkiv/typo-ovl.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tex/context/base/mkiv/typo-ovl.lua b/tex/context/base/mkiv/typo-ovl.lua index 6f836551d..25b1a0178 100644 --- a/tex/context/base/mkiv/typo-ovl.lua +++ b/tex/context/base/mkiv/typo-ovl.lua @@ -34,6 +34,8 @@ local setattrlist = nuts.setattrlist local getfield = nuts.getfield local setfont = nuts.setfont +local nextnode = nuts.traversers.node + local unsetvalue = attributes.unsetvalue local prvattribute = attributes.private @@ -90,9 +92,9 @@ end attributes.tooverloads = tooverloads function attributes.applyoverloads(specification,start,stop) - local current = tonut(start) + local start = tonut(start) local processor = specification.processor - local overloads = specification.processor or getattr(current,a_overloads) + local overloads = specification.processor or getattr(start,a_overloads) if overloads and overloads ~= unsetvalue then overloads = t_overloads[overloads] if not overloads then @@ -107,7 +109,7 @@ function attributes.applyoverloads(specification,start,stop) local newlist = nil local newfont = overloads.font - local function apply() + local function apply(current) local a = getattrlist(current) if a == oldlist then setattrlist(current,newlist) @@ -127,12 +129,11 @@ function attributes.applyoverloads(specification,start,stop) end end - while current do - local id = getid(current) + for current, id in nextnode, start do if id == glyph_code then - apply() + apply(current) elseif id == disc_code then - apply() + apply(current) if pre then while pre do if getid(pre) == glyph_code then @@ -161,7 +162,6 @@ function attributes.applyoverloads(specification,start,stop) if current == last then break end - current = getnext(current) end end |