From ed2c824995ef51ddb1dfc1fa2a526933cd377cda Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Wed, 30 Mar 2016 12:07:47 +0200 Subject: 2016-03-30 12:01:00 --- tex/context/base/mkiv/typo-krn.lua | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'tex/context/base/mkiv/typo-krn.lua') diff --git a/tex/context/base/mkiv/typo-krn.lua b/tex/context/base/mkiv/typo-krn.lua index a245fec41..bb9061c56 100644 --- a/tex/context/base/mkiv/typo-krn.lua +++ b/tex/context/base/mkiv/typo-krn.lua @@ -50,7 +50,8 @@ local setsubtype = nuts.setsubtype local texsetattribute = tex.setattribute local unsetvalue = attributes.unsetvalue -local new_gluespec = nodepool.gluespec +local resetglue = nuts.resetglue + local new_kern = nodepool.kern local new_glue = nodepool.glue @@ -209,16 +210,6 @@ local function kern_injector(fillup,kern) end end -local function spec_injector(fillup,width,stretch,shrink) - if fillup then - local s = new_gluespec(width,2*stretch,2*shrink) - setfield(s,"stretch_order",1) - return s - else - return new_gluespec(width,stretch,shrink) - end -end - -- a simple list injector, no components and such .. just disable ligatures in -- kern mode .. maybe not even hyphenate ... anyway, the next one is for simple -- sublists .. beware: we can have char -1 @@ -560,10 +551,19 @@ function kerns.handler(head) if subtype == userskip_code or subtype == xspaceskip_code or subtype == spaceskip_code then local w = getfield(start,"width") if w > 0 then - local width = w+gluefactor*w*krn - local stretch = getfield(start,"stretch") - local shrink = getfield(start,"shrink") - setfield(start,"spec",spec_injector(fillup,width,stretch*width/w,shrink*width/w)) + local width = w + gluefactor * w * krn + local stretch = getfield(start,"stretch") * width / w + local shrink = getfield(start,"shrink") * width / w + setfield(start,"width",width) + if fillup then + stretch = 2 * stretch + shrink = 2 * shrink + setfield(start,"stretch_order",1) + -- shrink_order ? + end + setfield(start,"stretch",stretch) + setfield(start,"shrink", shrink) + -- done = true end end -- cgit v1.2.3