GNU bug report logs - #22780
25.1.50; wrong average width picked for bold face for 7x13 X11 font

Previous Next

Package: emacs;

Reported by: Alex Khesin <alex <at> khesin.com>

Date: Tue, 23 Feb 2016 07:20:01 UTC

Severity: normal

Merged with 30203

Found in versions 25.1.50, 25.3

Full log


Message #11 received at 22780 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 22780 <at> debbugs.gnu.org, alex <at> khesin.com
Subject: Re: bug#22780: 25.1.50;
 wrong average width picked for bold face for 7x13 X11 font
Date: Wed, 14 Sep 2016 19:49:31 +0300
> From: Philipp Stephani <p.stephani2 <at> gmail.com>
> Date: Wed, 14 Sep 2016 14:15:47 +0000
> 
> Alex Khesin <alex <at> khesin.com> schrieb am Di., 23. Feb. 2016 um 08:20 Uhr:
> 
>  emacs 25 choses fonts with different average width for 7x13 font, making bold text take more horizontal
>  space. This is particularly a problem when using themes like https://github.com/bbatsov/zenburn-emacs
>  which use bold to hihglight matching parenthesis in show-paren-mode, causing characters to shift as
>  the cursor is moved from a parenthesis to a non-parenthesis character.
> 
>  Repro that demonstrates the problem in both 25 pretest 1 and current head (but is perfectly ok in emacs
>  24):
> 
>  $ emacs -Q --eval '(progn (set-face-font '\''default "7x13") (print (face-font "default")) (print (face-font
>  "bold")))'
> 
>  shows
>  -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso8859-1
>  -misc-fixed-bold-r-normal--13-120-75-75-c-80-iso8859-1
> 
>  Notice the jump from 70 to 80 before the iso8859 component - that's the average width, and that's what
>  I believe is causing bold characters to render wider than non-bold ones. Both are 70 in emacs 24.
> 
> This appears to be a regression from Emacs 24. Would be great if somebody who has knowledge about this
> area could look into this. 

Alas, we don't have such experts on board.  Moreover, I could be
wrong, but I don't think font selection has seen any changes between
Emacs 24 and 25.

Perhaps the best way ahead is for someone who sees the problem to
revert changes since Emacs 24.5 to xftfont.c, ftfont.c, and font.c one
by one, and see which one causes the problem.  There are only a few
changes there that affect the code and font selection in particular.

Sorry, but I have no better advice.




This bug report was last modified 5 years and 221 days ago.

Previous Next


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