* Visual font looping setup
@ 2020-11-20 19:26 Jean Louis
2020-11-20 20:00 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Jean Louis @ 2020-11-20 19:26 UTC (permalink / raw)
To: Help GNU Emacs
I think we should make a function to visually loop through all the
fonts for default Emacs settings. Beyond DejaVu Sans Mono I do not
know which font to use that it looks equally good. This one is very
readable.
What fonts are you using?
I think of a function that first slurps all the font list and then by
using keys it can show the font name and also quickly change the
settings.
Jean
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Visual font looping setup
2020-11-20 19:26 Visual font looping setup Jean Louis
@ 2020-11-20 20:00 ` Eli Zaretskii
2020-11-20 20:16 ` Jean Louis
2020-11-20 21:03 ` Jean Louis
0 siblings, 2 replies; 13+ messages in thread
From: Eli Zaretskii @ 2020-11-20 20:00 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Fri, 20 Nov 2020 22:26:48 +0300
> From: Jean Louis <bugs@gnu.support>
>
> I think we should make a function to visually loop through all the
> fonts for default Emacs settings.
What do you mean by "fonts for default Emacs settings"?
> Beyond DejaVu Sans Mono I do not know which font to use that it
> looks equally good.
Which font out of what collection? If you mean out of all the fonts
installed on your system, then surely your system has some tool that
can show all the installed fonts with a sample of each one?
Failing that, the font selection dialog popped by S-mouse-1 or
Options->Set Default Font from the menu bar usually shows a small
sample of each font as you scroll through their list.
Does one of these fit the bill?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Visual font looping setup
2020-11-20 20:00 ` Eli Zaretskii
@ 2020-11-20 20:16 ` Jean Louis
2020-11-20 20:30 ` Eli Zaretskii
2020-11-20 21:03 ` Jean Louis
1 sibling, 1 reply; 13+ messages in thread
From: Jean Louis @ 2020-11-20 20:16 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
* Eli Zaretskii <eliz@gnu.org> [2020-11-20 23:01]:
> > Date: Fri, 20 Nov 2020 22:26:48 +0300
> > From: Jean Louis <bugs@gnu.support>
> >
> > I think we should make a function to visually loop through all the
> > fonts for default Emacs settings.
>
> What do you mean by "fonts for default Emacs settings"?
Yes, I meant fonts that are available on system to be quickly looped
for visual selection.
Sure that I look into separate program and then try to set it in
Emacs. I have to know how to type the font and to choose various options in
Emacs to have the same font actually selected. It is tedious.
> Failing that, the font selection dialog popped by S-mouse-1 or
> Options->Set Default Font from the menu bar usually shows a small
> sample of each font as you scroll through their list.
>
> Does one of these fit the bill?
I remember using that one before many years. For me that option almost
never gives satisfactorily result.
DejaVu Sans Mono is for example not listed there. Many other way
better and visually pleasant fonts are not there. In fact the option
chooses more or less majority of fonts that I consider not pleasant
for reading or working.
I can see there only following:
- Misc
- Courier
- Fontset
Under fontset there are 2 options that change something, Courier
changes courier and Misc is pretty much ugly unless I enlarge those
fonts to be huge.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Visual font looping setup
2020-11-20 20:16 ` Jean Louis
@ 2020-11-20 20:30 ` Eli Zaretskii
2020-11-20 21:20 ` Jean Louis
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2020-11-20 20:30 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Fri, 20 Nov 2020 23:16:32 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: help-gnu-emacs@gnu.org
>
> Sure that I look into separate program and then try to set it in
> Emacs. I have to know how to type the font and to choose various options in
> Emacs to have the same font actually selected. It is tedious.
??? All you need is to tell Emacs which font to use, as in
emacs -fn FONT-NAME
And similar in your init file, using one of the available methods, for
example set-face-attribute.
> > Failing that, the font selection dialog popped by S-mouse-1 or
> > Options->Set Default Font from the menu bar usually shows a small
> > sample of each font as you scroll through their list.
> >
> > Does one of these fit the bill?
>
> I remember using that one before many years. For me that option almost
> never gives satisfactorily result.
I mentioned two possibilities, not one. Which one did you use, and
how about to try the other one?
> DejaVu Sans Mono is for example not listed there. Many other way
> better and visually pleasant fonts are not there. In fact the option
> chooses more or less majority of fonts that I consider not pleasant
> for reading or working.
>
> I can see there only following:
>
> - Misc
> - Courier
> - Fontset
>
> Under fontset there are 2 options that change something, Courier
> changes courier and Misc is pretty much ugly unless I enlarge those
> fonts to be huge.
Sounds like you tried S-mouse-1. Then try the other method I
mentioned.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Visual font looping setup
2020-11-20 20:00 ` Eli Zaretskii
2020-11-20 20:16 ` Jean Louis
@ 2020-11-20 21:03 ` Jean Louis
2020-11-21 7:19 ` Eli Zaretskii
1 sibling, 1 reply; 13+ messages in thread
From: Jean Louis @ 2020-11-20 21:03 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
* Eli Zaretskii <eliz@gnu.org> [2020-11-20 23:01]:
> > Date: Fri, 20 Nov 2020 22:26:48 +0300
> > From: Jean Louis <bugs@gnu.support>
> >
> > I think we should make a function to visually loop through all the
> > fonts for default Emacs settings.
>
> What do you mean by "fonts for default Emacs settings"?
>
> > Beyond DejaVu Sans Mono I do not know which font to use that it
> > looks equally good.
>
> Which font out of what collection? If you mean out of all the fonts
> installed on your system, then surely your system has some tool that
> can show all the installed fonts with a sample of each one?
>
> Failing that, the font selection dialog popped by S-mouse-1 or
> Options->Set Default Font from the menu bar usually shows a small
> sample of each font as you scroll through their list.
You say that it shows small sample of each font. On my side for years
it shows just 3 major options Misc, few fonts commonly used on X
before 20 years, then there is Courier option for various sizes, bold
and slant and mix, and there is fontset. More than that never appears
there.
S-mouse-1 opens up same dialog.
Do you mean that there are more fonts on your side displayed under
those options?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Visual font looping setup
2020-11-20 20:30 ` Eli Zaretskii
@ 2020-11-20 21:20 ` Jean Louis
2020-11-21 7:35 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Jean Louis @ 2020-11-20 21:20 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
* Eli Zaretskii <eliz@gnu.org> [2020-11-20 23:31]:
> > Date: Fri, 20 Nov 2020 23:16:32 +0300
> > From: Jean Louis <bugs@gnu.support>
> > Cc: help-gnu-emacs@gnu.org
> >
> > Sure that I look into separate program and then try to set it in
> > Emacs. I have to know how to type the font and to choose various options in
> > Emacs to have the same font actually selected. It is tedious.
>
> ??? All you need is to tell Emacs which font to use, as in
>
> 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. I have
to see it on the code and on plain text and in dired. Normally I
choose Mono fonts that will by default not disalign dired or other
aligned text and will be well readable.
Default font how I see it is always Courier and I wonder why Emacs
selects that one by default. On every computer I have that font comes
by default. It appears too small and too tiny to be readable. That is
first thing I am changing to something more readable. Normally to
DejaVu Sans Mono or Fira Mono or something similar. But after long
time I like to change fonts for a while to relax.
> And similar in your init file, using one of the available methods, for
> example set-face-attribute.
I guess I will play with those options for various modes. For Dired I
need Mono or fixed font to align the columns. I would like to have
different fonts for different modes. But then chasing default mode
could change them all.
How could I change font only for dired mode? There is no face like
dired-default or similar. I just found nice writing font and it is not
Mono but it looks like mono or almost as Courier. Dired and tabulated
list mode is distorted with this font.
But I do not find default fonts for dired or other mode.
I can see that fixed-pitch is monospace but Dired is not monospace if
I choose default font that is not monospace. Then there is bunch of
options in Dired, I would need probably to turn off each Inherit
option to make Dired behave.
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Visual font looping setup
2020-11-20 21:03 ` Jean Louis
@ 2020-11-21 7:19 ` Eli Zaretskii
2020-11-21 11:23 ` Jean Louis
2020-11-22 0:53 ` David Masterson
0 siblings, 2 replies; 13+ messages in thread
From: Eli Zaretskii @ 2020-11-21 7:19 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Sat, 21 Nov 2020 00:03:18 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: help-gnu-emacs@gnu.org
>
> > Failing that, the font selection dialog popped by S-mouse-1 or
> > Options->Set Default Font from the menu bar usually shows a small
> > sample of each font as you scroll through their list.
>
> You say that it shows small sample of each font. On my side for years
> it shows just 3 major options Misc, few fonts commonly used on X
> before 20 years, then there is Courier option for various sizes, bold
> and slant and mix, and there is fontset. More than that never appears
> there.
>
> S-mouse-1 opens up same dialog.
I guess the toolkit which you used to build Emacs doesn't have a
well-designed font selection dialog.
Do these commands invoke mouse-select-font or x-select-font on your
system?
> Do you mean that there are more fonts on your side displayed under
> those options?
Yes. If your Emacs was built with GTK, x-select-font should start a
GTK font selection dialog showing many fonts.
Of course, you can always write a simple command that loops over all
the fonts in the list created by this:
(x-list-fonts "-*-*-medium-r-normal-*-*-*-*-*-*-iso10646-1"
'default (selected-frame))
and display some sample text using each font. Or just looks at the
list returned by the above, and try some of the fonts manually (with
set-frame-font or somesuch).
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Visual font looping setup
2020-11-20 21:20 ` Jean Louis
@ 2020-11-21 7:35 ` Eli Zaretskii
2020-11-21 12:51 ` Jean Louis
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2020-11-21 7:35 UTC (permalink / raw)
To: help-gnu-emacs
> 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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Visual font looping setup
2020-11-21 7:19 ` Eli Zaretskii
@ 2020-11-21 11:23 ` Jean Louis
2020-11-22 0:53 ` David Masterson
1 sibling, 0 replies; 13+ messages in thread
From: Jean Louis @ 2020-11-21 11:23 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
* Eli Zaretskii <eliz@gnu.org> [2020-11-21 10:20]:
> > S-mouse-1 opens up same dialog.
>
> I guess the toolkit which you used to build Emacs doesn't have a
> well-designed font selection dialog.
Thank you.
Then it is it, I use Lucid version as it occupies less space in
general than GTK.
> Yes. If your Emacs was built with GTK, x-select-font should start a
> GTK font selection dialog showing many fonts.
>
> Of course, you can always write a simple command that loops over all
> the fonts in the list created by this:
>
(x-list-fonts "-*-*-medium-r-normal-*-*-*-*-*-*-iso10646-1" 'default (selected-frame))
> and display some sample text using each font. Or just looks at the
> list returned by the above, and try some of the fonts manually (with
> set-frame-font or somesuch).
Then I will use that.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Visual font looping setup
2020-11-21 7:35 ` Eli Zaretskii
@ 2020-11-21 12:51 ` Jean Louis
2020-11-21 13:23 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Jean Louis @ 2020-11-21 12:51 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
* 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)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Visual font looping setup
2020-11-21 12:51 ` Jean Louis
@ 2020-11-21 13:23 ` Eli Zaretskii
0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2020-11-21 13:23 UTC (permalink / raw)
To: Jean Louis; +Cc: help-gnu-emacs
> Date: Sat, 21 Nov 2020 15:51:51 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: help-gnu-emacs@gnu.org
>
> This is so far alright for selection. Which font do you use?
I use the default, but the question is only meaningful if we have the
same fonts installed, which is not something we should assume.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Visual font looping setup
2020-11-21 7:19 ` Eli Zaretskii
2020-11-21 11:23 ` Jean Louis
@ 2020-11-22 0:53 ` David Masterson
2020-11-22 3:42 ` Eli Zaretskii
1 sibling, 1 reply; 13+ messages in thread
From: David Masterson @ 2020-11-22 0:53 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Sat, 21 Nov 2020 00:03:18 +0300
>> From: Jean Louis <bugs@gnu.support>
>> Cc: help-gnu-emacs@gnu.org
>>
>> You say that it shows small sample of each font. On my side for years
>> it shows just 3 major options Misc, few fonts commonly used on X
>> before 20 years, then there is Courier option for various sizes, bold
>> and slant and mix, and there is fontset. More than that never appears
>> there.
>>
>> S-mouse-1 opens up same dialog.
>
> I guess the toolkit which you used to build Emacs doesn't have a
> well-designed font selection dialog.
>
> Do these commands invoke mouse-select-font or x-select-font on your
> system?
I have the same issue and we had this discussion several months back.
My personal build of Emacs v26.3 used the LUCID toolkit and doesn't
support XWidgets. I tried installing GTK on my Chromebook (in the Linux
VM), but I couldn't get the Emacs build process to find/use it (helpful
hints?)
Perhaps the Emacs Info pages need a small discussion on fonts and the
functions to use (beyond menu-select-font) and their expected effects?
For instance, more information about mouse-select-font for people who
can't (or won't) install GTK.
>> Do you mean that there are more fonts on your side displayed under
>> those options?
>
> Yes. If your Emacs was built with GTK, x-select-font should start a
> GTK font selection dialog showing many fonts.
>
> Of course, you can always write a simple command that loops over all
> the fonts in the list created by this:
>
> (x-list-fonts "-*-*-medium-r-normal-*-*-*-*-*-*-iso10646-1"
> 'default (selected-frame))
>
> and display some sample text using each font. Or just looks at the
> list returned by the above, and try some of the fonts manually (with
> set-frame-font or somesuch).
This is helpful, but people not knowledgeable about fonts may not
understand "some such". ;-)
--
David Masterson
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Visual font looping setup
2020-11-22 0:53 ` David Masterson
@ 2020-11-22 3:42 ` Eli Zaretskii
0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2020-11-22 3:42 UTC (permalink / raw)
To: help-gnu-emacs
> From: David Masterson <dsmasterson92630@outlook.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Sat, 21 Nov 2020 16:53:54 -0800
>
> >> S-mouse-1 opens up same dialog.
> >
> > I guess the toolkit which you used to build Emacs doesn't have a
> > well-designed font selection dialog.
> >
> > Do these commands invoke mouse-select-font or x-select-font on your
> > system?
>
> I have the same issue and we had this discussion several months back.
> My personal build of Emacs v26.3 used the LUCID toolkit and doesn't
> support XWidgets. I tried installing GTK on my Chromebook (in the Linux
> VM), but I couldn't get the Emacs build process to find/use it (helpful
> hints?)
>
> Perhaps the Emacs Info pages need a small discussion on fonts and the
> functions to use (beyond menu-select-font) and their expected effects?
> For instance, more information about mouse-select-font for people who
> can't (or won't) install GTK.
Feel free to start a discussion on emacs-devel, or submit a
feature-request bug report.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2020-11-22 3:42 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-20 19:26 Visual font looping setup Jean Louis
2020-11-20 20:00 ` Eli Zaretskii
2020-11-20 20:16 ` Jean Louis
2020-11-20 20:30 ` Eli Zaretskii
2020-11-20 21:20 ` Jean Louis
2020-11-21 7:35 ` Eli Zaretskii
2020-11-21 12:51 ` Jean Louis
2020-11-21 13:23 ` Eli Zaretskii
2020-11-20 21:03 ` Jean Louis
2020-11-21 7:19 ` Eli Zaretskii
2020-11-21 11:23 ` Jean Louis
2020-11-22 0:53 ` David Masterson
2020-11-22 3:42 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).