GNU bug report logs - #18077
24.4.50; Info-quoted face should inherit default

Previous Next

Package: emacs;

Reported by: swiesner <at> lunaryorn.com

Date: Tue, 22 Jul 2014 08:17:01 UTC

Severity: minor

Found in version 24.4.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18077 in the body.
You can then email your comments to 18077 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Tue, 22 Jul 2014 08:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to swiesner <at> lunaryorn.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 22 Jul 2014 08:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: swiesner <at> lunaryorn.com
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; Info-quoted face should inherit default
Date: Tue, 22 Jul 2014 10:15:38 +0200
Currently, the `Info-quoted' face is defined as follows in info.el:

(defface Info-quoted
  '((t :family "courier"))
  "Face used for quoted elements.")

I do no think that mode faces should *hard-code* specific font families,
and thus bypass any customization of the default face that the user
might have made to pick their preferred font.

Besides, courier is not a particularly friendly choice.  There is no
specific font with that name.  The actual font depends on the font
configuration and aliasing picked by the OS and the user, and depending
on the quality of this configuration the appearance of this font varies
greatly.  If the configuration is particularly poor, or if a proper
substitute font is missing, Emacs might even fall back to X11 bitmap
fonts, which are particularly ugly on modern screens.

So just because it's pretty on your screen, it doesn't need to be pretty
on some else's screen.

Please remove the hard-coded font family and inherit from the default
face instead.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Fri, 25 Jul 2014 08:26:01 GMT) Full text and rfc822 format available.

Message #8 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: swiesner <at> lunaryorn.com
Cc: 18077 <at> debbugs.gnu.org
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Fri, 25 Jul 2014 11:25:54 +0300
> From: swiesner <at> lunaryorn.com
> Date: Tue, 22 Jul 2014 10:15:38 +0200
> 
> Currently, the `Info-quoted' face is defined as follows in info.el:
> 
> (defface Info-quoted
>   '((t :family "courier"))
>   "Face used for quoted elements.")

This also violates the convention that Info face names start with a
lower-case letter.

> I do no think that mode faces should *hard-code* specific font families,
> and thus bypass any customization of the default face that the user
> might have made to pick their preferred font.
> 
> Besides, courier is not a particularly friendly choice.  There is no
> specific font with that name.  The actual font depends on the font
> configuration and aliasing picked by the OS and the user, and depending
> on the quality of this configuration the appearance of this font varies
> greatly.  If the configuration is particularly poor, or if a proper
> substitute font is missing, Emacs might even fall back to X11 bitmap
> fonts, which are particularly ugly on modern screens.
> 
> So just because it's pretty on your screen, it doesn't need to be pretty
> on some else's screen.
> 
> Please remove the hard-coded font family and inherit from the default
> face instead.

Thank you for your report.

Would you like to suggest a patch for fixing this problem?  Please
note that the underlying issue here is that the font should provide
nice-looking glyphs for the Unicode quote characters.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Fri, 25 Jul 2014 10:27:02 GMT) Full text and rfc822 format available.

Message #11 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Sebastian Wiesner <swiesner <at> lunaryorn.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18077 <at> debbugs.gnu.org
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Fri, 25 Jul 2014 12:25:47 +0200
> > I do no think that mode faces should *hard-code* specific font families,
> > and thus bypass any customization of the default face that the user
> > might have made to pick their preferred font.
> > 
> > Besides, courier is not a particularly friendly choice.  There is no
> > specific font with that name.  The actual font depends on the font
> > configuration and aliasing picked by the OS and the user, and depending
> > on the quality of this configuration the appearance of this font varies
> > greatly.  If the configuration is particularly poor, or if a proper
> > substitute font is missing, Emacs might even fall back to X11 bitmap
> > fonts, which are particularly ugly on modern screens.
> > 
> > So just because it's pretty on your screen, it doesn't need to be pretty
> > on some else's screen.
> > 
> > Please remove the hard-coded font family and inherit from the default
> > face instead.
> 
> Thank you for your report.
> 
> Would you like to suggest a patch for fixing this problem?  Please
> note that the underlying issue here is that the font should provide
> nice-looking glyphs for the Unicode quote characters.

I do not think that I am in a position to suggest a patch that could generally 
fix this problem.  I use Emacs only in two different environments, and have no 
idea of what limits and constraints Emacs must obey with regards to fonts to 
remain portable across various platforms.

I can only say that for my case it would be entirely sufficient to simply make 
Info-quoted inherit from default, i.e. use '((:inherit default)) as spec in 
defface.  

But I only use a GUI Emacs, and only on very recent and modern systems (Arch 
Linux with KDE, and OS X 10.9), where Unicode fonts are less of a problem.  On 
these systems Emacs typically picks a font with good unicode coverage for the 
default face automatically, e.g. DejaVu Sans Mono or a variant thereof.

Courier however does not exist as a specific family, and might be aliased to 
something entirely different than the standard monospace font of the system.  
It could be a fallback URW font, or (even worse) a built-in X11 bitmap font, 
which looks really ugly, and quite likely has much worse Unicode coverage than 
the font picked for the default face, if it even has any Unicode support at 
all.

But I do not know whether this is also the case on Windows, or on older X11 
environments, that do not use fontconfig, or even still rely on a font server.

Still, presuming that the user customized the default face to use a good font 
with reasonable character coverage (many users do, in my expierence), I think 
that it is very unlikely that "courier" is a better choice than the font of 
the default face with regards to Unicode coverage.

Also, inheriting from default seems to be the standard among other built-in 
faces.

TL;DR: My suggestion would be to simply inherit from default, with no other 
attributes set.  Sorry for the long comment.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Fri, 25 Jul 2014 12:12:02 GMT) Full text and rfc822 format available.

Message #14 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sebastian Wiesner <swiesner <at> lunaryorn.com>
Cc: 18077 <at> debbugs.gnu.org
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Fri, 25 Jul 2014 15:11:42 +0300
> From: Sebastian Wiesner <swiesner <at> lunaryorn.com>
> Cc: 18077 <at> debbugs.gnu.org
> Date: Fri, 25 Jul 2014 12:25:47 +0200
> 
> > Would you like to suggest a patch for fixing this problem?  Please
> > note that the underlying issue here is that the font should provide
> > nice-looking glyphs for the Unicode quote characters.
> 
> I do not think that I am in a position to suggest a patch that could generally 
> fix this problem.  I use Emacs only in two different environments, and have no 
> idea of what limits and constraints Emacs must obey with regards to fonts to 
> remain portable across various platforms.
> 
> I can only say that for my case it would be entirely sufficient to simply make 
> Info-quoted inherit from default, i.e. use '((:inherit default)) as spec in 
> defface.  
> 
> But I only use a GUI Emacs, and only on very recent and modern systems (Arch 
> Linux with KDE, and OS X 10.9), where Unicode fonts are less of a problem.  On 
> these systems Emacs typically picks a font with good unicode coverage for the 
> default face automatically, e.g. DejaVu Sans Mono or a variant thereof.

Character coverage is not the problem.  The problem is that some
widely used fonts that cover these characters have ugly or barely
visible glyphs for them.

> inheriting from default seems to be the standard among other
> built-in faces.

I would trust Stefan (who introduced this face) that he knows that for
quite some time, and had his reasons for not doing that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Fri, 25 Jul 2014 14:04:02 GMT) Full text and rfc822 format available.

Message #17 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Sebastian Wiesner <swiesner <at> lunaryorn.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18077 <at> debbugs.gnu.org
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Fri, 25 Jul 2014 16:03:20 +0200
[Message part 1 (text/plain, inline)]
Am Freitag, 25. Juli 2014, 15:11:42 schrieb Eli Zaretskii:
> > From: Sebastian Wiesner <swiesner <at> lunaryorn.com>
> > Cc: 18077 <at> debbugs.gnu.org
> > Date: Fri, 25 Jul 2014 12:25:47 +0200
> > 
> > > Would you like to suggest a patch for fixing this problem?  Please
> > > note that the underlying issue here is that the font should provide
> > > nice-looking glyphs for the Unicode quote characters.
> > 
> > I do not think that I am in a position to suggest a patch that could
> > generally fix this problem.  I use Emacs only in two different
> > environments, and have no idea of what limits and constraints Emacs must
> > obey with regards to fonts to remain portable across various platforms.
> > 
> > I can only say that for my case it would be entirely sufficient to simply
> > make Info-quoted inherit from default, i.e. use '((:inherit default)) as
> > spec in defface.
> > 
> > But I only use a GUI Emacs, and only on very recent and modern systems
> > (Arch Linux with KDE, and OS X 10.9), where Unicode fonts are less of a
> > problem.  On these systems Emacs typically picks a font with good unicode
> > coverage for the default face automatically, e.g. DejaVu Sans Mono or a
> > variant thereof.
>
> Character coverage is not the problem.  The problem is that some
> widely used fonts that cover these characters have ugly or barely
> visible glyphs for them.

I see.  I doubt, though, that "courier" has generally better quote glyphs than 
those  decent modern fonts that are typically used for the default face, 
either automatically or by user customization.

Take a look at the attached images, which show the quote characters of various 
fonts in Emacs on both of my systems:  

On OS X, the quote characters of Courier aren't any better than that of the 
standard monospace faces Menlo and Monaco.  On Linux, Courier isn't even anti-
aliased.  And in both cases the quote characters of Courier are worse than 
those of Source Code Pro and Inconsolata, which are popular 3rd party fonts.

Now, I understand that my setup is just some example and by no means 
authoritative, and that Courier may look significantly different and much 
better on your Linux system.

But I'm trying to demonstrate with these examples that Courier is by no means 
*guaranteed* to have good quote characters, and can in fact be significantly 
worse than other fonts.  

IOW, there's a chance that Courier gets it right, and there's also a good 
chance that Courier gets it wrong.  And that goes for the default face as 
well:  It can either have good quotes, or bad ones. 

However, the default fonts of modern systems are typically not that bad, and 
users typically don't choose very poor fonts for their "default" face, so I 
think it's less likely for "default" to get it wrong that for "Info-quoted".  
And the latter can fail really bad, as seen in my Arch Linux example.

 
> > inheriting from default seems to be the standard among other
> > built-in faces.
> 
> I would trust Stefan (who introduced this face) that he knows that for
> quite some time, and had his reasons for not doing that.

I'd trust Stefan to the end of the universe, for sure, but he might just have 
been lucky to have a proper Courier variant installed on his own systems.  
Even he can't test a face on each and every font setup out there :)
[OS X.png (image/png, attachment)]
[Arch Linux.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Fri, 25 Jul 2014 22:38:04 GMT) Full text and rfc822 format available.

Message #20 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: swiesner <at> lunaryorn.com
Cc: 18077 <at> debbugs.gnu.org
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Fri, 25 Jul 2014 18:37:51 -0400
> Please remove the hard-coded font family and inherit from the default
> face instead.

Inheriting from default would be equivalent to defining the attributes
as just nil.

The whole purpose of this is to make quoted text appear different, so we
don't want to use the default face.

I agree that a specific family is kind of annoying and theoretically
problematic, but it sounds too hypothetical to bother fixing (and to
know how to fix).

Do you have a concrete situation at hand?
Maybe we can address the problem with a a bit more fiddling of
face-font-family-alternatives.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Fri, 25 Jul 2014 22:56:01 GMT) Full text and rfc822 format available.

Message #23 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Sebastian Wiesner <swiesner <at> lunaryorn.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 18077 <at> debbugs.gnu.org
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Sat, 26 Jul 2014 00:55:47 +0200
Am 26.07.2014 um 00:37 schrieb Stefan Monnier <monnier <at> iro.umontreal.ca>:

>> Please remove the hard-coded font family and inherit from the default
>> face instead.
> 
> Inheriting from default would be equivalent to defining the attributes
> as just nil.
> 
> The whole purpose of this is to make quoted text appear different, so we
> don't want to use the default face.

A different style or color would not be sufficient?

> I agree that a specific family is kind of annoying and theoretically
> problematic, but it sounds too hypothetical to bother fixing (and to
> know how to fix).
> 
> Do you have a concrete situation at hand?
> Maybe we can address the problem with a a bit more fiddling of
> face-font-family-alternatives.

With respect, I mean no offense, but did you actually look at the screenshots that I attached to my previous mail?  Did you notice the different between “Courier” and “Source Code Pro” (which is my default face) in the Arch Linux screenshot? 

It’s not at all hypothetical.



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Sat, 26 Jul 2014 07:48:02 GMT) Full text and rfc822 format available.

Message #26 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 18077 <at> debbugs.gnu.org, swiesner <at> lunaryorn.com
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Sat, 26 Jul 2014 09:47:00 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> The whole purpose of this is to make quoted text appear different, so we
> don't want to use the default face.

That obviously fails if the default face is the same as courier (which
is the default without Fontconfig support).

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Sat, 26 Jul 2014 08:04:01 GMT) Full text and rfc822 format available.

Message #29 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Sebastian Wiesner <swiesner <at> lunaryorn.com>
Cc: 18077 <at> debbugs.gnu.org
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Sat, 26 Jul 2014 04:03:50 -0400
>> The whole purpose of this is to make quoted text appear different, so we
>> don't want to use the default face.
> A different style or color would not be sufficient?

To me "courier" is a different style.

Making it bold or italic or colored would not really match my
expectations as a reader of such documentation.

> With respect, I mean no offense, but did you actually look at the
> screenshots that I attached to my previous mail?

No, I didn't notice them, and they don't appear very well in my tty
connection ;-)

Have you looked at whether or not face-font-family-alternatives would
provide a good fix?


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Sat, 26 Jul 2014 09:00:03 GMT) Full text and rfc822 format available.

Message #32 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Sebastian Wiesner <swiesner <at> lunaryorn.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 18077 <at> debbugs.gnu.org
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Sat, 26 Jul 2014 10:58:56 +0200
>>> The whole purpose of this is to make quoted text appear different, so we
>>> don't want to use the default face.
>> A different style or color would not be sufficient?
> 
> To me "courier" is a different style.
> 
> Making it bold or italic or colored would not really match my
> expectations as a reader of such documentation.

What expectations?  

With respect, Info didn’t use different face for quoted text for ages.  Did the expectations of the readers change all of a sudden?

And if it’s just *your* expectation and your preference, doesn’t it belong into your personal "init.el" then?

>> With respect, I mean no offense, but did you actually look at the
>> screenshots that I attached to my previous mail?
> 
> No, I didn't notice them, and they don't appear very well in my tty
> connection ;-)

Oh, well, they are of quite some importance, since they happen to demonstrate what this is all about:  That courier is not consistently of good quality, and can be a very poor font on some systems.

> Have you looked at whether or not face-font-family-alternatives would
> provide a good fix?

I’m not sure whether I can follow.  I mean, I could add an arbitrary “good” font as alias for "courier" myself, but then I could just customize the "Info-quoted" face right away (which is what I’m doing currently).

And if the system can’t provide proper courier font or alias, how could Emacs do any better?



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Sun, 27 Jul 2014 10:17:01 GMT) Full text and rfc822 format available.

Message #35 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Sebastian Wiesner <swiesner <at> lunaryorn.com>
Cc: 18077 <at> debbugs.gnu.org
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Sun, 27 Jul 2014 06:16:39 -0400
> What expectations?

The expectations of someone reading online documentation.  Most online
documentation I can find don't use bold, italics, or colors to
distinguish "technical elements" like those that usually appear in
Info-quoted face.

> And if it’s just *your* expectation and your preference, doesn’t it belong
> into your personal "init.el" then?

I indeed have a different personal setting for Info-quoted in my .emacs,
but I wouldn't want to push this as the default.

> Oh, well, they are of quite some importance, since they happen to
> demonstrate what this is all about:  That courier is not consistently of
> good quality, and can be a very poor font on some systems.

No need for a screenshot to convince me of that, then.
When I say "concrete case" I don't mean "please try to construct
a situation where this happen" (I can usually do it myself), but rather
"did someone involuntarily bump into this in his everyday use of Emacs?".

So, IIUC, this is still hypothetical.

>> Have you looked at whether or not face-font-family-alternatives would
>> provide a good fix?
> I’m not sure whether I can follow.  I mean, I could add an arbitrary “good”
> font as alias for "courier" myself, but then I could just customize the
> "Info-quoted" face right away (which is what I’m doing currently).

On those systems that have a bad "courier" font (probably
bitmapped), do they usually have another font that looks good and is almost
identical (but obviously under a different name)?

> And if the system can’t provide proper courier font or alias, how
> could Emacs do any better?

I think the best we can do is to choose another monospaced font
with serif.  After all, face-font-family-alternatives already has
a fallback to "fixed" as a last resort, so any monospaced font with
serif would be a better fit than "fixed".


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Sun, 27 Jul 2014 20:05:02 GMT) Full text and rfc822 format available.

Message #38 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Sebastian Wiesner <swiesner <at> lunaryorn.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 18077 <at> debbugs.gnu.org
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Sun, 27 Jul 2014 22:04:22 +0200
Am 27.07.2014 um 12:16 schrieb Stefan Monnier <monnier <at> iro.umontreal.ca>:

>> What expectations?
> 
> The expectations of someone reading online documentation.  Most online
> documentation I can find don't use bold, italics, or colors to
> distinguish "technical elements" like those that usually appear in
> Info-quoted face.

Such documentation also uses proportional fonts for standard body text.  Now where’s `Info-body` with “Times New Roman”, to match this expectation as well?

>> And if it’s just *your* expectation and your preference, doesn’t it belong
>> into your personal "init.el" then?
> 
> I indeed have a different personal setting for Info-quoted in my .emacs,
> but I wouldn't want to push this as the default.
> 
>> Oh, well, they are of quite some importance, since they happen to
>> demonstrate what this is all about:  That courier is not consistently of
>> good quality, and can be a very poor font on some systems.
> 
> No need for a screenshot to convince me of that, then.
> When I say "concrete case" I don't mean "please try to construct
> a situation where this happen" (I can usually do it myself), but rather
> "did someone involuntarily bump into this in his everyday use of Emacs?“.

I did not specifically “construct” any situation where this issue appears.  I have better uses for my time than trying to provoke random issues ;)  I involuntary bumped into this, when after a rebuild of Emacs trunk I realized that all quoted text in Info had suddenly become quite ugly.

The screenshots should just demonstrate the issue, and show in how far „Courier“ can be expected to have good quote characters, as Eli demanded in his reply.

>>> Have you looked at whether or not face-font-family-alternatives would
>>> provide a good fix?
>> I’m not sure whether I can follow.  I mean, I could add an arbitrary “good”
>> font as alias for "courier" myself, but then I could just customize the
>> "Info-quoted" face right away (which is what I’m doing currently).
> 
> On those systems that have a bad "courier" font (probably
> bitmapped), do they usually have another font that looks good and is almost
> identical (but obviously under a different name)?

How am I supposed to know what fonts are available on arbitrary systems?  I can only say that on my Linux system there are various other fonts available.  Liberation Mono would probably be the one that is closest to Courier.

But whether that font is widely installed, I do not know.  As I said, font configuration and availability on Linux greatly various between distributions and individual setups.  There is no general set of fonts to rely upon on Linux beyond generic names (e.g. „Serif“, „Monospace“, „Sans“, etc.)



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Sun, 27 Jul 2014 23:24:02 GMT) Full text and rfc822 format available.

Message #41 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Sebastian Wiesner <swiesner <at> lunaryorn.com>
Cc: 18077 <at> debbugs.gnu.org
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Sun, 27 Jul 2014 19:23:30 -0400
>> The expectations of someone reading online documentation.  Most online
>> documentation I can find don't use bold, italics, or colors to
>> distinguish "technical elements" like those that usually appear in
>> Info-quoted face.
> Such documentation also uses proportional fonts for standard body text.

Indeed.  But currently, we can't do that very well because refilling
Info text is between hard and impossible (there would be other hurdles,
but that's the most immediate one).

> How am I supposed to know what fonts are available on arbitrary systems?

You don't need to know that.  You just need to know what alternative
fonts are available on the system where you bumped into the problem.

> I can only say that on my Linux system there are various other fonts
> available.  Liberation Mono would probably be the one that is closest
> to Courier.

Great, thanks.  I see my (xft, scalable) "courier" here on my Debian
machines is coming from the "foundry" "ibm", but I don't really know how
to further track its origin (e.g. which package it comes from).

> But whether that font is widely installed, I do not know.

Doesn't matter: face-font-family-alternatives is designed specifically
to overcome those problems.

E.g. we should probably change Info-quoted to use family
"monospace-serif" and then add an entry to face-font-family-alternatives
like ("monospace-serif" "Liberation Mono" "courier" "CMU Typewriter
Text" "fixed").


        Stefan






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Mon, 28 Jul 2014 00:00:03 GMT) Full text and rfc822 format available.

Message #44 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Sebastian Wiesner <swiesner <at> lunaryorn.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 18077 <at> debbugs.gnu.org
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Mon, 28 Jul 2014 02:30:37 +0300
> Take a look at the attached images, which show the quote characters of various
> fonts in Emacs on both of my systems:

For `info-quoted' we could use the same font families as e.g.
StackOverflow uses for code blocks:

    Consolas
    Menlo
    Monaco
    Lucida Console
    Liberation Mono
    DejaVu Sans Mono
    Bitstream Vera Sans Mono
    Courier New
    monospace
    serif

http://meta.stackexchange.com/questions/36176/whats-the-font-used-in-code-blocks




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Mon, 28 Jul 2014 08:13:02 GMT) Full text and rfc822 format available.

Message #47 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> jurta.org>
Cc: 18077 <at> debbugs.gnu.org, Sebastian Wiesner <swiesner <at> lunaryorn.com>
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Mon, 28 Jul 2014 04:12:53 -0400
> For `info-quoted' we could use the same font families as e.g.
> StackOverflow uses for code blocks:

It's probably a good source of inspiration, but we have to take into
account that the font of the "normal text" is usually proportional in
stackoverflow, whereas it's usually monospaced in Emacs.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Mon, 28 Jul 2014 08:34:02 GMT) Full text and rfc822 format available.

Message #50 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Sebastian Wiesner <swiesner <at> lunaryorn.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 18077 <at> debbugs.gnu.org
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Mon, 28 Jul 2014 10:33:52 +0200
Am 28.07.2014 um 01:23 schrieb Stefan Monnier <monnier <at> iro.umontreal.ca>:

>>> The expectations of someone reading online documentation.  Most online
>>> documentation I can find don't use bold, italics, or colors to
>>> distinguish "technical elements" like those that usually appear in
>>> Info-quoted face.
>> Such documentation also uses proportional fonts for standard body text.
> 
> Indeed.  But currently, we can't do that very well because refilling
> Info text is between hard and impossible (there would be other hurdles,
> but that's the most immediate one).

So Info is obviously *very* different from other online documentation, and we should probably not use other online documentation, that is not subject to these limitations, as a guideline for how Info mode should look like.  We can’t entirely match the expectations of readers of these other documentations anyway, because the constraints of the Info format won’t allow to make Info documentation really look like other documentation.  At best, we’ll have some remote similarity, and at worst, Info will look much worse (as it did in this case).

IOW, Info isn’t HTML, and we shouldn’t pretend that it was… my 2 cents.

Anyhow, the face is customizable, so it’s probably not an issue of importance, since anyone can customize it to have a sane style on their system, and we are used to customize Emacs anyway.

I do not know enough about font families and font style to discuss what fonts could be used as an alternative for Courier for use in the Info-quoted face, so if that is the solution you’d like to have, I can’t help anymore.



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18077; Package emacs. (Sat, 03 Apr 2021 23:59:01 GMT) Full text and rfc822 format available.

Message #53 received at 18077 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Juri Linkov <juri <at> jurta.org>, 18077 <at> debbugs.gnu.org,
 Sebastian Wiesner <swiesner <at> lunaryorn.com>
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Sat, 3 Apr 2021 18:58:37 -0500
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> For `info-quoted' we could use the same font families as e.g.
>> StackOverflow uses for code blocks:
>
> It's probably a good source of inspiration, but we have to take into
> account that the font of the "normal text" is usually proportional in
> stackoverflow, whereas it's usually monospaced in Emacs.

Is this now fixed by this commit, or is there more to do here?

    Author: Paul Eggert <eggert <at> cs.ucla.edu>
    Date:   Fri May 13 13:30:33 2016 -0700

        Improve display of tex-verbatim and Info quoted

        Problem reported by Glenn Morris (Bug#19889).
        * doc/emacs/display.texi (Standard Faces):
        * doc/lispref/display.texi (Basic Faces):
        * etc/NEWS: Mention fixed-pitch-serif.
        * lisp/faces.el (face-font-family-alternatives):
        New family alias Monospace Serif.
        (fixed-pitch-serif): New face, which uses the new family.
        * lisp/info.el (Info-quoted):
        * lisp/textmodes/tex-mode.el (tex-verbatim): Use the new face.
        * test/lisp/legacy/font-parse-tests.el (font-parse-tests--data):
        Add test case for Monospace Serif.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 04 Apr 2021 07:34:01 GMT) Full text and rfc822 format available.

Notification sent to swiesner <at> lunaryorn.com:
bug acknowledged by developer. (Sun, 04 Apr 2021 07:34:01 GMT) Full text and rfc822 format available.

Message #58 received at 18077-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 18077-done <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca,
 swiesner <at> lunaryorn.com
Subject: Re: bug#18077: 24.4.50; Info-quoted face should inherit default
Date: Sun, 04 Apr 2021 10:33:30 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Sat, 3 Apr 2021 18:58:37 -0500
> Cc: 18077 <at> debbugs.gnu.org, Sebastian Wiesner <swiesner <at> lunaryorn.com>
> 
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> 
> >> For `info-quoted' we could use the same font families as e.g.
> >> StackOverflow uses for code blocks:
> >
> > It's probably a good source of inspiration, but we have to take into
> > account that the font of the "normal text" is usually proportional in
> > stackoverflow, whereas it's usually monospaced in Emacs.
> 
> Is this now fixed by this commit, or is there more to do here?
> 
>     Author: Paul Eggert <eggert <at> cs.ucla.edu>
>     Date:   Fri May 13 13:30:33 2016 -0700
> 
>         Improve display of tex-verbatim and Info quoted

I think that commit changed things sufficiently to consider the issue
closed, and any further issues with what we use nowadays should be
submitted as a new bug report with updated facts and complaints.

Closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 02 May 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 190 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.