From: Paul Eggert <eggert@cs.ucla.edu>
To: Glenn Morris <rgm@gnu.org>
Cc: 19889@debbugs.gnu.org
Subject: bug#19889: bug#22207: emacs-25 mishandles info code text on Fedora 23
Date: Sat, 7 May 2016 09:56:12 -0700 [thread overview]
Message-ID: <572E1E2C.3050206@cs.ucla.edu> (raw)
In-Reply-To: <3q4mab7xv7.fsf_-_@fencepost.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 538 bytes --]
Glenn Morris wrote:
> Thanks, but it makes no difference for me on RHEL7.
> Emacs still uses the same poor non-xft font:
>
> x:-adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1
>
> (The addition of fixed-pitch-serif as a base face is of course desirable.)
Thanks for checking. I reproduced your problem on Ubuntu 16.04 by installing the
optional package xfonts-75dpi. Please try the attached patch to emacs-25 instead
of what I sent earlier. This patch tries to address Eli's comments, which I'll
follow up on separately.
[-- Attachment #2: 0001-Improve-display-of-tex-verbatim-and-Info-quoted.patch --]
[-- Type: text/x-diff, Size: 5072 bytes --]
From e17028f4319ba6f6979fd4f5003e3f55b138e8d2 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sat, 7 May 2016 09:50:59 -0700
Subject: [PATCH] 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.
---
doc/emacs/display.texi | 3 +++
doc/lispref/display.texi | 1 +
etc/NEWS | 4 ++++
lisp/faces.el | 29 +++++++++++++++++++++++++++++
lisp/info.el | 2 +-
lisp/textmodes/tex-mode.el | 3 +--
6 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 8039291..83be85f3 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -613,6 +613,9 @@ Standard Faces
This face forces use of a fixed-width font. It's reasonable to
customize this face to use a different fixed-width font, if you like,
but you should not make it a variable-width font.
+@item fixed-pitch-serif
+This face is like @code{fixed-pitch}, except the font has serifs and
+looks more like traditional typewriting.
@cindex variable-pitch face
@item variable-pitch
This face forces use of a variable-width font.
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 181bff0..087d6ba 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -3017,6 +3017,7 @@ Basic Faces
@itemx bold-italic
@itemx underline
@itemx fixed-pitch
+@itemx fixed-pitch-serif
@itemx variable-pitch
These have the attributes indicated by their names (e.g., @code{bold}
has a bold @code{:weight} attribute), with all other attributes
diff --git a/etc/NEWS b/etc/NEWS
index 785d14b..242d3fc 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1761,6 +1761,10 @@ calculation. This function is different from 'window-body-width' in
that it accounts for (i) continuation glyphs, (ii) the size of the
font, and (iii) the specified window.
++++
+*** New basic face 'fixed-pitch-serif', for a fixed-width font with serifs.
+The Info-quoted and tex-verbatim faces now default to inheriting from it.
+
---
** New utilities in subr-x.el:
diff --git a/lisp/faces.el b/lisp/faces.el
index fddc036..b1ea0f0 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -98,7 +98,31 @@ face-font-selection-order
(defcustom face-font-family-alternatives
(mapcar (lambda (arg) (mapcar 'purecopy arg))
'(("Monospace" "courier" "fixed")
+
+ ;; Monospace Serif is an Emacs invention, intended to work around
+ ;; portability problems when using Courier. It should work well
+ ;; when combined with Monospaced and with other standard fonts.
+ ("Monospace Serif"
+
+ ;; This looks good on GNU/Linux.
+ "Courier 10 Pitch"
+ ;; This looks good on MS-Windows and OS X.
+ "Consolas"
+ ;; This looks good on OS X. "Courier" looks good too, but is
+ ;; jagged on GNU/Linux and so is listed later as "courier".
+ "Courier Std"
+ ;; Although these are anti-aliased, they are a bit faint compared
+ ;; to the above.
+ "FreeMono" "Nimbus Mono L"
+ ;; These are aliased and look jagged.
+ "courier" "fixed"
+ ;; Omit Courier New, as it is the default MS-Windows font and so
+ ;; would look no different, and is pretty faint on other platforms.
+ )
+
+ ;; This is present for backward compatibility.
("courier" "CMU Typewriter Text" "fixed")
+
("Sans Serif" "helv" "helvetica" "arial" "fixed")
("helv" "helvetica" "arial" "fixed")))
"Alist of alternative font family names.
@@ -2280,6 +2304,11 @@ fixed-pitch
"The basic fixed-pitch face."
:group 'basic-faces)
+(defface fixed-pitch-serif
+ '((t :family "Monospace Serif"))
+ "The basic fixed-pitch face with serifs."
+ :group 'basic-faces)
+
(defface variable-pitch
'((((type w32))
;; This is a kludgy workaround for an issue discussed in
diff --git a/lisp/info.el b/lisp/info.el
index 6426cfc..ae46fba 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -4236,7 +4236,7 @@ Info-mode-syntax-table
"Syntax table used in `Info-mode'.")
(defface Info-quoted
- '((t :family "courier"))
+ '((t :inherit fixed-pitch-serif))
"Face used for quoted elements.")
(defvar Info-mode-font-lock-keywords
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 3ac68bd..8545a09 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -801,8 +801,7 @@ 'tex-math-face
(defvar tex-math-face 'tex-math)
(defface tex-verbatim
- ;; '((t :inherit font-lock-string-face))
- '((t :family "courier"))
+ '((t :inherit fixed-pitch-serif))
"Face used to highlight TeX verbatim environments."
:group 'tex)
(define-obsolete-face-alias 'tex-verbatim-face 'tex-verbatim "22.1")
--
2.7.4
next prev parent reply other threads:[~2016-05-07 16:56 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-18 18:25 bug#22207: emacs-25 mishandles info code text on Fedora 23 Paul Eggert
2015-12-18 18:57 ` Glenn Morris
2015-12-18 19:40 ` Eli Zaretskii
2015-12-18 19:49 ` Glenn Morris
2015-12-18 20:32 ` Eli Zaretskii
2015-12-19 14:21 ` Wolfgang Jenkner
2015-12-19 14:42 ` Eli Zaretskii
2015-12-19 15:28 ` Wolfgang Jenkner
2015-12-19 16:07 ` Wolfgang Jenkner
2015-12-19 16:57 ` Eli Zaretskii
2015-12-19 19:16 ` Glenn Morris
2015-12-19 19:21 ` Eli Zaretskii
2015-12-19 19:25 ` Eli Zaretskii
2015-12-19 19:31 ` Glenn Morris
2015-12-19 19:51 ` Eli Zaretskii
2015-12-20 3:40 ` Glenn Morris
2015-12-20 15:44 ` Eli Zaretskii
2015-12-20 21:14 ` Paul Eggert
2015-12-21 16:18 ` Eli Zaretskii
2016-02-13 1:29 ` Paul Eggert
2016-02-13 8:53 ` Eli Zaretskii
2016-02-13 18:33 ` Paul Eggert
2016-05-05 20:48 ` Paul Eggert
2016-05-05 21:29 ` Glenn Morris
2016-05-05 22:54 ` bug#19889: " Paul Eggert
2016-05-06 6:49 ` Eli Zaretskii
2016-05-06 15:47 ` Glenn Morris
2016-05-06 15:58 ` Eli Zaretskii
2016-05-06 16:24 ` Paul Eggert
2016-05-06 17:15 ` Eli Zaretskii
2016-05-06 15:59 ` Paul Eggert
2016-05-06 17:18 ` Eli Zaretskii
2016-05-06 18:24 ` Paul Eggert
2016-05-06 19:01 ` Eli Zaretskii
2016-05-07 3:03 ` Paul Eggert
2016-05-07 7:01 ` Eli Zaretskii
2016-05-07 17:05 ` Paul Eggert
2016-05-07 17:27 ` Eli Zaretskii
2016-05-07 20:37 ` Paul Eggert
2016-05-13 21:33 ` Paul Eggert
2016-05-14 7:48 ` Eli Zaretskii
2016-05-14 8:24 ` Paul Eggert
2016-05-14 9:28 ` Eli Zaretskii
2016-05-06 19:32 ` Stefan Monnier
2016-05-07 6:50 ` Eli Zaretskii
2016-05-06 20:08 ` bug#19889: Glenn Morris
2016-05-06 20:22 ` bug#19889: Glenn Morris
2016-05-07 6:53 ` bug#19889: Eli Zaretskii
2016-05-07 16:56 ` Paul Eggert [this message]
2016-05-06 6:37 ` bug#19889: bug#22207: emacs-25 mishandles info code text on Fedora 23 Eli Zaretskii
2016-05-06 16:02 ` bug#19889: tex-verbatim face: don't specify :family? Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=572E1E2C.3050206@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=19889@debbugs.gnu.org \
--cc=rgm@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.