bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#57372: no-toolkit menu popups do not respect emacs font configuratio


From: Tomas Hlavaty
Subject: bug#57372: no-toolkit menu popups do not respect emacs font configuration
Date: Tue, 23 Aug 2022 22:47:42 +0200

Hi

I would like to switch to no-toolkit gui emacs 28 but popped up menus do
not respect emacs font configuration.  This looks like the only thing
preventing me from switching.  (Unlike any toolkit emacs, menu bar with
no-toolkit uses the right font.)

I have this in my gui .emacs:

(custom-set-faces
 '(default ((t (:inherit nil :stipple nil :background "white" :foreground 
"black" :inverse-video nil :box nil :strike-through nil :overline nil 
:underline nil :slant normal :weight normal :height 200 :width normal :foundry 
"PfEd" :family "DejaVu Sans Mono")))))

and it seems that the only thing which does not respect that
configuration is the popped up menu text.

I often use C-+ and C-- to resize the default font and this does not
work in menus (except with the console emacs obviously, where there is
one font only and is resized by the console and not emacs).

emacs font resizing I found in emacs works per buffer but I want
it to work globally so I use:

(defun text-height ()
  (face-attribute 'default :height))
(defun set-text-height (new-height)
  (set-face-attribute 'default nil :height new-height))
(defvar text-height-factor (sqrt (sqrt 2)))
(defvar text-height-min 50)
(defvar text-height-max 500)
(defvar text-height-default (text-height))
(defun increase-text-height ()
  (interactive)
  (set-text-height
    (min text-height-max
         (round (* (text-height) text-height-factor)))))
(defun decrease-text-height ()
  (interactive)
  (set-text-height
    (max text-height-min
         (round (/ (text-height) text-height-factor)))))
(defun reset-text-height ()
  (interactive)
  (set-text-height text-height-default))
(global-set-key (kbd "C-+") 'increase-text-height)
(global-set-key (kbd "C--") 'decrease-text-height)
(global-set-key (kbd "C-0") 'reset-text-height)
(global-set-key (kbd "C-<mouse-4>") 'increase-text-height)
(global-set-key (kbd "C-<mouse-5>") 'decrease-text-height)

Would it be possible for no-toolkit emacs also respect the default font
in popped up menus?

Regards

Tomas





reply via email to

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