unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: gnubugs@gedanken.org.uk (Andrew M. Bishop),
	Kenichi Handa <handa@gnu.org>
Cc: 22780@debbugs.gnu.org, alex@khesin.com
Subject: bug#22780: 25.1.50; wrong average width picked for bold face for 7x13 X11 font
Date: Wed, 15 Mar 2017 17:39:32 +0200	[thread overview]
Message-ID: <83wpbqa6rv.fsf@gnu.org> (raw)
In-Reply-To: <1cnsT0-0000ii-Ph@gedanken.org.uk> (gnubugs@gedanken.org.uk)

> From: gnubugs@gedanken.org.uk (Andrew M. Bishop)
> Date: Tue, 14 Mar 2017 19:50:40 +0000
> Cc: alex@khesin.com
> 
> I have also found this problem since I use 7x13 as my default font.
> The widening of the bold version of this font makes Emacs version 25
> unusable by me.
> 
> Using Alex Khesin's test case:
> 
> $ emacs -Q --eval '(progn (set-face-font '\''default "7x13") (print (face-font "default")) (print (face-font "bold")))'
> 
> I find that these fonts all work correctly (the width is the same for
> normal and bold versions):  6x9, 6x10, 6x12, 6x13, 7x14, 8x13, 8x16.
> 
> It is only the 7x13 font that does not scale correctly since it gives
> different widths (80 compared to 70) for the bold compared to normal
> font:
> 
>   -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
> 
> 
> Using 'git bisect' I traced down the change that caused it and
> demonstrated that it can be fixed by this patch.
> 
> -------------------- src/xfaces.c patch --------------------
> diff --git a/src/xfaces.c b/src/xfaces.c
> index 5077cb2d94..c898b7886f 100644
> --- a/src/xfaces.c
> +++ b/src/xfaces.c
> @@ -5485,7 +5485,7 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE])
>  	}
>        if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX]))
>  	attrs[LFACE_FONT_INDEX]
> -	  = font_load_for_lface (f, attrs, Ffont_spec (0, NULL));
> +	  = font_load_for_lface (f, attrs, attrs[LFACE_FONT_INDEX]);
>        if (FONT_OBJECT_P (attrs[LFACE_FONT_INDEX]))
>  	{
>  	  face->font = XFONT_OBJECT (attrs[LFACE_FONT_INDEX]);
> -------------------- src/xfaces.c patch --------------------
> 
> This reverts a patch that was made as part of bug #17973.  The change
> in src/font.c that was also made in that bug report seems to not be
> relevant.
> 
> This is clearly a regression from Emacs 24 but since this change was
> made to fix another bug it might be quite difficult to find a change
> that works for both.

I'm CC'ing Handa-san who was involved in solving that bug.  Reverting
the solution for that bug is clearly not TRT, but I hope Handa-san
will have comments about your particular problem.

Thanks.





  reply	other threads:[~2017-03-15 15:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23  5:41 bug#22780: 25.1.50; wrong average width picked for bold face for 7x13 X11 font Alex Khesin
2016-09-14 14:15 ` Philipp Stephani
2016-09-14 16:49   ` Eli Zaretskii
2017-03-14 19:50 ` Andrew M. Bishop
2017-03-15 15:39   ` Eli Zaretskii [this message]
2019-11-17  6:55     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83wpbqa6rv.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=22780@debbugs.gnu.org \
    --cc=alex@khesin.com \
    --cc=gnubugs@gedanken.org.uk \
    --cc=handa@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).