-local function aw_step2(p, res, total, added_flag)
- if total == 0 then -- もともと伸縮の必要なし
+local function aw_step2_dummy(p, _, added_flag)
+ if added_flag then -- 行末に kern 追加したので,それによる補正
+ local f = node_hpack(getlist(p), getfield(p, 'width'), 'exactly')
+ setfield(f, 'head', nil)
+ setfield(p, 'glue_set', getfield(f, 'glue_set'))
+ setfield(p, 'glue_order', getfield(f, 'glue_order'))
+ setfield(p, 'glue_sign', getfield(f, 'glue_sign'))
+ node_free(f)
+ return
+ end
+end
+local function aw_step2(p, total, added_flag)
+ local name = (total>0) and 'stretch' or 'shrink'
+ local res = total_stsh[(total>0) and 1 or 2]
+ if total==0 or res.order > 0 then
+ -- もともと伸縮の必要なしか,残りの伸縮量は無限大