[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: slanted typewriter font / txicodevaristt yields a spurious space bef
From: |
Vincent Lefevre |
Subject: |
Re: slanted typewriter font / txicodevaristt yields a spurious space before a closing parenthesis in the text |
Date: |
Mon, 12 Sep 2022 03:34:44 +0200 |
User-agent: |
Mutt/2.2.7+37 (a90f69b9) vl-149028 (2022-09-02) |
[Cc'ed back to bug-texinfo]
On 2022-09-06 21:39:33 +0100, Gavin Smith wrote:
> On Mon, Sep 05, 2022 at 02:40:44AM +0200, Vincent Lefevre wrote:
> > Commit 18389820e7059724edfcd616e8bfafb376c5b9e1 introduced
> > a regression. Consider
> >
> > @code{(@var{b},@var{p})}
> >
> > Previous this commit, the text contains "(b,p)" as expected.
> > But since this commit, I get "(b,p )", with a space between "p"
> > and the closing parenthesis.
> >
> > This affects the text obtained with the pdftotext utility, but
> > also, with various PDF viewers, searching for text and copying
> > text.
>
> I believe it is something to do with the italic correction. This
> can be seen for other inputs: @i{aaaaaaaaaal}a appears to generate
> a space between the l and the a when it is copied from the PDF.
>
> I'm struggling to understand this - I don't understand when it inserts
> a space and when it doesn't. Here is a plain TeX input:
>
> \font\ttsl=cmsltt10
> {\ttsl p\/})
>
> ({\ttsl p\/})
>
> \end
>
> In the PDF output, the second line appears to have a space after the
> p while the first doesn't. (This might be a problem with the PDF
> readers I used - I checked evince and xreader.) Visually they look
> the same apart from the opening bracket at the start. Also copying
> and pasting has a space in both - so probably a PDF reader bug.
>
> Maybe there is some issue with the italic corrections for the ttsl
> font. If I have time I will check older versions of texinfo.tex to
> see if the problem existed there.
Actually this is not just a text issue. This is also visually
different: alignment has been broken.
For instance, consider
@code{(@var{b},@var{p})(@var{b},@var{p})(@var{b},@var{p})(@var{b},@var{p})}@*
@code{12345678901234567890}
With texinfo.tex 2020-02-11.09 (currently used for MPFR), alignment
is perfect: I get
(b,p)(b,p)(b,p)(b,p)
12345678901234567890
(with "b" and "p" in italics), where the last characters of each
line are vertically aligned. This is still true with texinfo.tex
2022-08-13.11 (commit f0c48d71fa1c08f9c10547835f1a4a71e830af0f).
But 2022-08-13.12 (commit b3abe7731dd2aaaf33007155d0bbeeb53bcae141),
slanted typewriter is no longer used.
Slanted typewriter was re-added in texinfo.tex 2022-08-26.23
(commit 18389820e7059724edfcd616e8bfafb376c5b9e1), mentioned above,
but with additional spacing.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)