diff options
author | Marius <mariausol@gmail.com> | 2014-01-07 15:20:21 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2014-01-07 15:20:21 +0200 |
commit | ff54944f72aa8a402a330a82e847c9c19fba5f24 (patch) | |
tree | 961dc9e94862dbc1f3cbc98d55f81b66b7c8bda4 /tex/context/base/font-col.lua | |
parent | 9e10531d96003139dbb12ef6c59f9b9827a65121 (diff) | |
download | context-ff54944f72aa8a402a330a82e847c9c19fba5f24.tar.gz |
beta 2014.01.07 14:00
Diffstat (limited to 'tex/context/base/font-col.lua')
-rw-r--r-- | tex/context/base/font-col.lua | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/tex/context/base/font-col.lua b/tex/context/base/font-col.lua index f5e17f1da..187e33311 100644 --- a/tex/context/base/font-col.lua +++ b/tex/context/base/font-col.lua @@ -17,7 +17,12 @@ local type, next, toboolean = type, next, toboolean local gmatch = string.gmatch local fastcopy = table.fastcopy -local traverse_id = nodes.traverse_id +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 settings_to_hash = utilities.parsers.settings_to_hash @@ -199,7 +204,7 @@ end -- -- if lpegmatch(okay,name) then -function collections.prepare(name) -- we can do this in lua now +function collections.prepare(name) -- we can do this in lua now .. todo current = currentfont() if vectors[current] then return @@ -244,23 +249,23 @@ end function collections.process(head) -- this way we keep feature processing local done = false - for n in traverse_id(glyph_code,head) do - local v = vectors[n.font] + for n in traverse_id(glyph_code,tonut(head)) do + local v = vectors[getfont(n)] if v then - local id = v[n.char] + local id = v[getchar(n)] 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 - n.font = newid - n.char = newchar + setfield(n,"font",newid) + setfield(n,"char",newchar) else if trace_collecting then report_fonts("remapping font %a to %a for character %C",getfont(n),id,getchar(n)) end - n.font = id + setfield(n,"font",id) end end end |