diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2020-04-21 18:43:36 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2020-04-21 18:43:36 +0000 |
commit | 7c0b908f1a6e1489834fbdb0789766eed8a37b49 (patch) | |
tree | cb55d631b861bfcf95fe853713af6f760227ba0f /Build/source/texk/web2c/luatexdir/tex/texnodes.c | |
parent | e783b071ded7eef421d0333416b47142bc5542cb (diff) |
pplib under libs -- WORK IN PROGRSS grep '?' out
git-svn-id: svn://tug.org/texlive/trunk@54824 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex/texnodes.c')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/texnodes.c | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/texnodes.c b/Build/source/texk/web2c/luatexdir/tex/texnodes.c index 6f1a6280eee..0d7bcd5dec2 100644 --- a/Build/source/texk/web2c/luatexdir/tex/texnodes.c +++ b/Build/source/texk/web2c/luatexdir/tex/texnodes.c @@ -4475,7 +4475,16 @@ halfword new_char(int f, int c) \.{\\rightghost}, respectively. They are going to be removed by |new_ligkern|, at the end of which they are no longer needed. - Here are a few handy helpers used by the list output routines. + Here are a few handy helpers used by the list output routines. The yoffset + has some history but we now give some control over its treatment: + + 0: what we had before + 1: compensate height and depth + 2: compensate height and depth, take max + 3: we keep height and depth + + The modes are controlled by a variable because we need to retain downward + compatibility. */ @@ -4487,20 +4496,24 @@ scaled glyph_width(halfword p) scaled glyph_height(halfword p) { - scaled w = char_height(font(p), character(p)) + y_displace(p); - if (w < 0) - w = 0; - return w; + scaled h = char_height(font(p), character(p)); + scaled y = y_displace(p); + if ((glyph_dimensions_par == 0) || (glyph_dimensions_par == 1) || (glyph_dimensions_par == 2 && y > 0)) + h += y; + if (h < 0) + h = 0; + return h; } -scaled glyph_depth(halfword p) +scaled glyph_depth(halfword p) /* not used */ { - scaled w = char_depth(font(p), character(p)); - if (y_displace(p) > 0) - w = w - y_displace(p); - if (w < 0) - w = 0; - return w; + scaled d = char_depth(font(p), character(p)); + scaled y = y_displace(p); + if ((glyph_dimensions_par == 0 && y > 0) || (glyph_dimensions_par == 1) || (glyph_dimensions_par == 2 && y < 0)) + d -= y; + if (d < 0) + d = 0; + return d; } /*tex |