diff options
Diffstat (limited to 'tex/context/base/mkiv/good-ctx.lua')
-rw-r--r-- | tex/context/base/mkiv/good-ctx.lua | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/tex/context/base/mkiv/good-ctx.lua b/tex/context/base/mkiv/good-ctx.lua index 5b6a02d09..b7dd15fb8 100644 --- a/tex/context/base/mkiv/good-ctx.lua +++ b/tex/context/base/mkiv/good-ctx.lua @@ -147,10 +147,9 @@ function colorschemes.coloring(head) local lastattr = nil local lastcache = nil local lastscheme = nil - for n in nextglyph, head do + for n, f, char in nextglyph, head do local a = getattr(n,a_colorscheme) if a then - local f = getfont(n) if f ~= lastfont then lastfont = f lastscheme = fontproperties[f].colorscheme @@ -160,7 +159,7 @@ function colorschemes.coloring(head) lastcache = cache[a] end if lastscheme then - local sc = lastscheme[getchar(n)] + local sc = lastscheme[char] if sc then setnodecolor(n,lastcache[sc]) -- we could inline this one end @@ -170,37 +169,6 @@ function colorschemes.coloring(head) return head end -if LUATEXVERSION >= 1.080 then - - function colorschemes.coloring(head) - local lastfont = nil - local lastattr = nil - local lastcache = nil - local lastscheme = nil - for n, f, char in nextglyph, head do - local a = getattr(n,a_colorscheme) - if a then - if f ~= lastfont then - lastfont = f - lastscheme = fontproperties[f].colorscheme - end - if a ~= lastattr then - lastattr = a - lastcache = cache[a] - end - if lastscheme then - local sc = lastscheme[char] - if sc then - setnodecolor(n,lastcache[sc]) -- we could inline this one - end - end - end - end - return head - end - -end - function colorschemes.enable() nodes.tasks.enableaction("processors","fonts.goodies.colorschemes.coloring") function colorschemes.enable() end |