Subject: Re: bug#57372: no-toolkit menu popups do not respect emacs font configuration

From: Po Lu <[email-masked]>
Date: Thu, 25 Aug 2022 09:40:08 +0800

Tomas Hlavaty <[email-masked]> writes:

> The point of C-+ and C-- bindings is that I can just press a key and
> grow or shrink the font.  That is essential for me.  My gui terminal can
> do that out of the box, my console can do that with a bit of elisp
> calling setfont, firefox can do that out of the box, and gui Emacs can
> do that using the code I showed earlier; except the menu text we are
> discussing.
>
> This font size change happens on demand, when a key is pressed.
>
> I guess writing to the ~/.Xresources file would work only on startup.
>
> Then there seems to be the issue you said that Emacs and X has different
> idea of describing fonts/units.
>
> It is just complex and inconvenient.

That's what happens if you use libraries for menus, since they obviously
know nothing about what faces are.

>> More generally, I don't see a way around the fact that different parts
>> of the system need to be customized differently.
>
> Why?
>
> At the moment, it is the consequence of the way the no-toolkit menu is
> implemented.
>
> But surely it could be possible to change it to customize no-toolkit
> menu text the same way as any other face.

Possible, but very difficult.  It's easier to do that on Motif and
Lucid, but that is still not reliable, since different font subsystems
are being used.

> This is about making it not to have more init files, because unlike
> customizing and changing faces, customizing a different system out of
> Emacs is complex, fragile, inconvenient and might be impossible (is it
> possible to change the menu text X resource on key press?).

No, Emacs only loads the X resource database on display initialization.