diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/scrp-eth.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/scrp-eth.lua | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/base/scrp-eth.lua b/Master/texmf-dist/tex/context/base/scrp-eth.lua index 597afa1b558..8ecbce52295 100644 --- a/Master/texmf-dist/tex/context/base/scrp-eth.lua +++ b/Master/texmf-dist/tex/context/base/scrp-eth.lua @@ -9,9 +9,17 @@ if not modules then modules = { } end modules ['scrp-eth'] = { -- at some point I will review the script code but for the moment we -- do it this way; so space settings like with cjk yet -local insert_node_before = node.insert_before +local nuts = nodes.nuts -local nodepool = nodes.pool +local getnext = nuts.getnext +local getfont = nuts.getfont +local getchar = nuts.getchar +local getid = nuts.getid +local getattr = nuts.getattr + +local insert_node_before = nuts.insert_before + +local nodepool = nuts.pool local new_glue = nodepool.glue local new_penalty = nodepool.penalty @@ -37,13 +45,13 @@ local inter_character_stretch_factor = 1 local inter_character_shrink_factor = 1 local function space_glue(current) - local data = numbertodataset[current[a_scriptinjection]] + local data = numbertodataset[getattr(current,a_scriptinjection)] if data then inter_character_space_factor = data.inter_character_space_factor or 1 inter_character_stretch_factor = data.inter_character_stretch_factor or 1 inter_character_shrink_factor = data.inter_character_shrink_factor or 1 end - local font = current.font + local font = getfont(current) if lastfont ~= font then local pf = parameters[font] space = pf.space @@ -104,9 +112,9 @@ local function process(head,first,last) local injector = false local current = first while current do - local id = current.id + local id = getid(current) if id == glyph_code then - local scriptstatus = current[a_scriptstatus] + local scriptstatus = getattr(current,a_scriptstatus) local category = numbertocategory[scriptstatus] if injector then local action = injector[category] @@ -121,7 +129,7 @@ local function process(head,first,last) if current == last then break else - current = current.next + current = getnext(current) end end end |