From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Hlavaty Newsgroups: gmane.emacs.bugs Subject: bug#57372: no-toolkit menu popups do not respect emacs font configuration Date: Tue, 23 Aug 2022 22:47:42 +0200 Message-ID: <87lerek7pt.fsf@logand.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4793"; mail-complaints-to="usenet@ciao.gmane.io" To: 57372@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 23 23:09:29 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQb9L-00014A-Qu for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Aug 2022 23:09:27 +0200 Original-Received: from localhost ([::1]:46428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQb9K-0004pz-VC for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Aug 2022 17:09:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQb8x-0004TK-Q0 for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 17:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQb8x-0001qh-HX for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 17:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQb8x-0002Qe-D4 for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 17:09:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tomas Hlavaty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Aug 2022 21:09:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57372 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16612889259282 (code B ref -1); Tue, 23 Aug 2022 21:09:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Aug 2022 21:08:45 +0000 Original-Received: from localhost ([127.0.0.1]:45168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQb8e-0002Pd-ST for submit@debbugs.gnu.org; Tue, 23 Aug 2022 17:08:45 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:60672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQaod-0008A5-Ph for submit@debbugs.gnu.org; Tue, 23 Aug 2022 16:48:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQaod-0005aX-7V for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 16:48:03 -0400 Original-Received: from logand.com ([37.48.87.44]:35024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQaoZ-0007BW-8m for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 16:48:01 -0400 Original-Received: by logand.com (Postfix, from userid 1001) id 904281A176F; Tue, 23 Aug 2022 22:47:46 +0200 (CEST) X-Mailer: emacs 28.1 (via feedmail 11-beta-1 I) Received-SPF: pass client-ip=37.48.87.44; envelope-from=tom@logand.com; helo=logand.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 23 Aug 2022 17:08:43 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240573 Archived-At: 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-") 'increase-text-height) (global-set-key (kbd "C-") 'decrease-text-height) Would it be possible for no-toolkit emacs also respect the default font in popped up menus? Regards Tomas