emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incorrect font weight selected


From: Eli Zaretskii
Subject: Re: Incorrect font weight selected
Date: Wed, 05 Jan 2022 21:07:10 +0200

> From: Yuri D'Elia <wavexx@thregr.org>
> Cc: dgutov@yandex.ru, monnier@iro.umontreal.ca, larsi@gnus.org,
>  emacs-devel@gnu.org
> Date: Wed, 05 Jan 2022 19:08:21 +0100
> 
> > I don't think this would be correct, since frames are supposed to be
> > independent wrt faces.
> 
> MMh, yes, and no? I definitely understand this reasoning, and we need to
> support that no questions here. But purely as as user, when I'm editing
> with multiple frames and I change the default font I certainly want all
> old and new frames to change as a result, which is why we have this odd
> dance.

Your expectations are in general incorrect.  They are due to the fact
that calling set-face-font and similar APIs without the optional FRAME
argument arranges for the change to affect all frames.  But the
low-level code which implements set-face-font only changes the face of
a single frame, and doesn't touch the face definition on other frames.
And the default font generally stands for the font of the default face
of the frame on which you change that face, so it, too, doesn't
necessarily affect other frames.  When we look at low-level code such
as this one, we should always keep that in mind, and avoid leaking the
face definitions to other frames.  The trick of making the change take
effect on other frames is implemented by higher levels.

This is the general background that makes me uneasy to accept the
changes which you suggested, because they seem to violate that general
principle on a very low level.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]