From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Protesilaos Stavrou Newsgroups: gmane.emacs.devel Subject: Re: Emacs master: different (ugly) font in org-mode [Windows, macOS] Date: Mon, 04 Oct 2021 22:40:55 +0300 Message-ID: <87sfxgr320.fsf@protesilaos.com> References: <1758826875.387473.1633124447794@mail1.libero.it> <87a6jsqbhq.fsf@protesilaos.com> <1048176278.452440.1633374684696@mail1.libero.it> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8401"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Notmuch/0.33.2 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) To: Angelo Graziosi , "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 04 21:41:58 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mXTqX-0001ry-De for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Oct 2021 21:41:57 +0200 Original-Received: from localhost ([::1]:37802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXTqV-0004eS-HB for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Oct 2021 15:41:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXTpf-0003H9-Ja for emacs-devel@gnu.org; Mon, 04 Oct 2021 15:41:03 -0400 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:36007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXTpd-0000N0-H0 for emacs-devel@gnu.org; Mon, 04 Oct 2021 15:41:03 -0400 Original-Received: (Authenticated sender: public@protesilaos.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 84C581C0007; Mon, 4 Oct 2021 19:40:57 +0000 (UTC) In-Reply-To: <1048176278.452440.1633374684696@mail1.libero.it> Received-SPF: none client-ip=217.70.183.197; envelope-from=info@protesilaos.com; helo=relay5-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:276259 Archived-At: On 2021-10-04, 21:11 +0200, Angelo Graziosi wrote: >> Il 02/10/2021 06:47 Protesilaos Stavrou ha scritto: >> >> >> On 2021-10-01, 23:40 +0200, Angelo Graziosi wrote: >> >> > I use JetBrains Mono font in Emacs and in today build from master, the >> > Org documents display a different ugly (in my opinion) font. See the >> > fields > > [... 34 lines elided] > >> This must be because in Org 9.5 those constructs inherit from the >> 'variable-pitch' face. The idea behind that is to make the buffer >> preserve spacing sensitive elements while using M-x variable-pitch-mode. >> >> Please try using something like this: >> >> (set-face-attribute 'fixed-pitch nil >> :family (face-attribute 'default :family) >> :height (face-attribute 'default :height)) >> > > Just for completeness, > > It seems I need those settings only on Windows (10 pro 64) and macOS > (10.13.6) because on GNU/Linux (with Monospaced font) I do not see the > issue: those fields ("#+language:", "#+options:" etc.) are rendered > with the same font! On Windows and macOS, instead, they are rendered > differently (and ugly!).. On Windows I tried other fonts (Lucida > Console, Cascadia Code) but with the same ugly results. On macOS the > font is 'Monaco'. That may then be due to the default definition of the 'fixed-pitch' face, which does not find a decent fallback font on all platforms. Perhaps something like the following specification would be better, but I have no means of testing it and do not know what the default/generic monospaced fonts are on other platforms: (defface fixed-pitch '((((type w32)) :family "What is the default on MS-Windows?") (((type ns)) :family "What is the default on GNUstep or Macintosh Cocoa?") (t :family "Monospace")) "The basic fixed-pitch face." :group 'basic-faces) The diff, for those interested: lisp/faces.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/faces.el b/lisp/faces.el index 7b96d938c5..f1644add12 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2357,7 +2357,11 @@ (defface underline :group 'basic-faces) (defface fixed-pitch - '((t :family "Monospace")) + '((((type w32)) + :family "What is the default on MS-Windows?") + (((type ns)) + :family "What is the default on GNUstep or Macintosh Cocoa?") + (t :family "Monospace")) "The basic fixed-pitch face." :group 'basic-faces) All the best, Protesilaos -- Protesilaos Stavrou https://protesilaos.com