Subject: Re: bug#46971: 28.0.50; Fontifications in Info buffers break alignment in @multitable

From: Stefan Kangas <[email-masked]>
Date: Sun, 26 Sep 2021 07:34:24 -0700

Eli Zaretskii <[email-masked]> writes:

> To reproduce:
>
>   emacs -Q
>   C-u C-h i ../info/elisp.info RET
>   C-s Syntax name

> You should now see the table of syntax categories.  The characters in
> the rightmost column don't align, which looks ugly.
>
> This happens because font-lock is instructed to do this:
>
>   (defvar Info-mode-font-lock-keywords
>     '(("‘\\([‘’]\\|[^‘’]*\\)’" (1 'Info-quoted))))
>
> Thus the quotes and the quoted text use different faces, and if those
> faces use different fonts (as they do by default), the table will not
> be aligned.
>
> One possible solution would be to modify Info-mode-font-lock-keywords
> such that the quotes are also fontified in Info-quoted face.

That fix solves this issue in "emacs -Q" here, but not in my personal
Emacs configuration where I use a different font.

In "emacs -Q" I have these fonts for the column text (1), and the
whitespace in between columns (2), and everything lines up:

  1. ftcrhb:-bitstream-Courier 10
Pitch-normal-normal-normal-*-16-*-*-*-m-0-iso10646-1 (#x08)
  2. ftcrhb:-Bits-Bitstream Vera Sans
Mono-normal-normal-normal-*-16-*-*-*-m-0-iso10646-1 (#x03)

With my personal configuration, I have these fonts for the column text
(1), and the whitespace in between (2), and the alignment is wrong (see
screenshots below):

  1. ftcrhb:-Bits-Bitstream Vera Sans
Mono-normal-normal-normal-*-21-*-*-*-m-0-iso10646-1 (#xB7)
  2. ftcrhb:-DAMA-Ubuntu
Mono-normal-normal-normal-*-21-*-*-*-m-0-iso10646-1 (#x03)

I don't know if this is relevant, but in "emacs -Q", the cursor stays
the same size when I move it from a character using font 1 to one using
font 2.

With my personal Emacs configuration, the cursor gets noticeably smaller
when I move it from a character using font 1 to one using font 2.  The
attached screenshots demonstrate this effect.