GNU bug report logs - #58538
anti-alias fix results in ugly scaled fonts

Previous Next

Package: emacs;

Reported by: Stephen Gildea <stepheng+emacs <at> gildea.com>

Date: Sat, 15 Oct 2022 04:08:02 UTC

Severity: normal

Tags: moreinfo

Fixed in version 29.0.60

Done: Stephen Gildea <stepheng+emacs <at> gildea.com>

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 58538 in the body.
You can then email your comments to 58538 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#58538; Package emacs. (Sat, 15 Oct 2022 04:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Gildea <stepheng+emacs <at> gildea.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 15 Oct 2022 04:08:02 GMT) Full text and rfc822 format available.

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

From: Stephen Gildea <stepheng+emacs <at> gildea.com>
To: bug-emacs <at> gnu.org
Subject: anti-alias fix results in ugly scaled fonts
Date: Fri, 14 Oct 2022 21:07:23 -0700
At HEAD (29.0.50), I get an ugly scaled font for my sans-serif text.
I noticed it in MH-E, and you can reproduce it as follows:

    emacs -Q -fn fixed --eval "(buffer-face-set 'variable-pitch)"

Although the default font is specified on the command line as "fixed"
(from the misc-fixed X11 family of fonts), and the variable-pitch font
selected is not in the misc-fixed family, having "fixed" as the
default font affects the font selected for the "variable-pitch" face.
Which font it selects changed recently.

This bug seems to have been introduced by commit 6b1ed2f2c9,
"Fix antialias face attribute when text is scaled", 27 August.

In an Emacs built before that commit, the above command displays text
with a pretty sans-serif font.

That commit undoes some of the changes that addressed bug#17973.
Bug#17973 fixed display of misc-fixed fonts.  With that recent commit,
using misc-fixed fonts again breaks some faces.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58538; Package emacs. (Sat, 15 Oct 2022 07:36:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Gildea <stepheng+emacs <at> gildea.com>
Cc: 58538 <at> debbugs.gnu.org
Subject: Re: bug#58538: anti-alias fix results in ugly scaled fonts
Date: Sat, 15 Oct 2022 10:34:57 +0300
> From: Stephen Gildea <stepheng+emacs <at> gildea.com>
> Date: Fri, 14 Oct 2022 21:07:23 -0700
> 
> At HEAD, I get an ugly scaled font for my sans-serif text.
> I noticed it in MH-E, and you can reproduce it as follows:
> 
>     emacs -Q -fn fixed --eval "(buffer-face-set 'variable-pitch)"
> 
> Although the default font is specified on the command line as "fixed"
> (from the misc-fixed X11 family of fonts), and the variable-pitch font
> selected is not in the misc-fixed family, having "fixed" as the
> default font affects the font selected for the "variable-pitch" face.
> Which font it selects changed recently.
> 
> This bug seems to have been introduced by commit 6b1ed2f2c9,
> "Fix antialias face attribute when text is scaled", 27 August.
> 
> In an Emacs built before that commit, the above command displays text
> with a pretty sans-serif font.

The above works fine on my system: I get a "fixed" font without the
"--eval" argument, and variable-pitch font with it, as expected.

It sounds like so do you, but you don't like the variable-pitch font
you get, is that so?  If so, then the problem is with the fonts you
have installed, not necessarily with what Emacs produces.  That is,
assuming you do get variable-pitch font in the buffer, why are you
saying that Emacs doesn't perform correctly?  The font being "ugly" is
something only you know.

I'm guessing that what you see is due to some attributes of the
"fixed" font used as the default face's font.  The commit you
identified as the culprit preserves the attributes of the original
font which the face doesn't override, instead of throwing them away.
So I think the pretty sans-serif font you wanted to see is rejected
because it doesn't fit some of those attributes of the default face's
font.  Can you try figuring out which attribute(s) are those?  It
could be the :weight attribute, for example (the "medium" vs "regular"
issue, which is new in Emacs 29), or maybe :size.

> That commit undoes some of the changes that addressed bug#17973.
> Bug#17973 fixed display of misc-fixed fonts.  With that recent commit,
> using misc-fixed fonts again breaks some faces.

Please tell the details: which faces are broken and how?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58538; Package emacs. (Sat, 15 Oct 2022 10:40:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stephen Gildea <stepheng+emacs <at> gildea.com>
Cc: 58538 <at> debbugs.gnu.org
Subject: Re: bug#58538: anti-alias fix results in ugly scaled fonts
Date: Sat, 15 Oct 2022 12:38:59 +0200
[Message part 1 (text/plain, inline)]
Stephen Gildea <stepheng+emacs <at> gildea.com> writes:

> At HEAD (29.0.50), I get an ugly scaled font for my sans-serif text.
> I noticed it in MH-E, and you can reproduce it as follows:
>
>     emacs -Q -fn fixed --eval "(buffer-face-set 'variable-pitch)"
>
> Although the default font is specified on the command line as "fixed"
> (from the misc-fixed X11 family of fonts), and the variable-pitch font
> selected is not in the misc-fixed family, having "fixed" as the
> default font affects the font selected for the "variable-pitch" face.
> Which font it selects changed recently.

You didn't include the output from `M-x report-emacs-bug' -- what OS are
you running Emacs on?

On the current Ubuntu, your recipe gives me:

[Message part 2 (image/png, inline)]
[Message part 3 (text/plain, inline)]
Without "-fn fixed", I get:

[Message part 4 (image/png, inline)]
[Message part 5 (text/plain, inline)]
Which looks like the same font for `variable-pitch' to me, only a lot
larger (since this is a HiDPI screen and the "fixed" font is tiny here).

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58538; Package emacs. (Sat, 15 Oct 2022 15:32:02 GMT) Full text and rfc822 format available.

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

From: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
To: Stephen Gildea <stepheng+emacs <at> gildea.com>
Cc: 58538 <at> debbugs.gnu.org
Subject: Re: bug#58538: anti-alias fix results in ugly scaled fonts
Date: Sat, 15 Oct 2022 08:31:25 -0700
[Message part 1 (text/plain, inline)]
Hi Stephen, can you post screenshots of what you currently get and what
you expected?

I wonder if the difference has something to do with the font registry.

With 

  /usr/new/bin/emacs -Q -fn "-*-fixed-*-*-*-*-*-*-*-*-*-*-*-*" --eval "(buffer-face-set 'variable-pitch)"

or

  /usr/new/bin/emacs -Q -fn "-*-fixed-*-*-*-*-*-*-*-*-*-*-jisx0201.1976-*" --eval "(buffer-face-set 'variable-pitch)"

I get

[default-registry.png (image/png, inline)]
[Message part 3 (text/plain, inline)]
With

  /usr/new/bin/emacs -Q -fn "-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-*" --eval "(buffer-face-set 'variable-pitch)"

or

  /usr/new/bin/emacs -Q -fn "-*-fixed-*-*-*-*-*-*-*-*-*-*-iso8859-*" --eval "(buffer-face-set 'variable-pitch)"

I get

[iso-mumble-registry.png (image/png, inline)]
[Message part 5 (text/plain, inline)]
(This is on Debian Bullseye, running i3.)

mike

Added tag(s) moreinfo. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 12 Nov 2022 20:59:04 GMT) Full text and rfc822 format available.

Reply sent to Stephen Gildea <stepheng+emacs <at> gildea.com>:
You have taken responsibility. (Wed, 01 Feb 2023 05:48:01 GMT) Full text and rfc822 format available.

Notification sent to Stephen Gildea <stepheng+emacs <at> gildea.com>:
bug acknowledged by developer. (Wed, 01 Feb 2023 05:48:02 GMT) Full text and rfc822 format available.

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

From: Stephen Gildea <stepheng+emacs <at> gildea.com>
To: 58538-done <at> debbugs.gnu.org
Subject: Re: bug#58538: anti-alias fix results in ugly scaled fonts
Date: Tue, 31 Jan 2023 21:34:33 -0800
Version: 29.0.60

This bug was fixed 10 Dec 2022 by commit 30e3cb2135, "Unset the weight/slant/width in the spec when realizing a font".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58538; Package emacs. (Wed, 01 Feb 2023 09:05:02 GMT) Full text and rfc822 format available.

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

From: Gregory Heytings <gregory <at> heytings.org>
To: Stephen Gildea <stepheng+emacs <at> gildea.com>
Cc: 58538-done <at> debbugs.gnu.org
Subject: Re: bug#58538: anti-alias fix results in ugly scaled fonts
Date: Wed, 01 Feb 2023 09:04:28 +0000
>
> This bug was fixed 10 Dec 2022 by commit 30e3cb2135, "Unset the 
> weight/slant/width in the spec when realizing a font".
>

Would you mind sharing more details, and if possible a reproducer, about 
that bug?  What do you see and what would you expect to see, what do you 
mean by "ugly", which fonts do you use and how do you scale them, ...?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58538; Package emacs. (Wed, 01 Feb 2023 13:51:01 GMT) Full text and rfc822 format available.

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

From: Gregory Heytings <gregory <at> heytings.org>
To: Stephen Gildea <stepheng+emacs <at> gildea.com>
Cc: 58538-done <at> debbugs.gnu.org
Subject: Re: bug#58538: anti-alias fix results in ugly scaled fonts
Date: Wed, 01 Feb 2023 13:50:41 +0000
>
> This bug was fixed 10 Dec 2022 by commit 30e3cb2135, "Unset the 
> weight/slant/width in the spec when realizing a font".
>

Sorry, please ignore my previous post, I've misread yours.  You wrote that 
the bug is fixed, and closed it.  Somehow I thought you were opening a new 
bug.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58538; Package emacs. (Thu, 02 Feb 2023 05:27:02 GMT) Full text and rfc822 format available.

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

From: Po Lu <luangruo <at> yahoo.com>
To: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
Cc: Stephen Gildea <stepheng+emacs <at> gildea.com>, 58538 <at> debbugs.gnu.org
Subject: Re: bug#58538: anti-alias fix results in ugly scaled fonts
Date: Thu, 02 Feb 2023 13:25:06 +0800
Mike Kupfer <mkupfer <at> alum.berkeley.edu> writes:

> Hi Stephen, can you post screenshots of what you currently get and what
> you expected?
>
> I wonder if the difference has something to do with the font registry.
>
> With 
>
>   /usr/new/bin/emacs -Q -fn "-*-fixed-*-*-*-*-*-*-*-*-*-*-*-*" --eval "(buffer-face-set 'variable-pitch)"
>
> or
>
>   /usr/new/bin/emacs -Q -fn "-*-fixed-*-*-*-*-*-*-*-*-*-*-jisx0201.1976-*" --eval "(buffer-face-set 'variable-pitch)"
>
> I get
>
>  
>
>
> With
>
>   /usr/new/bin/emacs -Q -fn "-*-fixed-*-*-*-*-*-*-*-*-*-*-iso10646-*" --eval "(buffer-face-set 'variable-pitch)"
>
> or
>
>   /usr/new/bin/emacs -Q -fn "-*-fixed-*-*-*-*-*-*-*-*-*-*-iso8859-*" --eval "(buffer-face-set 'variable-pitch)"
>
> I get
>
>  
>
>
> (This is on Debian Bullseye, running i3.)
>
> mike

Well yes, you will get a different font depending on what character set
you ask for.

The ``registry'' is technically the organization that has registered the
character set with the X Consortium, but that age is long over.  In
Emacs, it in effect means the character set.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 02 Mar 2023 12:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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