unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
       [not found] ` <20170711151709.2AE9822E0A@vcs0.savannah.gnu.org>
@ 2017-07-12  0:09   ` Mark Oteiza
  2017-07-12  2:39     ` Eli Zaretskii
  2017-07-12  8:06     ` Yuri Khan
  0 siblings, 2 replies; 24+ messages in thread
From: Mark Oteiza @ 2017-07-12  0:09 UTC (permalink / raw)
  To: emacs-devel; +Cc: Eli Zaretskii


eliz@gnu.org (Eli Zaretskii) writes:
>  (defface line-number
> -  '((t :inherit (shadow default)))
> +  '((t :inherit (shadow default) :family "Monospace Serif"))

Niggling, but I think it would be better to simply add the existing
monospace serif face to the inherits, e.g.:

  (fixed-pitch-serif shadow default)



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-12  0:09   ` master d014a5e: Use fixed-pitch font for display-line-numbers Mark Oteiza
@ 2017-07-12  2:39     ` Eli Zaretskii
  2017-07-12  3:18       ` Mark Oteiza
  2017-07-12  8:06     ` Yuri Khan
  1 sibling, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2017-07-12  2:39 UTC (permalink / raw)
  To: Mark Oteiza; +Cc: emacs-devel

> From: Mark Oteiza <mvoteiza@udel.edu>
> Cc: Eli Zaretskii <eliz@gnu.org>
> Date: Tue, 11 Jul 2017 20:09:15 -0400
> 
> 
> eliz@gnu.org (Eli Zaretskii) writes:
> >  (defface line-number
> > -  '((t :inherit (shadow default)))
> > +  '((t :inherit (shadow default) :family "Monospace Serif"))
> 
> Niggling, but I think it would be better to simply add the existing
> monospace serif face to the inherits, e.g.:
> 
>   (fixed-pitch-serif shadow default)

I don't necessarily mind, but can you explain why you think it would
be better?

One disadvantage of that is that now any changes to fixed-pitch-serif
must also consider their effect on line-number.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-12  2:39     ` Eli Zaretskii
@ 2017-07-12  3:18       ` Mark Oteiza
  2017-07-12 14:25         ` Eli Zaretskii
  0 siblings, 1 reply; 24+ messages in thread
From: Mark Oteiza @ 2017-07-12  3:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On 12/07/17 at 05:39am, Eli Zaretskii wrote:
> > From: Mark Oteiza <mvoteiza@udel.edu>
> > Date: Tue, 11 Jul 2017 20:09:15 -0400
> > 
> > eliz@gnu.org (Eli Zaretskii) writes:
> > >  (defface line-number
> > > -  '((t :inherit (shadow default)))
> > > +  '((t :inherit (shadow default) :family "Monospace Serif"))
> > 
> > Niggling, but I think it would be better to simply add the existing
> > monospace serif face to the inherits, e.g.:
> > 
> >   (fixed-pitch-serif shadow default)
> 
> I don't necessarily mind, but can you explain why you think it would
> be better?
> 
> One disadvantage of that is that now any changes to fixed-pitch-serif
> must also consider their effect on line-number.

Ah, I considered it a good thing to have one less place where
a particular typeface (well, in this case an alias) is specified.
I think of fixed-pitch, fixed-pitch-serif, and variable-pitch as places
to pick a family so other faces can inherit from them by default.

Put another way, one would only have to change one face to change the
monospace serif, instead of however each face specifying :family
"Monospace Serif" or some other typeface.  Though, perhaps I'm
misunderstanding face-font-family-alternatives.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-12  0:09   ` master d014a5e: Use fixed-pitch font for display-line-numbers Mark Oteiza
  2017-07-12  2:39     ` Eli Zaretskii
@ 2017-07-12  8:06     ` Yuri Khan
  2017-07-12 14:36       ` Eli Zaretskii
  1 sibling, 1 reply; 24+ messages in thread
From: Yuri Khan @ 2017-07-12  8:06 UTC (permalink / raw)
  To: Mark Oteiza; +Cc: Eli Zaretskii, Emacs developers

On Wed, Jul 12, 2017 at 7:09 AM, Mark Oteiza <mvoteiza@udel.edu> wrote:

> eliz@gnu.org (Eli Zaretskii) writes:
>>  (defface line-number
>> -  '((t :inherit (shadow default)))
>> +  '((t :inherit (shadow default) :family "Monospace Serif"))
>
> Niggling, but I think it would be better to simply add the existing
> monospace serif face to the inherits, e.g.:
>
>   (fixed-pitch-serif shadow default)

Why fixed-pitch-serif? fixed-pitch should be sufficient.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-12  3:18       ` Mark Oteiza
@ 2017-07-12 14:25         ` Eli Zaretskii
  2017-07-13 20:18           ` Nicolas Petton
  0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2017-07-12 14:25 UTC (permalink / raw)
  To: Mark Oteiza; +Cc: emacs-devel

> Date: Tue, 11 Jul 2017 23:18:00 -0400
> From: Mark Oteiza <mvoteiza@udel.edu>
> Cc: emacs-devel@gnu.org
> 
> > One disadvantage of that is that now any changes to fixed-pitch-serif
> > must also consider their effect on line-number.
> 
> Ah, I considered it a good thing to have one less place where
> a particular typeface (well, in this case an alias) is specified.
> I think of fixed-pitch, fixed-pitch-serif, and variable-pitch as places
> to pick a family so other faces can inherit from them by default.
> 
> Put another way, one would only have to change one face to change the
> monospace serif, instead of however each face specifying :family
> "Monospace Serif" or some other typeface.  Though, perhaps I'm
> misunderstanding face-font-family-alternatives.

That's indeed the dilemma here: on the one hand this makes it easier
to change several faces, but OTOH the change must also satisfy the
requirements and user expectations of each of the inheriting faces.  I
don't know which of these is more important.  In practice, we did have
a couple of cases where some face was changed, and many moons later
someone complained that this had an adverse effect on one of the
inheriting faces.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-12  8:06     ` Yuri Khan
@ 2017-07-12 14:36       ` Eli Zaretskii
  2017-07-13  6:13         ` Yuri Khan
  0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2017-07-12 14:36 UTC (permalink / raw)
  To: Yuri Khan; +Cc: mvoteiza, emacs-devel

> From: Yuri Khan <yuri.v.khan@gmail.com>
> Date: Wed, 12 Jul 2017 15:06:21 +0700
> Cc: Emacs developers <emacs-devel@gnu.org>, Eli Zaretskii <eliz@gnu.org>
> 
> On Wed, Jul 12, 2017 at 7:09 AM, Mark Oteiza <mvoteiza@udel.edu> wrote:
> 
> > eliz@gnu.org (Eli Zaretskii) writes:
> >>  (defface line-number
> >> -  '((t :inherit (shadow default)))
> >> +  '((t :inherit (shadow default) :family "Monospace Serif"))
> >
> > Niggling, but I think it would be better to simply add the existing
> > monospace serif face to the inherits, e.g.:
> >
> >   (fixed-pitch-serif shadow default)
> 
> Why fixed-pitch-serif? fixed-pitch should be sufficient.

I'm not sure I understand: sufficient for what?  These are two
different families.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-12 14:36       ` Eli Zaretskii
@ 2017-07-13  6:13         ` Yuri Khan
  2017-07-13 15:57           ` Eli Zaretskii
  0 siblings, 1 reply; 24+ messages in thread
From: Yuri Khan @ 2017-07-13  6:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Mark Oteiza, Emacs developers

On Wed, Jul 12, 2017 at 9:36 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> > Niggling, but I think it would be better to simply add the existing
>> > monospace serif face to the inherits, e.g.:
>> >
>> >   (fixed-pitch-serif shadow default)
>>
>> Why fixed-pitch-serif? fixed-pitch should be sufficient.
>
> I'm not sure I understand: sufficient for what?  These are two
> different families.

Maybe, but the name ‘fixed-pitch-serif’ suggests a particular
presentation (a serif font), while ‘fixed-pitch’ does not.

Based on face names alone, I would expect that it is more likely for
‘fixed-pitch’ to be the same family as ‘default’ than for
‘fixed-pitch-serif’.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-13  6:13         ` Yuri Khan
@ 2017-07-13 15:57           ` Eli Zaretskii
  2017-07-13 18:07             ` Yuri Khan
  0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2017-07-13 15:57 UTC (permalink / raw)
  To: Yuri Khan; +Cc: mvoteiza, emacs-devel

> From: Yuri Khan <yuri.v.khan@gmail.com>
> Date: Thu, 13 Jul 2017 13:13:02 +0700
> Cc: Mark Oteiza <mvoteiza@udel.edu>, Emacs developers <emacs-devel@gnu.org>
> 
> >> >   (fixed-pitch-serif shadow default)
> >>
> >> Why fixed-pitch-serif? fixed-pitch should be sufficient.
> >
> > I'm not sure I understand: sufficient for what?  These are two
> > different families.
> 
> Maybe, but the name ‘fixed-pitch-serif’ suggests a particular
> presentation (a serif font), while ‘fixed-pitch’ does not.

AFAIU, fixed-pitch just means Sans Serif, so it is also a particular
presentation in that sense.

> Based on face names alone, I would expect that it is more likely for
> ‘fixed-pitch’ to be the same family as ‘default’ than for
> ‘fixed-pitch-serif’.

What is that expectation based on?  I don't see anything in the
definitions of these faces and the family aliases they use to suggest
something other than simple heuristics regarding good fonts available
on various platforms.  And fixed-pitch definitely doesn't yield the
same font as the default face on my system.  I tried to explain the
reasons in another message regarding the same issue.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-13 15:57           ` Eli Zaretskii
@ 2017-07-13 18:07             ` Yuri Khan
  2017-07-13 19:02               ` Eli Zaretskii
  0 siblings, 1 reply; 24+ messages in thread
From: Yuri Khan @ 2017-07-13 18:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Mark Oteiza, Emacs developers

On Thu, Jul 13, 2017 at 10:57 PM, Eli Zaretskii <eliz@gnu.org> wrote:

>> Maybe, but the name ‘fixed-pitch-serif’ suggests a particular
>> presentation (a serif font), while ‘fixed-pitch’ does not.
>
> AFAIU, fixed-pitch just means Sans Serif, so it is also a particular
> presentation in that sense.

The name ‘fixed-pitch’ literally means only the fixedness of pitch and
says nothing about presence or absence of serifs.

>> Based on face names alone, I would expect that it is more likely for
>> ‘fixed-pitch’ to be the same family as ‘default’ than for
>> ‘fixed-pitch-serif’.
>
> What is that expectation based on?

Names, and names alone. Neither ‘fixed-pitch’ nor ‘default’ say
anything about serifs, therefore, in the default case when ‘default’
wants to be monospaced, they should be identical. That is what the
principle of least astonishment dictates.


I have also just read Bug#19889 which was the motivation for
‘fixed-pitch-serif’: A face that is monospace but intentionally
different from the default. (Brrr.) Arguably, if that was the intent,
then it is poorly named. Should have been ‘fixed-pitch-alternative’ or
‘fixed-pitch-2’. Anyway, with that history, it should not be used for
line numbers, which should strive to use the same typeface as default
if at all possible.

It would be acceptable, from the theoretical point, to use the UI font
(the same that is used for menus) for line numbers. But that is most
likely proportional. Having three different typefaces for the buffer
text, line numbers, and menu bar, is just offensive.

> And fixed-pitch definitely doesn't yield the
> same font as the default face on my system.

I would suggest that is a bug.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-13 18:07             ` Yuri Khan
@ 2017-07-13 19:02               ` Eli Zaretskii
  2017-07-13 19:17                 ` Yuri Khan
                                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Eli Zaretskii @ 2017-07-13 19:02 UTC (permalink / raw)
  To: Yuri Khan; +Cc: mvoteiza, emacs-devel

> From: Yuri Khan <yuri.v.khan@gmail.com>
> Date: Fri, 14 Jul 2017 01:07:21 +0700
> Cc: Mark Oteiza <mvoteiza@udel.edu>, Emacs developers <emacs-devel@gnu.org>
> 
> On Thu, Jul 13, 2017 at 10:57 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> >> Maybe, but the name ‘fixed-pitch-serif’ suggests a particular
> >> presentation (a serif font), while ‘fixed-pitch’ does not.
> >
> > AFAIU, fixed-pitch just means Sans Serif, so it is also a particular
> > presentation in that sense.
> 
> The name ‘fixed-pitch’ literally means only the fixedness of pitch and
> says nothing about presence or absence of serifs.

The name alone might suggest that, but the code tells a different
story.  I thought you looked in the code and saw there something I
missed, thus my questions.

> Anyway, with that history, it should not be used for line numbers,
> which should strive to use the same typeface as default if at all
> possible.

I did strive, as "git log" will show.  That's the best I could come up
with, without complicating this stuff even more.  IMO, it's not that
bad, so "should not be used for line numbers" sounds a bit radical to
me.

> Having three different typefaces for the buffer text, line numbers,
> and menu bar, is just offensive.

You forgot tooltips and the font used for the caption bar.

> > And fixed-pitch definitely doesn't yield the
> > same font as the default face on my system.
> 
> I would suggest that is a bug.

It's not a bug, since the code was written to produce that effect.  (I
think similar issue happens in the NS build.)



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-13 19:02               ` Eli Zaretskii
@ 2017-07-13 19:17                 ` Yuri Khan
  2017-07-13 19:49                   ` Eli Zaretskii
  2017-07-13 20:15                 ` Alex
  2017-07-14  3:00                 ` Stefan Monnier
  2 siblings, 1 reply; 24+ messages in thread
From: Yuri Khan @ 2017-07-13 19:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Mark Oteiza, Emacs developers

On Fri, Jul 14, 2017 at 2:02 AM, Eli Zaretskii <eliz@gnu.org> wrote:

>> Having three different typefaces for the buffer text, line numbers,
>> and menu bar, is just offensive.
>
> You forgot tooltips and the font used for the caption bar.

Usually(?) same typeface, possibly different color and/or size and/or weight.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-13 19:17                 ` Yuri Khan
@ 2017-07-13 19:49                   ` Eli Zaretskii
  0 siblings, 0 replies; 24+ messages in thread
From: Eli Zaretskii @ 2017-07-13 19:49 UTC (permalink / raw)
  To: Yuri Khan; +Cc: mvoteiza, emacs-devel

> From: Yuri Khan <yuri.v.khan@gmail.com>
> Date: Fri, 14 Jul 2017 02:17:31 +0700
> Cc: Mark Oteiza <mvoteiza@udel.edu>, Emacs developers <emacs-devel@gnu.org>
> 
> On Fri, Jul 14, 2017 at 2:02 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> >> Having three different typefaces for the buffer text, line numbers,
> >> and menu bar, is just offensive.
> >
> > You forgot tooltips and the font used for the caption bar.
> 
> Usually(?) same typeface, possibly different color and/or size and/or weight.

Maybe in the GTK build, if you let GTK handle tooltips and all the
rest.  But not in general.  E.g., tooltip.el has:

  (defface tooltip
    '((((class color))
       :background "lightyellow"
       :foreground "black"
       :inherit variable-pitch)
      (t
       :inherit variable-pitch))
    "Face for tooltips."
    :group 'tooltip
    :group 'basic-faces)

That's nowhere near fixed-pitch (or any other monospaced face).

And at least on my system, both menus and the caption bar use a
variable-pitch font that is different from the one used in the
tooltips.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-13 19:02               ` Eli Zaretskii
  2017-07-13 19:17                 ` Yuri Khan
@ 2017-07-13 20:15                 ` Alex
  2017-07-14  6:47                   ` Alex
  2017-07-14  6:56                   ` Eli Zaretskii
  2017-07-14  3:00                 ` Stefan Monnier
  2 siblings, 2 replies; 24+ messages in thread
From: Alex @ 2017-07-13 20:15 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: mvoteiza, emacs-devel, Yuri Khan

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Yuri Khan <yuri.v.khan@gmail.com>
>> Date: Fri, 14 Jul 2017 01:07:21 +0700
>> Cc: Mark Oteiza <mvoteiza@udel.edu>, Emacs developers <emacs-devel@gnu.org>
>> 
>> On Thu, Jul 13, 2017 at 10:57 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> 
>> >> Maybe, but the name ‘fixed-pitch-serif’ suggests a particular
>> >> presentation (a serif font), while ‘fixed-pitch’ does not.
>> >
>> > AFAIU, fixed-pitch just means Sans Serif, so it is also a particular
>> > presentation in that sense.
>> 
>> The name ‘fixed-pitch’ literally means only the fixedness of pitch and
>> says nothing about presence or absence of serifs.
>
> The name alone might suggest that, but the code tells a different
> story.  I thought you looked in the code and saw there something I
> missed, thus my questions.

Where does the code tell a different story? If you mean
`face-font-family-alternatives', then I believe it is faulty (see
below).

>> > And fixed-pitch definitely doesn't yield the
>> > same font as the default face on my system.
>> 
>> I would suggest that is a bug.
>
> It's not a bug, since the code was written to produce that effect.  (I
> think similar issue happens in the NS build.)

You're using Windows, correct? I just tried out Emacs 25.2 on a Windows
partition and I believe this a bug on Windows. I can't say anything
about the NS build.

In Emacs 25.2 on Windows 7, the default face is Courier New, a serif
font. GNU/Linux defaults to DejaVu Sans Mono, a sans-serif font. I don't
see why Windows should default to a serif font. FWIW, I checked a couple
of other popular text editors (Sublime and Atom), and they default to
Consolas (sans-serif) on Windows.

The bigger issue here is that fixed-pitch-serif on Windows defaults to a
sans-serif font (Consolas), and that fixed-pitch defaults to a serif
font (Courier -- not Courier New like the default font).

I believe the following should happen:

  * the defaults for the default face and fixed-pitch should align on
    all systems possible

  * fixed-pitch should default to what fixed-pitch serif does now
    (Consolas seems suitable)

  * fixed-pitch-serif should default to what the default face does
    currently

If this is done, then changing the line-number face to plain "Monospace"
should work fine even for Windows.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-12 14:25         ` Eli Zaretskii
@ 2017-07-13 20:18           ` Nicolas Petton
  2017-07-14  6:30             ` Eli Zaretskii
  0 siblings, 1 reply; 24+ messages in thread
From: Nicolas Petton @ 2017-07-13 20:18 UTC (permalink / raw)
  To: Eli Zaretskii, Mark Oteiza; +Cc: emacs-devel

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

Eli Zaretskii <eliz@gnu.org> writes:

> That's indeed the dilemma here: on the one hand this makes it easier
> to change several faces, but OTOH the change must also satisfy the
> requirements and user expectations of each of the inheriting faces.  I
> don't know which of these is more important.

I think that the least surprising behavior would be to use the same
fixed width font family for line numbers and for buffer content by
default.

Nico

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-13 19:02               ` Eli Zaretskii
  2017-07-13 19:17                 ` Yuri Khan
  2017-07-13 20:15                 ` Alex
@ 2017-07-14  3:00                 ` Stefan Monnier
  2 siblings, 0 replies; 24+ messages in thread
From: Stefan Monnier @ 2017-07-14  3:00 UTC (permalink / raw)
  To: emacs-devel

>> > And fixed-pitch definitely doesn't yield the
>> > same font as the default face on my system.
>> I would suggest that is a bug.
> It's not a bug, since the code was written to produce that effect.  (I
> think similar issue happens in the NS build.)

I think this is mostly a historical accident.  I think it's reasonable
for the user to expect that fixed-pitch is "any fixed-pitch font,
ideally close to the `default` font".  We could add
a fixed-pitch-sans-serif face if there's a need for such a thing.


        Stefan




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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-13 20:18           ` Nicolas Petton
@ 2017-07-14  6:30             ` Eli Zaretskii
  2017-07-14  7:43               ` James Cloos
  2017-07-14 11:16               ` Nicolas Petton
  0 siblings, 2 replies; 24+ messages in thread
From: Eli Zaretskii @ 2017-07-14  6:30 UTC (permalink / raw)
  To: Nicolas Petton, cloos; +Cc: mvoteiza, emacs-devel

> From: Nicolas Petton <nicolas@petton.fr>
> Cc: emacs-devel@gnu.org
> Date: Thu, 13 Jul 2017 22:18:20 +0200
> 
> I think that the least surprising behavior would be to use the same
> fixed width font family for line numbers and for buffer content by
> default.

Fine.  I've now reverted the change which triggered these discussions.
From now on, if someone has their default face set to use a
variable-pitch font, they will have to customize line-number face to
countermand that.  (Or maybe someone else will come up with a better
solution.)  Sorry, James: I tried.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-13 20:15                 ` Alex
@ 2017-07-14  6:47                   ` Alex
  2017-07-14  7:12                     ` Eli Zaretskii
  2017-07-14  6:56                   ` Eli Zaretskii
  1 sibling, 1 reply; 24+ messages in thread
From: Alex @ 2017-07-14  6:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Alex <agrambot@gmail.com> writes:

> In Emacs 25.2 on Windows 7, the default face is Courier New, a serif
> font. GNU/Linux defaults to DejaVu Sans Mono, a sans-serif font.

Sorry, I was a bit careless in stating that GNU/Linux, as a whole,
defaults to that face; fontconfig on my desktop systems does.

In any case, I find it odd that courier is the first fallback in
"Monospace". I suppose this may be what you meant by "the code tells a
different story". What about searching first for some other popular
sans-serif alternatives, such as Liberation Mono?




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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-13 20:15                 ` Alex
  2017-07-14  6:47                   ` Alex
@ 2017-07-14  6:56                   ` Eli Zaretskii
  2017-07-15  0:09                     ` Alex
  1 sibling, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2017-07-14  6:56 UTC (permalink / raw)
  To: Alex; +Cc: mvoteiza, emacs-devel, yuri.v.khan

> From: Alex <agrambot@gmail.com>
> Cc: Yuri Khan <yuri.v.khan@gmail.com>,  mvoteiza@udel.edu,  emacs-devel@gnu.org
> Date: Thu, 13 Jul 2017 14:15:17 -0600
> 
> > The name alone might suggest that, but the code tells a different
> > story.  I thought you looked in the code and saw there something I
> > missed, thus my questions.
> 
> Where does the code tell a different story? If you mean
> `face-font-family-alternatives', then I believe it is faulty (see
> below).

Faulty or not, it tells its story better than the name does.

> In Emacs 25.2 on Windows 7, the default face is Courier New, a serif
> font. GNU/Linux defaults to DejaVu Sans Mono, a sans-serif font. I don't
> see why Windows should default to a serif font. FWIW, I checked a couple
> of other popular text editors (Sublime and Atom), and they default to
> Consolas (sans-serif) on Windows.
> 
> The bigger issue here is that fixed-pitch-serif on Windows defaults to a
> sans-serif font (Consolas), and that fixed-pitch defaults to a serif
> font (Courier -- not Courier New like the default font).

Being serif or sans-serif is not the most important attribute of a
font that Emacs can use as its default.  A much more important
attribute is how many Unicode blocks and characters within those
blocks a font supports.  On my Windows XP, Courier New supports twice
as many blocks and characters as Consolas; on Windows 8.1 Consolas is
much better, but still lags in coverage behind Courier New.

So using Consolas just because other applications do that is not
necessarily TRT for Emacs; we must consider other factors of
importance to us.

> I believe the following should happen:
> 
>   * the defaults for the default face and fixed-pitch should align on
>     all systems possible
> 
>   * fixed-pitch should default to what fixed-pitch serif does now
>     (Consolas seems suitable)
> 
>   * fixed-pitch-serif should default to what the default face does
>     currently
> 
> If this is done, then changing the line-number face to plain "Monospace"
> should work fine even for Windows.

Sorry, I disagree with making these changes, certainly not for the
benefit of a minor feature such as display-line-numbers.  We have been
using Courier New by default since about forever; changing that now is
bound to send ripples all over the place, since many other face- and
font-related settings are based on that.

I have now reverted the change which prompted this sub-thread; I hope
that will make everyone (except James, perhaps ;-) happier, and we can
put this issue to rest.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-14  6:47                   ` Alex
@ 2017-07-14  7:12                     ` Eli Zaretskii
  0 siblings, 0 replies; 24+ messages in thread
From: Eli Zaretskii @ 2017-07-14  7:12 UTC (permalink / raw)
  To: Alex; +Cc: emacs-devel

> From: Alex <agrambot@gmail.com>
> Cc:  emacs-devel@gnu.org
> Date: Fri, 14 Jul 2017 00:47:42 -0600
> 
> In any case, I find it odd that courier is the first fallback in
> "Monospace". I suppose this may be what you meant by "the code tells a
> different story". What about searching first for some other popular
> sans-serif alternatives, such as Liberation Mono?

IMO it would be good to make the "Monospace" family better on
supported platforms, feel free (you or anyone else) to suggest
changes.  Just remember that the actual font families we put there
should satisfy the following basic requirements:

  . they should either come with the OS out of the box, or be free fonts
  . they should be present on all (or at least most) versions of the OS
    (if they are not available on all versions, the order in the
    family list should be tailored accordingly, with those which are
    always available last)
  . if  family looks good on one platform, but ugly on another, we
    should probably not include it

Thanks.

P.S. On my system here Courier is not a TTF/OTF font, so it looks
ugly.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-14  6:30             ` Eli Zaretskii
@ 2017-07-14  7:43               ` James Cloos
  2017-07-14 11:16               ` Nicolas Petton
  1 sibling, 0 replies; 24+ messages in thread
From: James Cloos @ 2017-07-14  7:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: mvoteiza, Nicolas Petton, emacs-devel

>>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:

EZ> if someone has their default face set to use a variable-pitch font,
EZ> they will have to customize line-number face to countermand that.
EZ> Sorry, James: I tried.

That is OK.

I suspect I'll make most use of native line numbers when editing large
source code files, where I'll not use variable-pitch-mode.

(At least until v-p-m supports fixed-pitch line indents. :)

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 0x997A9F17ED7DAEA6



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-14  6:30             ` Eli Zaretskii
  2017-07-14  7:43               ` James Cloos
@ 2017-07-14 11:16               ` Nicolas Petton
  2017-07-14 12:38                 ` Eli Zaretskii
  1 sibling, 1 reply; 24+ messages in thread
From: Nicolas Petton @ 2017-07-14 11:16 UTC (permalink / raw)
  To: Eli Zaretskii, cloos; +Cc: mvoteiza, emacs-devel

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

Eli Zaretskii <eliz@gnu.org> writes:

> Fine.  I've now reverted the change which triggered these discussions.
> From now on, if someone has their default face set to use a
> variable-pitch font, they will have to customize line-number face to
> countermand that.  (Or maybe someone else will come up with a better
> solution.)  Sorry, James: I tried.

I didn't mean to make you revert this commit if you disagree, but rather
to discuss and try to find the best way to do this.

Cheers,
Nico

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-14 11:16               ` Nicolas Petton
@ 2017-07-14 12:38                 ` Eli Zaretskii
  0 siblings, 0 replies; 24+ messages in thread
From: Eli Zaretskii @ 2017-07-14 12:38 UTC (permalink / raw)
  To: Nicolas Petton; +Cc: mvoteiza, cloos, emacs-devel

> From: Nicolas Petton <nicolas@petton.fr>
> Cc: mvoteiza@udel.edu, emacs-devel@gnu.org
> Date: Fri, 14 Jul 2017 13:16:02 +0200
> 
> > Fine.  I've now reverted the change which triggered these discussions.
> > From now on, if someone has their default face set to use a
> > variable-pitch font, they will have to customize line-number face to
> > countermand that.  (Or maybe someone else will come up with a better
> > solution.)  Sorry, James: I tried.
> 
> I didn't mean to make you revert this commit if you disagree, but rather
> to discuss and try to find the best way to do this.

I didn't mean to say that you meant that, just that your opinion was
the proverbial straw.

If someone comes up with a better way of doing this than what I found,
we can still make whatever changes that takes.



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-14  6:56                   ` Eli Zaretskii
@ 2017-07-15  0:09                     ` Alex
  2017-07-15  7:08                       ` Eli Zaretskii
  0 siblings, 1 reply; 24+ messages in thread
From: Alex @ 2017-07-15  0:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: mvoteiza, emacs-devel, yuri.v.khan

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Alex <agrambot@gmail.com>
>> Cc: Yuri Khan <yuri.v.khan@gmail.com>,  mvoteiza@udel.edu,  emacs-devel@gnu.org
>> Date: Thu, 13 Jul 2017 14:15:17 -0600
>> 
>> Where does the code tell a different story? If you mean
>> `face-font-family-alternatives', then I believe it is faulty (see
>> below).
>
> Faulty or not, it tells its story better than the name does.

I agree, though I believe that the end result is counterintuitive
(particularly in Windows). Perhaps there's no helping it.

> Being serif or sans-serif is not the most important attribute of a
> font that Emacs can use as its default.  A much more important
> attribute is how many Unicode blocks and characters within those
> blocks a font supports.  On my Windows XP, Courier New supports twice
> as many blocks and characters as Consolas; on Windows 8.1 Consolas is
> much better, but still lags in coverage behind Courier New.
>
> So using Consolas just because other applications do that is not
> necessarily TRT for Emacs; we must consider other factors of
> importance to us.

That makes sense. I didn't realize Consolas lagged in that department.

>> I believe the following should happen:
>> 
>>   * the defaults for the default face and fixed-pitch should align on
>>     all systems possible
>> 
>>   * fixed-pitch should default to what fixed-pitch serif does now
>>     (Consolas seems suitable)
>> 
>>   * fixed-pitch-serif should default to what the default face does
>>     currently
>> 
>> If this is done, then changing the line-number face to plain "Monospace"
>> should work fine even for Windows.
>
> Sorry, I disagree with making these changes, certainly not for the
> benefit of a minor feature such as display-line-numbers.  We have been
> using Courier New by default since about forever; changing that now is
> bound to send ripples all over the place, since many other face- and
> font-related settings are based on that.

That's unfortunate. What about just removing Consolas from the
"Monospace Serif" list, since it's the only sans-serif font in that
list? That would make things a bit more consistent. It would mean that
Windows would default to courier though, so maybe it's not worth it.

> I have now reverted the change which prompted this sub-thread; I hope
> that will make everyone (except James, perhaps ;-) happier, and we can
> put this issue to rest.

Thanks, that's good to hear. However, it is a bit disappointing that
there's no easy way to specify a face that uses the default face if it's
monospaced, and otherwise falls back to a font that is.

Alternatively, what about using fixed-pitch-serif for line-number on
Windows, and fixed-pitch on other platforms?



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

* Re: master d014a5e: Use fixed-pitch font for display-line-numbers
  2017-07-15  0:09                     ` Alex
@ 2017-07-15  7:08                       ` Eli Zaretskii
  0 siblings, 0 replies; 24+ messages in thread
From: Eli Zaretskii @ 2017-07-15  7:08 UTC (permalink / raw)
  To: Alex; +Cc: mvoteiza, emacs-devel, yuri.v.khan

> From: Alex <agrambot@gmail.com>
> Cc: yuri.v.khan@gmail.com,  mvoteiza@udel.edu,  emacs-devel@gnu.org
> Date: Fri, 14 Jul 2017 18:09:43 -0600
> 
> What about just removing Consolas from the "Monospace Serif" list,
> since it's the only sans-serif font in that list? That would make
> things a bit more consistent. It would mean that Windows would
> default to courier though, so maybe it's not worth it.

Yes, Courier looks ugly on Windows.  Moreover, the entire Monospace
Serif family was invented to fix a problem with displaying
tex-verbatim and Info-quoted faces (see bug#19889), which are quite
important to us.  Fixing that minor annoyance wasn't simple, and it
was done just a year ago, so I wouldn't rush to make changes in this
quite fragile setup.  (Note that the faces using this family must be
different from default, where they are used for tex-verbatim and
Info-quoted.  Also note that Consolas is also for macOS.)  It's
probably a good idea to add a comment there saying that Consolas is
sans-serif, though.

> > I have now reverted the change which prompted this sub-thread; I hope
> > that will make everyone (except James, perhaps ;-) happier, and we can
> > put this issue to rest.
> 
> Thanks, that's good to hear. However, it is a bit disappointing that
> there's no easy way to specify a face that uses the default face if it's
> monospaced, and otherwise falls back to a font that is.

Maybe there is, it's just that I couldn't think of one.  Maybe the
problem that led me to try to use something other than default is not
a grave one, and doesn't require an out-of-the-box solution; we should
wait and see.

> Alternatively, what about using fixed-pitch-serif for line-number on
> Windows, and fixed-pitch on other platforms?

Only if necessary, as platform-specific defaults should be avoided as
much as possible.  (There's also the NS case, where I'm not sure what
happens.)



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

end of thread, other threads:[~2017-07-15  7:08 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170711151708.4322.33014@vcs0.savannah.gnu.org>
     [not found] ` <20170711151709.2AE9822E0A@vcs0.savannah.gnu.org>
2017-07-12  0:09   ` master d014a5e: Use fixed-pitch font for display-line-numbers Mark Oteiza
2017-07-12  2:39     ` Eli Zaretskii
2017-07-12  3:18       ` Mark Oteiza
2017-07-12 14:25         ` Eli Zaretskii
2017-07-13 20:18           ` Nicolas Petton
2017-07-14  6:30             ` Eli Zaretskii
2017-07-14  7:43               ` James Cloos
2017-07-14 11:16               ` Nicolas Petton
2017-07-14 12:38                 ` Eli Zaretskii
2017-07-12  8:06     ` Yuri Khan
2017-07-12 14:36       ` Eli Zaretskii
2017-07-13  6:13         ` Yuri Khan
2017-07-13 15:57           ` Eli Zaretskii
2017-07-13 18:07             ` Yuri Khan
2017-07-13 19:02               ` Eli Zaretskii
2017-07-13 19:17                 ` Yuri Khan
2017-07-13 19:49                   ` Eli Zaretskii
2017-07-13 20:15                 ` Alex
2017-07-14  6:47                   ` Alex
2017-07-14  7:12                     ` Eli Zaretskii
2017-07-14  6:56                   ` Eli Zaretskii
2017-07-15  0:09                     ` Alex
2017-07-15  7:08                       ` Eli Zaretskii
2017-07-14  3:00                 ` Stefan Monnier

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