[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Visual font looping setup
From: |
Jean Louis |
Subject: |
Re: Visual font looping setup |
Date: |
Sat, 21 Nov 2020 15:51:51 +0300 |
User-agent: |
Mutt/2.0 (3d08634) (2020-11-07) |
* Eli Zaretskii <eliz@gnu.org> [2020-11-21 10:36]:
> > Date: Sat, 21 Nov 2020 00:20:22 +0300
> > From: Jean Louis <bugs@gnu.support>
> > 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)
Re: Visual font looping setup, Jean Louis, 2020/11/20