From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: Visual font looping setup Date: Sat, 21 Nov 2020 15:51:51 +0300 Message-ID: References: <83lfevztlq.fsf@gnu.org> <83im9zzs7m.fsf@gnu.org> <83ft53yxg0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34241"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0 (3d08634) (2020-11-07) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 21 13:52:39 2020 Return-path: Envelope-to: geh-help-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 1kgSNb-0008qN-HR for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 21 Nov 2020 13:52:39 +0100 Original-Received: from localhost ([::1]:50602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgSNa-0008M8-II for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 21 Nov 2020 07:52:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgSNH-0008Lt-JN for help-gnu-emacs@gnu.org; Sat, 21 Nov 2020 07:52:19 -0500 Original-Received: from static.rcdrun.com ([95.85.24.50]:58493) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgSNF-0005Zn-Fm; Sat, 21 Nov 2020 07:52:19 -0500 Original-Received: from localhost ([::ffff:41.202.241.56]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002C1AE6.000000005FB90D7D.000044E5; Sat, 21 Nov 2020 12:52:12 +0000 Content-Disposition: inline In-Reply-To: <83ft53yxg0.fsf@gnu.org> Received-SPF: pass client-ip=95.85.24.50; envelope-from=bugs@gnu.support; helo=static.rcdrun.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125439 Archived-At: * Eli Zaretskii [2020-11-21 10:36]: > > Date: Sat, 21 Nov 2020 00:20:22 +0300 > > From: Jean Louis > > Cc: help-gnu-emacs@gnu.org > > > > > emacs -fn FONT-NAME > > > > Sure it is possible to set it. > > > > After long time of using some fonts I can see that there is certain > > pleasure effect to change the fonts, like relaxation. Process of > > selecting various fonts is tedious. Imagine starting emacs with emacs > > -fn for 30 times just to see which font is maybe better or not. > > If you need to do that many times, "M-x set-frame-font RET" is better. > > > Default font how I see it is always Courier and I wonder why Emacs > > selects that one by default. > > Because that's how Emacs was programmed to work by default, if no > other user preferences are found. > > > On every computer I have that font comes by default. It appears too > > small and too tiny to be readable. > > The font and its default size are two different parameters. You can > change the size without changing the font by having in your init file > something like > > (set-face-attribute 'default nil :height 150) > > or alternatively something like > > (add-to-list 'default-frame-alist '(font . "...")) > > where the string which specifies font is constructed from what > (face-font 'default) returns, with the pixel-size value (the number > after "mono" in the XLFD-formatted font name) replaced by a larger > number, as you see fit. > > > How could I change font only for dired mode? There is no face like > > dired-default or similar. > > See buffer-face-mode. > > > I can see that fixed-pitch is monospace but Dired is not monospace if > > I choose default font that is not monospace. > > You are well-advised not to pick variable-pitch fonts for any default > face in any buffer or mode: they will not work well in Emacs. Where > variable-pitch fonts are reasonable, Emacs generally uses them > automatically (for example, when displaying Web pages in EWW). You > can specify which variable-pitch font to use in those cases by > customizing the variable-pitch face. > > > Somehow I expect to have fixed font in those modes where it is > > necesary. Manual says fixed-pitch, I was thinking Dired would use > > fixed-pitch settings, but it uses default font as it inherits. > > Don't change the default face to use a font that is not fixed-pitch, > you will be shooting yourself in the foot. This is so far alright for selection. Which font do you use? (defun loop-fonts () (let* ((fonts (x-list-fonts "-*-*-medium-r-normal-*-*-*-*-*-*-iso10646-1" 'default (selected-frame)))) (dolist (font fonts) (if (string-match "mono" font) (progn (message font) (set-frame-font font) (read-char font)))))) (loop-fonts)