diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-04-13 22:04:10 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-04-13 22:04:10 +0000 |
commit | 34dc70f0a26a867b37315dbbdd14c3ae02ff2b4d (patch) | |
tree | 05ce74e56ed3c2ce51b81f8debce967d07780194 /Build/source/texk | |
parent | 1a82e530ab0482ca68c80d12ad7892f297e79311 (diff) |
web2c/luatexdir: sync with the upstream
git-svn-id: svn://tug.org/texlive/trunk@40490 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/packaging.w | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/packaging.w b/Build/source/texk/web2c/luatexdir/tex/packaging.w index 5b9aa8b8995..4a5ab77c690 100644 --- a/Build/source/texk/web2c/luatexdir/tex/packaging.w +++ b/Build/source/texk/web2c/luatexdir/tex/packaging.w @@ -1144,6 +1144,8 @@ scaled_whd natural_sizes(halfword p, halfword pp, glue_ratio g_mult, int hpack_dir; scaled_whd xx; /* for recursion */ scaled_whd whd, siz = { 0, 0, 0 }; + scaled gp = 0; + scaled gm = 0; if (pack_direction == -1) { hpack_dir = text_direction; } else { @@ -1208,10 +1210,16 @@ scaled_whd natural_sizes(halfword p, halfword pp, glue_ratio g_mult, if (g_sign != normal) { if (g_sign == stretching) { if (stretch_order(p) == g_order) { - siz.wd += float_round(float_cast(g_mult) * float_cast(stretch(p))); + /* + siz.wd += float_round(float_cast(g_mult) * float_cast(stretch(p))); + */ + gp += stretch(p); } } else if (shrink_order(p) == g_order) { - siz.wd -= float_round(float_cast(g_mult) * float_cast(shrink(p))); + /* + siz.wd -= float_round(float_cast(g_mult) * float_cast(shrink(p))); + */ + gm += shrink(p); } } if (subtype(p) >= a_leaders) { @@ -1243,6 +1251,13 @@ scaled_whd natural_sizes(halfword p, halfword pp, glue_ratio g_mult, } } + if (g_sign != normal) { + if (g_sign == stretching) { + siz.wd += float_round(float_cast(g_mult) * float_cast(gp)); + } else { + siz.wd -= float_round(float_cast(g_mult) * float_cast(gm)); + } + } return siz; } |