diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-03-30 12:07:47 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-03-30 12:07:47 +0200 |
commit | ed2c824995ef51ddb1dfc1fa2a526933cd377cda (patch) | |
tree | d70dbfc0cfe6b33c0b87c662d259e5fc53cb9afd /tex/context/base/mkiv/typo-krn.lua | |
parent | f025339d0770904176dd9b32a405b23f809772ae (diff) | |
download | context-ed2c824995ef51ddb1dfc1fa2a526933cd377cda.tar.gz |
2016-03-30 12:01:00
Diffstat (limited to 'tex/context/base/mkiv/typo-krn.lua')
-rw-r--r-- | tex/context/base/mkiv/typo-krn.lua | 30 |
1 files changed, 15 insertions, 15 deletions
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 |