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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 24 Aug 2022 22:33:37 +0300

> From: Tomas Hlavaty <[email-masked]>
> Cc: [email-masked], [email-masked]
> Date: Wed, 24 Aug 2022 21:01:20 +0200
> 
> On Wed 24 Aug 2022 at 20:59, Eli Zaretskii <[email-masked]> wrote:
> >> I find the alien X resource fonts the ugliest, unreadable and very
> >> inconvenient because the font size is completely wrong and inconvenient
> >> to control.
> >
> > But you can customize that via the X resources, can't you?  Just tell
> > the menus to use the same font Emacs uses for its default face.
> 
> I suppose it is possible, but complex and inconvenient.
> Why do I need to do that in the first place?
> 
> In my example, I had a function like this:
> 
> (defun set-text-height (new-height)
>   (set-face-attribute 'default nil :height new-height))
> 
> How could I achieve what you suggest so that setting the font height
> would also apply to menu item X resource font?

Make the function write to the ~/.Xresources file?

Of course, X doesn't necessarily understand the Emacs units of
measuring fonts, for example the relative units.  So eventually you'll
need separate customizations.  However, I don't expect you to have to
change these customizations too frequently.

More generally, I don't see a way around the fact that different parts
of the system need to be customized differently.  Many programs have
their own init files, and some even have more than one: for example,
Bash, GDB, and any other program that uses Readline will typically
have customizations in ~/.inputrc, in addition to the program-specific
init file, such as ~/.gdbinit for GDB.