summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/trac-par.lua
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2019-02-24 15:12:57 +0000
committerNorbert Preining <preining@logic.at>2019-02-24 15:12:57 +0000
commit1314fbe93790c501dc436a5cf99f106b9e5c0f63 (patch)
tree04dc7734c8be8ffe385d41f4388826ef5857b6f9 /Master/texmf-dist/tex/context/base/mkiv/trac-par.lua
parenteb80ce7b34f59896a1dfee5ca422495394d6677f (diff)
Revert "ConTeXt version 2019.02.22 19:35"
This reverts commit 5c6357cdb820b4f628d036ba7b2248f221d50c0b. git-svn-id: svn://tug.org/texlive/trunk@50112 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/trac-par.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/trac-par.lua29
1 files changed, 13 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/trac-par.lua b/Master/texmf-dist/tex/context/base/mkiv/trac-par.lua
index 03f0a67d107..56291f8c83d 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/trac-par.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/trac-par.lua
@@ -15,13 +15,13 @@ local concat = table.concat
local nuts = nodes.nuts
local tonut = nuts.tonut
+local getfield = nuts.getfield
local getid = nuts.getid
local getnext = nuts.getnext
local getlist = nuts.getlist
+local getfont = nuts.getfont
+local getchar = nuts.getchar
local getwidth = nuts.getwidth
-local getexpansion = nuts.getexpansion
-
-local isglyph = nuts.isglyph
local nodecodes = nodes.nodecodes
local hlist_code = nodecodes.hlist
@@ -63,23 +63,23 @@ local function colorize(n)
-- tricky: the built-in method creates dummy fonts and the last line normally has the
-- original font and that one then has ex.auto set
while n do
- local char, id = isglyph(n)
- if char then
- local ne = getexpansion(n)
+ local id = getid(n)
+ if id == glyph_code then
+ local ne = getfield(n,"expansion_factor")
if ne == 0 then
if length > 0 then flush() end
setnodecolor(n,"hz:zero")
else
- -- id == font
- if id ~= font then
+ local f = getfont(n)
+ if f ~= font then
if length > 0 then
flush()
end
- local pf = parameters[id]
+ local pf = parameters[f]
local ex = pf.expansion
if ex and ex.auto then
size = pf.size
- font = id -- save lookups
+ font = f -- save lookups
else
size = false
end
@@ -100,7 +100,7 @@ local function colorize(n)
end
if trace_verbose then
length = length + 1
- list[length] = utfchar(char)
+ list[length] = utfchar(getchar(n))
width = width + getwidth(n) -- no kerning yet
end
end
@@ -109,10 +109,7 @@ local function colorize(n)
if length > 0 then
flush()
end
- local list = getlist(n)
- if list then
- colorize(list,flush)
- end
+ colorize(getlist(n),flush)
else -- nothing to show on kerns
if length > 0 then
flush()
@@ -128,7 +125,7 @@ end
builders.paragraphs.expansion = builders.paragraphs.expansion or { }
function builders.paragraphs.expansion.trace(head)
- colorize(head,true)
+ colorize(tonut(head),true)
return head
end