From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Emacs master: different (ugly) font in org-mode [Windows, macOS] Date: Tue, 05 Oct 2021 14:47:41 +0300 Message-ID: <83sfxf4rs2.fsf@gnu.org> References: <1758826875.387473.1633124447794@mail1.libero.it> <87a6jsqbhq.fsf@protesilaos.com> <1048176278.452440.1633374684696@mail1.libero.it> <87sfxgr320.fsf@protesilaos.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28171"; mail-complaints-to="usenet@ciao.gmane.io" Cc: angelo.g0@libero.it, emacs-devel@gnu.org To: Protesilaos Stavrou Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 05 13:56:35 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 1mXj3i-0007BC-Kv for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Oct 2021 13:56:34 +0200 Original-Received: from localhost ([::1]:47806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXj3h-00042x-BB for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Oct 2021 07:56:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXivH-000180-H9 for emacs-devel@gnu.org; Tue, 05 Oct 2021 07:48:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33908) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXivF-0006Op-PW; Tue, 05 Oct 2021 07:47:49 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2408 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXivF-0001QV-6v; Tue, 05 Oct 2021 07:47:49 -0400 In-Reply-To: <87sfxgr320.fsf@protesilaos.com> (message from Protesilaos Stavrou on Mon, 04 Oct 2021 22:40:55 +0300) 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:276323 Archived-At: > From: Protesilaos Stavrou > Date: Mon, 04 Oct 2021 22:40:55 +0300 > > 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) I'd like to understand the problem better before we consider solutions in this area. What's the problem with "Monospace" on MS-Windows? which font does that actually use? ("C-u C-x =" on the text in question should report the font Emacs uses to display that text.) In general, "Monospace" is supposed to be different from the default face's font, so "What is the default on MS-Windows" doesn't necessarily have a useful answer for this purpose.