GNU bug report logs - #46971
28.0.50; Fontifications in Info buffers break alignment in @multitable

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Sat, 6 Mar 2021 17:17:01 UTC

Severity: minor

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 46971 <at> debbugs.gnu.org
Subject: bug#46971: 28.0.50; Fontifications in Info buffers break alignment in @multitable
Date: Sun, 26 Sep 2021 07:34:24 -0700
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> 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.
[screenshot1.png (image/png, attachment)]
[screenshot2.png (image/png, attachment)]

This bug report was last modified 3 years and 318 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.