diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/typo-spa.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/typo-spa.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-spa.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-spa.lua index 78fc2296443..bda1397197e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-spa.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-spa.lua @@ -23,9 +23,12 @@ local unsetvalue = attributes.unsetvalue local v_reset = interfaces.variables.reset local nuts = nodes.nuts +local tonut = nuts.tonut +local tonode = nuts.tonode local getnext = nuts.getnext local getprev = nuts.getprev +local getfont = nuts.getfont local takeattr = nuts.takeattr local isglyph = nuts.isglyph @@ -70,6 +73,8 @@ end -- todo cache lastattr function spacings.handler(head) + head = tonut(head) + local done = false local start = head -- head is always begin of par (whatsit), so we have at least two prev nodes -- penalty followed by glue @@ -82,11 +87,10 @@ function spacings.handler(head) if data then local map = data.characters[char] if map then - local font = id local left = map.left local right = map.right local alternative = map.alternative - local quad = quaddata[font] + local quad = quaddata[getfont(start)] local prev = getprev(start) if left and left ~= 0 and prev then local ok = false @@ -118,6 +122,7 @@ function spacings.handler(head) end insert_node_before(head,start,new_penalty(10000)) insert_node_before(head,start,new_glue(left*quad)) + done = true end end local next = getnext(start) @@ -154,6 +159,7 @@ function spacings.handler(head) end insert_node_after(head,start,new_glue(right*quad)) insert_node_after(head,start,new_penalty(10000)) + done = true end end end @@ -166,7 +172,7 @@ function spacings.handler(head) start = getnext(start) end end - return head + return tonode(head), done end local enabled = false |