unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51405: Set default font on Windows to Consolas-11
@ 2021-10-26  6:28 Vince Salvino
  2021-10-26 12:53 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Vince Salvino @ 2021-10-26  6:28 UTC (permalink / raw)
  To: 51405

[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]

Courier New generally looks terrible on modern screens, as it has been neglected for decades since its original digitization for use with 640x480 CRT screens in the early 90s. Many of the character glyphs are only 1 pixel wide and look like hairlines on an LCD screen.

To address this, Windows Vista and later ship with Consolas, the default monospaced font used in Notepad, CMD (terminal), and other built-in programs. It is also used by default in nearly every other text/code editor, web browser, and terminal program when requesting a monospace font. Personally speaking, it is magnitudes more legible and easier to read. Consolas looks similar to DejaVu Mono, which is generally the default in GNU systems. 

This patch changes the default font in MS-Windows to Consolas-11. It will still fall back to the previous default (Courier New-10) on older systems where the font is not available. I want to be clear that this is not a change for the sake of choosing a fashionable font... Consolas has been the default monospace font in Windows for 15 years!


Vince Salvino


[-- Attachment #2: 0001-Set-default-font-on-Windows-to-Consolas-11.patch --]
[-- Type: application/octet-stream, Size: 769 bytes --]

From 58ec236a72b883455e5112d1aafdafff6ab8f32f Mon Sep 17 00:00:00 2001
From: Vince Salvino <salvino@coderedcorp.com>
Date: Tue, 26 Oct 2021 02:11:06 -0400
Subject: [PATCH] Set default font on Windows to Consolas-11

---
 src/w32fns.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/w32fns.c b/src/w32fns.c
index 14d1154a2b..141a9ed0a9 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5670,7 +5670,8 @@ w32_default_font_parameter (struct frame *f, Lisp_Object parms)
     {
       int i;
       static const char *names[]
-	= { "Courier New-10",
+	= { "Consolas-11",
+	    "Courier New-10",
 	    "-*-Courier-normal-r-*-*-13-*-*-*-c-*-iso8859-1",
 	    "-*-Fixedsys-normal-r-*-*-12-*-*-*-c-*-iso8859-1",
 	    "Fixedsys",
-- 
2.33.0.windows.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* bug#51405: Set default font on Windows to Consolas-11
  2021-10-26  6:28 bug#51405: Set default font on Windows to Consolas-11 Vince Salvino
@ 2021-10-26 12:53 ` Eli Zaretskii
  2021-10-26 14:08   ` Howard Melman
  2021-10-26 16:21   ` Vince Salvino
  0 siblings, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2021-10-26 12:53 UTC (permalink / raw)
  To: Vince Salvino; +Cc: 51405

> From: Vince Salvino <salvino@coderedcorp.com>
> Date: Tue, 26 Oct 2021 06:28:16 +0000
> 
> Courier New generally looks terrible on modern screens, as it has been neglected for decades since its original digitization for use with 640x480 CRT screens in the early 90s. Many of the character glyphs are only 1 pixel wide and look like hairlines on an LCD screen.
> 
> To address this, Windows Vista and later ship with Consolas, the default monospaced font used in Notepad, CMD (terminal), and other built-in programs. It is also used by default in nearly every other text/code editor, web browser, and terminal program when requesting a monospace font. Personally speaking, it is magnitudes more legible and easier to read. Consolas looks similar to DejaVu Mono, which is generally the default in GNU systems. 
> 
> This patch changes the default font in MS-Windows to Consolas-11. It will still fall back to the previous default (Courier New-10) on older systems where the font is not available. I want to be clear that this is not a change for the sake of choosing a fashionable font... Consolas has been the default monospace font in Windows for 15 years!

I'm sorry, but this is a non-starter.  Selecting a default font on
Windows that will work reasonably well on all the supported Windows
versions (i.e. Windows 9X to Windows 11) is a delicate and tricky
business.  Courier New, with all its deficiencies, is not a bad font
(I use it on many Windows system, up to and including Windows 10, and
cannot agree that it "looks terrible"), and it satisfies the
non-trivial requirements we have: support for many scripts and
availability on all the Windows versions.  (AFAICT, Consolas still
supports fewer Unicode blocks that Courier new, even on Windows 10.)
Moreover, replacing the default font will inevitably open a Pandora
box of the need to change the settings of some other faces we use in
Emacs (like fixed-pitch and variable-pitch, for example), which need
to be compatible with (i.e. reasonably similar to) the default font,
in order to avoid ugly displays where we mix these two (for example,
in Info buffers).

People who don't like the default font can easily customize their
Emacs to use Consolas (or any other font).  We have several ways of
doing that:

  . Invoke Emacs with "emacs -fn Consolas-11"
  . Put (set-face-font 'default "Consolas-11") in your init file
  . Put "Emacs.font" with the value "Consolas-11" in the Registry,
    under the HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs key

(The latter method emulates the X resources on Posix platforms.)

So, given that it is so easy to customize the default font, and OTOH
given the non-trivial issues that will be caused by changing the
default, I think we should not change the default, not in the
observable future.

In any case, a proposal to change the default font must be accompanied
by suitable changes to the basic faces that request different font
families, and we must also carefully consider the coverage of the
candidate font vs that of Courier new, because any Unicode block
covered by Courier New but not the contender would mean potential
display problems due to font size/pitch mismatches, which usually
results in user complaints.

Thanks.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#51405: Set default font on Windows to Consolas-11
  2021-10-26 12:53 ` Eli Zaretskii
@ 2021-10-26 14:08   ` Howard Melman
  2021-10-26 14:31     ` Howard Melman
  2021-10-26 16:02     ` Eli Zaretskii
  2021-10-26 16:21   ` Vince Salvino
  1 sibling, 2 replies; 8+ messages in thread
From: Howard Melman @ 2021-10-26 14:08 UTC (permalink / raw)
  To: 51405

Eli Zaretskii <eliz@gnu.org> writes:

> AFAICT, Consolas still supports fewer Unicode blocks that
> Courier new, even on Windows 10.

I don't use either so I'm not proposing one or the other but
I was curious about this.  According to wikipedia:

https://en.wikipedia.org/wiki/Consolas

Although Consolas is designed as a replacement for Courier
New, only 713 glyphs were initially available, as compared
to Courier New (2.90)'s 1318 glyphs. In version 5.22
(included with Windows 7), support for Greek Extended,
Combining Diacritical Marks For Symbols, Number Forms,
Arrows, Box Drawing, and Geometric Shapes was added. In
version 5.32 the total number of supported glyphs was
2735. In version 7.00 (as part of Windows 10 1909) there are
3030 glyphs in total.

https://en.wikipedia.org/wiki/Courier_(typeface)#Courier_New

Versions from 2.76 onward include Hebrew and Arabic glyphs,
with most of the Arabic characters added on non-italic
fonts. The styling of Arabic glyphs is similar to those
found in Times New Roman but adjusted for monospace. The
Courier New version 5.00 includes over 3100 glyphs, covering
over 2700 characters per font.

Is there some place that actually lists the unicode block
support for each font?

-- 

Howard






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#51405: Set default font on Windows to Consolas-11
  2021-10-26 14:08   ` Howard Melman
@ 2021-10-26 14:31     ` Howard Melman
  2021-10-26 16:03       ` Eli Zaretskii
  2021-10-26 16:02     ` Eli Zaretskii
  1 sibling, 1 reply; 8+ messages in thread
From: Howard Melman @ 2021-10-26 14:31 UTC (permalink / raw)
  To: 51405

Howard Melman <hmelman@gmail.com> writes:

>> AFAICT, Consolas still supports fewer Unicode blocks that
>> Courier new, even on Windows 10.

> Is there some place that actually lists the unicode block
> support for each font?

Based on:
https://docs.microsoft.com/en-us/typography/font-list/consolas
https://docs.microsoft.com/en-us/typography/font-list/courier-new

It seems the difference is that Courier New supports Hebrew
and Arabic while Consolas does not.

-- 

Howard






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#51405: Set default font on Windows to Consolas-11
  2021-10-26 14:08   ` Howard Melman
  2021-10-26 14:31     ` Howard Melman
@ 2021-10-26 16:02     ` Eli Zaretskii
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2021-10-26 16:02 UTC (permalink / raw)
  To: Howard Melman; +Cc: 51405

> From: Howard Melman <hmelman@gmail.com>
> Date: Tue, 26 Oct 2021 10:08:06 -0400
> 
> Is there some place that actually lists the unicode block
> support for each font?

You already found the official site, but I would also like to point
out that the wonderful BabelMap program will show this information for
each font installed on the system.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#51405: Set default font on Windows to Consolas-11
  2021-10-26 14:31     ` Howard Melman
@ 2021-10-26 16:03       ` Eli Zaretskii
  2022-09-14 18:32         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2021-10-26 16:03 UTC (permalink / raw)
  To: Howard Melman; +Cc: 51405

> From: Howard Melman <hmelman@gmail.com>
> Date: Tue, 26 Oct 2021 10:31:05 -0400
> 
> Based on:
> https://docs.microsoft.com/en-us/typography/font-list/consolas
> https://docs.microsoft.com/en-us/typography/font-list/courier-new
> 
> It seems the difference is that Courier New supports Hebrew
> and Arabic while Consolas does not.

Right.  Which I think is a significant disadvantage for the users who
need these scripts.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#51405: Set default font on Windows to Consolas-11
  2021-10-26 12:53 ` Eli Zaretskii
  2021-10-26 14:08   ` Howard Melman
@ 2021-10-26 16:21   ` Vince Salvino
  1 sibling, 0 replies; 8+ messages in thread
From: Vince Salvino @ 2021-10-26 16:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 51405@debbugs.gnu.org

I had expected this response, but figured it was worth a try.

I did test the tutorial, customize menus, and various info pages, and they all seemed to look fine, including in mixed-font scenarios as you mentioned. 

I know Consolas has much higher glyph coverage than Courier new (about 3x as much if I am correct), however I will do some empirical testing on different languages and scripts to observe the behavior. I have a huge set of translations from another project I can test on. 

I remember a heavily debated thread some time ago about making the emacs experience a bit "better" out of the box. I realize that is a loaded statement (or a fool's errand), but I do think many MS Windows users would find this to be a welcome change, if we can find a way to make it work properly. Or perhaps customizing the font is a right of passage :)


Vince Salvino



	  Original Message  	


From: eliz@gnu.org
Sent: October 26, 2021 8:53 AM
To: salvino@coderedcorp.com
Cc: 51405@debbugs.gnu.org
Subject: Re: bug#51405: Set default font on Windows to Consolas-11


> From: Vince Salvino <salvino@coderedcorp.com>
> Date: Tue, 26 Oct 2021 06:28:16 +0000
>
> Courier New generally looks terrible on modern screens, as it has been neglected for decades since its original digitization for use with 640x480 CRT screens in the early 90s. Many of the character glyphs are only 1 pixel wide and look like hairlines on an LCD screen.
>
> To address this, Windows Vista and later ship with Consolas, the default monospaced font used in Notepad, CMD (terminal), and other built-in programs. It is also used by default in nearly every other text/code editor, web browser, and terminal program when requesting a monospace font. Personally speaking, it is magnitudes more legible and easier to read. Consolas looks similar to DejaVu Mono, which is generally the default in GNU systems.
>
> This patch changes the default font in MS-Windows to Consolas-11. It will still fall back to the previous default (Courier New-10) on older systems where the font is not available. I want to be clear that this is not a change for the sake of choosing a fashionable font... Consolas has been the default monospace font in Windows for 15 years!

I'm sorry, but this is a non-starter.  Selecting a default font on
Windows that will work reasonably well on all the supported Windows
versions (i.e. Windows 9X to Windows 11) is a delicate and tricky
business.  Courier New, with all its deficiencies, is not a bad font
(I use it on many Windows system, up to and including Windows 10, and
cannot agree that it "looks terrible"), and it satisfies the
non-trivial requirements we have: support for many scripts and
availability on all the Windows versions.  (AFAICT, Consolas still
supports fewer Unicode blocks that Courier new, even on Windows 10.)
Moreover, replacing the default font will inevitably open a Pandora
box of the need to change the settings of some other faces we use in
Emacs (like fixed-pitch and variable-pitch, for example), which need
to be compatible with (i.e. reasonably similar to) the default font,
in order to avoid ugly displays where we mix these two (for example,
in Info buffers).

People who don't like the default font can easily customize their
Emacs to use Consolas (or any other font).  We have several ways of
doing that:

  . Invoke Emacs with "emacs -fn Consolas-11"
  . Put (set-face-font 'default "Consolas-11") in your init file
  . Put "Emacs.font" with the value "Consolas-11" in the Registry,
    under the HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs key

(The latter method emulates the X resources on Posix platforms.)

So, given that it is so easy to customize the default font, and OTOH
given the non-trivial issues that will be caused by changing the
default, I think we should not change the default, not in the
observable future.

In any case, a proposal to change the default font must be accompanied
by suitable changes to the basic faces that request different font
families, and we must also carefully consider the coverage of the
candidate font vs that of Courier new, because any Unicode block
covered by Courier New but not the contender would mean potential
display problems due to font size/pitch mismatches, which usually
results in user complaints.

Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#51405: Set default font on Windows to Consolas-11
  2021-10-26 16:03       ` Eli Zaretskii
@ 2022-09-14 18:32         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-14 18:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 51405, Howard Melman

Eli Zaretskii <eliz@gnu.org> writes:

> Right.  Which I think is a significant disadvantage for the users who
> need these scripts.

If I understand correctly, the conclusion here is that we don't want to
change the defaults in Windows, so I'm closing this bug report.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-09-14 18:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26  6:28 bug#51405: Set default font on Windows to Consolas-11 Vince Salvino
2021-10-26 12:53 ` Eli Zaretskii
2021-10-26 14:08   ` Howard Melman
2021-10-26 14:31     ` Howard Melman
2021-10-26 16:03       ` Eli Zaretskii
2022-09-14 18:32         ` Lars Ingebrigtsen
2021-10-26 16:02     ` Eli Zaretskii
2021-10-26 16:21   ` Vince Salvino

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).