GNU bug report logs - #68157
30.0.50; Size of selected font is wrong

Previous Next

Package: emacs;

Reported by: Arash Esbati <arash <at> gnu.org>

Date: Sat, 30 Dec 2023 21:50:02 UTC

Severity: normal

Found in version 30.0.50

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68157 in the body.
You can then email your comments to 68157 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#68157; Package emacs. (Sat, 30 Dec 2023 21:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arash Esbati <arash <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 30 Dec 2023 21:50:02 GMT) Full text and rfc822 format available.

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

From: Arash Esbati <arash <at> gnu.org>
To: "emacs-bugs" <bug-gnu-emacs <at> gnu.org>
Subject: 30.0.50; Size of selected font is wrong
Date: Sat, 30 Dec 2023 22:49:15 +0100
Hi all,

I didn't bisect this, but when I select another font than the standard
one, the size is wrong.  To reproduce:

  • emacs -Q
  • In scratch, enter 'o', put point on it and enter 'C-u C-x ='.  I see
      mac-ct:-*-Menlo-regular-normal-normal-*-12-*-*-*-m-0-iso10646-1 (#x52)
  • Now choose a new font from 'Options -> Set Default Font', I took
    'Source Code Pro' at 11pt.  Going back to 'o', I now get:
      mac-ct:-*-Menlo-regular-normal-normal-*-22-*-*-*-m-0-iso10646-1 (#x52)
  • Choose another font, I took 'Courier New' at 10pt, I get:
      mac-ct:-*-Courier New-regular-normal-normal-*-20-*-*-*-m-0-iso10646-1 (#x52)

Can others reproduce this?  I didn't have any issues like this until
now.  This means that my setting:

  (custom-set-faces
   '(default ((t (:family "Source Code Pro" :foundry "nil"
                  :slant normal :weight medium :height 110 :width normal)))))

works no more.

Best, Arash

In GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin23.2.0, NS
 appkit-2487.30 Version 14.2.1 (Build 23C71)) of 2023-12-30 built on
 MacMutant.fritz.box
Repository revision: fc8a20f79274a2e533722f636cb538d7f8fb5427
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2487
System Description:  macOS 14.2.1

Configured using:
 'configure --with-ns --without-pop --without-mailutils --with-threads
 --with-modules --with-native-compilation --without-compress-install
 'CFLAGS=-O2 -g0 -pipe'
 'CPPFLAGS=-I/opt/homebrew/Cellar/gcc/13.2.0/include
 -I/opt/homebrew/Cellar/libgccjit/13.2.0/include
 -I/opt/homebrew/Cellar/gmp/6.3.0/include'
 'LDFLAGS=-L/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current
 -L/opt/homebrew/Cellar/gmp/6.3.0/lib''

Configured features:
ACL GLIB GMP GNUTLS JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE
NS PDUMPER PNG RSVG SQLITE3 THREADS TOOLKIT_SCROLL_BARS TREE_SITTER WEBP
XIM ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68157; Package emacs. (Sat, 30 Dec 2023 22:31:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Arash Esbati <arash <at> gnu.org>, 68157 <at> debbugs.gnu.org
Subject: Re: bug#68157: 30.0.50; Size of selected font is wrong
Date: Sat, 30 Dec 2023 14:30:13 -0800
Arash Esbati <arash <at> gnu.org> writes:

> I didn't bisect this, but when I select another font than the standard
> one, the size is wrong.

Could you please explain how the size is wrong?
What do you expect and what happens?

Also, does `C-x C-M-0 +' work?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68157; Package emacs. (Sat, 30 Dec 2023 23:01:02 GMT) Full text and rfc822 format available.

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

From: Arash Esbati <arash <at> gnu.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 68157 <at> debbugs.gnu.org
Subject: Re: bug#68157: 30.0.50; Size of selected font is wrong
Date: Sun, 31 Dec 2023 00:00:08 +0100
Stefan Kangas <stefankangas <at> gmail.com> writes:

> Could you please explain how the size is wrong?

The size of the font selected is way too large:

  • I select 'Source Code Pro' at 11pt and get 22pt[1]:
      mac-ct:-*-Source Code Pro-regular-normal-normal-*-22-*-*-*-m-0-iso10646-1 (#x01)
  • I select 'Courier New' at 10pt and get 20pt:
      mac-ct:-*-Courier New-regular-normal-normal-*-20-*-*-*-m-0-iso10646-1 (#x52)

I had this in my custom file:

  (custom-set-faces
   '(default ((t (:family "Source Code Pro" :foundry "nil" :slant normal
                  :weight medium :height 110 :width normal))))

which now gives a huge font.  I had to turn it into:

  (custom-set-faces
   '(default ((t (:family "Source Code Pro" :foundry "nil" :slant normal
                  :weight medium :height 55 :width normal))))

in order to get back to normal state with:

  mac-ct:-*-Source Code Pro-medium-normal-normal-*-11-*-*-*-m-0-iso10646-1 (#x29)

> Also, does `C-x C-M-0 +' work?

Yes, but the baseline is the large font size as described above.

Best, Arash

Footnotes:
[1]  I pasted the wrong snippet in my last message; sorry.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68157; Package emacs. (Sat, 30 Dec 2023 23:17:02 GMT) Full text and rfc822 format available.

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

From: Alan Third <alan <at> idiocy.org>
To: Arash Esbati <arash <at> gnu.org>
Cc: 68157 <at> debbugs.gnu.org
Subject: Re: bug#68157: 30.0.50; Size of selected font is wrong
Date: Sat, 30 Dec 2023 23:16:46 +0000
On Sat, Dec 30, 2023 at 10:49:15PM +0100, Arash Esbati wrote:
> Hi all,
> 
> I didn't bisect this, but when I select another font than the standard
> one, the size is wrong.  To reproduce:
> 
>   • emacs -Q
>   • In scratch, enter 'o', put point on it and enter 'C-u C-x ='.  I see
>       mac-ct:-*-Menlo-regular-normal-normal-*-12-*-*-*-m-0-iso10646-1 (#x52)
>   • Now choose a new font from 'Options -> Set Default Font', I took
>     'Source Code Pro' at 11pt.  Going back to 'o', I now get:
>       mac-ct:-*-Menlo-regular-normal-normal-*-22-*-*-*-m-0-iso10646-1 (#x52)
>   • Choose another font, I took 'Courier New' at 10pt, I get:
>       mac-ct:-*-Courier New-regular-normal-normal-*-20-*-*-*-m-0-iso10646-1 (#x52)
> 
> Can others reproduce this?  I didn't have any issues like this until
> now.  This means that my setting:
> 
>   (custom-set-faces
>    '(default ((t (:family "Source Code Pro" :foundry "nil"
>                   :slant normal :weight medium :height 110 :width normal)))))
> 
> works no more.

Can you please try reverting change f3dec3439fd5aee885a76622f384f6c7ca67d128?

-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68157; Package emacs. (Sun, 31 Dec 2023 01:18:01 GMT) Full text and rfc822 format available.

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

From: Po Lu <luangruo <at> yahoo.com>
To: Alan Third <alan <at> idiocy.org>
Cc: 68157 <at> debbugs.gnu.org, Arash Esbati <arash <at> gnu.org>
Subject: Re: bug#68157: 30.0.50; Size of selected font is wrong
Date: Sun, 31 Dec 2023 09:16:55 +0800
Alan Third <alan <at> idiocy.org> writes:

> Can you please try reverting change
> f3dec3439fd5aee885a76622f384f6c7ca67d128?

If this commit produced a change in the values of resx and resy, it is
the likely culprit.  On window systems which scale graphics operations
to match the display density, resx and resy should NOT be set to that
density, but rather the density the window system expects graphics
operations to be issued while assuming.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68157; Package emacs. (Sun, 31 Dec 2023 08:35:02 GMT) Full text and rfc822 format available.

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

From: Arash Esbati <arash <at> gnu.org>
To: Alan Third <alan <at> idiocy.org>
Cc: 68157 <at> debbugs.gnu.org
Subject: Re: bug#68157: 30.0.50; Size of selected font is wrong
Date: Sun, 31 Dec 2023 09:34:31 +0100
Alan Third <alan <at> idiocy.org> writes:

> Can you please try reverting change f3dec3439fd5aee885a76622f384f6c7ca67d128?

Thanks, reverting that change fixes the issue.

Best, Arash




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68157; Package emacs. (Sun, 31 Dec 2023 10:28:02 GMT) Full text and rfc822 format available.

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

From: Alan Third <alan <at> idiocy.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 68157 <at> debbugs.gnu.org, Arash Esbati <arash <at> gnu.org>
Subject: Re: bug#68157: 30.0.50; Size of selected font is wrong
Date: Sun, 31 Dec 2023 10:27:36 +0000
On Sun, Dec 31, 2023 at 09:16:55AM +0800, Po Lu wrote:
> Alan Third <alan <at> idiocy.org> writes:
> 
> > Can you please try reverting change
> > f3dec3439fd5aee885a76622f384f6c7ca67d128?
> 
> If this commit produced a change in the values of resx and resy, it is
> the likely culprit.

It didn't in my testing.

> On window systems which scale graphics operations
> to match the display density, resx and resy should NOT be set to that
> density, but rather the density the window system expects graphics
> operations to be issued while assuming.

Indeed.
-- 
Alan Third




Reply sent to Alan Third <alan <at> idiocy.org>:
You have taken responsibility. (Sun, 31 Dec 2023 10:32:01 GMT) Full text and rfc822 format available.

Notification sent to Arash Esbati <arash <at> gnu.org>:
bug acknowledged by developer. (Sun, 31 Dec 2023 10:32:01 GMT) Full text and rfc822 format available.

Message #28 received at 68157-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Arash Esbati <arash <at> gnu.org>
Cc: 68157-done <at> debbugs.gnu.org
Subject: Re: bug#68157: 30.0.50; Size of selected font is wrong
Date: Sun, 31 Dec 2023 10:31:06 +0000
On Sun, Dec 31, 2023 at 09:34:31AM +0100, Arash Esbati wrote:
> Alan Third <alan <at> idiocy.org> writes:
> 
> > Can you please try reverting change f3dec3439fd5aee885a76622f384f6c7ca67d128?
> 
> Thanks, reverting that change fixes the issue.

Thanks. I've reverted the change on master now and am closing the bug
report.

-- 
Alan Third




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 28 Jan 2024 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 202 days ago.

Previous Next


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