diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-08-19 13:10:04 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2018-08-19 13:10:04 +0200 |
commit | 7539371c37c02bc2bc6c5d7ebffa2ffc6fec36c3 (patch) | |
tree | 8a2e1e9bfba18c3ee1897eda50f76f4726bdd108 /tex/context/base/mkiv/cldf-bas.lua | |
parent | 0fcb576f359edfdd50c2b13615a03b966a9073df (diff) | |
download | context-7539371c37c02bc2bc6c5d7ebffa2ffc6fec36c3.tar.gz |
2018-08-19 13:00:00
Diffstat (limited to 'tex/context/base/mkiv/cldf-bas.lua')
-rw-r--r-- | tex/context/base/mkiv/cldf-bas.lua | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/tex/context/base/mkiv/cldf-bas.lua b/tex/context/base/mkiv/cldf-bas.lua index af698ac97..4ad0c5a48 100644 --- a/tex/context/base/mkiv/cldf-bas.lua +++ b/tex/context/base/mkiv/cldf-bas.lua @@ -22,27 +22,30 @@ if not modules then modules = { } end modules ['cldf-bas'] = { -- flush(ctxcatcodes,"}") -- end -local tonumber = tonumber -local type = type -local format = string.format -local utfchar = utf.char -local concat = table.concat +local tonumber = tonumber +local type = type +local format = string.format +local utfchar = utf.char +local concat = table.concat -local context = context -local ctxcore = context.core -local variables = interfaces.variables -local sprint = context.sprint +local context = context +local ctxcore = context.core -local nodepool = nodes.pool -local new_rule = nodepool.rule -local new_glyph = nodepool.glyph -local new_latelua = nodepool.latelua +local variables = interfaces.variables -local current_attr = nodes.current_attr +local ctx_flushnode = context.nuts.flush -local current_font = font.current -local texgetcount = tex.getcount -local texsetcount = tex.setcount +local nuts = nodes.nuts +local tonode = nuts.tonode +local nodepool = nuts.pool +local new_rule = nodepool.rule +local new_glyph = nodepool.glyph +local new_latelua = nodepool.latelua + +local setattrlist = nuts.setattrlist + +local texgetcount = tex.getcount +local texsetcount = tex.setcount -- a set of basic fast ones @@ -80,19 +83,20 @@ function context.rule(w,h,d,dir) else rule = new_rule(w,h,d,dir) end - rule.attr = current_attr() - context(rule) + setattrlist(rule,true) + context(tonode(rule)) + -- ctx_flushnode(tonode(rule)) end function context.glyph(id,k) if id then if not k then - id, k = current_font(), id + id, k = true, id end local glyph = new_glyph(id,k) - glyph.attr = current_attr() - context(glyph) - -- context.node(glyph) + setattrlist(glyph,true) + context(tonode(glyph)) + -- ctx_flushnode(tonode(glyph)) end end @@ -178,10 +182,10 @@ context.registers = { do - local ctx_flushnode = context.nodes.flush - function context.latelua(f) - ctx_flushnode(new_latelua(f)) + local latelua = new_latelua(f) + setattrlist(latelua,true) + ctx_flushnode(latelua) end end |