summaryrefslogtreecommitdiff
path: root/tex/context/base/font-gds.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2014-05-03 13:55:34 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2014-05-03 13:55:34 +0200
commit624cbb5da392e9403984dd1cf368c0d408b1c2a8 (patch)
tree489c049ac849bb5bbce7d32e4df477872c58373d /tex/context/base/font-gds.lua
parent088de88944c1f2254250bb448c7371a87ff7ee39 (diff)
downloadcontext-624cbb5da392e9403984dd1cf368c0d408b1c2a8.tar.gz
2014-01-03 00:42:00
Diffstat (limited to 'tex/context/base/font-gds.lua')
-rw-r--r--tex/context/base/font-gds.lua33
1 files changed, 14 insertions, 19 deletions
diff --git a/tex/context/base/font-gds.lua b/tex/context/base/font-gds.lua
index e57f784a0..7131ecad5 100644
--- a/tex/context/base/font-gds.lua
+++ b/tex/context/base/font-gds.lua
@@ -46,12 +46,7 @@ local findfile = resolvers.findfile
local glyph_code = nodes.nodecodes.glyph
-local nuts = nodes.nuts
-local tonut = nuts.tonut
-local getfont = nuts.getfont
-local getchar = nuts.getchar
-local getattr = nuts.getattr
-local traverse_id = nuts.traverse_id
+local traverse_id = nodes.traverse_id
function fontgoodies.report(what,trace,goodies)
if trace_goodies or trace then
@@ -316,16 +311,16 @@ local setnodecolor = nodes.tracers.colors.set
-- function colorschemes.coloring(head)
-- local lastfont, lastscheme
-- local done = false
--- for n in traverse_id(glyph_code,tonut(head)) do
--- local a = getattr(n,a_colorscheme)
+-- for n in traverse_id(glyph_code,head) do
+-- local a = n[a_colorscheme]
-- if a then
--- local f = getfont(n)
+-- local f = n.font
-- if f ~= lastfont then
-- lastscheme = fontproperties[f].colorscheme
-- lastfont = f
-- end
-- if lastscheme then
--- local sc = lastscheme[getchar(n)]
+-- local sc = lastscheme[n.char]
-- if sc then
-- done = true
-- setnodecolor(n,"colorscheme:"..a..":"..sc) -- slow
@@ -343,21 +338,21 @@ local setnodecolor = nodes.tracers.colors.set
-- local lastattr = nil
-- local lastscheme = nil
-- local lastprefix = nil
--- local done = nil
--- for n in traverse_id(glyph_code,tonut(head)) do
--- local a = getattr(n,a_colorscheme)
+-- local done = nil
+-- for n in traverse_id(glyph_code,head) do
+-- local a = n[a_colorscheme]
-- if a then
-- if a ~= lastattr then
-- lastattr = a
-- lastprefix = "colorscheme:" .. a .. ":"
-- end
--- local f = getfont(n)
+-- local f = n.font
-- if f ~= lastfont then
-- lastfont = f
-- lastscheme = fontproperties[f].colorscheme
-- end
-- if lastscheme then
--- local sc = lastscheme[getchar(n)]
+-- local sc = lastscheme[n.char]
-- if sc then
-- setnodecolor(n,lastprefix .. sc) -- slow
-- done = true
@@ -389,10 +384,10 @@ function colorschemes.coloring(head)
local lastcache = nil
local lastscheme = nil
local done = nil
- for n in traverse_id(glyph_code,tonut(head)) do
- local a = getattr(n,a_colorscheme)
+ for n in traverse_id(glyph_code,head) do
+ local a = n[a_colorscheme]
if a then
- local f = getfont(n)
+ local f = n.font
if f ~= lastfont then
lastfont = f
lastscheme = fontproperties[f].colorscheme
@@ -402,7 +397,7 @@ function colorschemes.coloring(head)
lastcache = cache[a]
end
if lastscheme then
- local sc = lastscheme[getchar(n)]
+ local sc = lastscheme[n.char]
if sc then
setnodecolor(n,lastcache[sc]) -- we could inline this one
done = true