diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-05-03 13:55:34 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-05-03 13:55:34 +0200 |
commit | 624cbb5da392e9403984dd1cf368c0d408b1c2a8 (patch) | |
tree | 489c049ac849bb5bbce7d32e4df477872c58373d /tex/context/base/font-col.lua | |
parent | 088de88944c1f2254250bb448c7371a87ff7ee39 (diff) | |
download | context-624cbb5da392e9403984dd1cf368c0d408b1c2a8.tar.gz |
2014-01-03 00:42:00
Diffstat (limited to 'tex/context/base/font-col.lua')
-rw-r--r-- | tex/context/base/font-col.lua | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/tex/context/base/font-col.lua b/tex/context/base/font-col.lua index 187e33311..f5e17f1da 100644 --- a/tex/context/base/font-col.lua +++ b/tex/context/base/font-col.lua @@ -17,12 +17,7 @@ local type, next, toboolean = type, next, toboolean local gmatch = string.gmatch local fastcopy = table.fastcopy -local nuts = nodes.nuts -local tonut = nuts.tonut -local getfont = nuts.getfont -local getchar = nuts.getchar -local setfield = nuts.setfield -local traverse_id = nuts.traverse_id +local traverse_id = nodes.traverse_id local settings_to_hash = utilities.parsers.settings_to_hash @@ -204,7 +199,7 @@ end -- -- if lpegmatch(okay,name) then -function collections.prepare(name) -- we can do this in lua now .. todo +function collections.prepare(name) -- we can do this in lua now current = currentfont() if vectors[current] then return @@ -249,23 +244,23 @@ end function collections.process(head) -- this way we keep feature processing local done = false - for n in traverse_id(glyph_code,tonut(head)) do - local v = vectors[getfont(n)] + for n in traverse_id(glyph_code,head) do + local v = vectors[n.font] if v then - local id = v[getchar(n)] + local id = v[n.char] if id then if type(id) == "table" then local newid, newchar = id[1], id[2] if trace_collecting then report_fonts("remapping character %C in font %a to character %C in font %a",getchar(n),getfont(n),newchar,newid) end - setfield(n,"font",newid) - setfield(n,"char",newchar) + n.font = newid + n.char = newchar else if trace_collecting then report_fonts("remapping font %a to %a for character %C",getfont(n),id,getchar(n)) end - setfield(n,"font",id) + n.font = id end end end |